aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorIain Holmes <iain@helixcode.com>2000-10-18 18:56:11 +0800
committerIain Holmes <iain@src.gnome.org>2000-10-18 18:56:11 +0800
commit80dbb750f559f058ef656b012c24b031f0881126 (patch)
tree5c6b0dcffc27eed9503f2c67675eae81778e8988 /shell/e-shell.c
parent8d91a9c1c66077eb71a0bdab2bd946be70afa1ac (diff)
downloadgsoc2013-evolution-80dbb750f559f058ef656b012c24b031f0881126.tar
gsoc2013-evolution-80dbb750f559f058ef656b012c24b031f0881126.tar.gz
gsoc2013-evolution-80dbb750f559f058ef656b012c24b031f0881126.tar.bz2
gsoc2013-evolution-80dbb750f559f058ef656b012c24b031f0881126.tar.lz
gsoc2013-evolution-80dbb750f559f058ef656b012c24b031f0881126.tar.xz
gsoc2013-evolution-80dbb750f559f058ef656b012c24b031f0881126.tar.zst
gsoc2013-evolution-80dbb750f559f058ef656b012c24b031f0881126.zip
Save the settings before the view is destroyed. (e_shell_quit): Don't save
2000-10-17 Iain Holmes <iain@helixcode.com> * e-shell.c (view_deleted_cb): Save the settings before the view is destroyed. (e_shell_quit): Don't save the settings when there are no views. 2000-10-16 Iain Holmes <iain@helixcode.com> * e-setup.c (check_evolution_directory): Better dialog. * e-splash.c (icon_free): Don't unref the canvas item. (e_splash_construct): Add a frame round the splash screen. svn path=/trunk/; revision=5985
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 1875ba3a44..dc355c85e7 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -464,6 +464,22 @@ set_owner_on_components (EShell *shell)
/* EShellView destruction callback. */
+static int
+view_deleted_cb (GtkObject *object,
+ GdkEvent *ev,
+ gpointer data)
+{
+ EShell *shell;
+
+ g_assert (E_IS_SHELL_VIEW (object));
+
+ shell = E_SHELL (data);
+ e_shell_save_settings (shell);
+
+ /* Destroy it */
+ return FALSE;
+}
+
static void
view_destroy_cb (GtkObject *object,
gpointer data)
@@ -476,7 +492,6 @@ view_destroy_cb (GtkObject *object,
shell->priv->views = g_list_remove (
shell->priv->views, object);
- save_settings_for_views (shell);
if (shell->priv->views == NULL) {
/* FIXME: This looks like a Bonobo bug to me. */
bonobo_object_ref (BONOBO_OBJECT (shell));
@@ -523,7 +538,10 @@ destroy (GtkObject *object)
gtk_signal_disconnect_by_func (
GTK_OBJECT (view),
GTK_SIGNAL_FUNC (view_destroy_cb), shell);
-
+ gtk_signal_disconnect_by_func (GTK_OBJECT (view),
+ GTK_SIGNAL_FUNC (view_deleted_cb),
+ shell);
+
gtk_object_destroy (GTK_OBJECT (view));
}
@@ -737,6 +755,8 @@ e_shell_new_view (EShell *shell,
view = e_shell_view_new (shell);
gtk_widget_show (GTK_WIDGET (view));
+ gtk_signal_connect (GTK_OBJECT (view), "delete-event",
+ GTK_SIGNAL_FUNC (view_deleted_cb), shell);
gtk_signal_connect (GTK_OBJECT (view), "destroy",
GTK_SIGNAL_FUNC (view_destroy_cb), shell);
@@ -1016,7 +1036,8 @@ e_shell_quit (EShell *shell)
g_return_if_fail (shell != NULL);
g_return_if_fail (E_IS_SHELL (shell));
- e_shell_save_settings (shell);
+ if (shell->priv->views)
+ e_shell_save_settings (shell);
priv = shell->priv;