Mercurial > pidgin
comparison src/gtkstatusbox.c @ 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 | 708baf7cfee8 |
children | 2b9aa05b6fa1 |
comparison
equal
deleted
inserted
replaced
13384:a580ffe73314 | 13385:1a965241c8b9 |
---|---|
1102 { | 1102 { |
1103 text = g_markup_escape_text(title, -1); | 1103 text = g_markup_escape_text(title, -1); |
1104 } | 1104 } |
1105 else | 1105 else |
1106 { | 1106 { |
1107 gboolean show_buddy_icons; | |
1108 GtkStyle *style; | |
1107 char aa_color[8]; | 1109 char aa_color[8]; |
1108 gchar *escaped_title, *escaped_desc; | 1110 gchar *escaped_title, *escaped_desc; |
1109 GtkStyle *style; | 1111 |
1110 | 1112 show_buddy_icons = gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons"); |
1111 style = gtk_widget_get_style(GTK_WIDGET(status_box)); | 1113 style = gtk_widget_get_style(GTK_WIDGET(status_box)); |
1112 snprintf(aa_color, sizeof(aa_color), "#%02x%02x%02x", | 1114 snprintf(aa_color, sizeof(aa_color), "#%02x%02x%02x", |
1113 style->text_aa[GTK_STATE_NORMAL].red >> 8, | 1115 style->text_aa[GTK_STATE_NORMAL].red >> 8, |
1114 style->text_aa[GTK_STATE_NORMAL].green >> 8, | 1116 style->text_aa[GTK_STATE_NORMAL].green >> 8, |
1115 style->text_aa[GTK_STATE_NORMAL].blue >> 8); | 1117 style->text_aa[GTK_STATE_NORMAL].blue >> 8); |
1116 | 1118 |
1117 escaped_title = g_markup_escape_text(title, -1); | 1119 escaped_title = g_markup_escape_text(title, -1); |
1118 escaped_desc = g_markup_escape_text(desc, -1); | 1120 escaped_desc = g_markup_escape_text(desc, -1); |
1119 text = g_strdup_printf("%s\n<span color=\"%s\" size=\"smaller\">%s</span>", | 1121 text = g_strdup_printf("%s%s<span color=\"%s\" size=\"smaller\">%s</span>", |
1120 escaped_title, aa_color, escaped_desc); | 1122 escaped_title, |
1123 show_buddy_icons ? "\n" : " - ", | |
1124 aa_color, escaped_desc); | |
1121 g_free(escaped_title); | 1125 g_free(escaped_title); |
1122 g_free(escaped_desc); | 1126 g_free(escaped_desc); |
1123 } | 1127 } |
1124 | 1128 |
1125 gtk_list_store_append(status_box->dropdown_store, &iter); | 1129 gtk_list_store_append(status_box->dropdown_store, &iter); |