diff options
author | Stefano Karapetsas <stefano@karapetsas.com> | 2012-12-23 11:07:10 -0800 |
---|---|---|
committer | Stefano Karapetsas <stefano@karapetsas.com> | 2012-12-23 11:07:10 -0800 |
commit | e6f5e94d1bff4dbf166d45d5f2d3fb81fcb6140c (patch) | |
tree | 4632f7f05c88598aeb882cace1fa7cc4a01d4b46 /plugins | |
parent | f6c53419d075eb15dd952119bfc0bc9db2c30fbd (diff) | |
parent | d58a3b0f224b999e8812242e3e93091cf077a59d (diff) | |
download | mate-settings-daemon-e6f5e94d1bff4dbf166d45d5f2d3fb81fcb6140c.tar.bz2 mate-settings-daemon-e6f5e94d1bff4dbf166d45d5f2d3fb81fcb6140c.tar.xz |
Merge pull request #34 from jasmineaura/develop
Remove last remaining deprecations (GDK)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/clipboard/msd-clipboard-manager.c | 4 | ||||
-rw-r--r-- | plugins/keyboard/msd-keyboard-xkb.c | 19 | ||||
-rw-r--r-- | plugins/mouse/msd-locate-pointer.c | 12 | ||||
-rw-r--r-- | plugins/xrandr/msd-xrandr-manager.c | 2 |
4 files changed, 23 insertions, 14 deletions
diff --git a/plugins/clipboard/msd-clipboard-manager.c b/plugins/clipboard/msd-clipboard-manager.c index 8f02be1..93b1858 100644 --- a/plugins/clipboard/msd-clipboard-manager.c +++ b/plugins/clipboard/msd-clipboard-manager.c @@ -825,11 +825,11 @@ clipboard_manager_watch_cb (MsdClipboardManager *manager, GdkDisplay *display; display = gdk_display_get_default (); - gdkwin = gdk_window_lookup_for_display (display, window); + gdkwin = gdk_x11_window_lookup_for_display (display, window); if (is_start) { if (gdkwin == NULL) { - gdkwin = gdk_window_foreign_new_for_display (display, window); + gdkwin = gdk_x11_window_foreign_new_for_display (display, window); } else { g_object_ref (gdkwin); } 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 diff --git a/plugins/mouse/msd-locate-pointer.c b/plugins/mouse/msd-locate-pointer.c index f13f7a0..c0bc16f 100644 --- a/plugins/mouse/msd-locate-pointer.c +++ b/plugins/mouse/msd-locate-pointer.c @@ -62,12 +62,8 @@ locate_pointer_paint (MsdLocatePointerData *data, progress = data->progress; - #if GTK_CHECK_VERSION(3, 0, 0) - width = gdk_window_get_width(GDK_WINDOW(data->window)); - height = gdk_window_get_height(GDK_WINDOW(data->window)); - #else - gdk_drawable_get_size(data->window, &width, &height); - #endif + width = gdk_window_get_width (data->window); + height = gdk_window_get_height (data->window); style = gtk_widget_get_style (data->widget); color = style->bg[GTK_STATE_SELECTED]; @@ -180,7 +176,7 @@ timeline_frame_cb (MsdTimeline *timeline, data->progress += CIRCLES_PROGRESS_INTERVAL; } - screen = gdk_drawable_get_screen (data->window); + screen = gdk_window_get_screen (data->window); gdk_window_get_pointer (gdk_screen_get_root_window (screen), &cursor_x, &cursor_y, NULL); gdk_window_move (data->window, @@ -334,7 +330,7 @@ msd_locate_pointer (GdkScreen *screen) msd_timeline_rewind (data->timeline); /* Create again the window if it is not for the current screen */ - if (gdk_screen_get_number (screen) != gdk_screen_get_number (gdk_drawable_get_screen (data->window))) + if (gdk_screen_get_number (screen) != gdk_screen_get_number (gdk_window_get_screen (data->window))) { gdk_window_set_user_data (data->window, NULL); gdk_window_destroy (data->window); diff --git a/plugins/xrandr/msd-xrandr-manager.c b/plugins/xrandr/msd-xrandr-manager.c index c56cd51..f7f1f88 100644 --- a/plugins/xrandr/msd-xrandr-manager.c +++ b/plugins/xrandr/msd-xrandr-manager.c @@ -614,7 +614,7 @@ msd_xrandr_manager_2_apply_configuration (MsdXrandrManager *manager, gboolean result; if (parent_window_id != 0) - parent_window = gdk_window_foreign_new_for_display (gdk_display_get_default (), (GdkNativeWindow) parent_window_id); + parent_window = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), (Window) parent_window_id); else parent_window = NULL; |