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-view-menu.c | |
parent | 9b864ecd40139b61c89c459e4feb093c5b49d14b (diff) | |
download | gsoc2013-evolution-aad3ac6ddd62d5cd1b3421f5bf45ccdcf1b0ed35.tar gsoc2013-evolution-aad3ac6ddd62d5cd1b3421f5bf45ccdcf1b0ed35.tar.gz gsoc2013-evolution-aad3ac6ddd62d5cd1b3421f5bf45ccdcf1b0ed35.tar.bz2 gsoc2013-evolution-aad3ac6ddd62d5cd1b3421f5bf45ccdcf1b0ed35.tar.lz gsoc2013-evolution-aad3ac6ddd62d5cd1b3421f5bf45ccdcf1b0ed35.tar.xz 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-view-menu.c')
-rw-r--r-- | shell/e-shell-view-menu.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index efbb5898a5..52261abc1f 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -130,10 +130,17 @@ command_close (BonoboUIComponent *uih, const char *path) { EShellView *shell_view; + GdkEvent delete_event; shell_view = E_SHELL_VIEW (data); - gtk_object_destroy (GTK_OBJECT (shell_view)); + /* Send a delete_event to the window. This way we make sure that the + behaviors for delete_event and the menu item are the same. */ + + delete_event.any.type = GDK_DELETE; + delete_event.any.window = GTK_WIDGET (shell_view)->window; + delete_event.any.send_event = 0; + gtk_widget_event (GTK_WIDGET (shell_view), &delete_event); } static void |