Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
1339:6b31e7948b05 | 1340:1526caa87138 |
---|---|
1641 | 1641 |
1642 static void convo_sel_send(GtkObject * m, struct gaim_connection *c) | 1642 static void convo_sel_send(GtkObject * m, struct gaim_connection *c) |
1643 { | 1643 { |
1644 struct conversation *cnv = gtk_object_get_user_data(m); | 1644 struct conversation *cnv = gtk_object_get_user_data(m); |
1645 cnv->gc = c; | 1645 cnv->gc = c; |
1646 | |
1647 if (cnv->gc->prpl->set_info == NULL) | |
1648 gtk_widget_set_sensitive(cnv->info, FALSE); | |
1649 else | |
1650 gtk_widget_set_sensitive(cnv->info, TRUE); | |
1646 } | 1651 } |
1647 | 1652 |
1648 void update_convo_add_button(struct conversation *c) | 1653 void update_convo_add_button(struct conversation *c) |
1649 { | 1654 { |
1650 int dispstyle = set_dispstyle(0); | 1655 int dispstyle = set_dispstyle(0); |
1712 update_convo_add_button(C); | 1717 update_convo_add_button(C); |
1713 | 1718 |
1714 c = c->next; | 1719 c = c->next; |
1715 } | 1720 } |
1716 } | 1721 } |
1722 | |
1723 void update_buttons_by_protocol(struct conversation *c) | |
1724 { | |
1725 if (c->gc->prpl->set_info == NULL) | |
1726 gtk_widget_set_sensitive(c->info, FALSE); | |
1727 else | |
1728 gtk_widget_set_sensitive(c->info, TRUE); | |
1729 } | |
1730 | |
1717 | 1731 |
1718 void show_conv(struct conversation *c) | 1732 void show_conv(struct conversation *c) |
1719 { | 1733 { |
1720 GtkWidget *win; | 1734 GtkWidget *win; |
1721 char buf[256]; | 1735 char buf[256]; |
1865 gtk_box_pack_end(GTK_BOX(bbox), warn, dispstyle, dispstyle, 0); | 1879 gtk_box_pack_end(GTK_BOX(bbox), warn, dispstyle, dispstyle, 0); |
1866 gtk_widget_show(warn); | 1880 gtk_widget_show(warn); |
1867 | 1881 |
1868 info = picture_button2(win, _("Info"), tb_search_xpm, dispstyle); | 1882 info = picture_button2(win, _("Info"), tb_search_xpm, dispstyle); |
1869 c->info = info; | 1883 c->info = info; |
1884 | |
1870 gtk_signal_connect(GTK_OBJECT(info), "clicked", GTK_SIGNAL_FUNC(info_callback), c); | 1885 gtk_signal_connect(GTK_OBJECT(info), "clicked", GTK_SIGNAL_FUNC(info_callback), c); |
1871 gtk_box_pack_end(GTK_BOX(bbox), info, dispstyle, dispstyle, 0); | 1886 gtk_box_pack_end(GTK_BOX(bbox), info, dispstyle, dispstyle, 0); |
1872 gtk_widget_show(info); | 1887 gtk_widget_show(info); |
1873 | 1888 |
1874 c->sep2 = gtk_vseparator_new(); | 1889 c->sep2 = gtk_vseparator_new(); |
1878 send = picture_button2(win, _("Send"), tmp_send_xpm, dispstyle); | 1893 send = picture_button2(win, _("Send"), tmp_send_xpm, dispstyle); |
1879 c->send = send; | 1894 c->send = send; |
1880 gtk_signal_connect(GTK_OBJECT(send), "clicked", GTK_SIGNAL_FUNC(send_callback), c); | 1895 gtk_signal_connect(GTK_OBJECT(send), "clicked", GTK_SIGNAL_FUNC(send_callback), c); |
1881 gtk_box_pack_end(GTK_BOX(bbox), send, dispstyle, dispstyle, 0); | 1896 gtk_box_pack_end(GTK_BOX(bbox), send, dispstyle, dispstyle, 0); |
1882 gtk_widget_show(send); | 1897 gtk_widget_show(send); |
1898 | |
1899 update_buttons_by_protocol(c); | |
1883 | 1900 |
1884 gtk_widget_show(win); | 1901 gtk_widget_show(win); |
1885 } | 1902 } |
1886 | 1903 |
1887 | 1904 |