diff 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
line wrap: on
line diff
--- a/src/gtkconv.c	Sun Mar 21 18:24:29 2004 +0000
+++ b/src/gtkconv.c	Sun Mar 21 18:38:30 2004 +0000
@@ -227,13 +227,13 @@
 	{
 		if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_bold"))
 			gtk_imhtml_toggle_bold(GTK_IMHTML(c->entry));
-
+		
 		if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_italic"))
 			gtk_imhtml_toggle_italic(GTK_IMHTML(c->entry));
 
 		if (gaim_prefs_get_bool("/gaim/gtk/conversations/send_underline"))
 			gtk_imhtml_toggle_underline(GTK_IMHTML(c->entry));
-
+		
 		if (gaim_prefs_get_bool("/gaim/gtk/conversations/use_custom_font") ||
 			c->has_font)
 		{
@@ -3787,7 +3787,6 @@
 		gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->entry));
 	gaim_setup_imhtml(gtkconv->entry);
 	gtk_imhtml_set_editable(GTK_IMHTML(gtkconv->entry), TRUE);
-	default_formatize(conv);
 	gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(gtkconv->entry),
 								GTK_WRAP_WORD_CHAR);
 	gtk_widget_set_size_request(gtkconv->entry, -1,
@@ -3811,6 +3810,10 @@
 	gtk_widget_show(gtkconv->entry);
 	gtk_imhtmltoolbar_attach(GTK_IMHTMLTOOLBAR(gtkconv->toolbar),
 							 gtkconv->entry);
+	/* had to move this after the imtoolbar is attached so that the
+	 * signals get fired to toggle the buttons on the toolbar as well.
+	 */
+	default_formatize(conv);
 
 	gtkconv->bbox = gtk_hbox_new(FALSE, 6);
 	gtk_box_pack_start(GTK_BOX(vbox2), gtkconv->bbox, FALSE, FALSE, 0);