[evolution/gnome-2-28] Bug 606449 - empty mail-notification popups



commit 68a3c7fdc5277b82e098a5ecfc06da3c8313b0e1
Author: Lucian Langa <lucilanga gnome org>
Date:   Sat Jan 9 09:50:14 2010 +0200

    Bug 606449 -  empty mail-notification popups

 plugins/mail-notification/mail-notification.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index c42473a..a2340ce 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -484,7 +484,7 @@ can_support_actions (void)
 static void
 new_notify_status (EMEventTargetFolder *t)
 {
-	gchar *msg;
+	gchar *msg, *safetext;
 	gboolean new_icon = !status_icon;
 
 	if (new_icon) {
@@ -516,13 +516,14 @@ new_notify_status (EMEventTargetFolder *t)
 	#ifdef HAVE_LIBNOTIFY
 	/* Now check whether we're supposed to send notifications */
 	if (is_part_enabled (GCONF_KEY_STATUS_NOTIFICATION)) {
+		safetext = g_markup_escape_text(msg, strlen(msg));
 		if (notify) {
-			notify_notification_update (notify, _("New email"), msg, "mail-unread");
+			notify_notification_update (notify, _("New email"), safetext, "mail-unread");
 		} else {
 			if (!notify_init ("evolution-mail-notification"))
 				fprintf (stderr,"notify init error");
 
-			notify  = notify_notification_new (_("New email"), msg, "mail-unread", NULL);
+			notify  = notify_notification_new (_("New email"), safetext, "mail-unread", NULL);
 			notify_notification_attach_to_status_icon (notify, status_icon);
 
 			/* Check if actions are supported */
@@ -533,6 +534,7 @@ new_notify_status (EMEventTargetFolder *t)
 				g_timeout_add (500, notification_callback, notify);
 			}
 		}
+		g_free(safetext);
 	}
 	#endif
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]