From c9cf12dec80399cf8b02472d73fbd47c93777de4 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Mon, 14 Aug 2000 00:40:09 +0000 Subject: Make the close button on the ShellView quit Evolution. (Yeah, this is not correct, but at least it prevents some nasty GC errors and prevents evolution-mail from being left in a messy state.) svn path=/trunk/; revision=4828 --- shell/ChangeLog | 4 ++++ shell/e-shell-view.c | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index 5abcfd13ea..2bf2e6e1da 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,7 @@ +2000-08-13 Ettore Perazzoli + + * e-shell-view.c (delete_event): New. Make the parent shell quit. + 2000-08-13 Ettore Perazzoli * e-shell-view.c (shell_view_interface_set_message_cb): Removed diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 8b62e57d2b..36e69f51bb 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -526,6 +526,19 @@ unrealize (GtkWidget *widget) gdk_flush (); } +static int +delete_event (GtkWidget *widget, + GdkEventAny *event) +{ + EShellView *shell_view; + EShell *shell; + + shell_view = E_SHELL_VIEW (widget); + + shell = e_shell_view_get_shell (shell_view); + e_shell_quit (shell); +} + /* Initialization. */ @@ -540,7 +553,8 @@ class_init (EShellViewClass *klass) object_class->destroy = destroy; - widget_class->unrealize = unrealize; + widget_class->unrealize = unrealize; + widget_class->delete_event = delete_event; parent_class = gtk_type_class (gnome_app_get_type ()); -- cgit v1.2.3