diff options
author | Michael Meeks <michael@helixcode.com> | 2000-08-04 09:14:32 +0800 |
---|---|---|
committer | Michael Meeks <mmeeks@src.gnome.org> | 2000-08-04 09:14:32 +0800 |
commit | 6d6b9ec70ea0e6f16935ffbae676909c5a09f06c (patch) | |
tree | 55eaa990de792cfdc46ec999514cb2361d429d2d | |
parent | d2856de03062e5540dfefe3b8449324467e63966 (diff) | |
download | gsoc2013-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
-rw-r--r-- | shell/ChangeLog | 12 | ||||
-rw-r--r-- | shell/e-folder-type-registry.c | 6 | ||||
-rw-r--r-- | shell/e-shell-view.c | 7 | ||||
-rw-r--r-- | shell/e-shell.c | 15 | ||||
-rw-r--r-- | shell/e-shortcuts-view.c | 3 | ||||
-rw-r--r-- | shell/e-storage-set.c | 3 |
6 files changed, 37 insertions, 9 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index c25cc27616..eafb4f5b33 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,15 @@ +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. + +2000-08-03 Michael Meeks <michael@helixcode.com> + + * e-shell-view.c (destroy): unref the UI handler. + 2000-08-03 Jeffrey Stedfast <fejj@helixcode.com> * e-shell-folder-selection-dialog.c (set_default_folder): Make diff --git a/shell/e-folder-type-registry.c b/shell/e-folder-type-registry.c index 8e3e87ed8b..34fa5a0193 100644 --- a/shell/e-folder-type-registry.c +++ b/shell/e-folder-type-registry.c @@ -155,7 +155,8 @@ set_handler (EFolderTypeRegistry *folder_type_registry, if (folder_type == NULL) return FALSE; if (folder_type->handler != NULL) { - g_warning ("Folder type already has a handler -- %s", folder_type->name); + g_warning ("Folder type already has a handler -- %s", + folder_type->name); return FALSE; } @@ -188,7 +189,8 @@ destroy (GtkObject *object) folder_type_registry = E_FOLDER_TYPE_REGISTRY (object); priv = folder_type_registry->priv; - g_hash_table_foreach (priv->name_to_type, hash_forall_free_folder_type, NULL); + g_hash_table_foreach (priv->name_to_type, + hash_forall_free_folder_type, NULL); g_hash_table_destroy (priv->name_to_type); g_free (priv); diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index ac8db674d6..8091baf1f4 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -482,6 +482,8 @@ destroy (GtkObject *object) g_hash_table_foreach (priv->uri_to_control, hash_forall_destroy_control, NULL); g_hash_table_destroy (priv->uri_to_control); + bonobo_object_unref (priv->uih); + g_free (priv->uri); g_free (priv); @@ -841,8 +843,9 @@ get_control_for_uri (EShellView *shell_view, CORBA_exception_init (&ev); - corba_control = Evolution_ShellComponent_create_view (handler, e_folder_get_physical_uri (folder), - folder_type, &ev); + corba_control = Evolution_ShellComponent_create_view ( + handler, e_folder_get_physical_uri (folder), folder_type, &ev); + if (ev._major != CORBA_NO_EXCEPTION) { CORBA_exception_free (&ev); return NULL; 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; diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c index 6988f41de4..6f457cc18d 100644 --- a/shell/e-shortcuts-view.c +++ b/shell/e-shortcuts-view.c @@ -369,6 +369,9 @@ destroy (GtkObject *object) shortcuts_view = E_SHORTCUTS_VIEW (object); priv = shortcuts_view->priv; + + gtk_object_unref (GTK_OBJECT (priv->shortcuts)); + g_free (priv); (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); diff --git a/shell/e-storage-set.c b/shell/e-storage-set.c index 3a1fbb9b65..7b18d93c1c 100644 --- a/shell/e-storage-set.c +++ b/shell/e-storage-set.c @@ -198,7 +198,8 @@ destroy (GtkObject *object) gtk_object_unref (GTK_OBJECT (priv->folder_type_registry)); - g_hash_table_foreach (priv->name_to_named_storage, (GHFunc) named_storage_destroy, NULL); + g_hash_table_foreach (priv->name_to_named_storage, + (GHFunc) named_storage_destroy, NULL); g_hash_table_destroy (priv->name_to_named_storage); g_free (priv); |