diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-10-22 08:45:25 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-10-22 08:45:25 +0800 |
commit | 2eb6b07427b769ccc10034b9c5c32c226b3a8681 (patch) | |
tree | cb3b139c070a100b6b3d39b7a7302a49eea41aec | |
parent | 6b011476f69e6e2cbf6af940b5e85c046a74aa00 (diff) | |
download | gsoc2013-evolution-2eb6b07427b769ccc10034b9c5c32c226b3a8681.tar gsoc2013-evolution-2eb6b07427b769ccc10034b9c5c32c226b3a8681.tar.gz gsoc2013-evolution-2eb6b07427b769ccc10034b9c5c32c226b3a8681.tar.bz2 gsoc2013-evolution-2eb6b07427b769ccc10034b9c5c32c226b3a8681.tar.lz gsoc2013-evolution-2eb6b07427b769ccc10034b9c5c32c226b3a8681.tar.xz gsoc2013-evolution-2eb6b07427b769ccc10034b9c5c32c226b3a8681.tar.zst gsoc2013-evolution-2eb6b07427b769ccc10034b9c5c32c226b3a8681.zip |
Updated comments to make the code a bit more clear.
2001-10-21 Jeffrey Stedfast <fejj@ximian.com>
* camel-store.c (camel_folder_info_build): Updated comments to
make the code a bit more clear.
svn path=/trunk/; revision=13859
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/camel-store.c | 16 |
2 files changed, 14 insertions, 7 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 9fea232e7b..01658ef75b 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2001-10-21 Jeffrey Stedfast <fejj@ximian.com> + + * camel-store.c (camel_folder_info_build): Updated comments to + make the code a bit more clear. + 2001-10-21 <NotZed@Ximian.com> * camel-store.c (CS_CLASS): Dont do the macro stuff - basically so diff --git a/camel/camel-store.c b/camel/camel-store.c index 0f104b057b..c0e7ae2150 100644 --- a/camel/camel-store.c +++ b/camel/camel-store.c @@ -754,11 +754,11 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace, GHashTable *hash; char *name, *p, *pname; int i, nlen; - + if (!namespace) namespace = ""; nlen = strlen (namespace); - + /* Hash the folders. */ hash = g_hash_table_new (g_str_hash, g_str_equal); for (i = 0; i < folders->len; i++) { @@ -771,7 +771,7 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace, name++; g_hash_table_insert (hash, name, fi); } - + /* Now find parents. */ for (i = 0; i < folders->len; i++) { fi = folders->pdata[i]; @@ -793,9 +793,11 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace, if (pfi) { g_free (pname); } else { + /* we are missing a folder in the heirarchy so + create a fake folder node */ CamelURL *url; char *sep; - + pfi = g_new0 (CamelFolderInfo, 1); pfi->full_name = pname; if (short_names) { @@ -806,7 +808,7 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace, pfi->name = g_strdup (pname); } else pfi->name = g_strdup (pname); - + url = camel_url_new (fi->url, NULL); sep = strrchr (url->path, separator); if (sep) @@ -814,11 +816,11 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace, else d(g_warning ("huh, no \"%c\" in \"%s\"?", separator, fi->url)); - /* FIXME: wtf is this? This is WRONG. Parent folders can be selectable */ + /* since this is a "fake" folder node, it is not selectable */ camel_url_set_param (url, "noselect", "yes"); pfi->url = camel_url_to_string (url, 0); camel_url_free (url); - + g_hash_table_insert (hash, pname, pfi); g_ptr_array_add (folders, pfi); } |