aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-06-25 12:41:32 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-06-25 12:41:32 +0800
commit8a77a47f19e26c32eac2a2d0407d648bf3d72a73 (patch)
tree83e34c4e2f2c6e42f929c8565f737ba6817aaae3 /shell
parent5cd485fec1d234526a8027da736e8c13aa9e6ac2 (diff)
downloadgsoc2013-evolution-8a77a47f19e26c32eac2a2d0407d648bf3d72a73.tar
gsoc2013-evolution-8a77a47f19e26c32eac2a2d0407d648bf3d72a73.tar.gz
gsoc2013-evolution-8a77a47f19e26c32eac2a2d0407d648bf3d72a73.tar.bz2
gsoc2013-evolution-8a77a47f19e26c32eac2a2d0407d648bf3d72a73.tar.lz
gsoc2013-evolution-8a77a47f19e26c32eac2a2d0407d648bf3d72a73.tar.xz
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')
-rw-r--r--shell/ChangeLog11
-rw-r--r--shell/e-shell-view-menu.c4
-rw-r--r--shell/e-shell.c48
-rw-r--r--shell/e-shell.h2
-rw-r--r--shell/main.c4
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 ();
}