summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-12-22 11:14:34 -0500
committerMatthias Clasen <mclasen@redhat.com>2010-12-22 11:14:34 -0500
commiteb77b474a156412fbae5b86a9fdd3b101f68bb5b (patch)
tree4de867f5b4d2d75963b13e9a305198884b62bc5b
parent2c2b9d9fde78d721a59798ff8c55db78f02beef9 (diff)
Make the sound panel build against recent GTK+
Switch to use GIO for launching preferences instead of gdk_spawn.
-rw-r--r--panels/sound/gvc-stream-status-icon.c12
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 02c095fe2..3d9a6781e 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