diff pidgin/gtkblist.c @ 28413: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 901476dc70b9
children 4a2adf413aaa 2da9e508a523 e2c8fe39a2f1
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>",