From 92a8546a868b616dcd3eeb0812c4a9ce5eb85f2c Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Mon, 9 Apr 2012 18:19:31 +0100 Subject: Replace deprecated gdk_cursor_unref (bzr r11196) --- src/event-context.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/event-context.cpp') diff --git a/src/event-context.cpp b/src/event-context.cpp index 4ea4068fe..3bf1179c8 100644 --- a/src/event-context.cpp +++ b/src/event-context.cpp @@ -158,7 +158,11 @@ static void sp_event_context_dispose(GObject *object) { } if (ec->cursor != NULL) { +#if GTK_CHECK_VERSION(3,0,0) + g_object_unref(ec->cursor); +#else gdk_cursor_unref(ec->cursor); +#endif ec->cursor = NULL; } @@ -204,7 +208,11 @@ void sp_event_context_update_cursor(SPEventContext *ec) { ); if (pixbuf != NULL) { if (ec->cursor) +#if GTK_CHECK_VERSION(3,0,0) + g_object_unref(ec->cursor); +#else gdk_cursor_unref(ec->cursor); +#endif ec->cursor = gdk_cursor_new_from_pixbuf(display, pixbuf, ec->hot_x, ec->hot_y); g_object_unref(pixbuf); } @@ -214,7 +222,11 @@ void sp_event_context_update_cursor(SPEventContext *ec) { sp_cursor_bitmap_and_mask_from_xpm(&bitmap, &mask, ec->cursor_shape); if ((bitmap != NULL) && (mask != NULL)) { if (ec->cursor) +#if GTK_CHECK_VERSION(3,0,0) + g_object_unref(ec->cursor); +#else gdk_cursor_unref(ec->cursor); +#endif ec->cursor = gdk_cursor_new_from_pixmap(bitmap, mask, &style->black, &style->white, ec->hot_x, ec->hot_y); -- cgit v1.2.3