using Osso;
using Pango;
+public static const string FEEDINGIT_SERVICE =
+ "/usr/share/dbus-1/services/feedingit.service";
+
public enum Reader {
RSS = 1,
GOOGLE,
GPODDER,
+ FEEDINGIT,
}
public class DesktopFile : GLib.KeyFile {
if (FileUtils.test("/usr/bin/gpodder", FileTest.EXISTS)) {
dlg.add_button("gPodder", Reader.GPODDER);
}
+ if (FileUtils.test(FEEDINGIT_SERVICE, FileTest.EXISTS)) {
+ dlg.add_button("FeedingIt", Reader.FEEDINGIT);
+ }
dlg.add_button("Cancel", Gtk.ResponseType.CLOSE);
dlg.title = "Select application for handling this feed";
var label = new Gtk.Label(url);
stderr.printf("Can't launch: %s\n", e.message);
}
break;
+ case Reader.FEEDINGIT:
+ add_to_feedingit(url);
+ break;
}
message("URL received: %s", url);
obj.mime_open(url);
}
+ private void add_to_feedingit(string url)
+ {
+ dynamic DBus.Object obj = conn.get_object(
+ "org.maemo.feedingit",
+ "/org/maemo/feedingit",
+ "org.maemo.feedingit");
+ obj.AddFeed(url);
+ }
+
private void open_browser(string url)
{
context.rpc_run_with_defaults("osso_browser",