aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-local-storage.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-09-12 02:28:22 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-09-12 02:28:22 +0800
commit2b9fedff8b596d7a26cde14fb51012a9b1335f5c (patch)
tree9cbd79f4605d78af4a402dc20f42489df34b7f52 /shell/e-local-storage.c
parent4889cc0a361e693fb9aa852e58ce5fa9bf889f5a (diff)
downloadgsoc2013-evolution-2b9fedff8b596d7a26cde14fb51012a9b1335f5c.tar.gz
gsoc2013-evolution-2b9fedff8b596d7a26cde14fb51012a9b1335f5c.tar.zst
gsoc2013-evolution-2b9fedff8b596d7a26cde14fb51012a9b1335f5c.zip
Make `EvolutionStorage' and `ELocalstorage' actually update the CORBA
listeners and fix a bug with the creation of the `EvolutionStorageListener' servant. svn path=/trunk/; revision=5334
Diffstat (limited to 'shell/e-local-storage.c')
-rw-r--r--shell/e-local-storage.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c
index 7a8a1de8e2..43c433a1ee 100644
--- a/shell/e-local-storage.c
+++ b/shell/e-local-storage.c
@@ -28,6 +28,9 @@
* - If the LocalStorage is destroyed and an async operation on a shell component is
* pending, we get a callback on a bogus object. We need support for cancelling
* operations on the shell component.
+ *
+ * - The tree is kept both in the EStorage and the EvolutionStorage. Very
+ * bad design.
*/
#ifdef HAVE_CONFIG_H
@@ -151,6 +154,27 @@ get_physical_path (ELocalStorage *local_storage,
return real_path;
}
+static void
+new_folder (ELocalStorage *local_storage,
+ const char *path,
+ EFolder *folder)
+{
+ ELocalStoragePrivate *priv;
+
+ priv = local_storage->priv;
+
+ g_print ("%s:%s -- %s\n", __FILE__, __FUNCTION__, path);
+
+ e_storage_new_folder (E_STORAGE (local_storage), path, folder);
+
+ evolution_storage_new_folder (EVOLUTION_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));
+}
+
static gboolean
load_folders (ELocalStorage *local_storage,
const char *parent_path,
@@ -174,7 +198,7 @@ load_folders (ELocalStorage *local_storage,
if (folder == NULL)
return FALSE;
- e_storage_new_folder (E_STORAGE (local_storage), path, folder);
+ new_folder (E_STORAGE (local_storage), path, folder);
subfolder_directory_path = g_concat_dir_and_file (physical_path, SUBFOLDER_DIR_NAME);
}
@@ -334,9 +358,7 @@ component_async_create_folder_callback (EvolutionShellComponentClient *shell_com
e_folder_set_physical_uri (folder, callback_data->physical_uri);
if (e_local_folder_save (E_LOCAL_FOLDER (folder))) {
- e_storage_new_folder (callback_data->storage,
- callback_data->path,
- folder);
+ new_folder (callback_data->storage, callback_data->path, folder);
} else {
rmdir (callback_data->physical_path);
gtk_object_unref (GTK_OBJECT (folder));