diff options
author | Jasmine Hassan <[email protected]> | 2012-12-22 03:22:09 +0200 |
---|---|---|
committer | Jasmine Hassan <[email protected]> | 2012-12-22 03:36:29 +0200 |
commit | 4d7a3ffc29a253a4387eecf1fef25d29f175103a (patch) | |
tree | 2c08cb36e735db1dde363c32e06f690a81aff759 /plugins/keyboard/msd-keyboard-xkb.c | |
parent | 79738b4bddc38257848464414a6b0f16dee86d22 (diff) | |
download | mate-settings-daemon-4d7a3ffc29a253a4387eecf1fef25d29f175103a.tar.bz2 mate-settings-daemon-4d7a3ffc29a253a4387eecf1fef25d29f175103a.tar.xz |
[keyboard] don't use deprecated gdk_spawn API.
And use:
gdk_display_get_app_launch_context() on GTK3
gdk_app_launch_context_new() on GTK2
Diffstat (limited to 'plugins/keyboard/msd-keyboard-xkb.c')
-rw-r--r-- | plugins/keyboard/msd-keyboard-xkb.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/plugins/keyboard/msd-keyboard-xkb.c b/plugins/keyboard/msd-keyboard-xkb.c index b9b5c24..d37ea05 100644 --- a/plugins/keyboard/msd-keyboard-xkb.c +++ b/plugins/keyboard/msd-keyboard-xkb.c @@ -191,11 +191,24 @@ apply_desktop_settings_cb (GSettings *settings, gchar *key, gpointer user_data static void popup_menu_launch_capplet () { + GAppInfo *info; + GdkAppLaunchContext *context; GError *error = NULL; - gdk_spawn_command_line_on_screen (gdk_screen_get_default (), - "mate-keyboard-properties", - &error); + info = g_app_info_create_from_commandline ("mate-keyboard-properties", NULL, 0, &error); + + if (info != NULL) { +# if GTK_CHECK_VERSION (3, 0, 0) + context = gdk_display_get_app_launch_context (gdk_display_get_default ()); +# else + context = gdk_app_launch_context_new (); +# endif + g_app_info_launch (info, NULL, + G_APP_LAUNCH_CONTEXT (context), &error); + + g_object_unref (info); + g_object_unref (context); + } if (error != NULL) { g_warning |