[gedit] Do not use gdk_cursor_unref
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Do not use gdk_cursor_unref
- Date: Wed, 22 Dec 2010 20:48:05 +0000 (UTC)
commit 5e8d3242051a4c80fe05cbfab96ab765f3c74b80
Author: Paolo Borelli <pborelli gnome org>
Date: Wed Dec 22 21:37:47 2010 +0100
Do not use gdk_cursor_unref
Also remove busy cursor from the view, since it seems unused.
plugins/filebrowser/gedit-file-browser-view.c | 10 ++--------
plugins/filebrowser/gedit-file-browser-widget.c | 5 +++--
2 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/plugins/filebrowser/gedit-file-browser-view.c b/plugins/filebrowser/gedit-file-browser-view.c
index 81fc5e1..f3658f0 100644
--- a/plugins/filebrowser/gedit-file-browser-view.c
+++ b/plugins/filebrowser/gedit-file-browser-view.c
@@ -44,8 +44,6 @@ struct _GeditFileBrowserViewPrivate
GtkTreeModel *model;
GtkTreeRowReference *editable;
- GdkCursor *busy_cursor;
-
/* Click policy */
GeditFileBrowserViewClickPolicy click_policy;
/* Both clicks in a double click need to be on the same row */
@@ -114,7 +112,7 @@ gedit_file_browser_view_finalize (GObject *object)
GeditFileBrowserView *obj = GEDIT_FILE_BROWSER_VIEW (object);
if (obj->priv->hand_cursor)
- gdk_cursor_unref (obj->priv->hand_cursor);
+ g_object_unref (obj->priv->hand_cursor);
if (obj->priv->hover_path)
gtk_tree_path_free (obj->priv->hover_path);
@@ -125,8 +123,6 @@ gedit_file_browser_view_finalize (GObject *object)
obj->priv->expand_state = NULL;
}
- gdk_cursor_unref (obj->priv->busy_cursor);
-
G_OBJECT_CLASS (gedit_file_browser_view_parent_class)->finalize (object);
}
@@ -334,7 +330,7 @@ set_click_policy_property (GeditFileBrowserView *obj,
if (obj->priv->hand_cursor)
{
- gdk_cursor_unref (obj->priv->hand_cursor);
+ g_object_unref (obj->priv->hand_cursor);
obj->priv->hand_cursor = NULL;
}
}
@@ -1022,8 +1018,6 @@ gedit_file_browser_view_init (GeditFileBrowserView *obj)
drag_source_targets,
G_N_ELEMENTS (drag_source_targets),
GDK_ACTION_COPY);
-
- obj->priv->busy_cursor = gdk_cursor_new (GDK_WATCH);
}
static gboolean
diff --git a/plugins/filebrowser/gedit-file-browser-widget.c b/plugins/filebrowser/gedit-file-browser-widget.c
index 5084d78..95a7b9a 100644
--- a/plugins/filebrowser/gedit-file-browser-widget.c
+++ b/plugins/filebrowser/gedit-file-browser-widget.c
@@ -365,7 +365,8 @@ gedit_file_browser_widget_finalize (GObject *object)
cancel_async_operation (obj);
- gdk_cursor_unref (obj->priv->busy_cursor);
+ if (obj->priv->busy_cursor)
+ g_object_unref (obj->priv->busy_cursor);
g_free (obj->priv->filter_pattern_str);
@@ -2158,7 +2159,7 @@ set_busy (GeditFileBrowserWidget *obj,
{
cursor = gdk_cursor_new (GDK_WATCH);
gdk_window_set_cursor (window, cursor);
- gdk_cursor_unref (cursor);
+ g_object_unref (cursor);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]