Gray offline buddy icons when setting them as window icons. Fixes #302

Sat, 15 Sep 2007 20:53:42 +0000

author
Sean Egan <seanegan@pidgin.im>
date
Sat, 15 Sep 2007 20:53:42 +0000
changeset 20324
fabd44277f02
parent 20323
78e3d26ca09a
child 20325
f715307b15ec

Gray offline buddy icons when setting them as window icons. Fixes #302

pidgin/gtkconv.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkconv.c	Sat Sep 15 20:36:54 2007 +0000
+++ b/pidgin/gtkconv.c	Sat Sep 15 20:53:42 2007 +0000
@@ -6414,8 +6414,13 @@
 		if ((purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) &&
 				(gtkconv->u.im->anim))
 		{
+			PurpleBuddy *buddy = purple_find_buddy(conv->account, conv->name);
 			window_icon =
 				gdk_pixbuf_animation_get_static_image(gtkconv->u.im->anim);
+		
+			if (buddy &&  !PURPLE_BUDDY_IS_ONLINE(buddy))
+				gdk_pixbuf_saturate_and_pixelate(window_icon, window_icon, 0.0, FALSE);
+			
 			g_object_ref(window_icon);
 			l = g_list_append(l, window_icon);
 		} else {

mercurial