gedit r6224 - in trunk: . plugins/filebrowser
- From: pborelli svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6224 - in trunk: . plugins/filebrowser
- Date: Mon, 24 Mar 2008 16:45:39 +0000 (GMT)
Author: pborelli
Date: Mon Mar 24 16:45:39 2008
New Revision: 6224
URL: http://svn.gnome.org/viewvc/gedit?rev=6224&view=rev
Log:
2008-03-24 Paolo Borelli <pborelli katamail com>
* plugins/filebrowser/gedit-file-bookmarks-store.c: disconnect all the
volume monitor signals and do that in dispose.
Modified:
trunk/ChangeLog
trunk/plugins/filebrowser/gedit-file-bookmarks-store.c
Modified: trunk/plugins/filebrowser/gedit-file-bookmarks-store.c
==============================================================================
--- trunk/plugins/filebrowser/gedit-file-bookmarks-store.c (original)
+++ trunk/plugins/filebrowser/gedit-file-bookmarks-store.c Mon Mar 24 16:45:39 2008
@@ -71,29 +71,35 @@
}
static void
-gedit_file_bookmarks_store_finalize (GObject * object)
+gedit_file_bookmarks_store_dispose (GObject * object)
{
GeditFileBookmarksStore *obj = GEDIT_FILE_BOOKMARKS_STORE (object);
- if (obj->priv->volume_monitor) {
- g_signal_handlers_disconnect_by_func (obj->priv->
- volume_monitor,
+ if (obj->priv->volume_monitor != NULL) {
+ g_signal_handlers_disconnect_by_func (obj->priv->volume_monitor,
on_volume_mounted,
obj);
- g_signal_handlers_disconnect_by_func (obj->priv->
- volume_monitor,
- on_volume_mounted,
+ g_signal_handlers_disconnect_by_func (obj->priv->volume_monitor,
+ on_volume_unmounted,
obj);
+ obj->priv->volume_monitor = NULL;
}
- if (obj->priv->bookmarks_monitor != NULL)
+ if (obj->priv->bookmarks_monitor != NULL) {
gnome_vfs_monitor_cancel (obj->priv->bookmarks_monitor);
+ }
- gtk_tree_model_foreach (GTK_TREE_MODEL (obj), foreach_remove_node,
- NULL);
+ G_OBJECT_CLASS (gedit_file_bookmarks_store_parent_class)->dispose (object);
+}
+
+static void
+gedit_file_bookmarks_store_finalize (GObject * object)
+{
+ GeditFileBookmarksStore *obj = GEDIT_FILE_BOOKMARKS_STORE (object);
+
+ gtk_tree_model_foreach (GTK_TREE_MODEL (obj), foreach_remove_node, NULL);
- G_OBJECT_CLASS (gedit_file_bookmarks_store_parent_class)->
- finalize (object);
+ G_OBJECT_CLASS (gedit_file_bookmarks_store_parent_class)->finalize (object);
}
static void
@@ -102,10 +108,10 @@
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ object_class->dispose = gedit_file_bookmarks_store_dispose;
object_class->finalize = gedit_file_bookmarks_store_finalize;
- g_type_class_add_private (object_class,
- sizeof (GeditFileBookmarksStorePrivate));
+ g_type_class_add_private (object_class, sizeof (GeditFileBookmarksStorePrivate));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]