summaryrefslogtreecommitdiffstats
path: root/src/event-context.cpp
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-04-09 17:19:31 +0000
committerAlex Valavanis <valavanisalex@googlemail.com>2012-04-09 17:19:31 +0000
commit92a8546a868b616dcd3eeb0812c4a9ce5eb85f2c (patch)
tree5fd43b36d7ed974c1f1bcd56398418b8d0330481 /src/event-context.cpp
parentFix CheckButton header issue with GTK+ 3 (diff)
downloadinkscape-92a8546a868b616dcd3eeb0812c4a9ce5eb85f2c.tar.gz
inkscape-92a8546a868b616dcd3eeb0812c4a9ce5eb85f2c.zip
Replace deprecated gdk_cursor_unref
(bzr r11196)
Diffstat (limited to 'src/event-context.cpp')
-rw-r--r--src/event-context.cpp12
1 files changed, 12 insertions, 0 deletions
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);