[Galago-commits] r2995 - in trunk/notification-daemon: . src/themes/standard
galago-commits at freedesktop.org
galago-commits at freedesktop.org
Sat Aug 25 19:43:40 PDT 2007
Author: chipx86
Date: 2007-08-25 19:43:39 -0700 (Sat, 25 Aug 2007)
New Revision: 2995
Modified:
trunk/notification-daemon/ChangeLog
trunk/notification-daemon/NEWS
trunk/notification-daemon/src/themes/standard/theme.c
Log:
Escape the text in the summary so that & and < don't cause problems. Fixes bug #132.
Modified: trunk/notification-daemon/ChangeLog
===================================================================
--- trunk/notification-daemon/ChangeLog 2007-08-26 02:38:01 UTC (rev 2994)
+++ trunk/notification-daemon/ChangeLog 2007-08-26 02:43:39 UTC (rev 2995)
@@ -1,3 +1,9 @@
+Sat Aug 25 19:42:05 PDT 2007 Christian Hammond <chipx86 at chipx86.com>
+
+ * src/themes/standard/theme.c:
+ - Escape the text in the summary so that & and < don't cause problems.
+ Fixes bug #132.
+
Sat Aug 25 19:31:16 PDT 2007 Christian Hammond <chipx86 at chipx86.com>
* src/daemon/daemon.c:
Modified: trunk/notification-daemon/NEWS
===================================================================
--- trunk/notification-daemon/NEWS 2007-08-26 02:38:01 UTC (rev 2994)
+++ trunk/notification-daemon/NEWS 2007-08-26 02:43:39 UTC (rev 2995)
@@ -5,6 +5,9 @@
to indicate why the notification was closed. (Bug #137)
* Send an error if the user attempts to close an already closed
notification.
+ * Text is now escaped in the summary in the Standard theme so that
+ ampersands and other special characters show up instead of disappearing.
+ (Bug #132)
* Added support for playing sounds when the "sound-file" hint is set or
when the default_sound GConf key is set, as well as support for the
"suppress-sound" hint. Patch by Jim Ramsay. (Ticket #111)
Modified: trunk/notification-daemon/src/themes/standard/theme.c
===================================================================
--- trunk/notification-daemon/src/themes/standard/theme.c 2007-08-26 02:38:01 UTC (rev 2994)
+++ trunk/notification-daemon/src/themes/standard/theme.c 2007-08-26 02:43:39 UTC (rev 2995)
@@ -789,11 +789,14 @@
void
set_notification_text(GtkWindow *nw, const char *summary, const char *body)
{
- char *str;
+ char *str, *quoted;
WindowData *windata = g_object_get_data(G_OBJECT(nw), "windata");
g_assert(windata != NULL);
- str = g_strdup_printf("<b><big>%s</big></b>", summary);
+ quoted = g_markup_escape_text(summary, -1);
+ str = g_strdup_printf("<b><big>%s</big></b>", quoted);
+ g_free(quoted);
+
gtk_label_set_markup(GTK_LABEL(windata->summary_label), str);
g_free(str);
More information about the galago-commits
mailing list