aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-04-05 13:07:06 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-04-05 13:07:06 +0800
commit00559e4cf7127175023c43ac7b8f9caa18c0aacb (patch)
tree70fb1106313fcde7fba6ec54fd50c0524a80c810 /mail
parent6a1a952d1fb90bfd1fdc75c5c544e434b4908265 (diff)
downloadgsoc2013-evolution-00559e4cf7127175023c43ac7b8f9caa18c0aacb.tar
gsoc2013-evolution-00559e4cf7127175023c43ac7b8f9caa18c0aacb.tar.gz
gsoc2013-evolution-00559e4cf7127175023c43ac7b8f9caa18c0aacb.tar.bz2
gsoc2013-evolution-00559e4cf7127175023c43ac7b8f9caa18c0aacb.tar.lz
gsoc2013-evolution-00559e4cf7127175023c43ac7b8f9caa18c0aacb.tar.xz
gsoc2013-evolution-00559e4cf7127175023c43ac7b8f9caa18c0aacb.tar.zst
gsoc2013-evolution-00559e4cf7127175023c43ac7b8f9caa18c0aacb.zip
removed, this is done in camel now. (fix_unmatched_info): renamed from
2004-04-05 Not Zed <NotZed@Ximian.com> * mail-ops.c (add_special_info): removed, this is done in camel now. (fix_unmatched_info): renamed from add_unmatched_info. svn path=/trunk/; revision=25311
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-ops.c71
2 files changed, 9 insertions, 68 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index fdf26fb29a..4d470fc32c 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2004-04-05 Not Zed <NotZed@Ximian.com>
+
+ * mail-ops.c (add_special_info): removed, this is done in camel
+ now.
+ (fix_unmatched_info): renamed from add_unmatched_info.
+
2004-04-02 Jeffrey Stedfast <fejj@ximian.com>
* em-migrate.c (cp_r): Revert my "fix" from yesterday. We can't
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 5cf845e93c..3c0827d16f 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -996,62 +996,8 @@ get_folderinfo_desc (struct _mail_msg *mm, int done)
return ret;
}
-static CamelFolderInfo *
-add_special_info(CamelStore *store, CamelFolderInfo *info, char *name, char *full_name, char *url_base)
-{
- CamelFolderInfo *fi, *vinfo, *parent;
- char *uri, *path;
- CamelURL *url;
-
- g_return_val_if_fail (info != NULL, NULL);
-
- parent = NULL;
- 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->uri, NULL);
- path = g_strdup_printf ("/%s", name);
- if (url->fragment)
- camel_url_set_fragment (url, path);
- else
- camel_url_set_path (url, path);
- g_free (path);
- uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
- camel_url_free (url);
-
- if (fi) {
- /* We're going to replace the physical Trash/Junk folder with our vTrash/vJunk folder */
- vinfo = fi;
- g_free (vinfo->full_name);
- g_free (vinfo->name);
- g_free (vinfo->uri);
- } else {
- /* There wasn't a Trash/Junk folder so create a new folder entry */
- vinfo = g_new0 (CamelFolderInfo, 1);
-
- g_assert(parent != NULL);
-
- /* link it into the right spot */
- vinfo->next = parent->next;
- parent->next = vinfo;
- }
-
- /* Fill in the new fields */
- vinfo->full_name = g_strdup (full_name);
- vinfo->name = g_strdup(vinfo->full_name);
- vinfo->uri = g_strdup_printf ("%s:%s", url_base, uri);
- vinfo->path = g_strdup_printf("/%s", vinfo->name);
- g_free (uri);
-
- return vinfo;
-}
-
static void
-add_unmatched_info(CamelFolderInfo *fi)
+fix_unmatched_info(CamelFolderInfo *fi)
{
for (; fi; fi = fi->next) {
if (!strcmp(fi->full_name, CAMEL_UNMATCHED_NAME)) {
@@ -1074,19 +1020,8 @@ get_folderinfo_get (struct _mail_msg *mm)
flags |= CAMEL_STORE_FOLDER_INFO_SUBSCRIBED;
m->info = camel_store_get_folder_info (m->store, NULL, flags, &mm->ex);
- if (m->info) {
- if (m->info->uri && (m->store->flags & CAMEL_STORE_VTRASH))
- add_special_info(m->store, m->info, CAMEL_VTRASH_NAME, _("Trash"), "vtrash");
- if (m->info->uri && (m->store->flags & CAMEL_STORE_VJUNK)) {
- CamelFolderInfo *info;
-
- info = add_special_info(m->store, m->info, CAMEL_VJUNK_NAME, _("Junk"), "vjunk");
- info->unread = -1;
- }
-
- if (CAMEL_IS_VEE_STORE(m->store))
- add_unmatched_info(m->info);
- }
+ if (m->info && CAMEL_IS_VEE_STORE(m->store))
+ fix_unmatched_info(m->info);
}
static void