Mercurial > pidgin
comparison src/gtkpluginpref.c @ 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 | 8ae981f2c9cb |
| children | a0a4b44239e8 |
comparison
equal
deleted
inserted
replaced
| 12793:339c7dda758d | 12794:4e3dde2b2641 |
|---|---|
| 60 | 60 |
| 61 if (!text) | 61 if (!text) |
| 62 text = ""; | 62 text = ""; |
| 63 gaim_prefs_set_string(pref, text); | 63 gaim_prefs_set_string(pref, text); |
| 64 g_free(text); | 64 g_free(text); |
| 65 } | |
| 66 | |
| 67 static void | |
| 68 imhtml_format_cb(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons, gpointer data) | |
| 69 { | |
| 70 imhtml_cb(gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml)), data); | |
| 65 } | 71 } |
| 66 | 72 |
| 67 static void | 73 static void |
| 68 make_string_pref(GtkWidget *parent, GaimPluginPref *pref, GtkSizeGroup *sg) { | 74 make_string_pref(GtkWidget *parent, GaimPluginPref *pref, GtkSizeGroup *sg) { |
| 69 GtkWidget *hbox, *gtk_label, *entry; | 75 GtkWidget *hbox, *gtk_label, *entry; |
| 130 gtk_label_set_mnemonic_widget(GTK_LABEL(gtk_label), imhtml); | 136 gtk_label_set_mnemonic_widget(GTK_LABEL(gtk_label), imhtml); |
| 131 gtk_widget_show_all(frame); | 137 gtk_widget_show_all(frame); |
| 132 g_object_set_data(G_OBJECT(imhtml), "pref-key", pref_name); | 138 g_object_set_data(G_OBJECT(imhtml), "pref-key", pref_name); |
| 133 g_signal_connect(G_OBJECT(gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml))), | 139 g_signal_connect(G_OBJECT(gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml))), |
| 134 "changed", G_CALLBACK(imhtml_cb), imhtml); | 140 "changed", G_CALLBACK(imhtml_cb), imhtml); |
| 141 g_signal_connect(G_OBJECT(imhtml), | |
| 142 "format_function_toggle", G_CALLBACK(imhtml_format_cb), imhtml); | |
| 135 gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, FALSE, 0); | 143 gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, FALSE, 0); |
| 136 } | 144 } |
| 137 | 145 |
| 138 break; | 146 break; |
| 139 } | 147 } |
