File xfce4-panel-plugin-smartbookmark-use-exo-open.patch of Package xfce4-panel-plugin-smartbookmark

Index: xfce4-smartbookmark-plugin-0.4.4/src/smartbookmark.c
===================================================================
--- xfce4-smartbookmark-plugin-0.4.4.orig/src/smartbookmark.c
+++ xfce4-smartbookmark-plugin-0.4.4/src/smartbookmark.c
@@ -75,18 +75,27 @@ XFCE_PANEL_PLUGIN_REGISTER_INTERNAL(smar
 
 static gboolean do_search(const char *url, const char *keyword)
 {
+    gchar *argv[] = { "exo-open", "--launch", "WebBrowser", NULL, NULL };
+    gchar *complete_url;
+    gboolean retval;
+    GError *error = NULL;
+
     DBG ("Do search");
-    gchar *execute;
-    gboolean success;
-    execute = g_strconcat("xfbrowser4  \"", url, NULL);//works better for me
-    //execute = g_strconcat("x-www-browser \"", url, NULL);
-    execute = g_strconcat(execute, keyword, NULL);
-    execute = g_strconcat(execute, "\"", NULL);
 
-    success = exec_command(execute);
-    g_free(execute);
+    complete_url = g_strconcat(url, keyword, NULL);
+    argv[3] = complete_url;
+
+    retval = g_spawn_async(NULL, (gchar **)argv, NULL,
+        G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, NULL, &error);
+
+    g_free(complete_url);
+
+    if (!retval) {
+        xfce_err("%s", error->message);
+        g_error_free(error);
+    }
 
-    return success;
+    return retval;
 }
openSUSE Build Service is sponsored by