]> gitweb.michael.orlitzky.com - xfce4-hdaps.git/blobdiff - panel-plugin/xfce4-hdaps-dialogs.c
xfce4-hdaps-dialogs.c: remove redundant double-launch.
[xfce4-hdaps.git] / panel-plugin / xfce4-hdaps-dialogs.c
index 4a995df484056e4cbfa2dbba8bb23266d1bb734f..5ac786051e2dfde205f0fc1b9b56e6a8ed8a2fb5 100644 (file)
@@ -203,15 +203,14 @@ void hdaps_configure(XfcePanelPlugin *plugin,
 static void hdaps_uri_handler(GtkAboutDialog *about,
                               const gchar *uri,
                               gpointer data) {
-    gchar *cmd;
 
-    cmd = g_strdup_printf("%s %s","xdg-open", uri);
+    gchar *cmd = g_strdup_printf("%s %s","xdg-open", uri);
+    gboolean spawn_result = g_spawn_command_line_async(cmd, NULL);
 
-    if (!g_spawn_command_line_async(cmd, NULL)) {
-      g_free(cmd);
-      cmd = g_strdup_printf("%s %s","xdg-open", uri);
-      g_spawn_command_line_async(cmd, NULL);
+    if (G_UNLIKELY(spawn_result == FALSE)) {
+      g_warning(_("Unable to open the following uri: %s"), uri);
     }
+
     g_free(cmd);
 }