projects
/
feedhandler
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
59acda4
)
Example code for launching a reader app
author
Thomas Perl
<thp@thpinfo.com>
Thu, 1 Oct 2009 10:49:36 +0000
(12:49 +0200)
committer
Thomas Perl
<thp@thpinfo.com>
Thu, 1 Oct 2009 10:49:36 +0000
(12:49 +0200)
feedhandler.vala
patch
|
blob
|
history
diff --git
a/feedhandler.vala
b/feedhandler.vala
index
3ad4810
..
f36c392
100644
(file)
--- a/
feedhandler.vala
+++ b/
feedhandler.vala
@@
-22,7
+22,18
@@
public class FeedHandler : GLib.Object {
dlg.title = "feedhandler received a URL";
dlg.vbox.add(new Gtk.Label(url));
dlg.show_all();
dlg.title = "feedhandler received a URL";
dlg.vbox.add(new Gtk.Label(url));
dlg.show_all();
- dlg.run();
+ if (dlg.run() == Gtk.ResponseType.YES) {
+ /* Example code for launching a RSS application */
+ try {
+ GLib.Process.spawn_async(null,
+ {"gpodder",
+ "--fremantle",
+ "-s",
+ url}, null, GLib.SpawnFlags.SEARCH_PATH, null, null);
+ } catch (GLib.SpawnError e) {
+ stderr.printf("Can't launch: %s\n", e.message);
+ }
+ }
dlg.destroy();
message("URL received: %s", url);
loop.quit();
dlg.destroy();
message("URL received: %s", url);
loop.quit();