aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-05-18 12:23:29 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-05-18 12:23:29 +0800
commitebcd73e5d234b9b746ef1baa50bd01dac30b44cf (patch)
treef6468e669c1b1de6f425c4a68000ff62af58166c /plugins
parent1e906110ccc40256aee28b45deb88e3cdef8242e (diff)
downloadgsoc2013-evolution-ebcd73e5d234b9b746ef1baa50bd01dac30b44cf.tar.gz
gsoc2013-evolution-ebcd73e5d234b9b746ef1baa50bd01dac30b44cf.tar.zst
gsoc2013-evolution-ebcd73e5d234b9b746ef1baa50bd01dac30b44cf.zip
** Fix for bug #439316
svn path=/trunk/; revision=33557
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mail-notification/ChangeLog7
-rw-r--r--plugins/mail-notification/mail-notification.c27
2 files changed, 24 insertions, 10 deletions
diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog
index d06fe45266..0e50fff1a3 100644
--- a/plugins/mail-notification/ChangeLog
+++ b/plugins/mail-notification/ChangeLog
@@ -1,5 +1,12 @@
2007-05-18 Srinivasa Ragavan <sragavan@novell.com>
+ ** Fix for bug #439316
+
+ * mail-notification.c: (org_gnome_mail_new_notify): Fixes translation
+ issues and some fixes around broken gtk.
+
+2007-05-18 Srinivasa Ragavan <sragavan@novell.com>
+
** Fix for bug #439146 and #438711 from Ross Burton and Daniel Gryniewicz
* Makefile.am:
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index 7eace23fb9..d170d7a6df 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -96,13 +96,16 @@ org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t)
is_key = gconf_client_get (client, GCONF_KEY_BLINK, NULL);
if (!is_key)
gconf_client_set_bool (client, GCONF_KEY_BLINK, TRUE, NULL);
+ else
+ gconf_value_free (is_key);
+
+ if (!status_icon) {
+ status_icon = gtk_status_icon_new ();
+ gtk_status_icon_set_from_pixbuf (status_icon, e_icon_factory_get_icon ("stock_mail", E_ICON_SIZE_LARGE_TOOLBAR));
+ }
- gconf_value_free (is_key);
- if (!status_icon)
- status_icon = gtk_status_icon_new_from_pixbuf (e_icon_factory_get_icon ("stock_mail", E_ICON_SIZE_LARGE_TOOLBAR));
-
folder = em_utils_folder_name_from_uri (t->uri);
- msg = g_strdup_printf (_("You have received %d new messages in %s."), t->new, folder);
+ msg = g_strdup_printf (ngettext(_("You have received %d new message in %s."), _("You have received %d new messages in %s."), t->new), t->new, folder);
gtk_status_icon_set_tooltip (status_icon, msg);
gtk_status_icon_set_visible (status_icon, TRUE);
@@ -114,18 +117,22 @@ org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t)
is_key = gconf_client_get (client, GCONF_KEY_NOTIFICATION, NULL);
if (!is_key)
gconf_client_set_bool (client, GCONF_KEY_NOTIFICATION, TRUE, NULL);
- gconf_value_free (is_key);
+ else
+ gconf_value_free (is_key);
/* Now check whether we're supposed to send notifications */
if (gconf_client_get_bool (client, GCONF_KEY_NOTIFICATION, NULL)) {
if (!notify_init ("evolution-mail-notification"))
fprintf(stderr,"notify init error");
+ printf("creating %d\n", status_icon);
- notify = notify_notification_new_with_status_icon (
- "New email",
+ notify = notify_notification_new (
+ _("New email"),
msg,
- "stock_mail",
- status_icon);
+ "stock_mail",
+ NULL);
+ notify_notification_attach_to_status_icon (notify, status_icon);
+
notify_notification_set_urgency(notify, NOTIFY_URGENCY_NORMAL);
notify_notification_set_timeout(notify, NOTIFY_EXPIRES_DEFAULT);
notify_notification_show(notify, NULL);