[gtk+] gtk: Use g_object_unref instead of gdk_cursor_unref
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk: Use g_object_unref instead of gdk_cursor_unref
- Date: Tue, 21 Dec 2010 17:16:24 +0000 (UTC)
commit 8f1f7439033e85ebf480c1c62e8e4647cba80b97
Author: Benjamin Otte <otte redhat com>
Date: Mon Dec 20 03:14:38 2010 +0100
gtk: Use g_object_unref instead of gdk_cursor_unref
gtk/gtkaboutdialog.c | 4 ++--
gtk/gtkcolorsel.c | 2 +-
gtk/gtkdnd.c | 8 ++++----
gtk/gtkentry.c | 10 +++++-----
gtk/gtkfilechooserdefault.c | 2 +-
gtk/gtkfilechooserentry.c | 2 +-
gtk/gtkhandlebox.c | 2 +-
gtk/gtkhsv.c | 2 +-
gtk/gtklabel.c | 4 ++--
gtk/gtklinkbutton.c | 2 +-
gtk/gtkpaned.c | 4 ++--
gtk/gtkprintunixdialog.c | 2 +-
gtk/gtkrecentchooserdefault.c | 2 +-
gtk/gtktextview.c | 8 ++++----
gtk/gtktreeviewcolumn.c | 2 +-
gtk/gtkwindow.c | 2 +-
16 files changed, 29 insertions(+), 29 deletions(-)
---
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index 3d2d73f..2e042bd 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -796,8 +796,8 @@ gtk_about_dialog_finalize (GObject *object)
g_slist_foreach (priv->visited_links, (GFunc)g_free, NULL);
g_slist_free (priv->visited_links);
- gdk_cursor_unref (priv->hand_cursor);
- gdk_cursor_unref (priv->regular_cursor);
+ g_object_unref (priv->hand_cursor);
+ g_object_unref (priv->regular_cursor);
G_OBJECT_CLASS (gtk_about_dialog_parent_class)->finalize (object);
}
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c
index 2f029ac..9948090 100644
--- a/gtk/gtkcolorsel.c
+++ b/gtk/gtkcolorsel.c
@@ -1968,7 +1968,7 @@ get_screen_color (GtkWidget *button)
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK,
picker_cursor,
time);
- gdk_cursor_unref (picker_cursor);
+ g_object_unref (picker_cursor);
if (grab_status != GDK_GRAB_SUCCESS)
{
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 502e21b..e9f0cc1 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -734,7 +734,7 @@ gtk_drag_get_cursor (GdkDisplay *display,
for (i = 0 ; i < n_drag_cursors - 1; i++)
if (drag_cursors[i].cursor != NULL)
{
- gdk_cursor_unref (drag_cursors[i].cursor);
+ g_object_unref (drag_cursors[i].cursor);
drag_cursors[i].cursor = NULL;
}
}
@@ -751,7 +751,7 @@ gtk_drag_get_cursor (GdkDisplay *display,
{
if (display != gdk_cursor_get_display (drag_cursors[i].cursor))
{
- gdk_cursor_unref (drag_cursors[i].cursor);
+ g_object_unref (drag_cursors[i].cursor);
drag_cursors[i].cursor = NULL;
}
}
@@ -776,7 +776,7 @@ gtk_drag_get_cursor (GdkDisplay *display,
if (display == gdk_cursor_get_display (info->drag_cursors[i]))
return info->drag_cursors[i];
- gdk_cursor_unref (info->drag_cursors[i]);
+ g_object_unref (info->drag_cursors[i]);
info->drag_cursors[i] = NULL;
}
@@ -3891,7 +3891,7 @@ gtk_drag_source_info_destroy (GtkDragSourceInfo *info)
{
if (info->drag_cursors[i] != NULL)
{
- gdk_cursor_unref (info->drag_cursors[i]);
+ g_object_unref (info->drag_cursors[i]);
info->drag_cursors[i] = NULL;
}
}
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index b344349..ca42ba4 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -2699,7 +2699,7 @@ update_cursors (GtkWidget *widget)
display = gtk_widget_get_display (widget);
cursor = gdk_cursor_new_for_display (display, GDK_XTERM);
gdk_window_set_cursor (icon_info->window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
else
{
@@ -2863,7 +2863,7 @@ gtk_entry_realize (GtkWidget *widget)
gdk_window_set_user_data (priv->text_area, entry);
if (attributes_mask & GDK_WA_CURSOR)
- gdk_cursor_unref (attributes.cursor);
+ g_object_unref (attributes.cursor);
gtk_widget_style_attach (widget);
@@ -4029,7 +4029,7 @@ gtk_entry_motion_notify (GtkWidget *widget,
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), GDK_XTERM);
gdk_window_set_cursor (priv->text_area, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
priv->mouse_cursor_obscured = FALSE;
}
@@ -4142,7 +4142,7 @@ set_invisible_cursor (GdkWindow *window)
gdk_window_set_cursor (window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
static void
@@ -4336,7 +4336,7 @@ gtk_entry_state_flags_changed (GtkWidget *widget,
gdk_window_set_cursor (priv->text_area, cursor);
if (cursor)
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
priv->mouse_cursor_obscured = FALSE;
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index ef98afe..42ced3f 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -6053,7 +6053,7 @@ set_busy_cursor (GtkFileChooserDefault *impl,
gdk_display_flush (display);
if (cursor)
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
/* Creates a sort model to wrap the file system model and sets it on the tree view */
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index 009d842..03ff782 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -914,7 +914,7 @@ set_invisible_mouse_cursor (GdkWindow *window)
gdk_window_set_cursor (window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
static void
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index 2b1f906..0c2ca50 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -1199,7 +1199,7 @@ gtk_handle_box_button_press (GtkWidget *widget,
G_CALLBACK (gtk_handle_box_grab_event), hb);
}
- gdk_cursor_unref (fleur);
+ g_object_unref (fleur);
event_handled = TRUE;
}
else if (priv->child_detached) /* Double click */
diff --git a/gtk/gtkhsv.c b/gtk/gtkhsv.c
index e6093fa..80128f9 100644
--- a/gtk/gtkhsv.c
+++ b/gtk/gtkhsv.c
@@ -684,7 +684,7 @@ set_cross_grab (GtkHSV *hsv,
NULL,
cursor,
time);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
static gboolean
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 53b2df7..ba74055 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3799,7 +3799,7 @@ gtk_label_update_cursor (GtkLabel *label)
gdk_window_set_cursor (priv->select_info->window, cursor);
if (cursor)
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
}
@@ -5113,7 +5113,7 @@ gtk_label_create_window (GtkLabel *label)
gdk_window_set_user_data (priv->select_info->window, widget);
if (attributes_mask & GDK_WA_CURSOR)
- gdk_cursor_unref (attributes.cursor);
+ g_object_unref (attributes.cursor);
}
static void
diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c
index 9a6b6fa..7e57596 100644
--- a/gtk/gtklinkbutton.c
+++ b/gtk/gtklinkbutton.c
@@ -390,7 +390,7 @@ set_hand_cursor (GtkWidget *widget,
gdk_display_flush (display);
if (cursor)
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
static void
diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c
index 7c0958f..959ac78 100644
--- a/gtk/gtkpaned.c
+++ b/gtk/gtkpaned.c
@@ -1134,7 +1134,7 @@ gtk_paned_realize (GtkWidget *widget)
&attributes, attributes_mask);
gdk_window_set_user_data (priv->handle, paned);
if (attributes_mask & GDK_WA_CURSOR)
- gdk_cursor_unref (attributes.cursor);
+ g_object_unref (attributes.cursor);
gtk_widget_style_attach (widget);
@@ -1439,7 +1439,7 @@ gtk_paned_state_changed (GtkWidget *widget,
gdk_window_set_cursor (priv->handle, cursor);
if (cursor)
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
}
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index bbe59da..861d779 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -402,7 +402,7 @@ set_busy_cursor (GtkPrintUnixDialog *dialog,
gdk_display_flush (display);
if (cursor)
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
static void
diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c
index f1caf17..8fba866 100644
--- a/gtk/gtkrecentchooserdefault.c
+++ b/gtk/gtkrecentchooserdefault.c
@@ -765,7 +765,7 @@ set_busy_cursor (GtkRecentChooserDefault *impl,
gdk_display_flush (display);
if (cursor)
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
static void
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index e57f957..fdd44f1 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -4171,7 +4171,7 @@ gtk_text_view_state_flags_changed (GtkWidget *widget,
gdk_window_set_cursor (text_view->priv->text_window->bin_window, cursor);
if (cursor)
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
text_view->priv->mouse_cursor_obscured = FALSE;
}
@@ -4196,7 +4196,7 @@ set_invisible_cursor (GdkWindow *window)
gdk_window_set_cursor (window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
static void
@@ -4220,7 +4220,7 @@ gtk_text_view_unobscure_mouse_cursor (GtkTextView *text_view)
cursor = gdk_cursor_new_for_display (gtk_widget_get_display (GTK_WIDGET (text_view)),
GDK_XTERM);
gdk_window_set_cursor (text_view->priv->text_window->bin_window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
text_view->priv->mouse_cursor_obscured = FALSE;
}
}
@@ -8428,7 +8428,7 @@ text_window_realize (GtkTextWindow *win,
cursor = gdk_cursor_new_for_display (gdk_window_get_display (window),
GDK_XTERM);
gdk_window_set_cursor (win->bin_window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
gtk_im_context_set_client_window (GTK_TEXT_VIEW (widget)->priv->im_context,
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 905a7bb..0147a4a 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -1354,7 +1354,7 @@ _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column)
gtk_tree_view_column_update_button (column);
- gdk_cursor_unref (attr.cursor);
+ g_object_unref (attr.cursor);
}
void
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 1a77b1f..2723c42 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5202,7 +5202,7 @@ set_grip_cursor (GtkWindow *window)
display = gtk_widget_get_display (widget);
cursor = gdk_cursor_new_for_display (display, cursor_type);
gdk_window_set_cursor (priv->grip_window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
else
gdk_window_set_cursor (priv->grip_window, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]