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
This commit is contained in:

committed by
Michael Meeks

parent
d2856de030
commit
6d6b9ec70e
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user