diff --git a/src/gnome-utils/dialog-preferences.c b/src/gnome-utils/dialog-preferences.c
index 35d9187280..19949c5a2c 100644
--- a/src/gnome-utils/dialog-preferences.c
+++ b/src/gnome-utils/dialog-preferences.c
@@ -646,88 +646,6 @@ gnc_prefs_split_widget_name (const gchar *name, gchar **group, gchar **pref)
}
/* FIXME to remove when gconf conversion of preferences is complete */
-/** The user changed a GtkFontButton. Update gconf. Font selection
- * choices are stored as a string.
- *
- * @internal
- *
- * @param gde A pointer to the GtkFontButton that was changed.
- *
- * @param user_data Unused.
- */
-static void
-gnc_prefs_font_button_user_cb_gconf (GtkFontButton *fb,
- gpointer user_data)
-{
- const gchar *key, *font;
-
- g_return_if_fail(GTK_IS_FONT_BUTTON(fb));
- key = gtk_buildable_get_name(GTK_BUILDABLE(fb)) + PREFIX_LEN;
- font = gtk_font_button_get_font_name(fb);
-
- DEBUG("font_button %s set", key);
- gnc_gconf_set_string(key, NULL, font, NULL);
-}
-
-
-/** A GtkFontButton choice was updated in gconf. Update the user
- * visible dialog.
- *
- * @internal
- *
- * @param gde A pointer to the GtkFontButton that changed.
- *
- * @param value The new value of the GtkFontButton.
- */
-static void
-gnc_prefs_font_button_gconf_cb_gconf (GtkFontButton *fb,
- GConfEntry *entry)
-{
- const gchar *font;
-
- g_return_if_fail(GTK_IS_FONT_BUTTON(fb));
- ENTER("fb %p, entry %p", fb, entry);
-
- font = gconf_value_get_string(entry->value);
-
- g_signal_handlers_block_by_func(G_OBJECT(fb),
- G_CALLBACK(gnc_prefs_font_button_user_cb_gconf), NULL);
- gtk_font_button_set_font_name(fb, font);
- g_signal_handlers_unblock_by_func(G_OBJECT(fb),
- G_CALLBACK(gnc_prefs_font_button_user_cb_gconf), NULL);
- LEAVE(" ");
-}
-
-
-/** Connect a GtkFontButton widget to the user callback function. Set
- * the font from its value in gconf.
- *
- * @internal
- *
- * @param gde A pointer to the date_edit that should be connected.
- */
-static void
-gnc_prefs_connect_font_button_gconf (GtkFontButton *fb)
-{
- const gchar *name;
- gchar *font;
-
- g_return_if_fail(GTK_IS_FONT_BUTTON(fb));
-
- /* Lookup font name based upon gconf setting */
- name = gtk_buildable_get_name(GTK_BUILDABLE(fb)) + PREFIX_LEN;
- font = gnc_gconf_get_string(name, NULL, NULL);
-
- gtk_font_button_set_font_name(fb, font);
- DEBUG(" font_button %s set", name);
- g_free(font);
-
- g_signal_connect(G_OBJECT(fb), "font_set",
- G_CALLBACK(gnc_prefs_font_button_user_cb_gconf), NULL);
-
- gtk_widget_show_all(GTK_WIDGET(fb));
-}
-
/****************************************************************************/
/** The user clicked on a radio button. Update gconf. Radio button
@@ -1407,6 +1325,31 @@ gnc_prefs_connect_date_edit_gconf (GNCDateEdit *gde , const gchar *boxname )
}
/* FIXME end of section to remove */
+/****************************************************************************/
+
+/** Connect a GtkFontButton widget to its stored value in the preferences database.
+ *
+ * @internal
+ *
+ * @param fb A pointer to the font button that should be connected.
+ */
+static void
+gnc_prefs_connect_font_button (GtkFontButton *fb)
+{
+ gchar *group, *pref;
+ gchar *font;
+
+ g_return_if_fail(GTK_IS_FONT_BUTTON(fb));
+
+ gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(fb)), &group, &pref);
+ gnc_prefs_bind (group, pref, G_OBJECT (fb), "font-name");
+
+ g_free (group);
+ g_free (pref);
+
+ gtk_widget_show_all(GTK_WIDGET(fb));
+}
+
/****************************************************************************/
@@ -1477,12 +1420,7 @@ gnc_prefs_connect_one_gconf (const gchar *name,
/* These tests must be ordered from more specific widget to less
* specific widget. */
- if (GTK_IS_FONT_BUTTON(widget))
- {
- DEBUG(" %s - entry", name);
- gnc_prefs_connect_font_button_gconf(GTK_FONT_BUTTON(widget));
- }
- else if (GTK_IS_RADIO_BUTTON(widget))
+ if (GTK_IS_RADIO_BUTTON(widget))
{
DEBUG(" %s - radio button", name);
gnc_prefs_connect_radio_button_gconf(GTK_RADIO_BUTTON(widget));
@@ -1560,6 +1498,16 @@ gnc_prefs_connect_one (const gchar *name,
/* These tests must be ordered from more specific widget to less
* specific widget. */
+ if (GTK_IS_FONT_BUTTON(widget))
+ {
+ DEBUG(" %s - entry", name);
+ gnc_prefs_connect_font_button(GTK_FONT_BUTTON(widget));
+ }
+ else
+ {
+ DEBUG(" %s - unsupported %s", name,
+ G_OBJECT_TYPE_NAME(G_OBJECT(widget)));
+ }
}
@@ -1803,12 +1751,7 @@ gnc_preferences_gconf_changed (GConfClient *client,
/* These tests must be ordered from more specific widget to less
* specific widget. */
- if (GTK_IS_FONT_BUTTON(widget))
- {
- DEBUG("widget %p - font button", widget);
- gnc_prefs_font_button_gconf_cb_gconf(GTK_FONT_BUTTON(widget), entry);
- }
- else if (GTK_IS_RADIO_BUTTON(widget))
+ if (GTK_IS_RADIO_BUTTON(widget))
{
DEBUG("widget %p - radio button", widget);
gnc_prefs_radio_button_gconf_cb_gconf(GTK_RADIO_BUTTON(widget));
diff --git a/src/gnome-utils/gtkbuilder/dialog-preferences.glade b/src/gnome-utils/gtkbuilder/dialog-preferences.glade
index 83dbef9b0f..db4400fa3c 100644
--- a/src/gnome-utils/gtkbuilder/dialog-preferences.glade
+++ b/src/gnome-utils/gtkbuilder/dialog-preferences.glade
@@ -2288,7 +2288,7 @@ many months before the current month:
Default _font:TrueTrue
- gconf/dialogs/print_checks/default_font
+ pref/dialogs.checkprinting/default_font
@@ -2300,7 +2300,7 @@ many months before the current month:
-