diff options
author | Christopher James Lahey <clahey@ximian.com> | 2002-05-15 01:21:52 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2002-05-15 01:21:52 +0800 |
commit | 8f6615310100030250e4c179666aed8419931421 (patch) | |
tree | defb2475e0c66b36826bb145db94396aedb96718 /shell | |
parent | eec3b5a2f3d0d4ca1211c0f3ddec19e707cfbf22 (diff) | |
download | gsoc2013-evolution-8f6615310100030250e4c179666aed8419931421.tar gsoc2013-evolution-8f6615310100030250e4c179666aed8419931421.tar.gz gsoc2013-evolution-8f6615310100030250e4c179666aed8419931421.tar.bz2 gsoc2013-evolution-8f6615310100030250e4c179666aed8419931421.tar.lz gsoc2013-evolution-8f6615310100030250e4c179666aed8419931421.tar.xz gsoc2013-evolution-8f6615310100030250e4c179666aed8419931421.tar.zst gsoc2013-evolution-8f6615310100030250e4c179666aed8419931421.zip |
Compute the evolutionUri here and pass it in.
2002-05-14 Christopher James Lahey <clahey@ximian.com>
* evolution-storage.c (evolution_storage_new_folder): Compute the
evolutionUri here and pass it in.
svn path=/trunk/; revision=16782
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 5 | ||||
-rw-r--r-- | shell/evolution-storage.c | 34 |
2 files changed, 38 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index ce83a680fe..b8d0b288cd 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,8 @@ +2002-05-14 Christopher James Lahey <clahey@ximian.com> + + * evolution-storage.c (evolution_storage_new_folder): Compute the + evolutionUri here and pass it in. + 2002-05-14 Ettore Perazzoli <ettore@ximian.com> * e-shell-config-offline.c diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c index 317812ab3c..28cbf89ce2 100644 --- a/shell/evolution-storage.c +++ b/shell/evolution-storage.c @@ -37,6 +37,8 @@ #include "evolution-storage.h" +#include "e-shell-constants.h" + #define PARENT_TYPE BONOBO_OBJECT_TYPE static BonoboObjectClass *parent_class = NULL; @@ -909,6 +911,31 @@ evolution_storage_deregister_on_shell (EvolutionStorage *evolution_storage, return result; } +static char * +make_full_uri (EvolutionStorage *storage, + const char *path) +{ + const char *storage_name; + char *full_path; + + storage_name = storage->priv->name; + + if (strcmp (path, G_DIR_SEPARATOR_S) == 0) + full_path = g_strconcat (E_SHELL_URI_PREFIX, + G_DIR_SEPARATOR_S, storage_name, + NULL); + else if (! g_path_is_absolute (path)) + full_path = g_strconcat (E_SHELL_URI_PREFIX, + G_DIR_SEPARATOR_S, storage_name, + G_DIR_SEPARATOR_S, path, NULL); + else + full_path = g_strconcat (E_SHELL_URI_PREFIX, + G_DIR_SEPARATOR_S, storage_name, + path, NULL); + + return full_path; +} + EvolutionStorageResult evolution_storage_new_folder (EvolutionStorage *evolution_storage, const char *path, @@ -923,6 +950,7 @@ evolution_storage_new_folder (EvolutionStorage *evolution_storage, GNOME_Evolution_Folder *corba_folder; CORBA_Environment ev; GList *p; + char *evolutionUri; g_return_val_if_fail (evolution_storage != NULL, EVOLUTION_STORAGE_ERROR_INVALIDPARAMETER); @@ -946,7 +974,11 @@ evolution_storage_new_folder (EvolutionStorage *evolution_storage, corba_folder->description = CORBA_string_dup (description); corba_folder->type = CORBA_string_dup (type); corba_folder->physicalUri = CORBA_string_dup (physical_uri); - corba_folder->evolutionUri = CORBA_string_dup (""); /* FIXME? */ + + evolutionUri = make_full_uri (evolution_storage, path); + corba_folder->evolutionUri = CORBA_string_dup (evolutionUri); + g_free (evolutionUri); + corba_folder->unreadCount = unread_count; if (! e_folder_tree_add (priv->folder_tree, path, corba_folder)) { |