From d25df2ff25c20e6b8a0fc1d2977dbd49f6335fb6 Mon Sep 17 00:00:00 2001 From: Lucian Langa Date: Sat, 9 Jan 2010 09:38:43 +0200 Subject: Bug 606449 - empty mail-notification popups --- plugins/mail-notification/mail-notification.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'plugins/mail-notification/mail-notification.c') diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index 22b0eeacd1..72e3881b23 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -465,7 +465,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) { @@ -540,13 +540,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 */ @@ -557,6 +558,7 @@ new_notify_status (EMEventTargetFolder *t) g_timeout_add (500, notification_callback, notify); } } + g_free(safetext); } #endif -- cgit