[nautilus] general: don't use gdk_cursor_unref()
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] general: don't use gdk_cursor_unref()
- Date: Wed, 22 Dec 2010 16:01:33 +0000 (UTC)
commit 74a8f78e2a5b06485c7daf830372a5f7b15a87b8
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Dec 22 16:50:32 2010 +0100
general: don't use gdk_cursor_unref()
eel/eel-editable-label.c | 2 +-
libnautilus-private/nautilus-icon-canvas-item.c | 2 +-
libnautilus-private/nautilus-icon-container.c | 2 +-
src/file-manager/fm-list-view.c | 5 +----
src/file-manager/fm-properties-window.c | 2 +-
src/nautilus-window.c | 2 +-
6 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index 27e06a2..ff8aa3f 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -1888,7 +1888,7 @@ eel_editable_label_realize (GtkWidget *widget)
gtk_widget_set_window (widget, window);
gdk_window_set_user_data (window, widget);
- gdk_cursor_unref (attributes.cursor);
+ g_object_unref (attributes.cursor);
style = gtk_widget_get_style_context (widget);
gtk_style_context_set_background (style, gtk_widget_get_window (widget));
diff --git a/libnautilus-private/nautilus-icon-canvas-item.c b/libnautilus-private/nautilus-icon-canvas-item.c
index 82ea6af..d0e862a 100644
--- a/libnautilus-private/nautilus-icon-canvas-item.c
+++ b/libnautilus-private/nautilus-icon-canvas-item.c
@@ -1786,7 +1786,7 @@ nautilus_icon_canvas_item_event (EelCanvasItem *item, GdkEvent *event)
cursor = gdk_cursor_new_for_display (gdk_display_get_default(),
GDK_HAND2);
gdk_window_set_cursor (((GdkEventAny *)event)->window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
/* FIXME bugzilla.gnome.org 42473:
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index d4b0b0a..a70877a 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -4494,7 +4494,7 @@ start_stretching (NautilusIconContainer *container)
cursor,
GDK_CURRENT_TIME);
if (cursor)
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
/* Ensure the window itself is focused.. */
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (container));
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index 6eeda14..3a53770 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -2757,10 +2757,7 @@ fm_list_view_click_policy_changed (FMDirectoryView *directory_view)
}
}
- if (hand_cursor != NULL) {
- gdk_cursor_unref (hand_cursor);
- hand_cursor = NULL;
- }
+ g_clear_object (&hand_cursor);
} else if (click_policy_auto_value == NAUTILUS_CLICK_POLICY_SINGLE) {
if (hand_cursor == NULL) {
hand_cursor = gdk_cursor_new(GDK_HAND2);
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index b9bd7ee..9c8318d 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -3235,7 +3235,7 @@ start_long_operation (FMPropertiesWindow *window)
cursor = gdk_cursor_new (GDK_WATCH);
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
window->details->long_operation_underway ++;
}
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index a4bcc7a..1c38a11 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -356,7 +356,7 @@ update_cursor (NautilusWindow *window)
if (slot->allow_stop) {
cursor = gdk_cursor_new (GDK_WATCH);
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
} else {
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]