aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-03 02:21:21 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:05 +0800
commit2c2c46289502eaf0455dcbc24cb1144be2ce545c (patch)
treed2f9573e90bfcf884c1d827febcc7515e84b82fa /plugins
parentbb99cdc5de522ad7dac209d0c3fe357493cbf6ac (diff)
downloadgsoc2013-evolution-2c2c46289502eaf0455dcbc24cb1144be2ce545c.tar
gsoc2013-evolution-2c2c46289502eaf0455dcbc24cb1144be2ce545c.tar.gz
gsoc2013-evolution-2c2c46289502eaf0455dcbc24cb1144be2ce545c.tar.bz2
gsoc2013-evolution-2c2c46289502eaf0455dcbc24cb1144be2ce545c.tar.lz
gsoc2013-evolution-2c2c46289502eaf0455dcbc24cb1144be2ce545c.tar.xz
gsoc2013-evolution-2c2c46289502eaf0455dcbc24cb1144be2ce545c.tar.zst
gsoc2013-evolution-2c2c46289502eaf0455dcbc24cb1144be2ce545c.zip
EMEventTargetFolder: Add an EAccount member.
The mail-notification plugin can use the EAccount member directly instead of searching for it by URI.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mail-notification/mail-notification.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index 5cde1fbf69..9f236c072a 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -379,16 +379,13 @@ new_notify_status (EMEventTargetFolder *t)
gchar *msg;
if (!status_count) {
- EAccount *account;
- gchar *name = t->name;
+ gchar *folder_name;
- account = e_get_account_by_source_url (t->uri);
-
- if (account != NULL) {
- name = g_strdup_printf (
- "%s/%s", e_account_get_string (
- account, E_ACCOUNT_NAME), name);
- }
+ if (t->account != NULL)
+ folder_name = g_strdup_printf (
+ "%s/%s", t->account->name, t->name);
+ else
+ folder_name = g_strdup (t->name);
status_count = t->new;
@@ -397,10 +394,9 @@ new_notify_status (EMEventTargetFolder *t)
msg = g_strdup_printf (ngettext (
"You have received %d new message\nin %s.",
"You have received %d new messages\nin %s.",
- status_count), status_count, name);
+ status_count), status_count, folder_name);
- if (name != t->name)
- g_free (name);
+ g_free (folder_name);
if (t->msg_sender) {
gchar *tmp, *str;