changeset 13385:1a965241c8b9

[gaim-migrate @ 15758] sf patch #1431281, from Sadrul Habib Chowdhury "This displays the status-text in the dropdown-store in the same line with the text when the small-buddy list is being used. This makes it consistent with the cellview." committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 03 Mar 2006 05:54:34 +0000
parents a580ffe73314
children 54f679516b52
files src/gtkstatusbox.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkstatusbox.c	Fri Mar 03 03:38:36 2006 +0000
+++ b/src/gtkstatusbox.c	Fri Mar 03 05:54:34 2006 +0000
@@ -1104,10 +1104,12 @@
 	}
 	else
 	{
+		gboolean show_buddy_icons;
+		GtkStyle *style;
 		char aa_color[8];
 		gchar *escaped_title, *escaped_desc;
-		GtkStyle *style;
 
+		show_buddy_icons = gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons");
 		style = gtk_widget_get_style(GTK_WIDGET(status_box));
 		snprintf(aa_color, sizeof(aa_color), "#%02x%02x%02x",
 			 style->text_aa[GTK_STATE_NORMAL].red >> 8,
@@ -1116,8 +1118,10 @@
 
 		escaped_title = g_markup_escape_text(title, -1);
 		escaped_desc = g_markup_escape_text(desc, -1);
-		text = g_strdup_printf("%s\n<span color=\"%s\" size=\"smaller\">%s</span>",
-					escaped_title, aa_color, escaped_desc);
+		text = g_strdup_printf("%s%s<span color=\"%s\" size=\"smaller\">%s</span>",
+					escaped_title,
+					show_buddy_icons ? "\n" : " - ",
+					aa_color, escaped_desc);
 		g_free(escaped_title);
 		g_free(escaped_desc);
 	}