psa: new icon, increased listing font size
[feedingit] / psa_harmattan / feedingit / deb_dist / feedingit-0.1.0 / debian / feedingit / usr / share / feedingit / feedingit.py
index 374627f..2b63a19 100644 (file)
@@ -195,6 +195,19 @@ class Controller(QtCore.QObject):
             config.setAutoUpdateEnabled(value)
         config.saveConfig()
 
+    @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: