[gnome-control-center] Make the sound panel build against recent GTK+



commit eb77b474a156412fbae5b86a9fdd3b101f68bb5b
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Dec 22 11:14:34 2010 -0500

    Make the sound panel build against recent GTK+
    
    Switch to use GIO for launching preferences instead of gdk_spawn.

 panels/sound/gvc-stream-status-icon.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/panels/sound/gvc-stream-status-icon.c b/panels/sound/gvc-stream-status-icon.c
index 02c095f..3d9a678 100644
--- a/panels/sound/gvc-stream-status-icon.c
+++ b/panels/sound/gvc-stream-status-icon.c
@@ -216,12 +216,15 @@ static void
 on_menu_activate_open_volume_control (GtkMenuItem *item,
                                       GvcStreamStatusIcon   *icon)
 {
+        GAppInfo *app;
+        GdkAppLaunchContext *context;
         GError *error;
 
         error = NULL;
-        gdk_spawn_command_line_on_screen (gtk_widget_get_screen (icon->priv->dock),
-                                          "gnome-control-center sound",
-                                          &error);
+        context = gdk_app_launch_context_new ();
+        app = g_app_info_create_from_commandline ("gnome-control-center sound", "Sound preferences", 0, &error);
+        if (app)
+                g_app_info_launch (app, NULL, G_APP_LAUNCH_CONTEXT (context), &error);
 
         if (error != NULL) {
                 GtkWidget *dialog;
@@ -239,6 +242,9 @@ on_menu_activate_open_volume_control (GtkMenuItem *item,
                 gtk_widget_show (dialog);
                 g_error_free (error);
         }
+
+        g_object_unref (context);
+        g_object_unref (app);
 }
 
 static void



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