aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-vfolder.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-05-18 16:46:37 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-05-18 16:46:37 +0800
commit31d87dbdfe55a62a9736b3a51b9339c1e516c2b2 (patch)
treeabe4076e57941e129855b62dbfc99238f30b6e5e /mail/mail-vfolder.c
parentb0cdc364041108c4e57a55e497b9ca9c7cd06471 (diff)
downloadgsoc2013-evolution-31d87dbdfe55a62a9736b3a51b9339c1e516c2b2.tar.gz
gsoc2013-evolution-31d87dbdfe55a62a9736b3a51b9339c1e516c2b2.tar.zst
gsoc2013-evolution-31d87dbdfe55a62a9736b3a51b9339c1e516c2b2.zip
no new message test if its the drafts folder too.
2004-05-18 Not Zed <NotZed@Ximian.com> * mail-folder-cache.c (folder_changed): no new message test if its the drafts folder too. * mail-vfolder.c (vfolder_adduri_desc): use a nicer, account-based formatter for folder names. Hmm, that was a good waste of time. For #55412. svn path=/trunk/; revision=25955
Diffstat (limited to 'mail/mail-vfolder.c')
-rw-r--r--mail/mail-vfolder.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index b4c2920c8b..14c5bf2ba3 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -202,8 +202,46 @@ static char *
vfolder_adduri_desc(struct _mail_msg *mm, int done)
{
struct _adduri_msg *m = (struct _adduri_msg *)mm;
+ char *euri, *desc;
+
+ /* Yuck yuck. Lookup the account name and use that to describe the path */
+ /* We really need to normalise this across all of camel and evolution :-/ */
+ euri = em_uri_from_camel(m->uri);
+ if (euri) {
+ CamelURL *url = camel_url_new(euri, NULL);
+
+ if (url) {
+ const char *loc = NULL;
+
+ if (url->host && !strcmp(url->host, "local")
+ && url->user && !strcmp(url->user, "local")) {
+ loc = _("On This Computer");
+ } else {
+ char *uid;
+ const EAccount *account;
+
+ if (url->user == NULL)
+ uid = g_strdup(url->host);
+ else
+ uid = g_strdup_printf("%s@%s", url->user, url->host);
+
+ account = e_account_list_find(mail_config_get_accounts(), E_ACCOUNT_FIND_UID, uid);
+ g_free(uid);
+ if (account != NULL)
+ loc = account->name;
+ }
+
+ if (loc && url->path)
+ desc = g_strdup_printf(_("Updating vFolders for '%s:%s'"), loc, url->path);
+ camel_url_free(url);
+ }
+ g_free(euri);
+ }
+
+ if (desc == NULL)
+ desc = g_strdup_printf(_("Updating vFolders for '%s'"), m->uri);
- return g_strdup_printf(_("Updating vfolders for uri: %s"), m->uri);
+ return desc;
}
static void