Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 12012:16f75a4d9fec
[gaim-migrate @ 14305]
This spacing was freaking me out
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 09 Nov 2005 00:24:22 +0000 |
parents | 91aaa1b3ac30 |
children | 1a86417abfc8 |
comparison
equal
deleted
inserted
replaced
12011:b4d7d6dbc95c | 12012:16f75a4d9fec |
---|---|
4849 /* | 4849 /* |
4850 * Handle graying stuff out based on whether an account is connected | 4850 * Handle graying stuff out based on whether an account is connected |
4851 * and what features that account supports. | 4851 * and what features that account supports. |
4852 */ | 4852 */ |
4853 if ((gc != NULL) && | 4853 if ((gc != NULL) && |
4854 ( (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_CHAT) || | 4854 ((gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_CHAT) || |
4855 !gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv)) )) { | 4855 !gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv)) )) |
4856 { | |
4856 /* Account is online */ | 4857 /* Account is online */ |
4857 /* Deal with the toolbar */ | 4858 /* Deal with the toolbar */ |
4858 if (conv->features & GAIM_CONNECTION_HTML) { | 4859 if (conv->features & GAIM_CONNECTION_HTML) |
4859 buttons = GTK_IMHTML_ALL; /* Everything on */ | 4860 { |
4860 if (!(prpl_info->options & OPT_PROTO_IM_IMAGE) || | 4861 buttons = GTK_IMHTML_ALL; /* Everything on */ |
4861 conv->features & GAIM_CONNECTION_NO_IMAGES) | 4862 if (!(prpl_info->options & OPT_PROTO_IM_IMAGE) || |
4862 buttons &= ~GTK_IMHTML_IMAGE; | 4863 conv->features & GAIM_CONNECTION_NO_IMAGES) |
4863 if (conv->features & GAIM_CONNECTION_NO_BGCOLOR) | 4864 buttons &= ~GTK_IMHTML_IMAGE; |
4864 buttons &= ~GTK_IMHTML_BACKCOLOR; | 4865 if (conv->features & GAIM_CONNECTION_NO_BGCOLOR) |
4865 if (conv->features & GAIM_CONNECTION_NO_FONTSIZE) { | 4866 buttons &= ~GTK_IMHTML_BACKCOLOR; |
4866 buttons &= ~GTK_IMHTML_GROW; | 4867 if (conv->features & GAIM_CONNECTION_NO_FONTSIZE) |
4867 buttons &= ~GTK_IMHTML_SHRINK; | 4868 { |
4868 } | 4869 buttons &= ~GTK_IMHTML_GROW; |
4869 if (conv->features & GAIM_CONNECTION_NO_URLDESC) | 4870 buttons &= ~GTK_IMHTML_SHRINK; |
4870 buttons &= ~GTK_IMHTML_LINKDESC; | 4871 } |
4871 } else { | 4872 if (conv->features & GAIM_CONNECTION_NO_URLDESC) |
4872 buttons = GTK_IMHTML_SMILEY; | 4873 buttons &= ~GTK_IMHTML_LINKDESC; |
4873 } | 4874 } else { |
4874 gtk_imhtml_set_format_functions(GTK_IMHTML(gtkconv->entry), buttons); | 4875 buttons = GTK_IMHTML_SMILEY; |
4875 gtk_imhtmltoolbar_associate_smileys(GTK_IMHTMLTOOLBAR(gtkconv->toolbar), gaim_account_get_protocol_id(account)); | 4876 } |
4877 gtk_imhtml_set_format_functions(GTK_IMHTML(gtkconv->entry), buttons); | |
4878 gtk_imhtmltoolbar_associate_smileys(GTK_IMHTMLTOOLBAR(gtkconv->toolbar), gaim_account_get_protocol_id(account)); | |
4876 | 4879 |
4877 /* Deal with menu items */ | 4880 /* Deal with menu items */ |
4878 gtk_widget_set_sensitive(win->menu.view_log, TRUE); | 4881 gtk_widget_set_sensitive(win->menu.view_log, TRUE); |
4879 gtk_widget_set_sensitive(win->menu.add_pounce, TRUE); | 4882 gtk_widget_set_sensitive(win->menu.add_pounce, TRUE); |
4880 gtk_widget_set_sensitive(win->menu.get_info, (prpl_info->get_info != NULL)); | 4883 gtk_widget_set_sensitive(win->menu.get_info, (prpl_info->get_info != NULL)); |
4881 gtk_widget_set_sensitive(win->menu.invite, (prpl_info->chat_invite != NULL)); | 4884 gtk_widget_set_sensitive(win->menu.invite, (prpl_info->chat_invite != NULL)); |
4882 gtk_widget_set_sensitive(win->menu.block, (prpl_info->add_deny != NULL)); | 4885 gtk_widget_set_sensitive(win->menu.block, (prpl_info->add_deny != NULL)); |
4883 gtk_widget_set_sensitive(win->menu.insert_link, (conv->features & GAIM_CONNECTION_HTML)); | 4886 gtk_widget_set_sensitive(win->menu.insert_link, (conv->features & GAIM_CONNECTION_HTML)); |
4884 gtk_widget_set_sensitive(win->menu.insert_image, (prpl_info->options & OPT_PROTO_IM_IMAGE)); | 4887 gtk_widget_set_sensitive(win->menu.insert_image, (prpl_info->options & OPT_PROTO_IM_IMAGE)); |
4885 | 4888 |
4886 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { | 4889 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) |
4887 gtk_widget_set_sensitive(win->menu.add, (prpl_info->add_buddy != NULL)); | 4890 { |
4888 gtk_widget_set_sensitive(win->menu.remove, (prpl_info->remove_buddy != NULL)); | 4891 gtk_widget_set_sensitive(win->menu.add, (prpl_info->add_buddy != NULL)); |
4889 gtk_widget_set_sensitive(win->menu.send_file, | 4892 gtk_widget_set_sensitive(win->menu.remove, (prpl_info->remove_buddy != NULL)); |
4890 (prpl_info->send_file != NULL && (!prpl_info->can_receive_file || | 4893 gtk_widget_set_sensitive(win->menu.send_file, |
4891 prpl_info->can_receive_file(gc, gaim_conversation_get_name(conv))))); | 4894 (prpl_info->send_file != NULL && (!prpl_info->can_receive_file || |
4892 gtk_widget_set_sensitive(win->menu.alias, | 4895 prpl_info->can_receive_file(gc, gaim_conversation_get_name(conv))))); |
4893 (gaim_find_buddy(account, gaim_conversation_get_name(conv)) != NULL)); | 4896 gtk_widget_set_sensitive(win->menu.alias, |
4894 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { | 4897 (gaim_find_buddy(account, gaim_conversation_get_name(conv)) != NULL)); |
4895 gtk_widget_set_sensitive(win->menu.add, (prpl_info->join_chat != NULL)); | 4898 } |
4896 gtk_widget_set_sensitive(win->menu.remove, (prpl_info->join_chat != NULL)); | 4899 else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) |
4897 gtk_widget_set_sensitive(win->menu.alias, | 4900 { |
4898 (gaim_blist_find_chat(account, gaim_conversation_get_name(conv)) != NULL)); | 4901 gtk_widget_set_sensitive(win->menu.add, (prpl_info->join_chat != NULL)); |
4899 } | 4902 gtk_widget_set_sensitive(win->menu.remove, (prpl_info->join_chat != NULL)); |
4903 gtk_widget_set_sensitive(win->menu.alias, | |
4904 (gaim_blist_find_chat(account, gaim_conversation_get_name(conv)) != NULL)); | |
4905 } | |
4900 | 4906 |
4901 /* Deal with chat userlist buttons */ | 4907 /* Deal with chat userlist buttons */ |
4902 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) | 4908 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) |
4903 { | 4909 { |
4904 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, TRUE); | 4910 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, TRUE); |
4905 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, TRUE); | 4911 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, TRUE); |
4906 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_info, (prpl_info->get_info != NULL)); | 4912 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_info, (prpl_info->get_info != NULL)); |
4907 } | 4913 } |
4908 } else { | 4914 } else { |
4909 /* Account is offline */ | 4915 /* Account is offline */ |
4910 /* Or it's a chat that we've left. */ | 4916 /* Or it's a chat that we've left. */ |
4911 | 4917 |
4912 /* Then deal with menu items */ | 4918 /* Then deal with menu items */ |
4913 gtk_widget_set_sensitive(win->menu.view_log, TRUE); | 4919 gtk_widget_set_sensitive(win->menu.view_log, TRUE); |
4914 gtk_widget_set_sensitive(win->menu.send_file, FALSE); | 4920 gtk_widget_set_sensitive(win->menu.send_file, FALSE); |
4915 gtk_widget_set_sensitive(win->menu.add_pounce, TRUE); | 4921 gtk_widget_set_sensitive(win->menu.add_pounce, TRUE); |
4916 gtk_widget_set_sensitive(win->menu.get_info, FALSE); | 4922 gtk_widget_set_sensitive(win->menu.get_info, FALSE); |
4917 gtk_widget_set_sensitive(win->menu.invite, FALSE); | 4923 gtk_widget_set_sensitive(win->menu.invite, FALSE); |
4918 gtk_widget_set_sensitive(win->menu.alias, FALSE); | 4924 gtk_widget_set_sensitive(win->menu.alias, FALSE); |
4919 gtk_widget_set_sensitive(win->menu.block, FALSE); | 4925 gtk_widget_set_sensitive(win->menu.block, FALSE); |
4920 gtk_widget_set_sensitive(win->menu.add, FALSE); | 4926 gtk_widget_set_sensitive(win->menu.add, FALSE); |
4921 gtk_widget_set_sensitive(win->menu.remove, FALSE); | 4927 gtk_widget_set_sensitive(win->menu.remove, FALSE); |
4922 gtk_widget_set_sensitive(win->menu.insert_link, TRUE); | 4928 gtk_widget_set_sensitive(win->menu.insert_link, TRUE); |
4923 gtk_widget_set_sensitive(win->menu.insert_image, FALSE); | 4929 gtk_widget_set_sensitive(win->menu.insert_image, FALSE); |
4924 | 4930 |
4925 /* Deal with chat userlist buttons */ | 4931 /* Deal with chat userlist buttons */ |
4926 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) | 4932 if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) |
4927 { | 4933 { |
4928 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, FALSE); | 4934 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_im, FALSE); |
4929 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, FALSE); | 4935 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_ignore, FALSE); |
4930 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_info, FALSE); | 4936 gtk_widget_set_sensitive(gtkconv->u.chat->userlist_info, FALSE); |
4931 } | 4937 } |
4932 } | 4938 } |
4933 | 4939 |
4934 /* | 4940 /* |
4935 * Update the window's icon | 4941 * Update the window's icon |
4936 */ | 4942 */ |
4937 if ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) && | 4943 if ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) && |
4938 (gtkconv->u.im->anim)) | 4944 (gtkconv->u.im->anim)) |
4939 { | 4945 { |
4940 window_icon = | 4946 window_icon = |
4941 gdk_pixbuf_animation_get_static_image(gtkconv->u.im->anim); | 4947 gdk_pixbuf_animation_get_static_image(gtkconv->u.im->anim); |
4942 g_object_ref(window_icon); | 4948 g_object_ref(window_icon); |
4943 } else { | 4949 } else { |