diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-05-16 22:54:55 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-05-16 22:54:55 +0800 |
commit | aad3ac6ddd62d5cd1b3421f5bf45ccdcf1b0ed35 (patch) | |
tree | 022b30eaf1dad44f44efac106296c6a7ea7955fb /shell/e-shell.c | |
parent | 9b864ecd40139b61c89c459e4feb093c5b49d14b (diff) | |
download | gsoc2013-evolution-aad3ac6ddd62d5cd1b3421f5bf45ccdcf1b0ed35.tar.gz gsoc2013-evolution-aad3ac6ddd62d5cd1b3421f5bf45ccdcf1b0ed35.tar.zst gsoc2013-evolution-aad3ac6ddd62d5cd1b3421f5bf45ccdcf1b0ed35.zip |
Ask e_shell_prepare_for_quit() before destroying the view if it's the last
* e-shell.c (view_delete_event_cb): Ask e_shell_prepare_for_quit()
before destroying the view if it's the last one.
* e-shell-view-menu.c (command_close): Synthesize a delete_event
on the view instead of directly destroying it.
svn path=/trunk/; revision=16931
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r-- | shell/e-shell.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c index 6353a45f55..3799a2b513 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -953,8 +953,17 @@ view_delete_event_cb (GtkWidget *widget, shell = E_SHELL (data); e_shell_save_settings (shell); - /* Destroy it */ - return FALSE; + if (g_list_length (shell->priv->views) != 1) { + /* If it's not the last view, just destroy it. */ + return FALSE; + } + + /* If it's the last view, ask for confirm before actually destroying + this view. */ + if (e_shell_prepare_for_quit (shell)) + return FALSE; + else + return TRUE; } static void |