aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-store.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-05-26 12:24:01 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-05-26 12:24:01 +0800
commit1c11041eebd485a471e842ba4f75834c2ce6e1f7 (patch)
treec708d5ff8c87af387e5ad790f15616053068e9f4 /camel/camel-store.c
parentca6276f9e5e5813b6954e2869667458c3b1d9f10 (diff)
downloadgsoc2013-evolution-1c11041eebd485a471e842ba4f75834c2ce6e1f7.tar
gsoc2013-evolution-1c11041eebd485a471e842ba4f75834c2ce6e1f7.tar.gz
gsoc2013-evolution-1c11041eebd485a471e842ba4f75834c2ce6e1f7.tar.bz2
gsoc2013-evolution-1c11041eebd485a471e842ba4f75834c2ce6e1f7.tar.lz
gsoc2013-evolution-1c11041eebd485a471e842ba4f75834c2ce6e1f7.tar.xz
gsoc2013-evolution-1c11041eebd485a471e842ba4f75834c2ce6e1f7.tar.zst
gsoc2013-evolution-1c11041eebd485a471e842ba4f75834c2ce6e1f7.zip
removed.
2004-05-25 Not Zed <NotZed@Ximian.com> * camel-store.c (camel_folder_info_build_path): removed. * camel-store.h (CamelFolderInfo): removed 'path', fixed all callers. (struct _CamelStore): removed 'dir_sep' fixed all uses. svn path=/trunk/; revision=26089
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r--camel/camel-store.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 861edeced4..042e9509da 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -138,8 +138,6 @@ camel_store_init (void *o)
/* set vtrash and vjunk on by default */
store->flags = CAMEL_STORE_VTRASH | CAMEL_STORE_VJUNK;
- store->dir_sep = '/';
-
store->priv = g_malloc0 (sizeof (*store->priv));
store->priv->folder_lock = e_mutex_new (E_MUTEX_REC);
}
@@ -459,7 +457,7 @@ camel_store_rename_folder (CamelStore *store, const char *old_namein, const char
strcmp(folder->full_name, old_name) == 0)
|| ((namelen > oldlen)
&& strncmp(folder->full_name, old_name, oldlen) == 0
- && folder->full_name[oldlen] == store->dir_sep)) {
+ && folder->full_name[oldlen] == '/')) {
d(printf("Found subfolder of '%s' == '%s'\n", old_name, folder->full_name));
CAMEL_FOLDER_LOCK(folder, lock);
} else {
@@ -730,7 +728,6 @@ add_special_info (CamelStore *store, CamelFolderInfo *info, const char *name, co
g_free (vinfo->full_name);
g_free (vinfo->name);
g_free (vinfo->uri);
- g_free (vinfo->path);
} else {
/* There wasn't a Trash/Junk folder so create a new folder entry */
vinfo = g_new0 (CamelFolderInfo, 1);
@@ -751,7 +748,6 @@ add_special_info (CamelStore *store, CamelFolderInfo *info, const char *name, co
vinfo->uri = uri;
if (!unread_count)
vinfo->unread = -1;
- vinfo->path = g_strdup_printf ("/%s", vinfo->full_name);
}
static void
@@ -889,39 +885,11 @@ camel_folder_info_free (CamelFolderInfo *fi)
camel_folder_info_free (fi->child);
g_free (fi->name);
g_free (fi->full_name);
- g_free (fi->path);
g_free (fi->uri);
g_free (fi);
}
}
-/**
- * camel_folder_info_build_path:
- * @fi: folder info
- * @separator: directory separator
- *
- * Sets the folder info path based on the folder's full name and
- * directory separator.
- **/
-void
-camel_folder_info_build_path (CamelFolderInfo *fi, char separator)
-{
- const char *full_name;
- char *p;
-
- full_name = fi->full_name;
- while (*full_name == separator)
- full_name++;
-
- fi->path = g_strdup_printf ("/%s", full_name);
- if (separator != '/') {
- for (p = fi->path; *p; p++) {
- if (*p == separator)
- *p = '/';
- }
- }
-}
-
static int
folder_info_cmp (const void *ap, const void *bp)
{
@@ -997,10 +965,6 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace,
if (*name == separator)
name++;
- /* set the path if it isn't already set */
- if (!fi->path)
- camel_folder_info_build_path (fi, separator);
-
p = strrchr (name, separator);
if (p) {
pname = g_strndup (name, p - name);
@@ -1079,7 +1043,6 @@ static CamelFolderInfo *folder_info_clone_rec(CamelFolderInfo *fi, CamelFolderIn
info->uri = g_strdup(fi->uri);
info->name = g_strdup(fi->name);
info->full_name = g_strdup(fi->full_name);
- info->path = g_strdup(fi->path);
info->unread = fi->unread;
info->flags = fi->flags;