From c29d3eb6f8827d937002bce1b93c27bf635a8b21 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 2 Jun 2000 02:26:45 +0000 Subject: Make the close button on the shell view exit Evolution cleanly. Not a real fix, but at least it makes it work correctly for the current setup that only allows one view. svn path=/trunk/; revision=3364 --- shell/ChangeLog | 6 ++++++ shell/main.c | 20 ++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index 1663152cc3..de85899b61 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2000-06-02 Ettore Perazzoli + + * main.c (view_delete_event_cb): New callback for the + "delete_event" on the view. + (idle_cb): Connect it. + 2000-06-01 Christopher James Lahey * e-storage-set-view.c (set_e_shortcut_selection): Added a diff --git a/shell/main.c b/shell/main.c index 407abaebc5..c4d8735eb9 100644 --- a/shell/main.c +++ b/shell/main.c @@ -140,11 +140,25 @@ development_warning () gnome_dialog_run (GNOME_DIALOG (warning_dialog)); gtk_object_destroy (GTK_OBJECT (warning_dialog)); -} +} + +static void +view_delete_event_cb (GtkWidget *widget, + GdkEventAny *event, + void *data) +{ + EShell *shell; + + shell = E_SHELL (data); + + gtk_widget_destroy (widget); + e_shell_quit (shell); +} static gint idle_cb (gpointer data) { + GtkWidget *view; char *evolution_directory; evolution_directory = (char *) data; @@ -163,7 +177,9 @@ idle_cb (gpointer data) gtk_signal_connect (GTK_OBJECT (shell), "destroy", GTK_SIGNAL_FUNC (destroy_cb), NULL); - e_shell_new_view (shell, STARTUP_URI); + view = e_shell_new_view (shell, STARTUP_URI); + gtk_signal_connect (GTK_OBJECT (view), "delete_event", + GTK_SIGNAL_FUNC (view_delete_event_cb), shell); if (!getenv ("EVOLVE_ME_HARDER")) development_warning (); -- cgit v1.2.3