aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-03 02:21:21 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-05-03 03:12:55 +0800
commit5fcf41925becbac39447b315097b062de2bfd0a1 (patch)
tree3ae862b0c279b7e591ba6ff5ae07e865191fe59e /plugins
parentba47251738be2efbe56852e843f9b4c3e4be5b9a (diff)
downloadgsoc2013-evolution-5fcf41925becbac39447b315097b062de2bfd0a1.tar
gsoc2013-evolution-5fcf41925becbac39447b315097b062de2bfd0a1.tar.gz
gsoc2013-evolution-5fcf41925becbac39447b315097b062de2bfd0a1.tar.bz2
gsoc2013-evolution-5fcf41925becbac39447b315097b062de2bfd0a1.tar.lz
gsoc2013-evolution-5fcf41925becbac39447b315097b062de2bfd0a1.tar.xz
gsoc2013-evolution-5fcf41925becbac39447b315097b062de2bfd0a1.tar.zst
gsoc2013-evolution-5fcf41925becbac39447b315097b062de2bfd0a1.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;