self.checkAutoUpdate()
gobject.idle_add(self.build_feed_display)
+ gobject.idle_add(self.check_for_woodchuck)
def build_feed_display(self):
if not hasattr(self, 'disp'):
self.disp = DisplayFeed(self.listing, self.config)
self.disp.connect("feed-closed", self.onFeedClosed)
+ def check_for_woodchuck(self):
+ if self.config.getAskedAboutWoodchuck():
+ return
+
+ try:
+ import woodchuck
+ # It is already installed successfully.
+ self.config.setAskedAboutWoodchuck(True)
+ return
+ except ImportError:
+ pass
+
+ note = hildon.hildon_note_new_confirmation(
+ self.window,
+ "\nFeedingIt can use Woodchuck, a network transfer "
+ + "daemon, to schedule transfers more intelligently.\n\n"
+ + "Install Woodchuck? (This is recommended.)\n")
+ note.set_button_texts("Install", "Cancel")
+ note.add_button("Learn More", 42)
+
+ while True:
+ response = gtk.Dialog.run(note)
+ if response == 42:
+ open_in_browser("http://hssl.cs.jhu.edu/~neal/woodchuck")
+ continue
+
+ break
+
+ note.destroy()
+
+ if response == gtk.RESPONSE_OK:
+ open_in_browser("http://maemo.org/downloads/product/raw/Maemo5/murmeltier?get_installfile")
+ self.config.setAskedAboutWoodchuck(True)
+
def button_markAll(self, button):
for key in self.listing.getListOfFeeds():
feed = self.listing.getFeed(key)
(configParser.getint, "expiry", 24),
(configParser.getboolean, "autoupdate", False),
(configParser.getboolean, "woodchuck", True),
+ (configParser.getboolean, "askedAboutWoodchuck", False),
(configParser.getint, "updateInterval", 4),
(configParser.get, "orientation", "Automatic"),
(configParser.getboolean, "imageCache", False),
configParser.set(section, 'autoupdate', str(self.config["autoupdate"]))
configParser.set(section, 'updateInterval', str(self.config["updateInterval"]))
configParser.set(section, 'woodchuck', str(self.config["woodchuck"]))
+ configParser.set(section, 'askedAboutWoodchuck', str(self.config["askedAboutWoodchuck"]))
configParser.set(section, 'orientation', str(self.config["orientation"]))
configParser.set(section, 'imageCache', str(self.config["imageCache"]))
configParser.set(section, 'proxy', str(self.config["proxy"]))
return self.config["autoupdate"]
def getWoodchuckEnabled(self):
return self.config["woodchuck"]
+ def getAskedAboutWoodchuck(self):
+ return self.config["askedAboutWoodchuck"]
+ def setAskedAboutWoodchuck(self, value):
+ self.config["askedAboutWoodchuck"] = value
+ self.saveConfig()
def getUpdateInterval(self):
return float(self.config["updateInterval"])
def getReadFont(self):