[gnome-media] gst-mixer: fix lunching help



commit a3d44913336c1dfcef8cb5ea6d091f19036fa721
Author: Chris Coulson <chrisccoulson googlemail com>
Date:   Sun May 3 01:45:26 2009 +0300

    gst-mixer: fix lunching help
    
    Closes: http://bugzilla.gnome.org/show_bug.cgi?id=575152
    
    Signed-off-by: Marc-André Lureau <marcandre lureau gmail com>
---
 gst-mixer/src/window.c |   31 ++++++++++---------------------
 1 files changed, 10 insertions(+), 21 deletions(-)

diff --git a/gst-mixer/src/window.c b/gst-mixer/src/window.c
index 8438ed9..4057736 100644
--- a/gst-mixer/src/window.c
+++ b/gst-mixer/src/window.c
@@ -99,34 +99,23 @@ cb_preferences (GtkAction *action,
 }
 
 static void
-open_uri (GtkWindow *parent,
-          const char *uri)
+cb_help (GtkAction *action,
+	 GnomeVolumeControlWindow *win)
 {
-  GtkWidget *dialog;
   GdkScreen *screen;
+  GtkWidget *dialog;
   GError *error = NULL;
-  gchar *cmdline;
-
-  screen = gtk_window_get_screen (parent);
 
-  cmdline = g_strconcat ("xdg-open ", uri, NULL);
+  screen = gtk_window_get_screen (GTK_WINDOW (win));
 
-  if (gdk_spawn_command_line_on_screen (screen, cmdline, &error) == FALSE) {
-    dialog = gtk_message_dialog_new (parent, GTK_DIALOG_DESTROY_WITH_PARENT,
+  if (gtk_show_uri (screen, "ghelp:gnome-volume-control", GDK_CURRENT_TIME,
+  				&error) == FALSE) {
+  	dialog = gtk_message_dialog_new (GTK_WINDOW (win), GTK_DIALOG_DESTROY_WITH_PARENT,
                                      GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", error->message);
-    gtk_dialog_run(GTK_DIALOG(dialog));
-    gtk_widget_destroy(dialog);
-    g_error_free(error);
+    gtk_dialog_run (GTK_DIALOG (dialog));
+    gtk_widget_destroy (dialog);
+    g_error_free (error);
   }
-  g_free(cmdline);
-}
-
-
-static void
-cb_help (GtkAction *action,
-	 GnomeVolumeControlWindow *win)
-{
-  open_uri (GTK_WINDOW (win), "ghelp:gnome-volume-control");
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]