Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 8420:c25c697525b7
[gaim-migrate @ 9150]
Phase II. If anyone finds anything problematic here that can't be attributed
to GtkIMHtml itself, please let me know (I'll probably tell you it can be
attributed to GtkIMHtml itself ;)).
Love, Sean.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Wed, 10 Mar 2004 06:10:00 +0000 |
parents | 13a65fd6a932 |
children | a34fe3117877 |
comparison
equal
deleted
inserted
replaced
8419:5c6124e9a3a7 | 8420:c25c697525b7 |
---|---|
2213 | 2213 |
2214 win = gaim_conversation_get_window(conv); | 2214 win = gaim_conversation_get_window(conv); |
2215 gtkwin = GAIM_GTK_WINDOW(win); | 2215 gtkwin = GAIM_GTK_WINDOW(win); |
2216 gtkconv = GAIM_GTK_CONVERSATION(conv); | 2216 gtkconv = GAIM_GTK_CONVERSATION(conv); |
2217 gc = gaim_conversation_get_gc(conv); | 2217 gc = gaim_conversation_get_gc(conv); |
2218 | 2218 GtkIMHtmlButtons buttons; |
2219 | |
2219 if (gc != NULL) | 2220 if (gc != NULL) |
2220 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); | 2221 prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); |
2221 | 2222 |
2222 if (gtkwin->menu.send_as != NULL) | 2223 if (gtkwin->menu.send_as != NULL) |
2223 g_timeout_add(0, (GSourceFunc)update_send_as_selection, win); | 2224 g_timeout_add(0, (GSourceFunc)update_send_as_selection, win); |
2327 gtk_widget_set_sensitive(gtkconv->u.chat->invite, | 2328 gtk_widget_set_sensitive(gtkconv->u.chat->invite, |
2328 (prpl_info->chat_invite != NULL)); | 2329 (prpl_info->chat_invite != NULL)); |
2329 } | 2330 } |
2330 | 2331 |
2331 /* Deal with the toolbar */ | 2332 /* Deal with the toolbar */ |
2333 | |
2334 if (gc->flags & GAIM_CONNECTION_HTML) { | |
2335 buttons = -1; /* Everything on */ | |
2336 if (!(prpl_info->options & OPT_PROTO_IM_IMAGE)) | |
2337 buttons ^= GTK_IMHTML_IMAGE; | |
2338 if (gc->flags & GAIM_CONNECTION_NO_BGCOLOR) | |
2339 buttons ^= GTK_IMHTML_BACKCOLOR; | |
2340 } else { | |
2341 buttons = 0; | |
2342 } | |
2343 gtk_imhtml_set_format_functions(GTK_IMHTML(gtkconv->entry), buttons); | |
2344 | |
2332 #if 0 | 2345 #if 0 |
2333 gtk_widget_set_sensitive(gtkconv->toolbar.link, TRUE); | |
2334 gtk_widget_set_sensitive(gtkconv->toolbar.image, | |
2335 (prpl_info->options & OPT_PROTO_IM_IMAGE)); | |
2336 gtk_widget_set_sensitive(gtkconv->toolbar.bgcolor, | |
2337 !(gc->flags & GAIM_CONNECTION_NO_BGCOLOR)); | |
2338 | |
2339 /* Deal with menu items */ | 2346 /* Deal with menu items */ |
2340 gtk_widget_set_sensitive(gtkwin->menu.view_log, TRUE); | 2347 gtk_widget_set_sensitive(gtkwin->menu.view_log, TRUE); |
2341 gtk_widget_set_sensitive(gtkwin->menu.add_pounce, TRUE); | 2348 gtk_widget_set_sensitive(gtkwin->menu.add_pounce, TRUE); |
2342 gtk_widget_set_sensitive(gtkwin->menu.get_info, (prpl_info->get_info != NULL)); | 2349 gtk_widget_set_sensitive(gtkwin->menu.get_info, (prpl_info->get_info != NULL)); |
2343 gtk_widget_set_sensitive(gtkwin->menu.warn, (prpl_info->warn != NULL)); | 2350 gtk_widget_set_sensitive(gtkwin->menu.warn, (prpl_info->warn != NULL)); |
2379 gtk_widget_set_sensitive(gtkconv->u.im->warn, FALSE); | 2386 gtk_widget_set_sensitive(gtkconv->u.im->warn, FALSE); |
2380 gtk_widget_set_sensitive(gtkconv->u.im->block, FALSE); | 2387 gtk_widget_set_sensitive(gtkconv->u.im->block, FALSE); |
2381 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { | 2388 } else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT) { |
2382 gtk_widget_set_sensitive(gtkconv->u.chat->invite, FALSE); | 2389 gtk_widget_set_sensitive(gtkconv->u.chat->invite, FALSE); |
2383 } | 2390 } |
2384 | 2391 |
2385 /* Then deal with menu items */ | 2392 /* Then deal with menu items */ |
2386 gtk_widget_set_sensitive(gtkwin->menu.view_log, TRUE); | 2393 gtk_widget_set_sensitive(gtkwin->menu.view_log, TRUE); |
2387 gtk_widget_set_sensitive(gtkwin->menu.add_pounce, TRUE); | 2394 gtk_widget_set_sensitive(gtkwin->menu.add_pounce, TRUE); |
2388 gtk_widget_set_sensitive(gtkwin->menu.get_info, FALSE); | 2395 gtk_widget_set_sensitive(gtkwin->menu.get_info, FALSE); |
2389 gtk_widget_set_sensitive(gtkwin->menu.warn, FALSE); | 2396 gtk_widget_set_sensitive(gtkwin->menu.warn, FALSE); |