diff options
-rw-r--r-- | shell/ChangeLog | 6 | ||||
-rw-r--r-- | shell/main.c | 20 |
2 files changed, 24 insertions, 2 deletions
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 <ettore@helixcode.com> + + * 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 <clahey@helixcode.com> * 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 (); |