diff MainWindow.py @ 39:0c2578196643

Disable the article menu by default, enable it when the first article is selected
author Dirk Olmes <dirk@xanthippe.ping.de>
date Fri, 14 May 2010 06:48:48 +0200
parents 22214d79ed41
children c858aab71e5b
line wrap: on
line diff
--- a/MainWindow.py	Fri May 14 06:40:12 2010 +0200
+++ b/MainWindow.py	Fri May 14 06:48:48 2010 +0200
@@ -37,6 +37,7 @@
         self.ui.feedEntryList.update()
         
     def feedEntrySelected(self, index):
+        self.ui.menuArticle.setEnabled(True)
         row = index.row()
         self.selectedEntry = self.sortedEntries[row]
         baseUrl = QUrl(self.selectedEntry.link) # TODO this is the wrong base url, figure out the correct one
@@ -56,10 +57,15 @@
             # TODO get status from feedUpdater and display in status area of the main window
             self.updateFeedList()
 
-    def openSelectedEntry(self):
+    def openSelectedEntryInBrowser(self):
         # TODO make browser configurable
         browser = "/usr/local/bin/opera"
         subprocess.Popen([browser, self.selectedEntry.link])
+        
+    def openLinkFromSelectedEntry(self):
+        url = QUrl(self.selectedEntry.link)
+        self.ui.webView.load(url)
+        self.ui.webView.show()
 
 class FeedEntryItemDelegate(QtGui.QStyledItemDelegate):
     def __init__(self):