# HG changeset patch # User Richard Laager # Date 1136820720 0 # Node ID 4e3dde2b2641a32253d2f570872cd2fb47ceded7 # Parent 339c7dda758db6a94d2c779a9fe77a577bf8d266 [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 diff -r 339c7dda758d -r 4e3dde2b2641 src/gtkpluginpref.c --- 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); }