Mercurial > hg > Feedworm
changeset 82:2dd6e6894772
update the status bar when opening a feed's rss url via WebView or external browser
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Thu, 19 Aug 2010 07:03:32 +0200 |
parents | faca24809ffd |
children | 19394162a39d |
files | MainWindow.py |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/MainWindow.py Mon Aug 16 17:37:31 2010 +0200 +++ b/MainWindow.py Thu Aug 19 07:03:32 2010 +0200 @@ -78,11 +78,15 @@ self.openSelectedEntryInWebView() def openSelectedEntryInWebView(self): + message = "Open %s ..." % (self.selectedEntry.title) + self._updateStatusBar(message) url = QUrl(self.selectedEntry.link) self.ui.webView.load(url) self.ui.webView.show() def openSelectedEntryInBrowser(self): + message = "Open %s in external browser", (self.selectedEntry.title) + self._updateStatusBar(message) # TODO make browser configurable browser = "/usr/local/bin/opera" subprocess.Popen([browser, self.selectedEntry.link]) @@ -105,7 +109,7 @@ if addFeed.exception is not None: message = "Error while adding feed: " + str(addFeed.exception) - self.ui.statusbar.showMessage(message, STATUS_MESSAGE_DISPLAY_MILLIS) + self._updateStatusBar(message) else: self.session.commit() self.updateFeedList() @@ -118,4 +122,6 @@ feedSettings = FeedSettings(self.session, self.selectedFeed) feedSettings.exec_() + def _updateStatusBar(self, message): + self.ui.statusbar.showMessage(message, STATUS_MESSAGE_DISPLAY_MILLIS)