aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorMichael Meeks <michael@helixcode.com>2000-08-04 09:14:32 +0800
committerMichael Meeks <mmeeks@src.gnome.org>2000-08-04 09:14:32 +0800
commit6d6b9ec70ea0e6f16935ffbae676909c5a09f06c (patch)
tree55eaa990de792cfdc46ec999514cb2361d429d2d /shell/e-shell.c
parentd2856de03062e5540dfefe3b8449324467e63966 (diff)
downloadgsoc2013-evolution-6d6b9ec70ea0e6f16935ffbae676909c5a09f06c.tar.gz
gsoc2013-evolution-6d6b9ec70ea0e6f16935ffbae676909c5a09f06c.tar.zst
gsoc2013-evolution-6d6b9ec70ea0e6f16935ffbae676909c5a09f06c.zip
Remove erroneous refs on folder_type_registry, storage_set.
2000-08-04 Michael Meeks <michael@helixcode.com> * e-shell.c (e_shell_construct): Remove erroneous refs on folder_type_registry, storage_set. * e-shortcuts-view.c (destroy): unref the shortcuts, causing a massive ripple chain ref-count reaction. svn path=/trunk/; revision=4522
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index fd8807ab64..ed7715b652 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -490,9 +490,7 @@ e_shell_construct (EShell *shell,
priv->local_directory = g_strdup (local_directory);
priv->folder_type_registry = e_folder_type_registry_new ();
- gtk_object_ref (GTK_OBJECT (priv->folder_type_registry ));
priv->storage_set = e_storage_set_new (shell->priv->folder_type_registry);
- gtk_object_ref (GTK_OBJECT (priv->storage_set ));
gtk_object_ref (GTK_OBJECT (gconf_client));
priv->gconf_client = gconf_client;
@@ -561,7 +559,8 @@ e_shell_new_view (EShell *shell,
view = e_shell_view_new (shell);
gtk_widget_show (view);
- gtk_signal_connect (GTK_OBJECT (view), "destroy", GTK_SIGNAL_FUNC (view_destroy_cb), shell);
+ gtk_signal_connect (GTK_OBJECT (view), "destroy",
+ GTK_SIGNAL_FUNC (view_destroy_cb), shell);
if (uri != NULL)
e_shell_view_display_uri (E_SHELL_VIEW (view), uri);
@@ -818,11 +817,19 @@ e_shell_quit (EShell *shell)
priv->corba_storage_registry = NULL;
e_storage_set_remove_all_storages (priv->storage_set);
- gtk_object_unref (GTK_OBJECT (priv->storage_set));
+ /*
+ * Ok, so you thought the GUI components lifecycle was coupled to
+ * the Shell's, in fact this is not the case, they are unref'd
+ * here, and NULL'd to avoid shell destruction killing them again.
+ * So; the shell can be destroyed either remotely or localy.
+ */
+
+ gtk_object_unref (GTK_OBJECT (priv->storage_set));
gtk_object_unref (GTK_OBJECT (priv->shortcuts));
gtk_object_unref (GTK_OBJECT (priv->folder_type_registry));
gtk_object_unref (GTK_OBJECT (priv->component_registry));
+
priv->storage_set = NULL;
priv->shortcuts = NULL;
priv->folder_type_registry = NULL;