# HG changeset patch # User Dirk Olmes # Date 1281748275 -7200 # Node ID d11c3f71ac40b9d8ae6edc10d8f074abf63fb5d0 # Parent a728bbc7171e843b845f5bf8baf7449cea282eef Make update interval editable via the feed's settings dialog. diff -r a728bbc7171e -r d11c3f71ac40 FeedSettings.py --- a/FeedSettings.py Sat Aug 14 02:54:01 2010 +0200 +++ b/FeedSettings.py Sat Aug 14 03:11:15 2010 +0200 @@ -13,12 +13,18 @@ def initUi(self): self.ui.feedTitle.setText(self.feed.title) + self.ui.updateInterval.setText(str(self.feed.update_interval)) self.ui.autoLoadArticle.setChecked(self.feed.auto_load_entry_link) self.ui.alwaysOpenInBrowser.setChecked(self.feed.always_open_in_browser) def editingTitleFinished(self): title = str(self.ui.feedTitle.text()) self.feed.title = title + + def editingUpdateIntervalFinished(self): + updateInterval = int(str(self.ui.updateInterval.text())) + self.feed.update_interval = updateInterval + self.feed.incrementNextUpdateDate() def autoLoadArticleChanged(self, change): if change: diff -r a728bbc7171e -r d11c3f71ac40 Mapping.py --- a/Mapping.py Sat Aug 14 02:54:01 2010 +0200 +++ b/Mapping.py Sat Aug 14 03:11:15 2010 +0200 @@ -33,6 +33,7 @@ Column("pk", Integer, primary_key=True), Column("title", String(255), nullable=False), Column("rss_url", String(255), nullable=False), + # update interval is specified in minutes Column("update_interval", Integer, nullable=False), Column("next_update", DateTime, nullable=False), # when displaying an entry of this feed, do not display the summary but rather load diff -r a728bbc7171e -r d11c3f71ac40 Ui_FeedSettings.ui --- a/Ui_FeedSettings.ui Sat Aug 14 02:54:01 2010 +0200 +++ b/Ui_FeedSettings.ui Sat Aug 14 03:11:15 2010 +0200 @@ -7,7 +7,7 @@ 0 0 400 - 140 + 178 @@ -21,7 +21,7 @@ 20 - 100 + 135 341 32 @@ -37,7 +37,7 @@ 10 - 40 + 80 331 22 @@ -59,8 +59,8 @@ - 11 - 11 + 10 + 14 26 17 @@ -73,7 +73,7 @@ 10 - 70 + 105 371 22 @@ -82,6 +82,42 @@ when loading article's url, always use external browser + + + + 10 + 50 + 91 + 17 + + + + Update every + + + + + + 105 + 45 + 46 + 23 + + + + + + + 160 + 50 + 61 + 17 + + + + minutes + + @@ -167,10 +203,27 @@ + + updateInterval + editingFinished() + FeedSettings + editingUpdateIntervalFinished() + + + 127 + 56 + + + 199 + 88 + + + autoLoadArticleChanged() editingTitleFinished() alwaysOpenInExternalBrowser() + editingUpdateIntervalFinished()