diff src/dialogs.c @ 7714:3d9d3d21e600

[gaim-migrate @ 8359] I rock so hard! This is just too easy. WYSIWYG foreground and background colors. The observant commit watcher will note that I'm not really paying too close attention to the toolbar UI yet. And as a result, it doesn't really work too great. The plan is to make the toolbar its own GtkWidget, which will attach to a GtkIMHtml. The GtkIMHtml will emit signals to it, telling it what state it should be in, and the toolbar will manipulate the GtkIMHtml accordingly. This way, anything that has text entry can have a toolbar with which to edit it. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Wed, 03 Dec 2003 04:17:42 +0000
parents 17756d5dcfdf
children edebf99a5ec4
line wrap: on
line diff
--- a/src/dialogs.c	Wed Dec 03 02:03:44 2003 +0000
+++ b/src/dialogs.c	Wed Dec 03 04:17:42 2003 +0000
@@ -1093,16 +1093,12 @@
 	gtkconv = GAIM_GTK_CONVERSATION(c);
 
 	gtkconv->fg_color = text_color;
-	g_snprintf(open_tag, 23, "<FONT COLOR=\"#%02X%02X%02X\">",
+	g_snprintf(open_tag, 23, "#%02X%02X%02X",
 			   text_color.red / 256,
 			   text_color.green / 256,
 			   text_color.blue / 256);
-	gaim_gtk_surround(gtkconv, open_tag, "</FONT>");
+	gtk_imhtml_toggle_forecolor(GTK_IMHTML(gtkconv->entry), open_tag);
 
-	gaim_debug(GAIM_DEBUG_MISC, "fgcolor dialog", "#%02X%02X%02X\n",
-			   text_color.red / 256,
-			   text_color.green / 256,
-			   text_color.blue / 256);
 	g_free(open_tag);
 	cancel_fgcolor(NULL, c);
 }
@@ -1124,16 +1120,12 @@
 	gtkconv = GAIM_GTK_CONVERSATION(c);
 
 	gtkconv->bg_color = text_color;
-	g_snprintf(open_tag, 25, "<BODY BGCOLOR=\"#%02X%02X%02X\">",
+	g_snprintf(open_tag, 25, "#%02X%02X%02X",
 			   text_color.red / 256,
 			   text_color.green / 256,
 			   text_color.blue / 256);
-	gaim_gtk_surround(gtkconv, open_tag, "</BODY>");
-	gaim_debug(GAIM_DEBUG_MISC, "bgcolor dialog", "#%02X%02X%02X\n",
-			   text_color.red / 256,
-			   text_color.green / 256,
-			   text_color.blue / 256);
-
+	gtk_imhtml_toggle_backcolor(GTK_IMHTML(gtkconv->entry), open_tag);
+	
 	g_free(open_tag);
 	cancel_bgcolor(NULL, c);
 }