changeset 21198:b6136fd465a0

If there is no secondary text in a notify, avoid adding "\n\n" and creating a big gap. This may only be an issue if the primary text is very long.
author Richard Laager <rlaager@wiktel.com>
date Sun, 07 Oct 2007 15:58:57 +0000
parents 6f3eb604de73
children fb8f9bf86315
files pidgin/gtknotify.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtknotify.c	Sun Oct 07 15:15:58 2007 +0000
+++ b/pidgin/gtknotify.c	Sun Oct 07 15:58:57 2007 +0000
@@ -270,8 +270,9 @@
 	primary_esc = g_markup_escape_text(primary, -1);
 	secondary_esc = (secondary != NULL) ? g_markup_escape_text(secondary, -1) : NULL;
 	g_snprintf(label_text, sizeof(label_text),
-			   "<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s",
-			   primary_esc, (secondary ? secondary_esc : ""));
+			   "<span weight=\"bold\" size=\"larger\">%s</span>%s%s",
+			   primary_esc, (secondary ? "\n\n" : ""),
+			   (secondary ? secondary_esc : ""));
 	g_free(primary_esc);
 	g_free(secondary_esc);