From ca5abdea1b6a1e5e178dfe63a260b73106f69658 Mon Sep 17 00:00:00 2001 From: infirit Date: Sat, 22 Nov 2014 14:09:09 +0100 Subject: Gtk3: Replaced gdk_cursor_unref() by g_object_unref() gdk_cursor_unref () is deprecated in Gtk+3 --- mate-panel/menu.c | 4 ++++ mate-panel/panel-force-quit.c | 4 ++++ mate-panel/panel-toplevel.c | 4 ++++ mate-panel/panel-util.c | 4 ++++ mate-panel/panel-widget.c | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/mate-panel/menu.c b/mate-panel/menu.c index 368c416c..3e4b16d2 100644 --- a/mate-panel/menu.c +++ b/mate-panel/menu.c @@ -709,7 +709,11 @@ drag_end_menu_cb (GtkWidget *widget, GdkDragContext *context) } } +#if GTK_CHECK_VERSION (3, 0, 0) + g_object_unref (cursor); +#else gdk_cursor_unref (cursor); +#endif } } diff --git a/mate-panel/panel-force-quit.c b/mate-panel/panel-force-quit.c index b4498aeb..9d70b590 100644 --- a/mate-panel/panel-force-quit.c +++ b/mate-panel/panel-force-quit.c @@ -302,7 +302,11 @@ panel_force_quit (GdkScreen *screen, cross = gdk_cursor_new (GDK_CROSS); status = gdk_pointer_grab (root, FALSE, GDK_BUTTON_PRESS_MASK, NULL, cross, time); +#if GTK_CHECK_VERSION (3, 0, 0) + g_object_unref (cross); +#else gdk_cursor_unref (cross); +#endif if (status != GDK_GRAB_SUCCESS) { g_warning ("Pointer grab failed\n"); remove_popup (popup); diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c index 00659e5d..8c8b5561 100644 --- a/mate-panel/panel-toplevel.c +++ b/mate-panel/panel-toplevel.c @@ -497,7 +497,11 @@ static void panel_toplevel_begin_grab_op(PanelToplevel* toplevel, PanelGrabOpTyp gdk_pointer_grab (window, FALSE, GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, NULL, cursor, time_); +#if GTK_CHECK_VERSION (3, 0, 0) + g_object_unref (cursor); +#else gdk_cursor_unref (cursor); +#endif if (grab_keyboard) gdk_keyboard_grab (window, FALSE, time_); diff --git a/mate-panel/panel-util.c b/mate-panel/panel-util.c index 838d9687..f3ab7bc7 100644 --- a/mate-panel/panel-util.c +++ b/mate-panel/panel-util.c @@ -116,7 +116,11 @@ panel_push_window_busy (GtkWidget *window) if (win != NULL) { GdkCursor *cursor = gdk_cursor_new (GDK_WATCH); gdk_window_set_cursor (win, cursor); +#if GTK_CHECK_VERSION (3, 0, 0) + g_object_unref (cursor); +#else gdk_cursor_unref (cursor); +#endif gdk_flush (); } } diff --git a/mate-panel/panel-widget.c b/mate-panel/panel-widget.c index 2f402da7..5dd4bb43 100644 --- a/mate-panel/panel-widget.c +++ b/mate-panel/panel-widget.c @@ -2032,7 +2032,11 @@ panel_widget_applet_drag_start (PanelWidget *panel, APPLET_EVENT_MASK, NULL, fleur_cursor, time_); +#if GTK_CHECK_VERSION (3, 0, 0) + g_object_unref (fleur_cursor); +#else gdk_cursor_unref (fleur_cursor); +#endif gdk_flush (); if (status != GDK_GRAB_SUCCESS) { -- cgit v1.2.1