mirror of https://github.com/GNOME/gimp.git
Replace gdk_cursor_unref() with g_object_unref()
This commit is contained in:
parent
8c975484ab
commit
ce2cd374ee
|
@ -424,7 +424,7 @@ 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);
|
||||
|
||||
gdk_display_flush (gtk_widget_get_display (widget));
|
||||
}
|
||||
|
|
|
@ -755,7 +755,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;
|
||||
}
|
||||
|
|
|
@ -1565,7 +1565,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_HANDEDNESS_RIGHT,
|
||||
|
@ -1580,7 +1580,7 @@ gimp_dialog_factory_set_busy (GimpDialogFactory *factory)
|
|||
}
|
||||
|
||||
if (cursor)
|
||||
gdk_cursor_unref (cursor);
|
||||
g_object_unref (cursor);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -232,7 +232,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
|
||||
|
@ -260,7 +260,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
|
||||
{
|
||||
|
@ -362,7 +362,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;
|
||||
}
|
||||
|
|
|
@ -185,7 +185,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),
|
||||
|
|
|
@ -964,7 +964,7 @@ build_dialog (gchar *imagename)
|
|||
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_drawing_area, "size-allocate",
|
||||
G_CALLBACK(sda_size_callback),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1038,7 +1038,7 @@ view_unrealize (GtkWidget *widget)
|
|||
{
|
||||
if (busy_cursor)
|
||||
{
|
||||
gdk_cursor_unref (busy_cursor);
|
||||
g_object_unref (busy_cursor);
|
||||
busy_cursor = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1469,7 +1469,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
|
||||
|
|
|
@ -371,7 +371,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;
|
||||
|
||||
|
|
|
@ -388,12 +388,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 ();
|
||||
}
|
||||
|
||||
|
|
|
@ -1125,7 +1125,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);
|
||||
}
|
||||
|
||||
if (image_setup (drawable, TRUE))
|
||||
|
|
|
@ -292,13 +292,13 @@ compute_preview_image (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 (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);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@ -315,6 +315,9 @@ preview_expose (GtkWidget *widget,
|
|||
startx = (PREVIEW_WIDTH - pw) / 2;
|
||||
starty = (PREVIEW_HEIGHT - ph) / 2;
|
||||
|
||||
if (pw != PREVIEW_WIDTH || ph != PREVIEW_HEIGHT)
|
||||
gdk_window_clear (gtk_widget_get_window (previewarea));
|
||||
|
||||
cairo_set_source_surface (cr, preview_surface, startx, starty);
|
||||
cairo_rectangle (cr, startx, starty, pw, ph);
|
||||
cairo_clip (cr);
|
||||
|
|
|
@ -1438,7 +1438,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);
|
||||
|
|
|
@ -245,7 +245,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);
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ print_preview_button_press_event (GtkWidget *widget,
|
|||
preview->dragging = TRUE;
|
||||
}
|
||||
|
||||
gdk_cursor_unref (cursor);
|
||||
g_object_unref (cursor);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in New Issue