aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--shell/ChangeLog8
-rw-r--r--shell/e-shell.c16
-rw-r--r--shell/e-shell.h3
-rw-r--r--shell/main.c2
4 files changed, 22 insertions, 7 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 5fb29e2c3c..7c710595a5 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,13 @@
2002-09-04 Ettore Perazzoli <ettore@ximian.com>
+ * 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.
+
+2002-09-04 Ettore Perazzoli <ettore@ximian.com>
+
* e-storage-set-view.c (popup_folder_menu): Remove the context
menu items using
evolution_shell_component_client_unpopulate_folder_context_menu()
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);
}
diff --git a/shell/e-shell.h b/shell/e-shell.h
index f5bb51e637..8713a0b06e 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -126,7 +126,8 @@ EFolderTypeRegistry *e_shell_get_folder_type_registry (EShell *shell);
EUriSchemaRegistry *e_shell_get_uri_schema_registry (EShell *shell);
gboolean e_shell_save_settings (EShell *shell);
-gboolean e_shell_restore_from_settings (EShell *shell);
+gboolean e_shell_restore_from_settings (EShell *shell,
+ gboolean restore_all_views);
void e_shell_destroy_all_views (EShell *shell);
diff --git a/shell/main.c b/shell/main.c
index 1b22658d96..b22fd8fa5e 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -387,7 +387,7 @@ idle_cb (void *data)
* user's previous settings, then show the default URI.
*/
if (! have_evolution_uri) {
- if (! e_shell_restore_from_settings (shell))
+ if (! e_shell_restore_from_settings (shell, FALSE))
display_default = TRUE;
else
display_default = FALSE;