[gimp/gtk3-port: 135/228] libgimpwidgets: use g_object_ref()/unref() for GdkCursors



commit aaca86f86ed48d879c4ce07f0d7be0097d564260
Author: Michael Natterer <mitch gimp org>
Date:   Wed Dec 22 21:53:10 2010 +0100

    libgimpwidgets: use g_object_ref()/unref() for GdkCursors
    
    The are GObjects now.

 libgimpwidgets/gimphelpui.c          |    2 +-
 libgimpwidgets/gimpoffsetarea.c      |    2 +-
 libgimpwidgets/gimppickbutton.c      |    2 +-
 libgimpwidgets/gimppreview.c         |    6 +++---
 libgimpwidgets/gimpscrolledpreview.c |    6 +++---
 5 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/libgimpwidgets/gimphelpui.c b/libgimpwidgets/gimphelpui.c
index 0f4ba8f..3fdfbe1 100644
--- a/libgimpwidgets/gimphelpui.c
+++ b/libgimpwidgets/gimphelpui.c
@@ -474,7 +474,7 @@ gimp_context_help_idle_start (gpointer widget)
                                  NULL, cursor,
                                  GDK_CURRENT_TIME);
 
-      gdk_cursor_unref (cursor);
+      g_object_unref (cursor);
 
       if (status != GDK_GRAB_SUCCESS)
         {
diff --git a/libgimpwidgets/gimpoffsetarea.c b/libgimpwidgets/gimpoffsetarea.c
index 7e5c627..660ba42 100644
--- a/libgimpwidgets/gimpoffsetarea.c
+++ b/libgimpwidgets/gimpoffsetarea.c
@@ -334,7 +334,7 @@ gimp_offset_area_realize (GtkWidget *widget)
   cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
                                        GDK_FLEUR);
   gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
-  gdk_cursor_unref (cursor);
+  g_object_unref (cursor);
 }
 
 static gboolean
diff --git a/libgimpwidgets/gimppickbutton.c b/libgimpwidgets/gimppickbutton.c
index f1e2f31..67caa0e 100644
--- a/libgimpwidgets/gimppickbutton.c
+++ b/libgimpwidgets/gimppickbutton.c
@@ -137,7 +137,7 @@ gimp_pick_button_dispose (GObject *object)
 
   if (button->cursor)
     {
-      gdk_cursor_unref (button->cursor);
+      g_object_unref (button->cursor);
       button->cursor = NULL;
     }
 
diff --git a/libgimpwidgets/gimppreview.c b/libgimpwidgets/gimppreview.c
index a5199c9..d5a4ddb 100644
--- a/libgimpwidgets/gimppreview.c
+++ b/libgimpwidgets/gimppreview.c
@@ -395,7 +395,7 @@ gimp_preview_area_unrealize (GtkWidget   *widget,
 {
   if (preview->cursor_busy)
     {
-      gdk_cursor_unref (preview->cursor_busy);
+      g_object_unref (preview->cursor_busy);
       preview->cursor_busy = NULL;
     }
 }
@@ -825,10 +825,10 @@ gimp_preview_set_default_cursor (GimpPreview *preview,
   g_return_if_fail (GIMP_IS_PREVIEW (preview));
 
   if (preview->default_cursor)
-    gdk_cursor_unref (preview->default_cursor);
+    g_object_unref (preview->default_cursor);
 
   if (cursor)
-    gdk_cursor_ref (cursor);
+    g_object_ref (cursor);
 
   preview->default_cursor = cursor;
 }
diff --git a/libgimpwidgets/gimpscrolledpreview.c b/libgimpwidgets/gimpscrolledpreview.c
index a86359d..d4506e8 100644
--- a/libgimpwidgets/gimpscrolledpreview.c
+++ b/libgimpwidgets/gimpscrolledpreview.c
@@ -258,7 +258,7 @@ gimp_scrolled_preview_area_unrealize (GtkWidget           *widget,
 {
   if (preview->cursor_move)
     {
-      gdk_cursor_unref (preview->cursor_move);
+      g_object_unref (preview->cursor_move);
       preview->cursor_move = NULL;
     }
 }
@@ -388,7 +388,7 @@ gimp_scrolled_preview_area_event (GtkWidget           *area,
               gtk_grab_add (area);
             }
 
-          gdk_cursor_unref (cursor);
+          g_object_unref (cursor);
 
           break;
 
@@ -642,7 +642,7 @@ gimp_scrolled_preview_nav_button_press (GtkWidget           *widget,
                         gtk_widget_get_window (area), cursor,
                         event->time);
 
-      gdk_cursor_unref (cursor);
+      g_object_unref (cursor);
     }
 
   return TRUE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]