diff src/buddy.c @ 2592:f194dd8250d4

[gaim-migrate @ 2605] hi committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 24 Oct 2001 01:42:48 +0000
parents cfb8c88d290e
children b2800bca74fe
line wrap: on
line diff
--- a/src/buddy.c	Tue Oct 23 21:39:44 2001 +0000
+++ b/src/buddy.c	Wed Oct 24 01:42:48 2001 +0000
@@ -1920,6 +1920,7 @@
 	time_t t;
 	int ihrs, imin;
 	struct buddy *b;
+	GtkStyle *style;
 
 	char infotip[2048];
 	char warn[256];
@@ -1948,6 +1949,20 @@
 	if (blist_options & OPT_BLIST_SHOW_IDLETIME)
 		gtk_widget_show(bs->idle);
 
+	style = gtk_style_new();
+	gdk_font_unref(style->font);
+	style->font = gdk_font_ref(GTK_WIDGET(bs->label)->style->font);
+	if ((blist_options & OPT_BLIST_GREY_IDLERS) && (b->idle) && (t - b->idle >= 1200)) {
+		style->fg[GTK_STATE_NORMAL].red =
+		  (style->fg[GTK_STATE_NORMAL].red / 3) * 2 + (style->bg[GTK_STATE_NORMAL].red / 3);
+		style->fg[GTK_STATE_NORMAL].green = 
+		  (style->fg[GTK_STATE_NORMAL].green / 3) * 2 + (style->bg[GTK_STATE_NORMAL].green / 3);
+		style->fg[GTK_STATE_NORMAL].blue = 
+		  (style->fg[GTK_STATE_NORMAL].blue / 3) * 2 + (style->bg[GTK_STATE_NORMAL].blue / 3);
+	}
+	gtk_widget_set_style(bs->label, style);
+	gtk_style_unref(style);
+
 	/* now we do the tooltip */
 	if (b->signon) {
 		char *stime = sec_to_text(t - b->signon +