diff options
-rw-r--r-- | shell/ChangeLog | 11 | ||||
-rw-r--r-- | shell/e-shell-view-menu.c | 4 | ||||
-rw-r--r-- | shell/e-shell.c | 48 | ||||
-rw-r--r-- | shell/e-shell.h | 2 | ||||
-rw-r--r-- | shell/main.c | 4 |
5 files changed, 25 insertions, 44 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 237d494c43..559e99f055 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,14 @@ +2001-06-25 Ettore Perazzoli <ettore@ximian.com> + + * main.c (no_views_left_cb): Don't call `e_shell_quit()' anymore. + + * e-shell-view-menu.c (command_quit): Call + `e_shell_destroy_all_views()' instead of `e_shell_quit()', which + does not exist anymore. + + * e-shell.c (e_shell_quit): Removed. + (e_shell_destroy_all_views): New. + 2001-06-24 Ettore Perazzoli <ettore@ximian.com> * Makefile.am: s/\.oafinfo/.oaf/g. diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index 5f314ade50..f4a8eb35ec 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -159,9 +159,7 @@ command_quit (BonoboUIComponent *uih, shell_view = E_SHELL_VIEW (data); shell = e_shell_view_get_shell (shell_view); - e_shell_quit (shell); - - gtk_main_quit (); + e_shell_destroy_all_views (shell); } #if 0 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)); } diff --git a/shell/e-shell.h b/shell/e-shell.h index a07706a41d..b876f64743 100644 --- a/shell/e-shell.h +++ b/shell/e-shell.h @@ -97,7 +97,7 @@ EFolderTypeRegistry *e_shell_get_folder_type_registry (EShell *shell); gboolean e_shell_save_settings (EShell *shell); gboolean e_shell_restore_from_settings (EShell *shell); -void e_shell_quit (EShell *shell); +void e_shell_destroy_all_views (EShell *shell); void e_shell_component_maybe_crashed (EShell *shell, const char *uri, diff --git a/shell/main.c b/shell/main.c index f31f460878..57e3d6cea0 100644 --- a/shell/main.c +++ b/shell/main.c @@ -56,7 +56,9 @@ extern char *evolution_debug_log; static void no_views_left_cb (EShell *shell, gpointer data) { - e_shell_quit (shell); + /* FIXME: This is wrong. We should exit only when the shell is + destroyed. But refcounting is broken at present, so this is a + reasonable workaround for now. */ gtk_main_quit (); } |