completed, in_progress, queued,
bytes_downloaded, bytes_updated, bytes_per_second,
feed_updated):
- logger.info(feed_updated)
total = completed + in_progress + queued
- root.updateProgress(total, completed)
+ root.updateProgress(int(total), int(completed))
+
+ def articleCountUpdated(self):
+ print "article updated"
def update_started(self):
root.updateStarted()
#onlyUnread = arguments.get("onlyUnread","False")
return self._handler.generateArticlesXml(key, config.getHideReadArticles())
+ @QtCore.Slot(str,str,result=str)
+ def getNextId(self, key, articleid):
+ feed = listing.getFeed(key)
+ return feed.getNextId(articleid)
+
+ @QtCore.Slot(str,str,result=str)
+ def getPreviousId(self, key, articleid):
+ feed = listing.getFeed(key)
+ return feed.getPreviousId(articleid)
+
@QtCore.Slot(result=str)
def getCategoryXml(self):
return self._handler.generateCategoryXml()
else:
return 'True'
+ @QtCore.Slot(str, result=int)
+ def getIntSetting(self, setting):
+ if (setting == "artFontSize"):
+ return config.getArtFontSize()
+ elif (setting == "fontSize" ):
+ return config.getFontSize()
+ else:
+ return -1
+
@QtCore.Slot(str, bool)
def setBooleanSetting(self, setting, value):
if (setting == "theme"):
elif (setting == "autoupdate"):
config.setAutoUpdateEnabled(value)
config.saveConfig()
+
+ @QtCore.Slot(str, int)
+ def setIntSetting(self, setting, value):
+ if (setting == "artFontSize"):
+ config.setArtFontSize(value)
+ elif (setting == "fontSize" ):
+ config.setFontSize(value)
+ config.saveConfig()
-def main():
+ @QtCore.Slot(str, str)
+ def share(self, key, articleid):
+ feed = listing.getFeed(key)
+ title = feed.getTitle(articleid)
+ link = feed.getExternalLink(articleid)
+ description = 'Shared%20via%20FeedingIt%20on%20Meego'
+ import urllib
+ bus = dbus.SessionBus()
+ shareService = bus.get_object('com.nokia.ShareUi', '/')
+ share = shareService.get_dbus_method('share', 'com.nokia.maemo.meegotouch.ShareUiInterface')
+ #share([u'data:text/x-url;description=Support%20for%20Nokia%20Developers;title=Forum%20Nokia,http%3A%2F%2Fforum.nokia.com',])
+ share( ['data:text/x-url;title=%s;description=%s,%s' %(urllib.quote(title), description, urllib.quote(link)),] )
+def main():
if not isdir(CONFIGDIR):
try:
mkdir(CONFIGDIR)
# listen on dbus for download update progress
bus = dbus.SessionBus()
+
bus.add_signal_receiver(handler_function=controller.update_progress,
bus_name=None,
signal_name='UpdateProgress',
dbus_interface='org.marcoz.feedingit',
path='/org/marcoz/feedingit/update')
+
+ bus.add_signal_receiver(handler_function=controller.articleCountUpdated,
+ bus_name=None,
+ signal_name='ArticleCountUpdated',
+ dbus_interface='org.marcoz.feedingit',
+ path='/org/marcoz/feedingit/update')
bus.add_signal_receiver(handler_function=controller.update_started,
bus_name=None,
signal_name='UpdateStarted',
#view.show()
sys.exit(app.exec_())
-if __name__ == "__main__":
-
+if __name__ == "__main__":
main()