aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mail-notification
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-06-08 04:23:41 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-06-08 04:23:41 +0800
commitc3d830ff18bd08a367d3c5d984d1c0ef03a7634b (patch)
treed5dada0dae62326d82a25b9921603a92efcde671 /plugins/mail-notification
parentcad21a7450e8d88032038f2592abf0d95ae5139b (diff)
downloadgsoc2013-evolution-c3d830ff18bd08a367d3c5d984d1c0ef03a7634b.tar.gz
gsoc2013-evolution-c3d830ff18bd08a367d3c5d984d1c0ef03a7634b.tar.zst
gsoc2013-evolution-c3d830ff18bd08a367d3c5d984d1c0ef03a7634b.zip
Bug 677628 - Remove account and folder name from mail notifications
Diffstat (limited to 'plugins/mail-notification')
-rw-r--r--plugins/mail-notification/mail-notification.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index 005ee66b74..d859c47072 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -364,6 +364,8 @@ new_notify_status (EMEventTargetFolder *t)
{
gchar *escaped_text;
gchar *text;
+ const gchar *summary;
+ const gchar *icon_name;
if (!status_count) {
CamelService *service;
@@ -378,12 +380,11 @@ new_notify_status (EMEventTargetFolder *t)
status_count = t->new;
- /* Translators: '%d' is the count of mails received
- * and '%s' is the name of the folder*/
+ /* Translators: '%d' is the count of mails received. */
text = g_strdup_printf (ngettext (
- "You have received %d new message\nin %s.",
- "You have received %d new messages\nin %s.",
- status_count), status_count, folder_name);
+ "You have received %d new message.",
+ "You have received %d new messages.",
+ status_count), status_count);
g_free (folder_name);
@@ -422,22 +423,23 @@ new_notify_status (EMEventTargetFolder *t)
status_count), status_count);
}
+ icon_name = "evolution";
+ summary = _("New email in Evolution");
escaped_text = g_markup_escape_text (text, strlen (text));
if (notify) {
notify_notification_update (
- notify, _("New email"),
- escaped_text, "mail-unread");
+ notify, summary, escaped_text, icon_name);
} else {
if (!notify_init ("evolution-mail-notification"))
fprintf (stderr,"notify init error");
#ifdef HAVE_LIBNOTIFY_07
notify = notify_notification_new (
- _("New email"), escaped_text, "mail-unread");
+ summary, escaped_text, icon_name);
#else
notify = notify_notification_new (
- _("New email"), escaped_text, "mail-unread", NULL);
+ summary, escaped_text, icon_name, NULL);
#endif /* HAVE_LIBNOTIFY_07 */
notify_notification_set_urgency (