[gaim-migrate @ 15141]

Mon, 09 Jan 2006 15:32:00 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Mon, 09 Jan 2006 15:32:00 +0000
changeset 12794
e4f178fc08b5
parent 12793
5add7e19d6c4
child 12795
83d09a3b4e3c

[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: Richard Laager <rlaager@pidgin.im>

src/gtkpluginpref.c file | annotate | diff | comparison | revisions
--- 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);
 			}
 

mercurial