aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view-menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell-view-menu.c')
-rw-r--r--shell/e-shell-view-menu.c9
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