Make idle and offline buddy names and the idle time in the small list grey

Sat, 22 Aug 2009 19:35:02 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Sat, 22 Aug 2009 19:35:02 +0000
changeset 28344
7f13e35b4edb
parent 28343
0f91a1031c00
child 28345
57a838c454b0
child 28346
1250dd4e9448

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

pidgin/gtkblist.c file | annotate | diff | comparison | revisions
--- 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>",

mercurial