diff options
author | Not Zed <NotZed@Ximian.com> | 2004-01-19 16:41:11 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-01-19 16:41:11 +0800 |
commit | 35243289664c9e672b2802ffdd1408294a53b4a4 (patch) | |
tree | df7113e172f5333abbf7320e93f02f1b1e064274 /mail/mail-ops.c | |
parent | 3f3cb88b8e27d8926701bac89ec8773f4bf99d83 (diff) | |
download | gsoc2013-evolution-35243289664c9e672b2802ffdd1408294a53b4a4.tar.gz gsoc2013-evolution-35243289664c9e672b2802ffdd1408294a53b4a4.tar.zst gsoc2013-evolution-35243289664c9e672b2802ffdd1408294a53b4a4.zip |
removed this like i asked radek to ages ago, just call the parent
2004-01-19 Not Zed <NotZed@Ximian.com>
* mail-ops.c (add_vjunk_info, add_vtrash_info): removed this like
i asked radek to ages ago, just call the parent directly.
(add_vtrash_or_vjunk_info): renamed to something saner.
add_special_info.
(add_special_info): removed the 'unread count' parameter & return
the added info.
** See bug #52854.
* em-folder-tree.c (emft_tree_button_press): setup a FOLDER target
for the popup menu.
* em-popup.c (em_popup_target_free): implement free for
TARGET_FOLDER, changed the target options somewhat.
(em_popup_target_new_folder): implement folder selection target.
Total Hack(tm) alert.
(emp_standard_menu_factory): removed the stupid
g_assert_if_not_reached() call.
* message-list.c (message_list_destroy): NULL out the uid_nodemap
when we destroy it.
svn path=/trunk/; revision=24302
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 380ba24d30..9804584bc1 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1042,14 +1042,14 @@ get_folderinfo_desc (struct _mail_msg *mm, int done) return ret; } -static void -add_vtrash_or_vjunk_info (CamelStore *store, CamelFolderInfo *info, gchar *name, gchar *full_name, gchar *url_base, gboolean unread_count) +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_if_fail (info != NULL); + g_return_val_if_fail (info != NULL, NULL); parent = NULL; for (fi = info; fi; fi = fi->sibling) { @@ -1090,22 +1090,10 @@ add_vtrash_or_vjunk_info (CamelStore *store, CamelFolderInfo *info, gchar *name, vinfo->full_name = g_strdup (full_name); vinfo->name = g_strdup(vinfo->full_name); vinfo->url = g_strdup_printf ("%s:%s", url_base, uri); - if (!unread_count) - vinfo->unread_message_count = -1; vinfo->path = g_strdup_printf("/%s", vinfo->name); g_free (uri); -} -static void -add_vtrash_info (CamelStore *store, CamelFolderInfo *info) -{ - add_vtrash_or_vjunk_info (store, info, CAMEL_VTRASH_NAME, _("Trash"), "vtrash", FALSE); -} - -static void -add_vjunk_info (CamelStore *store, CamelFolderInfo *info) -{ - add_vtrash_or_vjunk_info (store, info, CAMEL_VJUNK_NAME, _("Junk"), "vjunk", TRUE); + return vinfo; } static void @@ -1134,9 +1122,14 @@ get_folderinfo_get (struct _mail_msg *mm) m->info = camel_store_get_folder_info (m->store, NULL, flags, &mm->ex); if (m->info) { if (m->info->url && (m->store->flags & CAMEL_STORE_VTRASH)) - add_vtrash_info(m->store, m->info); - if (m->info->url && (m->store->flags & CAMEL_STORE_VJUNK)) - add_vjunk_info(m->store, m->info); + add_special_info(m->store, m->info, CAMEL_VTRASH_NAME, _("Trash"), "vtrash"); + if (m->info->url && (m->store->flags & CAMEL_STORE_VJUNK)) { + CamelFolderInfo *info; + + info = add_special_info(m->store, m->info, CAMEL_VJUNK_NAME, _("Junk"), "vjunk"); + info->unread_message_count = -1; + } + if (CAMEL_IS_VEE_STORE(m->store)) add_unmatched_info(m->info); } |