aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-09-05 02:36:21 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-09-05 02:36:21 +0800
commit6b346389dcf339d68fbdae79b0cf13924a2b3700 (patch)
tree07f4e547a0600b030f18c72b23e72ee8478f0a71 /shell/e-shell.c
parent2fe0e9f18fa879a2957e07ff43252d60c21f7b00 (diff)
downloadgsoc2013-evolution-6b346389dcf339d68fbdae79b0cf13924a2b3700.tar
gsoc2013-evolution-6b346389dcf339d68fbdae79b0cf13924a2b3700.tar.gz
gsoc2013-evolution-6b346389dcf339d68fbdae79b0cf13924a2b3700.tar.bz2
gsoc2013-evolution-6b346389dcf339d68fbdae79b0cf13924a2b3700.tar.lz
gsoc2013-evolution-6b346389dcf339d68fbdae79b0cf13924a2b3700.tar.xz
gsoc2013-evolution-6b346389dcf339d68fbdae79b0cf13924a2b3700.tar.zst
gsoc2013-evolution-6b346389dcf339d68fbdae79b0cf13924a2b3700.zip
Pass FALSE as @restore_all_views to e_shell_restore_from_settings() so we
* main.c (idle_cb): Pass FALSE as @restore_all_views to e_shell_restore_from_settings() so we only restore the first view. * e-shell.c (e_shell_restore_from_settings): New arg @restore_all_views. svn path=/trunk/; revision=17967
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 09eb7f91cf..a6b90f3669 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -1304,9 +1304,8 @@ e_shell_construct (EShell *shell,
can tell the components we are here. */
set_owner_on_components (shell, E_SPLASH (splash));
- if (show_splash) {
+ if (show_splash)
gtk_widget_destroy (splash);
- }
if (e_shell_startup_wizard_create () == FALSE) {
e_shell_unregister_all (shell);
@@ -1694,15 +1693,18 @@ e_shell_save_settings (EShell *shell)
/**
* e_shell_restore_from_settings:
* @shell: An EShell object.
+ * @restore_all_views: whether to restore all the views
*
* Restore the existing views from the saved configuration. The shell must
- * have no views for this to work.
+ * have no views for this to work. If @restore_all_views is TRUE, restore all
+ * the views; otherwise, just the first one.
*
* Return value: %FALSE if the shell has some open views or there is no saved
* configuration. %TRUE if the configuration could be restored successfully.
**/
gboolean
-e_shell_restore_from_settings (EShell *shell)
+e_shell_restore_from_settings (EShell *shell,
+ gboolean restore_all_views)
{
EShellPrivate *priv;
int num_views;
@@ -1716,9 +1718,13 @@ e_shell_restore_from_settings (EShell *shell)
num_views = bonobo_config_get_long_with_default (priv->db, "/Shell/Views/NumberOfViews", 0, NULL);
- for (i = 0; i < num_views; i++)
+ for (i = 0; i < num_views; i++) {
e_shell_create_view_from_uri_and_settings (shell, NULL, i);
+ if (! restore_all_views)
+ break;
+ }
+
return (num_views > 0);
}