Mercurial > hg > Feedworm
diff FeedSettings.py @ 48:6e5219e05625
GUI for feed settings
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Sun, 16 May 2010 08:26:46 +0200 |
parents | |
children | 6bc6899f3330 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FeedSettings.py Sun May 16 08:26:46 2010 +0200 @@ -0,0 +1,29 @@ + +from PyQt4 import QtGui +from Ui_FeedSettings import Ui_FeedSettings + +class FeedSettings(QtGui.QDialog): + def __init__(self, session, feed): + QtGui.QWidget.__init__(self, None) + self.session = session + self.feed = feed + self.ui = Ui_FeedSettings() + self.ui.setupUi(self) + self.initUi() + + def initUi(self): + self.ui.autoLoadArticle.setChecked(self.feed.auto_load_entry_link) + + def autoLoadArticleChanged(self, change): + if change: + self.feed.auto_load_entry_link = True + else: + self.feed.auto_load_entry_link = False + + def accept(self): + self.session.commit() + QtGui.QDialog.accept(self) + + def reject(self): + self.session.rollback() + QtGui.QDialog.reject(self)