diff options
author | Jason Leach <jleach@ximian.com> | 2001-06-07 03:38:28 +0800 |
---|---|---|
committer | Jacob Leach <jleach@src.gnome.org> | 2001-06-07 03:38:28 +0800 |
commit | c77b7e30202573c1c4ab54086388202d93181b45 (patch) | |
tree | ae8398641bd6ab8c397b721226d20c77aa40e0ef /shell/e-shell.c | |
parent | 0a7445949918ec1cc80cd303217df742e10fb6f5 (diff) | |
download | gsoc2013-evolution-c77b7e30202573c1c4ab54086388202d93181b45.tar.gz gsoc2013-evolution-c77b7e30202573c1c4ab54086388202d93181b45.tar.zst gsoc2013-evolution-c77b7e30202573c1c4ab54086388202d93181b45.zip |
(Fix bug #418: Save state of folder tree view)
2001-06-06 Jason Leach <jleach@ximian.com>
(Fix bug #418: Save state of folder tree view)
* e-shell-view.c (e_shell_view_save_settings): Changed the char *
@prefix argument to an int @view_num.
(e_shell_view_load_settings): Ditto.
(get_local_prefix_for_view): New function that gets us a prefix
from a view_num.
* e-shell-view.c (e_shell_view_save_settings): Save the
expanded/collapsed information for each storage-set-view here.
(e_shell_view_load_settings): Load it here.
* e-storage-set-view.c (e_storage_set_view_construct): Make it so
new storage set views have their storages expanded by default, but
will respsect the expanded state information that we load into it.
(insert_storages): Minor change here too.
(new_folder_cb): Ditto.
svn path=/trunk/; revision=10135
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r-- | shell/e-shell.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c index 566a9e6a72..e931da6377 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -361,7 +361,8 @@ setup_corba_storages (EShell *shell) if (corba_storage_registry == NULL) return FALSE; - bonobo_object_add_interface (BONOBO_OBJECT (shell), BONOBO_OBJECT (corba_storage_registry)); + bonobo_object_add_interface (BONOBO_OBJECT (shell), + BONOBO_OBJECT (corba_storage_registry)); /* Notice that `bonobo_object_add_interface()' aggregates the two object's reference counts, so we need an extra ref here if we want to keep a separate @@ -764,7 +765,7 @@ e_shell_construct (EShell *shell, priv->local_directory = g_strdup (local_directory); priv->folder_type_registry = e_folder_type_registry_new (); - priv->storage_set = e_storage_set_new (shell->priv->folder_type_registry); + priv->storage_set = e_storage_set_new (priv->folder_type_registry); /* CORBA storages must be set up before the components, because otherwise components cannot register their own storages. */ @@ -986,15 +987,10 @@ save_settings_for_views (EShell *shell) view = E_SHELL_VIEW (p->data); - prefix = g_strdup_printf ("=%s/config/Shell=/Views/%d/", - priv->local_directory, i); - - if (! e_shell_view_save_settings (view, prefix)) { + if (! e_shell_view_save_settings (view, i)) { g_warning ("Cannot save settings for view -- %d", i); retval = FALSE; } - - g_free (prefix); } prefix = g_strdup_printf ("=%s/config/Shell=/Views/NumberOfViews", @@ -1023,7 +1019,8 @@ save_settings_for_component (EShell *shell, CORBA_exception_init (&ev); - session_interface = Bonobo_Unknown_queryInterface (unknown_interface, "IDL:GNOME/Evolution/Session:1.0", &ev); + session_interface = Bonobo_Unknown_queryInterface (unknown_interface, + "IDL:GNOME/Evolution/Session:1.0", &ev); if (ev._major != CORBA_NO_EXCEPTION || CORBA_Object_is_nil (session_interface, &ev)) { CORBA_exception_free (&ev); return TRUE; @@ -1137,17 +1134,12 @@ e_shell_restore_from_settings (EShell *shell) for (i = 0; i < num_views; i++) { EShellView *view; - prefix = g_strdup_printf ("=%s/config/Shell=/Views/%d/", - priv->local_directory, i); - - /* FIXME restore the URI here. There should be an + /* FIXME: restore the URI here. There should be an e_shell_view_new_from_configuration() thingie. */ view = e_shell_new_view (shell, NULL); - if (! e_shell_view_load_settings (view, prefix)) + if (! e_shell_view_load_settings (view, i)) retval = FALSE; - - g_free (prefix); } return retval; |