Mercurial > pidgin
diff src/conversation.c @ 1340:1526caa87138
[gaim-migrate @ 1350]
Grey's out the info button on conversation windows if the protocol doesnt support it.
Probably should add support for the other buttons to. For example: Warn, Block, add/remove, send :-)
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Thu, 21 Dec 2000 02:01:20 +0000 |
parents | 8342d3aab1f1 |
children | 6ec45c45157c |
line wrap: on
line diff
--- a/src/conversation.c Thu Dec 21 01:07:18 2000 +0000 +++ b/src/conversation.c Thu Dec 21 02:01:20 2000 +0000 @@ -1643,6 +1643,11 @@ { struct conversation *cnv = gtk_object_get_user_data(m); cnv->gc = c; + + if (cnv->gc->prpl->set_info == NULL) + gtk_widget_set_sensitive(cnv->info, FALSE); + else + gtk_widget_set_sensitive(cnv->info, TRUE); } void update_convo_add_button(struct conversation *c) @@ -1715,6 +1720,15 @@ } } +void update_buttons_by_protocol(struct conversation *c) +{ + if (c->gc->prpl->set_info == NULL) + gtk_widget_set_sensitive(c->info, FALSE); + else + gtk_widget_set_sensitive(c->info, TRUE); +} + + void show_conv(struct conversation *c) { GtkWidget *win; @@ -1867,6 +1881,7 @@ info = picture_button2(win, _("Info"), tb_search_xpm, dispstyle); c->info = info; + gtk_signal_connect(GTK_OBJECT(info), "clicked", GTK_SIGNAL_FUNC(info_callback), c); gtk_box_pack_end(GTK_BOX(bbox), info, dispstyle, dispstyle, 0); gtk_widget_show(info); @@ -1881,6 +1896,8 @@ gtk_box_pack_end(GTK_BOX(bbox), send, dispstyle, dispstyle, 0); gtk_widget_show(send); + update_buttons_by_protocol(c); + gtk_widget_show(win); }