summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cut-n-paste/toolbar-editor/egg-editable-toolbar.c4
-rw-r--r--cut-n-paste/toolbar-editor/egg-toolbar-editor.c4
-rw-r--r--src/eom-print-preview.c4
-rw-r--r--src/eom-scroll-view.c4
4 files changed, 16 insertions, 0 deletions
diff --git a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
index ced3971..0158cda 100644
--- a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
+++ b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
@@ -430,7 +430,11 @@ configure_item_cursor (GtkToolItem *item,
cursor = gdk_cursor_new_for_display (gdk_screen_get_display (screen),
GDK_HAND2);
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ g_object_unref (cursor);
+#else
gdk_cursor_unref (cursor);
+#endif
gtk_drag_source_set (widget, GDK_BUTTON1_MASK, dest_drag_types,
G_N_ELEMENTS (dest_drag_types), GDK_ACTION_MOVE);
diff --git a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
index d9854b7..fbd2b40 100644
--- a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
+++ b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
@@ -368,7 +368,11 @@ set_drag_cursor (GtkWidget *widget)
cursor = gdk_cursor_new_for_display (gdk_screen_get_display (screen),
GDK_HAND2);
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ g_object_unref (cursor);
+#else
gdk_cursor_unref (cursor);
+#endif
}
static void
diff --git a/src/eom-print-preview.c b/src/eom-print-preview.c
index dd8dba2..ba45f8a 100644
--- a/src/eom-print-preview.c
+++ b/src/eom-print-preview.c
@@ -977,7 +977,11 @@ motion_notify_event_cb (GtkWidget *widget,
GDK_FLEUR);
gdk_window_set_cursor (gtk_widget_get_window (widget),
cursor);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ g_object_unref (cursor);
+#else
gdk_cursor_unref (cursor);
+#endif
} else {
gdk_window_set_cursor (gtk_widget_get_window (widget),
NULL);
diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c
index d3015c6..53fda38 100644
--- a/src/eom-scroll-view.c
+++ b/src/eom-scroll-view.c
@@ -405,7 +405,11 @@ eom_scroll_view_set_cursor (EomScrollView *view, EomScrollViewCursor new_cursor)
if (cursor) {
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ g_object_unref (cursor);
+#else
gdk_cursor_unref (cursor);
+#endif
gdk_flush();
}
}