aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-local-folder.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-05-26 22:49:12 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-05-26 22:49:12 +0800
commit47ab2202ba161234ec2790290152f64be0163dd7 (patch)
tree3abf67438aeb9b509c589d489bb89fd1f90a8d60 /shell/e-local-folder.c
parent3c89185e9f07621d4b516a8ee5dac9f2d267c87d (diff)
downloadgsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.tar
gsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.tar.gz
gsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.tar.bz2
gsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.tar.lz
gsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.tar.xz
gsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.tar.zst
gsoc2013-evolution-47ab2202ba161234ec2790290152f64be0163dd7.zip
Made the storage view update at changes in the storage, and
implemented a BonoboObject for wrapping the Evolution::Storage CORBA interface. Also fixed a few bugs. This makes the shell's storage extensibility usable for Evolution components. svn path=/trunk/; revision=3219
Diffstat (limited to 'shell/e-local-folder.c')
-rw-r--r--shell/e-local-folder.c34
1 files changed, 10 insertions, 24 deletions
diff --git a/shell/e-local-folder.c b/shell/e-local-folder.c
index b164eb1e95..23cd106390 100644
--- a/shell/e-local-folder.c
+++ b/shell/e-local-folder.c
@@ -56,6 +56,10 @@ static EFolderClass *parent_class = NULL;
#define METADATA_FILE_NAME "folder-metadata.xml"
#define METADATA_FILE_NAME_LEN 19
+struct _ELocalFolderPrivate {
+ int dummy;
+};
+
static char *
get_string_value (xmlNode *node,
@@ -90,6 +94,7 @@ construct_loading_metadata (ELocalFolder *local_folder,
char *type;
char *description;
char *metadata_path;
+ char *physical_uri;
folder = E_FOLDER (local_folder);
@@ -118,7 +123,9 @@ construct_loading_metadata (ELocalFolder *local_folder,
xmlFreeDoc (doc);
- local_folder->physical_uri = g_strconcat (URI_PREFIX, path, NULL);
+ physical_uri = g_strconcat (URI_PREFIX, path, NULL);
+ e_folder_set_physical_uri (folder, physical_uri);
+ g_free (physical_uri);
g_free (metadata_path);
@@ -142,7 +149,7 @@ save_metadata (ELocalFolder *local_folder)
xmlNewChild (root, NULL, (xmlChar *) "type", (xmlChar *) e_folder_get_type_string (folder));
xmlNewChild (root, NULL, (xmlChar *) "description", (xmlChar *) e_folder_get_description (folder));
- physical_path = local_folder->physical_uri + URI_PREFIX_LEN - 1;
+ physical_path = e_folder_get_physical_uri (folder) + URI_PREFIX_LEN - 1;
if (xmlSaveFile (physical_path, doc) < 0) {
xmlFreeDoc (doc);
@@ -154,28 +161,12 @@ save_metadata (ELocalFolder *local_folder)
}
-/* EFolder methods. */
-
-static const char *
-get_physical_uri (EFolder *folder)
-{
- ELocalFolder *local_folder;
-
- local_folder = E_LOCAL_FOLDER (folder);
- return local_folder->physical_uri;
-}
-
-
/* GtkObject methods. */
static void
destroy (GtkObject *object)
{
- ELocalFolder *folder;
-
- folder = E_LOCAL_FOLDER (object);
-
- g_free (folder->physical_uri);
+ /* No ELocalFolder-specific data to free. */
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
@@ -185,21 +176,16 @@ static void
class_init (ELocalFolderClass *klass)
{
GtkObjectClass *object_class;
- EFolderClass *folder_class;
parent_class = gtk_type_class (e_folder_get_type ());
object_class = GTK_OBJECT_CLASS (klass);
object_class->destroy = destroy;
-
- folder_class = E_FOLDER_CLASS (klass);
- folder_class->get_physical_uri = get_physical_uri;
}
static void
init (ELocalFolder *local_folder)
{
- local_folder->physical_uri = NULL;
}