diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-06-25 12:41:32 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-06-25 12:41:32 +0800 |
commit | 8a77a47f19e26c32eac2a2d0407d648bf3d72a73 (patch) | |
tree | 83e34c4e2f2c6e42f929c8565f737ba6817aaae3 /shell/e-shell.c | |
parent | 5cd485fec1d234526a8027da736e8c13aa9e6ac2 (diff) | |
download | gsoc2013-evolution-8a77a47f19e26c32eac2a2d0407d648bf3d72a73.tar.gz gsoc2013-evolution-8a77a47f19e26c32eac2a2d0407d648bf3d72a73.tar.zst gsoc2013-evolution-8a77a47f19e26c32eac2a2d0407d648bf3d72a73.zip |
Remove the ugliness that was `e_shell_quit()'; implement an
`e_shell_destroy_all_views()' function instead, and get the "Exit"
menu item to use that instead.
svn path=/trunk/; revision=10467
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r-- | shell/e-shell.c | 48 |
1 files changed, 9 insertions, 39 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c index ad7da57b9f..c642d991c6 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -1121,17 +1121,16 @@ e_shell_restore_from_settings (EShell *shell) } /** - * e_shell_quit: - * @shell: An EShell. + * e_shell_destroy_all_views: + * @shell: * - * Make @shell quit. This will close all the associated views and destroy the - * object. + * Destroy all the views in @shell. **/ void -e_shell_quit (EShell *shell) +e_shell_destroy_all_views (EShell *shell) { EShellPrivate *priv; - GList *p; + GList *p, *pnext; g_return_if_fail (shell != NULL); g_return_if_fail (E_IS_SHELL (shell)); @@ -1141,43 +1140,14 @@ e_shell_quit (EShell *shell) priv = shell->priv; - for (p = priv->views; p != NULL; p = p->next) { + for (p = priv->views; p != NULL; p = pnext) { EShellView *shell_view; + pnext = p->next; + shell_view = E_SHELL_VIEW (p->data); - gtk_signal_disconnect_by_func ( - GTK_OBJECT (shell_view), - GTK_SIGNAL_FUNC (view_destroy_cb), shell); - gtk_object_destroy (GTK_OBJECT (shell_view)); + gtk_widget_destroy (GTK_WIDGET (shell_view)); } - - g_list_free (priv->views); - priv->views = NULL; - - bonobo_object_unref (BONOBO_OBJECT (priv->corba_storage_registry)); - - priv->corba_storage_registry = NULL; - - e_storage_set_remove_all_storages (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; - priv->component_registry = NULL; - - bonobo_object_unref (BONOBO_OBJECT (shell)); } |