aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-09-24 05:30:57 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-09-24 05:30:57 +0800
commit92ec933b198f15789e028cd3c3dc144ba00bb862 (patch)
tree5de5c8405635b2f7f38fbaf358cd130e14ba10f2 /shell/e-shell.c
parent944861b19874e2066c412d1dabf09ce00cc35586 (diff)
downloadgsoc2013-evolution-92ec933b198f15789e028cd3c3dc144ba00bb862.tar.gz
gsoc2013-evolution-92ec933b198f15789e028cd3c3dc144ba00bb862.tar.zst
gsoc2013-evolution-92ec933b198f15789e028cd3c3dc144ba00bb862.zip
Use e_shell_request_close_view().
* e-shell-view-menu.c (command_close): Use e_shell_request_close_view(). * e-shell.c (e_shell_request_close_view): New, code moved out of view_delete_event_cb(). (view_delete_event_cb): Use it. svn path=/trunk/; revision=18183
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c53
1 files changed, 36 insertions, 17 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 839d77263c..115201f982 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -652,6 +652,16 @@ impl_Shell_setLineStatus (PortableServer_Servant servant,
}
+void
+e_shell_set_interactive (EShell *shell,
+ gboolean interactive)
+{
+ g_return_if_fail (E_IS_SHELL (shell));
+
+ set_interactive (shell, interactive);
+}
+
+
/* Set up the ::Activity interface. */
static void
@@ -916,24 +926,9 @@ view_delete_event_cb (GtkWidget *widget,
EShell *shell;
g_assert (E_IS_SHELL_VIEW (widget));
-
shell = E_SHELL (data);
- e_shell_save_settings (shell);
-
- if (g_list_length (shell->priv->views) != 1) {
- /* If it's not the last view, just destroy it. */
- 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))
- return FALSE;
- else
- return TRUE;
+ return ! e_shell_request_close_view (shell, E_SHELL_VIEW (widget));
}
static void
@@ -1307,7 +1302,7 @@ e_shell_construct (EShell *shell,
if (show_splash)
gtk_widget_destroy (splash);
- if (e_shell_startup_wizard_create () == FALSE) {
+ if (e_shell_startup_wizard_create (shell) == FALSE) {
e_shell_unregister_all (shell);
bonobo_object_unref (BONOBO_OBJECT (shell));
@@ -1444,6 +1439,30 @@ e_shell_create_view_from_uri_and_settings (EShell *shell,
return view;
}
+gboolean
+e_shell_request_close_view (EShell *shell,
+ EShellView *shell_view)
+{
+ g_return_val_if_fail (E_IS_SHELL (shell), FALSE);
+ g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), FALSE);
+
+ e_shell_save_settings (shell);
+
+ if (g_list_length (shell->priv->views) != 1) {
+ /* Not the last view. */
+ return TRUE;
+ }
+
+ if (shell->priv->preparing_to_quit)
+ return FALSE;
+
+ /* If it's the last view, ask for confirm. */
+ if (e_shell_prepare_for_quit (shell))
+ return TRUE;
+ else
+ return FALSE;
+}
+
/**
* e_shell_get_local_directory: