aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-store.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-03-11 11:04:45 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-03-11 11:04:45 +0800
commit6071a963e85f69133cc1761e37b6ed942629d70d (patch)
tree95c9e1644c80d083e2baf049e66b9f99c5997051 /camel/camel-store.c
parentecda7da11e893ff29258388c7b594b5ef4fa902a (diff)
downloadgsoc2013-evolution-6071a963e85f69133cc1761e37b6ed942629d70d.tar.gz
gsoc2013-evolution-6071a963e85f69133cc1761e37b6ed942629d70d.tar.zst
gsoc2013-evolution-6071a963e85f69133cc1761e37b6ed942629d70d.zip
turn off NOINFERIORS always, translate to nochildren.
2004-03-11 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_one_folder_offline): (parse_list_response_as_folder_info): turn off NOINFERIORS always, translate to nochildren. 2004-03-08 Not Zed <NotZed@Ximian.com> * camel-vee-store.c (vee_get_folder_info): setup virtual/system flags as appropriate. (change_folder): setup flags properly. * providers/nntp/camel-nntp-store.c (nntp_store_get_subscribed_folder_info): mark all folders as system folders. * providers/local/camel-mh-store.c (fill_fi): add this to setup folderinfo. (folder_info_new): call fill_fi to fill unread/total. (recursive_scan, folders_scan): ahh yeah, so wtf was i thinking, store->flags != get_folder_info flags!!!! * providers/local/camel-maildir-store.c (camel_folder_info_new): remove unread count arg & setup total. (fill_fi): setup total field. (scan_dir): remove the code that checked the directory directly - use fill_fi instead. It will more accurately reflect what you get when you visit the folder. (camel_folder_info_new): mark "." as a system folder. (scan_dir): try to setup children/no children flags properly. * providers/local/camel-mbox-store.c (fill_fi): setup total field. (scan_dir): init total. (get_folder_info): " 2004-03-05 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (parse_list_response_as_folder_info): mark INBOX as a system folder. Can't be renamed/deleted. (fill_fi): setup total field. (get_folder_counts): ditto. * camel-store.c (add_special_info): set the system folder flag. * camel-store.h: time to fix up the camelfolderinfo mess. fix some member names, and add some type fields. Fixed all uses. svn path=/trunk/; revision=25019
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r--camel/camel-store.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 3beda71336..38bfcc1e32 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -687,14 +687,14 @@ add_special_info (CamelStore *store, CamelFolderInfo *info, const char *name, co
g_return_if_fail (info != NULL);
parent = NULL;
- for (fi = info; fi; fi = fi->sibling) {
+ for (fi = info; fi; fi = fi->next) {
if (!strcmp (fi->name, name))
break;
parent = fi;
}
/* create our vTrash/vJunk URL */
- url = camel_url_new (info->url, NULL);
+ url = camel_url_new (info->uri, NULL);
if (((CamelService *) store)->provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) {
camel_url_set_fragment (url, name);
} else {
@@ -711,7 +711,7 @@ add_special_info (CamelStore *store, CamelFolderInfo *info, const char *name, co
vinfo = fi;
g_free (vinfo->full_name);
g_free (vinfo->name);
- g_free (vinfo->url);
+ g_free (vinfo->uri);
g_free (vinfo->path);
} else {
/* There wasn't a Trash/Junk folder so create a new folder entry */
@@ -722,17 +722,17 @@ add_special_info (CamelStore *store, CamelFolderInfo *info, const char *name, co
vinfo->flags |= CAMEL_FOLDER_NOINFERIORS | CAMEL_FOLDER_SUBSCRIBED;
/* link it into the right spot */
- vinfo->sibling = parent->sibling;
- parent->sibling = vinfo;
+ vinfo->next = parent->next;
+ parent->next = vinfo;
}
/* Fill in the new fields */
- vinfo->flags |= CAMEL_FOLDER_VIRTUAL;
+ vinfo->flags |= CAMEL_FOLDER_VIRTUAL|CAMEL_FOLDER_SYSTEM|CAMEL_FOLDER_VTRASH;
vinfo->full_name = g_strdup (full_name);
vinfo->name = g_strdup (vinfo->full_name);
- vinfo->url = uri;
+ vinfo->uri = uri;
if (!unread_count)
- vinfo->unread_message_count = -1;
+ vinfo->unread = -1;
vinfo->path = g_strdup_printf ("/%s", vinfo->name);
}
@@ -775,9 +775,9 @@ camel_store_get_folder_info(CamelStore *store, const char *top, guint32 flags, C
CAMEL_STORE_UNLOCK(store, folder_lock);
if (info && (top == NULL || *top == '\0') && (flags & CAMEL_STORE_FOLDER_INFO_NO_VIRTUAL) == 0) {
- if (info->url && (store->flags & CAMEL_STORE_VTRASH))
+ if (info->uri && (store->flags & CAMEL_STORE_VTRASH))
add_special_info (store, info, CAMEL_VTRASH_NAME, _("Trash"), FALSE);
- if (info->url && (store->flags & CAMEL_STORE_VJUNK))
+ if (info->uri && (store->flags & CAMEL_STORE_VJUNK))
add_special_info (store, info, CAMEL_VJUNK_NAME, _("Junk"), TRUE);
}
@@ -844,12 +844,12 @@ void
camel_folder_info_free (CamelFolderInfo *fi)
{
if (fi) {
- camel_folder_info_free (fi->sibling);
+ camel_folder_info_free (fi->next);
camel_folder_info_free (fi->child);
g_free (fi->name);
g_free (fi->full_name);
g_free (fi->path);
- g_free (fi->url);
+ g_free (fi->uri);
g_free (fi);
}
}
@@ -983,7 +983,7 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace,
pfi->name = g_strdup (pname);
/* FIXME: url's with fragments should have the fragment truncated, not path */
- url = camel_url_new (fi->url, NULL);
+ url = camel_url_new (fi->uri, NULL);
sep = strrchr (url->path, separator);
if (sep)
*sep = '\0';
@@ -994,7 +994,7 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace,
/* 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);
+ pfi->uri = camel_url_to_string (url, 0);
camel_url_free (url);
g_hash_table_insert (hash, pname, pfi);
@@ -1004,9 +1004,9 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace,
if (tail == NULL) {
pfi->child = fi;
} else {
- while (tail->sibling)
- tail = tail->sibling;
- tail->sibling = fi;
+ while (tail->next)
+ tail = tail->next;
+ tail->next = fi;
}
fi->parent = pfi;
} else if (!top)
@@ -1025,7 +1025,7 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace,
tail = fi;
top = fi;
} else {
- tail->sibling = fi;
+ tail->next = fi;
tail = fi;
}
}
@@ -1039,17 +1039,17 @@ static CamelFolderInfo *folder_info_clone_rec(CamelFolderInfo *fi, CamelFolderIn
info = g_malloc(sizeof(*info));
info->parent = parent;
- info->url = g_strdup(fi->url);
+ 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_message_count = fi->unread_message_count;
+ info->unread = fi->unread;
info->flags = fi->flags;
- if (fi->sibling)
- info->sibling = folder_info_clone_rec(fi->sibling, parent);
+ if (fi->next)
+ info->next = folder_info_clone_rec(fi->next, parent);
else
- info->sibling = NULL;
+ info->next = NULL;
if (fi->child)
info->child = folder_info_clone_rec(fi->child, info);