aboutsummaryrefslogtreecommitdiffstats
path: root/mail
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
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')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-folder-cache.c1
-rw-r--r--mail/mail-vfolder.c40
3 files changed, 47 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index cf8714322a..7c632f643c 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,12 @@
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.
+
* em-folder-view.c (emfv_list_selection_change): Listen to the
tree selection change event directly & proxy out, so we can update
the status bar properly. Blah. For #58600.
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index e4d9e327e5..b43f33e62c 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -435,6 +435,7 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
if (!CAMEL_IS_VEE_FOLDER(folder)
&& folder != mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)
+ && folder != mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS)
&& folder != mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT)
&& changes && changes->uid_added)
new = changes->uid_added->len;
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