comparison src/gtkconv.c @ 8481:6d0869404696

[gaim-migrate @ 9214] " this fixes and should close 9, 10, and 12 on simguys list... those are... 9 Buttons that are pushed in when text is sent, stay pushed in. They should reset to the default for the line based on the B/I/U preferences. 10 Buttons are not properly pushed in if B/I/U are set in the prefs when the conversation window appears. 12 Buttons don't push in and out when the cursor enters regions that are differently formatted. For example, if you move the cursor to a place where the text is bold, the B button should probably be pushed in. While working on these i uncovered another bug which i'll start working on shortly, but thats no reason to hold this back when someone may find something I missed..." --Gary Kramlich as per his note, this does not fix moving the cursor with the mouse, but that doesn't work without this patch either. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sun, 21 Mar 2004 18:38:30 +0000
parents 9773e3f3ec7a
children f07fbdfbe2e0
comparison
equal deleted inserted replaced
8480:b0cebd011cc0 8481:6d0869404696
225 225
226 if (gc && gc->flags & GAIM_CONNECTION_HTML) 226 if (gc && gc->flags & GAIM_CONNECTION_HTML)
227 { 227 {
228 if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_bold")) 228 if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_bold"))
229 gtk_imhtml_toggle_bold(GTK_IMHTML(c->entry)); 229 gtk_imhtml_toggle_bold(GTK_IMHTML(c->entry));
230 230
231 if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_italic")) 231 if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_italic"))
232 gtk_imhtml_toggle_italic(GTK_IMHTML(c->entry)); 232 gtk_imhtml_toggle_italic(GTK_IMHTML(c->entry));
233 233
234 if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_underline")) 234 if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_underline"))
235 gtk_imhtml_toggle_underline(GTK_IMHTML(c->entry)); 235 gtk_imhtml_toggle_underline(GTK_IMHTML(c->entry));
236 236
237 if (gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_font") || 237 if (gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_font") ||
238 c->has_font) 238 c->has_font)
239 { 239 {
240 gtk_imhtml_toggle_fontface(GTK_IMHTML(c->entry), c->fontface); 240 gtk_imhtml_toggle_fontface(GTK_IMHTML(c->entry), c->fontface);
241 } 241 }
3785 protocol->info->name); 3785 protocol->info->name);
3786 gtkconv->entry_buffer = 3786 gtkconv->entry_buffer =
3787 gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry)); 3787 gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry));
3788 gaim_setup_imhtml(gtkconv->entry); 3788 gaim_setup_imhtml(gtkconv->entry);
3789 gtk_imhtml_set_editable(GTK_IMHTML(gtkconv->entry), TRUE); 3789 gtk_imhtml_set_editable(GTK_IMHTML(gtkconv->entry), TRUE);
3790 default_formatize(conv);
3791 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(gtkconv->entry), 3790 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(gtkconv->entry),
3792 GTK_WRAP_WORD_CHAR); 3791 GTK_WRAP_WORD_CHAR);
3793 gtk_widget_set_size_request(gtkconv->entry, -1, 3792 gtk_widget_set_size_request(gtkconv->entry, -1,
3794 gaim_prefs_get_int("/gaim/gtk/conversations/im/entry_height")); 3793 gaim_prefs_get_int("/gaim/gtk/conversations/im/entry_height"));
3795 g_object_set_data(G_OBJECT(gtkconv->entry_buffer), "user_data", conv); 3794 g_object_set_data(G_OBJECT(gtkconv->entry_buffer), "user_data", conv);
3809 3808
3810 gtk_container_add(GTK_CONTAINER(sw), GTK_WIDGET(gtkconv->entry)); 3809 gtk_container_add(GTK_CONTAINER(sw), GTK_WIDGET(gtkconv->entry));
3811 gtk_widget_show(gtkconv->entry); 3810 gtk_widget_show(gtkconv->entry);
3812 gtk_imhtmltoolbar_attach(GTK_IMHTMLTOOLBAR(gtkconv->toolbar), 3811 gtk_imhtmltoolbar_attach(GTK_IMHTMLTOOLBAR(gtkconv->toolbar),
3813 gtkconv->entry); 3812 gtkconv->entry);
3813 /* had to move this after the imtoolbar is attached so that the
3814 * signals get fired to toggle the buttons on the toolbar as well.
3815 */
3816 default_formatize(conv);
3814 3817
3815 gtkconv->bbox = gtk_hbox_new(FALSE, 6); 3818 gtkconv->bbox = gtk_hbox_new(FALSE, 6);
3816 gtk_box_pack_start(GTK_BOX(vbox2), gtkconv->bbox, FALSE, FALSE, 0); 3819 gtk_box_pack_start(GTK_BOX(vbox2), gtkconv->bbox, FALSE, FALSE, 0);
3817 gtk_widget_show(gtkconv->bbox); 3820 gtk_widget_show(gtkconv->bbox);
3818 3821