diff src/gtkprefs.c @ 11275:ffc86d9ad8b7

[gaim-migrate @ 13461] Make the new clear formatting button work. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 15 Aug 2005 19:46:32 +0000
parents b33eccbc3a10
children fb6e85c55fb8
line wrap: on
line diff
--- a/src/gtkprefs.c	Mon Aug 15 16:22:25 2005 +0000
+++ b/src/gtkprefs.c	Mon Aug 15 19:46:32 2005 +0000
@@ -818,6 +818,20 @@
 	}
 }
 
+static void
+formatting_clear_cb(GtkIMHtml *imhtml, void *data)
+{
+	gaim_prefs_set_bool("/gaim/gtk/conversations/send_bold", FALSE);
+	gaim_prefs_set_bool("/gaim/gtk/conversations/send_italic", FALSE);
+	gaim_prefs_set_bool("/gaim/gtk/conversations/send_underline", FALSE);
+
+	gaim_prefs_set_int("/gaim/gtk/conversations/font_size", 3);
+
+	gaim_prefs_set_string("/gaim/gtk/conversations/font_face", "");
+	gaim_prefs_set_string("/gaim/gtk/conversations/fgcolor", "");
+	gaim_prefs_set_string("/gaim/gtk/conversations/bgcolor", "");
+}
+
 static GtkWidget *
 list_page()
 {
@@ -929,7 +943,8 @@
 
 	g_signal_connect_after(G_OBJECT(imhtml), "format_function_toggle",
 					 G_CALLBACK(formatting_toggle_cb), toolbar);
-
+	g_signal_connect_after(G_OBJECT(imhtml), "format_function_clear",
+					 G_CALLBACK(formatting_clear_cb), NULL);
 
 	/* All the tab options! */
 	vbox = gaim_gtk_make_frame(ret, _("Tab Options"));