aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorJason Leach <jasonleach@usa.net>2001-01-25 02:55:10 +0800
committerJacob Leach <jleach@src.gnome.org>2001-01-25 02:55:10 +0800
commit152c6a69b1c2454bc0920092e42005e168e01743 (patch)
treed2c4c89859330a0929b21a72ea80eece9f3b6197 /shell/e-shell.c
parent95956d2f827a120fcf467f1e7bf857e280894f09 (diff)
downloadgsoc2013-evolution-152c6a69b1c2454bc0920092e42005e168e01743.tar
gsoc2013-evolution-152c6a69b1c2454bc0920092e42005e168e01743.tar.gz
gsoc2013-evolution-152c6a69b1c2454bc0920092e42005e168e01743.tar.bz2
gsoc2013-evolution-152c6a69b1c2454bc0920092e42005e168e01743.tar.lz
gsoc2013-evolution-152c6a69b1c2454bc0920092e42005e168e01743.tar.xz
gsoc2013-evolution-152c6a69b1c2454bc0920092e42005e168e01743.tar.zst
gsoc2013-evolution-152c6a69b1c2454bc0920092e42005e168e01743.zip
(Fix #1252: Need a File->Close way to close a view)
2001-01-24 Jason Leach <jasonleach@usa.net> (Fix #1252: Need a File->Close way to close a view) * evolution.xml: new File->Close menu item and associated command. 2001-01-24 Jason Leach <jasonleach@usa.net> (Fix #1252: Need a File->Close way to close a view) * e-shell-view-menu.c (command_close): New function, destroys the current view. * e-shell.c (view_destroy_cb): Make sure shell settings get saved when the last view is destroyed. svn path=/trunk/; revision=7787
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index fec2a2febd..8cecea7d4f 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -525,12 +525,21 @@ view_destroy_cb (GtkObject *object,
gpointer data)
{
EShell *shell;
+ int nviews;
g_assert (E_IS_SHELL_VIEW (object));
shell = E_SHELL (data);
- shell->priv->views = g_list_remove (
- shell->priv->views, object);
+
+ nviews = g_list_length (shell->priv->views);
+
+ /* If this is our last view, save settings now because in the
+ callback for no_views_left shell->priv->views will be NULL
+ and settings won't be saved because of that */
+ if (nviews - 1 == 0)
+ e_shell_save_settings (shell);
+
+ shell->priv->views = g_list_remove (shell->priv->views, object);
if (shell->priv->views == NULL) {
/* FIXME: This looks like a Bonobo bug to me. */