Mercurial > pidgin
comparison src/gtkconv.c @ 10500:6ec5da82ef41
[gaim-migrate @ 11792]
Disable/enabled the userlist buttons in chat windows when you sign
offline
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 10 Jan 2005 05:54:07 +0000 |
parents | 8dffdd8861b5 |
children | 776586d647e3 |
comparison
equal
deleted
inserted
replaced
10499:d0c336ad0b27 | 10500:6ec5da82ef41 |
---|---|
2761 gtk_widget_set_sensitive(gtkwin->menu.add, (prpl_info->join_chat != NULL)); | 2761 gtk_widget_set_sensitive(gtkwin->menu.add, (prpl_info->join_chat != NULL)); |
2762 gtk_widget_set_sensitive(gtkwin->menu.remove, (prpl_info->join_chat != NULL)); | 2762 gtk_widget_set_sensitive(gtkwin->menu.remove, (prpl_info->join_chat != NULL)); |
2763 gtk_widget_set_sensitive(gtkwin->menu.alias, | 2763 gtk_widget_set_sensitive(gtkwin->menu.alias, |
2764 (gaim_blist_find_chat(account, gaim_conversation_get_name(conv)) != NULL)); | 2764 (gaim_blist_find_chat(account, gaim_conversation_get_name(conv)) != NULL)); |
2765 } | 2765 } |
2766 | |
2767 /* Deal with chat userlist buttons */ | |
2768 if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) | |
2769 { | |
2770 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, TRUE); | |
2771 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, TRUE); | |
2772 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_info, (prpl_info->get_info != NULL)); | |
2773 } | |
2766 } else { | 2774 } else { |
2767 /* Account is offline */ | 2775 /* Account is offline */ |
2768 /* Or it's a chat that we've left. */ | 2776 /* Or it's a chat that we've left. */ |
2769 | 2777 |
2770 /* Then deal with menu items */ | 2778 /* Then deal with menu items */ |
2778 gtk_widget_set_sensitive(gtkwin->menu.block, FALSE); | 2786 gtk_widget_set_sensitive(gtkwin->menu.block, FALSE); |
2779 gtk_widget_set_sensitive(gtkwin->menu.add, FALSE); | 2787 gtk_widget_set_sensitive(gtkwin->menu.add, FALSE); |
2780 gtk_widget_set_sensitive(gtkwin->menu.remove, FALSE); | 2788 gtk_widget_set_sensitive(gtkwin->menu.remove, FALSE); |
2781 gtk_widget_set_sensitive(gtkwin->menu.insert_link, TRUE); | 2789 gtk_widget_set_sensitive(gtkwin->menu.insert_link, TRUE); |
2782 gtk_widget_set_sensitive(gtkwin->menu.insert_image, FALSE); | 2790 gtk_widget_set_sensitive(gtkwin->menu.insert_image, FALSE); |
2791 | |
2792 /* Deal with chat userlist buttons */ | |
2793 if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) | |
2794 { | |
2795 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, FALSE); | |
2796 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, FALSE); | |
2797 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_info, FALSE); | |
2798 } | |
2783 } | 2799 } |
2784 | 2800 |
2785 /* | 2801 /* |
2786 * Update the window's icon | 2802 * Update the window's icon |
2787 */ | 2803 */ |
3874 gtk_widget_show(bbox); | 3890 gtk_widget_show(bbox); |
3875 | 3891 |
3876 /* IM */ | 3892 /* IM */ |
3877 button = gaim_pixbuf_button_from_stock(NULL, GAIM_STOCK_IM, | 3893 button = gaim_pixbuf_button_from_stock(NULL, GAIM_STOCK_IM, |
3878 GAIM_BUTTON_VERTICAL); | 3894 GAIM_BUTTON_VERTICAL); |
3895 gtkchat->userlist_im = button; | |
3879 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | 3896 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); |
3880 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 3897 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
3881 gtk_tooltips_set_tip(gtkconv->tooltips, button, _("IM the user"), NULL); | 3898 gtk_tooltips_set_tip(gtkconv->tooltips, button, _("IM the user"), NULL); |
3882 g_signal_connect(G_OBJECT(button), "clicked", | 3899 g_signal_connect(G_OBJECT(button), "clicked", |
3883 G_CALLBACK(chat_im_button_cb), conv); | 3900 G_CALLBACK(chat_im_button_cb), conv); |
3885 gtk_widget_show(button); | 3902 gtk_widget_show(button); |
3886 | 3903 |
3887 /* Ignore */ | 3904 /* Ignore */ |
3888 button = gaim_pixbuf_button_from_stock(NULL, GAIM_STOCK_IGNORE, | 3905 button = gaim_pixbuf_button_from_stock(NULL, GAIM_STOCK_IGNORE, |
3889 GAIM_BUTTON_VERTICAL); | 3906 GAIM_BUTTON_VERTICAL); |
3907 gtkchat->userlist_ignore = button; | |
3890 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | 3908 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); |
3891 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 3909 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
3892 gtk_tooltips_set_tip(gtkconv->tooltips, button, | 3910 gtk_tooltips_set_tip(gtkconv->tooltips, button, |
3893 _("Ignore the user"), NULL); | 3911 _("Ignore the user"), NULL); |
3894 g_signal_connect(G_OBJECT(button), "clicked", | 3912 g_signal_connect(G_OBJECT(button), "clicked", |
3896 gtk_widget_show(button); | 3914 gtk_widget_show(button); |
3897 | 3915 |
3898 /* Info */ | 3916 /* Info */ |
3899 button = gaim_pixbuf_button_from_stock(NULL, GAIM_STOCK_INFO, | 3917 button = gaim_pixbuf_button_from_stock(NULL, GAIM_STOCK_INFO, |
3900 GAIM_BUTTON_VERTICAL); | 3918 GAIM_BUTTON_VERTICAL); |
3919 gtkchat->userlist_info = button; | |
3901 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | 3920 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); |
3902 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); | 3921 gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); |
3903 gtk_tooltips_set_tip(gtkconv->tooltips, button, | 3922 gtk_tooltips_set_tip(gtkconv->tooltips, button, |
3904 _("Get the user's information"), NULL); | 3923 _("Get the user's information"), NULL); |
3905 g_signal_connect(G_OBJECT(button), "clicked", | 3924 g_signal_connect(G_OBJECT(button), "clicked", |