Mercurial > hg > Feedworm
diff MainWindow.py @ 37:22214d79ed41
database URL must be given as commandline argument now, no need for creating complicated config files. Add a menu entry for opening the selected article in browser.
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Fri, 14 May 2010 06:16:05 +0200 |
parents | f371d02fa09d |
children | 0c2578196643 |
line wrap: on
line diff
--- a/MainWindow.py Wed May 05 03:10:15 2010 +0200 +++ b/MainWindow.py Fri May 14 06:16:05 2010 +0200 @@ -8,6 +8,7 @@ from PyQt4.QtGui import QFont from Ui_MainWindow import Ui_MainWindow import FeedUpdater +import subprocess class MainWindow(QtGui.QMainWindow): def __init__(self, session=None): @@ -55,6 +56,11 @@ # TODO get status from feedUpdater and display in status area of the main window self.updateFeedList() + def openSelectedEntry(self): + # TODO make browser configurable + browser = "/usr/local/bin/opera" + subprocess.Popen([browser, self.selectedEntry.link]) + class FeedEntryItemDelegate(QtGui.QStyledItemDelegate): def __init__(self): QtGui.QStyledItemDelegate.__init__(self, None)