changeset 1343:a0d89bdc733e

[gaim-migrate @ 1353] More non-clickable button changes =) committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Thu, 21 Dec 2000 06:56:48 +0000
parents 84aef77f0add
children 8b5ed2f0496c
files src/buddy_chat.c src/conversation.c
diffstat 2 files changed, 25 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/buddy_chat.c	Thu Dec 21 02:11:56 2000 +0000
+++ b/src/buddy_chat.c	Thu Dec 21 06:56:48 2000 +0000
@@ -655,6 +655,7 @@
 	info = picture_button2(win, _("Info"), tb_search_xpm, FALSE);
 	gtk_box_pack_start(GTK_BOX(bbox2), info, dispstyle, dispstyle, 0);
 	gtk_signal_connect(GTK_OBJECT(info), "clicked", GTK_SIGNAL_FUNC(info_callback), b);
+	b->info = info;
 
 	vbox = gtk_vbox_new(FALSE, 5);
 	gtk_paned_pack2(GTK_PANED(vpaned), vbox, TRUE, FALSE);
@@ -722,6 +723,8 @@
 	b->fgcol = fgcolor;
 	b->hasfg = 0;
 
+	update_buttons_by_protocol(b);
+
 	gtk_widget_show(win);
 }
 
--- a/src/conversation.c	Thu Dec 21 02:11:56 2000 +0000
+++ b/src/conversation.c	Thu Dec 21 06:56:48 2000 +0000
@@ -1727,27 +1727,44 @@
 
 void update_buttons_by_protocol(struct conversation *c)
 {
-	if (c->gc->prpl->set_info == NULL)
+	if (c->gc->prpl->set_info == NULL && c->info)
 		gtk_widget_set_sensitive(c->info, FALSE);
 	else
 		gtk_widget_set_sensitive(c->info, TRUE);
 
-	if (c->gc->prpl->send_im == NULL)
+	if (c->gc->prpl->send_im == NULL && c->send)
 		gtk_widget_set_sensitive(c->send, FALSE);
 	else
 		gtk_widget_set_sensitive(c->send, TRUE);
 
-	if (c->gc->prpl->warn == NULL)
+	if (c->gc->prpl->warn == NULL && c->warn)
 		gtk_widget_set_sensitive(c->warn, FALSE);
 	else
 		gtk_widget_set_sensitive(c->warn, TRUE);
 
-	if (c->gc->prpl->add_permit == NULL)
+	if (c->gc->prpl->add_permit == NULL && c->block)
 		gtk_widget_set_sensitive(c->block, FALSE);
 	else
 		gtk_widget_set_sensitive(c->block, TRUE);
 
-	update_convo_add_button(c);
+	if (c->add)
+		update_convo_add_button(c);
+
+	if (c->whisper) 
+	{
+		if (c->gc->prpl->chat_whisper == NULL)
+			gtk_widget_set_sensitive(c->whisper, FALSE);
+		else
+			gtk_widget_set_sensitive(c->whisper, TRUE);
+	}
+
+	if (c->invite) 
+	{
+		if (c->gc->prpl->chat_invite == NULL)
+			gtk_widget_set_sensitive(c->invite, FALSE);
+		else
+			gtk_widget_set_sensitive(c->invite, TRUE);
+	}
 }