changeset 28063:f1a8a28432f4

Make idle and offline buddy names and the idle time in the small list grey in the buddy list when not using a theme, and default offline buddies to grey when using a theme that does not specify a color for offline buddies Fixes #9947
author Mark Doliner <mark@kingant.net>
date Sat, 22 Aug 2009 19:35:02 +0000
parents 4b61989ab198
children e7a2e2208f88 7921a53b94b3
files pidgin/gtkblist.c
diffstat 1 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Sat Aug 22 18:52:16 2009 +0000
+++ b/pidgin/gtkblist.c	Sat Aug 22 19:35:02 2009 +0000
@@ -4148,6 +4148,7 @@
 			name_color = "dim grey";
 		} else if (!purple_presence_is_online(presence)) {
 			namefont = pidgin_blist_theme_get_offline_text_info(theme);
+			name_color = "dim grey";
 			statusfont = pidgin_blist_theme_get_status_text_info(theme);
 		} else if (purple_presence_is_available(presence)) {
 			namefont = pidgin_blist_theme_get_online_text_info(theme);
@@ -4156,6 +4157,13 @@
 			namefont = pidgin_blist_theme_get_away_text_info(theme);
 			statusfont = pidgin_blist_theme_get_status_text_info(theme);
 		}
+	} else {
+		if (!selected
+				&& (purple_presence_is_idle(presence)
+							|| !purple_presence_is_online(presence)))
+		{
+			name_color = "dim grey";
+		}
 	}
 
 	name_color = theme_font_get_color_default(namefont, name_color);
@@ -6405,10 +6413,13 @@
 			ihrs = (t - idle_secs) / 3600;
 			imin = ((t - idle_secs) / 60) % 60;
 
-			if (!selected && theme != NULL && (pair = pidgin_blist_theme_get_idle_text_info(theme)) != NULL)
+			if (selected)
+				textcolor = NULL;
+			else if (theme != NULL && (pair = pidgin_blist_theme_get_idle_text_info(theme)) != NULL)
 				textcolor = pidgin_theme_font_get_color_describe(pair);
 			else
-				textcolor = NULL;
+				/* If no theme them default to making idle buddy names grey */
+				textcolor = "dim grey";
 
 			if (textcolor) {
 				idle = g_strdup_printf("<span color='%s' font_desc='%s'>%d:%02d</span>",