mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
gtk: Use g_object_unref instead of gdk_cursor_unref
This commit is contained in:
parent
a9637f05b6
commit
8f1f743903
@ -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);
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
@ -684,7 +684,7 @@ set_cross_grab (GtkHSV *hsv,
|
||||
NULL,
|
||||
cursor,
|
||||
time);
|
||||
gdk_cursor_unref (cursor);
|
||||
g_object_unref (cursor);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user