aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog8
-rw-r--r--shell/e-shell-view-menu.c9
-rw-r--r--shell/e-shell.c13
3 files changed, 27 insertions, 3 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 421bd64a6b..ed436547f3 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,11 @@
+2002-05-16 Ettore Perazzoli <ettore@ximian.com>
+
+ * 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.
+
2002-05-15 Ettore Perazzoli <ettore@ximian.com>
* e-shell-view-menu.c (command_quit): Check with
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
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
~lantw44/cgit/cgit.cgi/freebsd-ports-gnome/commit/x11-toolkits/libbonoboui?h=gstreamer0.10-removal&id=7f7d1cea729a5815af0f4db6edfc5ba0f62a57e3'>The FreeBSD GNOME team is proud to annunce the release of GNOME 2.22.0 formarcus2008-03-243-6/+12 * Presenting GNOME 2.20.1 and all related works for FreeBSD. The officialmarcus2007-10-254-13/+18 * - Welcome X.org 7.2 \o/.flz2007-05-202-39/+1 * Presenting GNOME 2.18 for FreeBSD. GNOME 2.18 is a departure from recent GNOMEmarcus2007-03-19