Mercurial > hg > Feedworm
comparison MainWindow.py @ 83:19394162a39d
Automated merge with ssh://xanthippe.dyndns.org//home/dirk/Projekte/Python/Feedworm
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Sun, 22 Aug 2010 16:35:08 +0200 |
parents | 2dd6e6894772 |
children | bacf42da9e36 |
comparison
equal
deleted
inserted
replaced
81:050748b596a8 | 83:19394162a39d |
---|---|
76 self.openSelectedEntryInBrowser() | 76 self.openSelectedEntryInBrowser() |
77 else: | 77 else: |
78 self.openSelectedEntryInWebView() | 78 self.openSelectedEntryInWebView() |
79 | 79 |
80 def openSelectedEntryInWebView(self): | 80 def openSelectedEntryInWebView(self): |
81 message = "Open %s ..." % (self.selectedEntry.title) | |
82 self._updateStatusBar(message) | |
81 url = QUrl(self.selectedEntry.link) | 83 url = QUrl(self.selectedEntry.link) |
82 self.ui.webView.load(url) | 84 self.ui.webView.load(url) |
83 self.ui.webView.show() | 85 self.ui.webView.show() |
84 | 86 |
85 def openSelectedEntryInBrowser(self): | 87 def openSelectedEntryInBrowser(self): |
88 message = "Open %s in external browser", (self.selectedEntry.title) | |
89 self._updateStatusBar(message) | |
86 # TODO make browser configurable | 90 # TODO make browser configurable |
87 browser = "/usr/local/bin/opera" | 91 browser = "/usr/local/bin/opera" |
88 subprocess.Popen([browser, self.selectedEntry.link]) | 92 subprocess.Popen([browser, self.selectedEntry.link]) |
89 | 93 |
90 def toggleReadOnSelectedEntry(self): | 94 def toggleReadOnSelectedEntry(self): |
103 if not success: | 107 if not success: |
104 return | 108 return |
105 | 109 |
106 if addFeed.exception is not None: | 110 if addFeed.exception is not None: |
107 message = "Error while adding feed: " + str(addFeed.exception) | 111 message = "Error while adding feed: " + str(addFeed.exception) |
108 self.ui.statusbar.showMessage(message, STATUS_MESSAGE_DISPLAY_MILLIS) | 112 self._updateStatusBar(message) |
109 else: | 113 else: |
110 self.session.commit() | 114 self.session.commit() |
111 self.updateFeedList() | 115 self.updateFeedList() |
112 | 116 |
113 def showPreferences(self): | 117 def showPreferences(self): |
116 | 120 |
117 def showFeedSettings(self): | 121 def showFeedSettings(self): |
118 feedSettings = FeedSettings(self.session, self.selectedFeed) | 122 feedSettings = FeedSettings(self.session, self.selectedFeed) |
119 feedSettings.exec_() | 123 feedSettings.exec_() |
120 | 124 |
125 def _updateStatusBar(self, message): | |
126 self.ui.statusbar.showMessage(message, STATUS_MESSAGE_DISPLAY_MILLIS) | |
121 | 127 |