diff pidgin/gtkimhtmltoolbar.c @ 29251:602f3b6ddbbf

Removed _ALLOW_ATTENTION from connection flags Look at the existence of prpl->send_attention to gray out attention button
author Marcus Lundblad <ml@update.uu.se>
date Wed, 29 Oct 2008 20:17:21 +0000
parents 0efd688ed086
children 9e07b1c14075
line wrap: on
line diff
--- a/pidgin/gtkimhtmltoolbar.c	Tue Oct 28 23:08:13 2008 +0000
+++ b/pidgin/gtkimhtmltoolbar.c	Wed Oct 29 20:17:21 2008 +0000
@@ -1562,11 +1562,16 @@
 	PurpleConversation *conv)
 {
 	PurpleConnection *gc = purple_conversation_get_gc(conv);
+	PurplePlugin *prpl = purple_connection_get_prpl(gc);
+	
 	purple_debug_info("gtkimhtmltoolbar", "switch active conversation to %p\n",
 		conv);
 	toolbar->active_conv = conv;
 	
-	gtk_widget_set_sensitive(toolbar->attention, 
-		gc->flags & PURPLE_CONNECTION_ALLOW_ATTENTION);
+	/* gray out attention button on protocols that don't support it
+	 for the time being it is always disabled for chats */
+	gtk_widget_set_sensitive(toolbar->attention,
+		purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM && 
+							 PURPLE_PLUGIN_PROTOCOL_INFO(prpl)->send_attention != NULL);
 }