aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-06-02 10:26:45 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-06-02 10:26:45 +0800
commitc29d3eb6f8827d937002bce1b93c27bf635a8b21 (patch)
tree7a47b9eca22dfe4600a9868036b6fc69611442b8 /shell
parent10639cdca92f3225f2c246289402677d5af16755 (diff)
downloadgsoc2013-evolution-c29d3eb6f8827d937002bce1b93c27bf635a8b21.tar
gsoc2013-evolution-c29d3eb6f8827d937002bce1b93c27bf635a8b21.tar.gz
gsoc2013-evolution-c29d3eb6f8827d937002bce1b93c27bf635a8b21.tar.bz2
gsoc2013-evolution-c29d3eb6f8827d937002bce1b93c27bf635a8b21.tar.lz
gsoc2013-evolution-c29d3eb6f8827d937002bce1b93c27bf635a8b21.tar.xz
gsoc2013-evolution-c29d3eb6f8827d937002bce1b93c27bf635a8b21.tar.zst
gsoc2013-evolution-c29d3eb6f8827d937002bce1b93c27bf635a8b21.zip
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
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/main.c20
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 ();