From 7ecd4e666490ee384122b938149ac04ab8ead6d9 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Wed, 26 Mar 2003 19:31:37 +0000 Subject: [Shell part of #7153.] (load_folder): Call e_storage_new_folder() instead of new_folder() here so the folder doesn't get added to the EvolutionStorage. Since the EvolutionStorage has its own CORBAfied copy of the folder info [sigh] and it can't be updated, we have to set up the EvolutionStorage after setup_stock_folders() has been called. (setup_corba_storage): New function to set up the CORBA storage. (load_all_folders): Call setup_corba_storage() after setup_stock_folders(). svn path=/trunk/; revision=20522 --- shell/ChangeLog | 14 ++++++++++++++ shell/e-local-storage.c | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index db3cf89490..3925be2841 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,17 @@ +2003-03-26 Ettore Perazzoli + + [Shell part of #7153.] + + * e-local-storage.c (load_folder): Call e_storage_new_folder() + instead of new_folder() here so the folder doesn't get added to + the EvolutionStorage. Since the EvolutionStorage has its own + CORBAfied copy of the folder info [sigh] and it can't be updated, + we have to set up the EvolutionStorage after setup_stock_folders() + has been called. + (setup_corba_storage): New function to set up the CORBA storage. + (load_all_folders): Call setup_corba_storage() after + setup_stock_folders(). + 2003-03-25 Not Zed * e-shell-settings-dialog.c (set_dialog_size): Use diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c index 380f88fba4..6aa41e23f8 100644 --- a/shell/e-local-storage.c +++ b/shell/e-local-storage.c @@ -200,10 +200,40 @@ load_folder (const char *physical_path, return TRUE; } - new_folder (local_storage, path, folder); + e_storage_new_folder (local_storage, path, folder); return TRUE; } +static void +setup_corba_storage (ELocalStorage *local_storage, + const char *path) +{ + GList *subfolder_paths; + EFolder *folder; + GList *p; + + folder = e_storage_get_folder (E_STORAGE (local_storage), path); + + if (folder != NULL) + evolution_storage_new_folder (EVOLUTION_STORAGE (local_storage->priv->bonobo_interface), + path, + e_folder_get_name (folder), + e_folder_get_type_string (folder), + e_folder_get_physical_uri (folder), + e_folder_get_description (folder), + e_folder_get_custom_icon_name (folder), + e_folder_get_unread_count (folder), + FALSE, + 0); + + subfolder_paths = e_storage_get_subfolder_paths (E_STORAGE (local_storage), path); + + for (p = subfolder_paths; p != NULL; p = p->next) + setup_corba_storage (local_storage, (const char *) p->data); + + e_free_string_list (subfolder_paths); +} + static gboolean load_all_folders (ELocalStorage *local_storage) { @@ -217,6 +247,8 @@ load_all_folders (ELocalStorage *local_storage) setup_stock_folders (local_storage); + setup_corba_storage (local_storage, "/"); + return TRUE; } -- cgit