aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-07-02 01:42:29 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-07-02 01:42:29 +0800
commitf3a15eb3515fbecc1135496b3dc21990b867844f (patch)
tree0048ca0e518fe1cd49d917a816c8c5f70a53bd15 /shell
parent56867f3fe28668dc013dd2f54703ddb7affdbc48 (diff)
downloadgsoc2013-evolution-f3a15eb3515fbecc1135496b3dc21990b867844f.tar.gz
gsoc2013-evolution-f3a15eb3515fbecc1135496b3dc21990b867844f.tar.zst
gsoc2013-evolution-f3a15eb3515fbecc1135496b3dc21990b867844f.zip
New member preparing_to_quit in EShellPrivate.
(init): Initialize to FALSE. (e_shell_prepare_for_quit): Set preparing_to_quit to TRUE on entering, and set it to FALSE on return. (view_delete_event_cb): Don't call e_shell_prepare_for_quit() if preparing_for_quit is TRUE. svn path=/trunk/; revision=17336
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog9
-rw-r--r--shell/e-shell.c14
2 files changed, 22 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index be087166e9..b398182b16 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,12 @@
+2002-07-01 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-shell.c: New member preparing_to_quit in EShellPrivate.
+ (init): Initialize to FALSE.
+ (e_shell_prepare_for_quit): Set preparing_to_quit to TRUE on
+ entering, and set it to FALSE on return.
+ (view_delete_event_cb): Don't call e_shell_prepare_for_quit() if
+ preparing_for_quit is TRUE.
+
2002-06-28 Ettore Perazzoli <ettore@ximian.com>
* evolution-storage.c (impl_Storage_updateFolder): Don't stop
diff --git a/shell/e-shell.c b/shell/e-shell.c
index de4294bbec..382af66bb8 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -136,6 +136,10 @@ struct _EShellPrivate {
(Currently, it's interactive IIF there is at least one active
view.) */
unsigned int is_interactive : 1;
+
+ /* Whether quit has been requested, and the shell is now waiting for
+ permissions from all the components to quit. */
+ unsigned int preparing_to_quit : 1;
};
@@ -958,6 +962,9 @@ view_delete_event_cb (GtkWidget *widget,
return FALSE;
}
+ if (shell->priv->preparing_to_quit)
+ return TRUE;
+
/* If it's the last view, ask for confirm before actually destroying
this view. */
if (e_shell_prepare_for_quit (shell))
@@ -1196,6 +1203,7 @@ init (EShell *shell)
priv->db = CORBA_OBJECT_NIL;
priv->is_initialized = FALSE;
priv->is_interactive = FALSE;
+ priv->preparing_to_quit = FALSE;
shell->priv = priv;
}
@@ -2188,11 +2196,14 @@ e_shell_prepare_for_quit (EShell *shell)
g_return_val_if_fail (E_IS_SHELL (shell), FALSE);
priv = shell->priv;
+ priv->preparing_to_quit = TRUE;
/* Make all the views insensitive so we have some modal-like
behavior. */
- for (p = priv->views; p != NULL; p = p->next)
+ for (p = priv->views; p != NULL; p = p->next) {
+ g_print ("Insensitive %p\n", p->data);
gtk_widget_set_sensitive (GTK_WIDGET (p->data), FALSE);
+ }
component_ids = e_component_registry_get_id_list (priv->component_registry);
@@ -2223,6 +2234,7 @@ e_shell_prepare_for_quit (EShell *shell)
/* Restore all the views to be sensitive. */
for (p = priv->views; p != NULL; p = p->next)
gtk_widget_set_sensitive (GTK_WIDGET (p->data), TRUE);
+ priv->preparing_to_quit = FALSE;
e_free_string_list (component_ids);
return retval;