]> spindle.queued.net Git - midori/commitdiff
Special-case Liferea because a helper script may be required
authorChristian Dywan <christian@twotoasts.de>
Sun, 1 May 2011 04:57:41 +0000 (06:57 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 1 May 2011 04:57:41 +0000 (06:57 +0200)
The script is usually installed but not used unless the user
manually picks it, which is far from user-friendly.

midori/midori-browser.c

index 4d982e80739e1576668e08f2437e9589305c6793..9f528279590716d7ad1efb28296b45a6cb2aae2c 100644 (file)
@@ -2341,7 +2341,14 @@ midori_browser_subscribe_to_news_feed (MidoriBrowser* browser,
                                        const gchar*   uri)
 {
     if (browser->news_aggregator && *browser->news_aggregator)
-        sokoke_spawn_program (browser->news_aggregator, uri);
+    {
+        /* Special-case Liferea because a helper script may be required */
+        if (g_str_equal (browser->news_aggregator, "liferea")
+         && g_find_program_in_path ("liferea-add-feed"))
+            sokoke_spawn_program ("liferea-add-feed", uri);
+        else
+            sokoke_spawn_program (browser->news_aggregator, uri);
+    }
     else
     {
         gchar* description = g_strdup_printf ("%s\n\n%s", uri,