aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-03-27 03:31:37 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-03-27 03:31:37 +0800
commit7ecd4e666490ee384122b938149ac04ab8ead6d9 (patch)
tree86c7d43cbf71089349d9564c3a4a0bac1d67a930 /shell
parent8cca88b4f676ac7cc4b719264c7a6c9d965bc8e2 (diff)
downloadgsoc2013-evolution-7ecd4e666490ee384122b938149ac04ab8ead6d9.tar.gz
gsoc2013-evolution-7ecd4e666490ee384122b938149ac04ab8ead6d9.tar.zst
gsoc2013-evolution-7ecd4e666490ee384122b938149ac04ab8ead6d9.zip
[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
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog14
-rw-r--r--shell/e-local-storage.c34
2 files changed, 47 insertions, 1 deletions
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 <ettore@ximian.com>
+
+ [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 <NotZed@Ximian.com>
* 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;
}