changeset 12794:4e3dde2b2641

[gaim-migrate @ 15141] Patch of SF Patch #1400162 from Sadrul "Make sure the preference is saved when only the formatting is changed without changing the text." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 09 Jan 2006 15:32:00 +0000
parents 339c7dda758d
children ca1144227826
files src/gtkpluginpref.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkpluginpref.c	Mon Jan 09 15:23:42 2006 +0000
+++ b/src/gtkpluginpref.c	Mon Jan 09 15:32:00 2006 +0000
@@ -65,6 +65,12 @@
 }
 
 static void
+imhtml_format_cb(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons, gpointer data)
+{
+	imhtml_cb(gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml)), data);
+}
+
+static void
 make_string_pref(GtkWidget *parent, GaimPluginPref *pref, GtkSizeGroup *sg) {
 	GtkWidget *hbox, *gtk_label, *entry;
 	gchar *pref_name, *pref_label;
@@ -132,6 +138,8 @@
 				g_object_set_data(G_OBJECT(imhtml), "pref-key", pref_name);
 				g_signal_connect(G_OBJECT(gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml))),
 								"changed", G_CALLBACK(imhtml_cb), imhtml);
+				g_signal_connect(G_OBJECT(imhtml),
+								"format_function_toggle", G_CALLBACK(imhtml_format_cb), imhtml);
 				gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, FALSE, 0);
 			}