[gimp/gtk3-port: 181/215] Replace gdk_cursor_unref() with g_object_unref()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 181/215] Replace gdk_cursor_unref() with g_object_unref()
- Date: Mon, 3 Jan 2011 15:13:36 +0000 (UTC)
commit a949951983ab283a91f3e6e2bac54f051d6c9080
Author: Michael Natterer <mitch gimp org>
Date: Wed Dec 29 15:30:20 2010 +0100
Replace gdk_cursor_unref() with g_object_unref()
app/widgets/gimpcursor.c | 2 +-
app/widgets/gimpcurveview.c | 2 +-
app/widgets/gimpdialogfactory.c | 4 ++--
app/widgets/gimpnavigationview.c | 6 +++---
app/widgets/gimpoverlaychild.c | 2 +-
app/widgets/gimpspinscale.c | 4 ++--
plug-ins/common/animation-play.c | 2 +-
plug-ins/common/iwarp.c | 2 +-
plug-ins/common/lens-flare.c | 2 +-
plug-ins/common/nova.c | 2 +-
plug-ins/gradient-flare/gradient-flare.c | 2 +-
plug-ins/help-browser/dialog.c | 2 +-
plug-ins/ifs-compose/ifs-compose.c | 2 +-
plug-ins/imagemap/imap_preview.c | 2 +-
plug-ins/lighting/lighting-preview.c | 4 ++--
plug-ins/lighting/lighting-ui.c | 2 +-
plug-ins/map-object/map-object-preview.c | 4 ++--
plug-ins/map-object/map-object-ui.c | 2 +-
plug-ins/print/print-preview.c | 4 ++--
19 files changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/app/widgets/gimpcursor.c b/app/widgets/gimpcursor.c
index e2170b1..e7ede05 100644
--- a/app/widgets/gimpcursor.c
+++ b/app/widgets/gimpcursor.c
@@ -371,5 +371,5 @@ gimp_cursor_set (GtkWidget *widget,
tool_cursor,
modifier);
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
diff --git a/app/widgets/gimpcurveview.c b/app/widgets/gimpcurveview.c
index 16540ba..476ba8a 100644
--- a/app/widgets/gimpcurveview.c
+++ b/app/widgets/gimpcurveview.c
@@ -667,7 +667,7 @@ set_cursor (GimpCurveView *view,
GdkCursor *cursor = gdk_cursor_new_for_display (display, new_cursor);
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (view)), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
view->cursor_type = new_cursor;
}
diff --git a/app/widgets/gimpdialogfactory.c b/app/widgets/gimpdialogfactory.c
index ca8df26..ebf0559 100644
--- a/app/widgets/gimpdialogfactory.c
+++ b/app/widgets/gimpdialogfactory.c
@@ -1485,7 +1485,7 @@ gimp_dialog_factory_set_busy (GimpDialogFactory *factory)
display = gtk_widget_get_display (widget);
if (cursor)
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
cursor = gimp_cursor_new (display,
GIMP_CURSOR_FORMAT_BITMAP,
@@ -1500,7 +1500,7 @@ gimp_dialog_factory_set_busy (GimpDialogFactory *factory)
}
if (cursor)
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
void
diff --git a/app/widgets/gimpnavigationview.c b/app/widgets/gimpnavigationview.c
index f65f071..20d09bb 100644
--- a/app/widgets/gimpnavigationview.c
+++ b/app/widgets/gimpnavigationview.c
@@ -220,7 +220,7 @@ gimp_navigation_view_grab_pointer (GimpNavigationView *nav_view)
GDK_EXTENSION_EVENTS_ALL,
NULL, cursor, GDK_CURRENT_TIME);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
static gboolean
@@ -255,7 +255,7 @@ gimp_navigation_view_button_press (GtkWidget *widget,
display = gtk_widget_get_display (widget);
cursor = gdk_cursor_new_for_display (display, GDK_FLEUR);
gdk_window_set_cursor (GIMP_VIEW (widget)->event_window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
else
{
@@ -368,7 +368,7 @@ gimp_navigation_view_motion_notify (GtkWidget *widget,
}
gdk_window_set_cursor (view->event_window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
return FALSE;
}
diff --git a/app/widgets/gimpoverlaychild.c b/app/widgets/gimpoverlaychild.c
index 09bc725..af60536 100644
--- a/app/widgets/gimpoverlaychild.c
+++ b/app/widgets/gimpoverlaychild.c
@@ -180,7 +180,7 @@ gimp_overlay_child_realize (GimpOverlayBox *box,
gdk_offscreen_window_set_embedder (child->window,
gtk_widget_get_window (widget));
- gdk_cursor_unref (attributes.cursor);
+ g_object_unref (attributes.cursor);
g_signal_connect (child->window, "from-embedder",
G_CALLBACK (gimp_overlay_child_from_embedder),
diff --git a/app/widgets/gimpspinscale.c b/app/widgets/gimpspinscale.c
index b8ade5d..f5edf7b 100644
--- a/app/widgets/gimpspinscale.c
+++ b/app/widgets/gimpspinscale.c
@@ -453,7 +453,7 @@ gimp_spin_scale_button_motion (GtkWidget *widget,
cursor = gdk_cursor_new_for_display (display, GDK_XTERM);
gdk_window_set_cursor (event->window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
else
{
@@ -462,7 +462,7 @@ gimp_spin_scale_button_motion (GtkWidget *widget,
cursor = gdk_cursor_new_for_display (display, GDK_LEFT_PTR);
gdk_window_set_cursor (event->window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
}
diff --git a/plug-ins/common/animation-play.c b/plug-ins/common/animation-play.c
index 5854738..35ba9a9 100644
--- a/plug-ins/common/animation-play.c
+++ b/plug-ins/common/animation-play.c
@@ -728,7 +728,7 @@ build_dialog (GimpImageBaseType basetype,
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (shape_window),
GDK_HAND2);
gdk_window_set_cursor (gtk_widget_get_window (shape_window), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
g_signal_connect (shape_window, "button-press-event",
G_CALLBACK (shape_pressed),
diff --git a/plug-ins/common/iwarp.c b/plug-ins/common/iwarp.c
index 3e52bd9..5f519f3 100644
--- a/plug-ins/common/iwarp.c
+++ b/plug-ins/common/iwarp.c
@@ -1666,7 +1666,7 @@ iwarp_realize_callback (GtkWidget *widget)
GdkCursor *cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
static gboolean
diff --git a/plug-ins/common/lens-flare.c b/plug-ins/common/lens-flare.c
index f7e4505..ddeb8af 100644
--- a/plug-ins/common/lens-flare.c
+++ b/plug-ins/common/lens-flare.c
@@ -830,7 +830,7 @@ flare_center_preview_realize (GtkWidget *widget,
GdkCursor *cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
gimp_preview_set_default_cursor (center->preview, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
/*
diff --git a/plug-ins/common/nova.c b/plug-ins/common/nova.c
index beea2fb..cc4ba77 100644
--- a/plug-ins/common/nova.c
+++ b/plug-ins/common/nova.c
@@ -521,7 +521,7 @@ nova_center_preview_realize (GtkWidget *widget,
GdkCursor *cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
gimp_preview_set_default_cursor (center->preview, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
/*
diff --git a/plug-ins/gradient-flare/gradient-flare.c b/plug-ins/gradient-flare/gradient-flare.c
index b1b77a4..86e4fdd 100644
--- a/plug-ins/gradient-flare/gradient-flare.c
+++ b/plug-ins/gradient-flare/gradient-flare.c
@@ -2542,7 +2542,7 @@ dlg_preview_realize (GtkWidget *widget)
GdkCursor *cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
static gboolean
diff --git a/plug-ins/help-browser/dialog.c b/plug-ins/help-browser/dialog.c
index 788beef..63b0feb 100644
--- a/plug-ins/help-browser/dialog.c
+++ b/plug-ins/help-browser/dialog.c
@@ -1045,7 +1045,7 @@ view_unrealize (GtkWidget *widget)
{
if (busy_cursor)
{
- gdk_cursor_unref (busy_cursor);
+ g_object_unref (busy_cursor);
busy_cursor = NULL;
}
}
diff --git a/plug-ins/ifs-compose/ifs-compose.c b/plug-ins/ifs-compose/ifs-compose.c
index 722fc76..8d5382a 100644
--- a/plug-ins/ifs-compose/ifs-compose.c
+++ b/plug-ins/ifs-compose/ifs-compose.c
@@ -1487,7 +1487,7 @@ design_area_realize (GtkWidget *widget)
GdkCursor *cursor = gdk_cursor_new_for_display (display,
cursors[ifsDesign->op]);
gdk_window_set_cursor (gtk_widget_get_window (widget), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
static gboolean
diff --git a/plug-ins/imagemap/imap_preview.c b/plug-ins/imagemap/imap_preview.c
index 3165ba8..9b6799c 100644
--- a/plug-ins/imagemap/imap_preview.c
+++ b/plug-ins/imagemap/imap_preview.c
@@ -361,7 +361,7 @@ preview_set_cursor(Preview_t *preview, GdkCursorType cursor_type)
cursor_type);
gdk_window_set_cursor(gtk_widget_get_window (preview->window), cursor);
- gdk_cursor_unref(cursor);
+ g_object_unref (cursor);
preview->cursor = cursor_type;
diff --git a/plug-ins/lighting/lighting-preview.c b/plug-ins/lighting/lighting-preview.c
index 8913fae..7d7a9fe 100644
--- a/plug-ins/lighting/lighting-preview.c
+++ b/plug-ins/lighting/lighting-preview.c
@@ -479,12 +479,12 @@ preview_compute (void)
cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
gdk_window_set_cursor (gtk_widget_get_window (previewarea), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
compute_preview (startx, starty, pw, ph);
cursor = gdk_cursor_new_for_display (display, GDK_HAND2);
gdk_window_set_cursor (gtk_widget_get_window (previewarea), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
gdk_flush ();
/* if we recompute, clear backbuf, so we don't
diff --git a/plug-ins/lighting/lighting-ui.c b/plug-ins/lighting/lighting-ui.c
index db8d1ea..396bf86 100644
--- a/plug-ins/lighting/lighting-ui.c
+++ b/plug-ins/lighting/lighting-ui.c
@@ -1113,7 +1113,7 @@ main_dialog (GimpDrawable *drawable)
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (previewarea),
GDK_HAND2);
gdk_window_set_cursor (gtk_widget_get_window (previewarea), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
image_setup (drawable, TRUE);
diff --git a/plug-ins/map-object/map-object-preview.c b/plug-ins/map-object/map-object-preview.c
index 7bb8017..332caba 100644
--- a/plug-ins/map-object/map-object-preview.c
+++ b/plug-ins/map-object/map-object-preview.c
@@ -443,13 +443,13 @@ draw_preview_image (gint docompute)
cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
gdk_window_set_cursor (gtk_widget_get_window (previewarea), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
compute_preview (0, 0, width - 1, height - 1, pw, ph);
cursor = gdk_cursor_new_for_display (display, GDK_HAND2);
gdk_window_set_cursor(gtk_widget_get_window (previewarea), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
clear_light_marker ();
}
diff --git a/plug-ins/map-object/map-object-ui.c b/plug-ins/map-object/map-object-ui.c
index cfe8884..d05d6d6 100644
--- a/plug-ins/map-object/map-object-ui.c
+++ b/plug-ins/map-object/map-object-ui.c
@@ -1435,7 +1435,7 @@ main_dialog (GimpDrawable *drawable)
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (previewarea),
GDK_HAND2);
gdk_window_set_cursor (gtk_widget_get_window (previewarea), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
image_setup (drawable, TRUE);
diff --git a/plug-ins/print/print-preview.c b/plug-ins/print/print-preview.c
index 47b0650..472fab8 100644
--- a/plug-ins/print/print-preview.c
+++ b/plug-ins/print/print-preview.c
@@ -251,7 +251,7 @@ print_preview_unrealize (GtkWidget *widget)
PrintPreview *preview = PRINT_PREVIEW (widget);
if (preview->cursor)
- gdk_cursor_unref (preview->cursor);
+ g_object_unref (preview->cursor);
GTK_WIDGET_CLASS (print_preview_parent_class)->unrealize (widget);
}
@@ -353,7 +353,7 @@ print_preview_button_press_event (GtkWidget *widget,
preview->dragging = TRUE;
}
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]