r23240 - gnucash/trunk/src - Gnc-Prefs: migrate GtkSpinbutton widgets (and associated preferences)

Geert Janssens gjanssens at code.gnucash.org
Mon Oct 7 10:13:53 EDT 2013


Author: gjanssens
Date: 2013-10-07 10:13:51 -0400 (Mon, 07 Oct 2013)
New Revision: 23240
Trac: http://svn.gnucash.org/trac/changeset/23240

Modified:
   gnucash/trunk/src/app-utils/gnc-prefs-utils.c
   gnucash/trunk/src/app-utils/gnc-ui-util.c
   gnucash/trunk/src/business/business-gnome/dialog-invoice.c
   gnucash/trunk/src/business/business-gnome/gtkbuilder/business-prefs.glade
   gnucash/trunk/src/gnome-utils/dialog-preferences.c
   gnucash/trunk/src/gnome-utils/gnc-autosave.c
   gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
   gnucash/trunk/src/gnome-utils/gnc-main-window.c
   gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c
   gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.h
   gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade
   gnucash/trunk/src/gnome/dialog-print-check.c
   gnucash/trunk/src/gnome/dialog-print-check2.c
   gnucash/trunk/src/gnome/dialog-sx-editor.c
   gnucash/trunk/src/gnome/dialog-sx-editor.h
   gnucash/trunk/src/gnome/dialog-sx-editor2.c
   gnucash/trunk/src/gnome/dialog-sx-editor2.h
   gnucash/trunk/src/gnome/dialog-sx-from-trans.c
   gnucash/trunk/src/gnome/gnc-plugin-page-register2.c
   gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.checkprinting.gschema.xml.in
   gnucash/trunk/src/gnome/gtkbuilder/dialog-sx.glade
   gnucash/trunk/src/import-export/dialog-import.glade
   gnucash/trunk/src/import-export/import-settings.c
   gnucash/trunk/src/import-export/import-utilities.h
   gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
   gnucash/trunk/src/register/ledger-core/gnc-ledger-display2.c
Log:
Gnc-Prefs: migrate GtkSpinbutton widgets (and associated preferences)

All GtkSpinkButtons now use the new preferences backend
so drop the GtkSpinkButton-Gconf wiring as well.

Modified: gnucash/trunk/src/app-utils/gnc-prefs-utils.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-prefs-utils.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/app-utils/gnc-prefs-utils.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -40,9 +40,9 @@
  * Initialization                                              *
  ***************************************************************/
 static void
-file_retain_changed_cb(GConfEntry *entry, gpointer user_data)
+file_retain_changed_cb(gpointer gsettings, gchar *key, gpointer user_data)
 {
-    gint days = (int)gnc_gconf_get_float(GCONF_GENERAL, KEY_RETAIN_DAYS, NULL);
+    gint days = (int)gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_DAYS);
     gnc_prefs_set_file_retention_days (days);
 }
 
@@ -82,13 +82,14 @@
     gnc_gsettings_load_backend();
 
     /* Add hooks to update core preferences whenever the associated gconf key changes */
-    gnc_gconf_general_register_cb(KEY_RETAIN_DAYS, file_retain_changed_cb, NULL);
+    gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_DAYS,
+                          (GCallback) file_retain_changed_cb, NULL);
     gnc_gconf_general_register_cb(KEY_RETAIN_TYPE, file_retain_type_changed_cb, NULL);
     gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_FILE_COMPRESSION,
-                              (GCallback) file_compression_changed_cb, NULL);
+                          (GCallback) file_compression_changed_cb, NULL);
 
     /* Call the hooks once manually to initialize the core preferences */
-    file_retain_changed_cb (NULL, NULL);
+    file_retain_changed_cb (NULL, NULL, NULL);
     file_retain_type_changed_cb (NULL, NULL);
     file_compression_changed_cb (NULL, NULL, NULL);
 

Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -2279,16 +2279,18 @@
 
 /* enable/disable the auto_decimal_enabled option */
 static void
-gnc_set_auto_decimal_enabled (GSettings *settings, gchar *key, gpointer user_data)
+gnc_set_auto_decimal_enabled (gpointer settings, gchar *key, gpointer user_data)
 {
-    auto_decimal_enabled = g_settings_get_boolean (settings, key);
+    auto_decimal_enabled =
+            gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTO_DECIMAL_POINT);
 }
 
 /* set the number of auto decimal places to use */
 static void
-gnc_set_auto_decimal_places (GSettings *settings, gchar *key, gpointer user_data)
+gnc_set_auto_decimal_places (gpointer settings, gchar *key, gpointer user_data)
 {
-    auto_decimal_places = g_settings_get_int (settings, key);
+    auto_decimal_places =
+            gnc_prefs_get_float (GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTO_DECIMAL_PLACES);
 }
 
 static void

Modified: gnucash/trunk/src/business/business-gnome/dialog-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/dialog-invoice.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/business/business-gnome/dialog-invoice.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -36,7 +36,6 @@
 #include "dialog-utils.h"
 #include "gnc-component-manager.h"
 #include "gnc-ui.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-gui-query.h"
 #include "gnc-prefs.h"
 #include "gnc-ui-util.h"
@@ -89,6 +88,7 @@
 #define GNC_PREFS_GROUP_SEARCH   "dialogs.business.invoice_search"
 #define GNC_PREF_NOTIFY_WHEN_DUE "notify_when_due"
 #define GNC_PREF_ACCUM_SPLITS    "accumulate_splits"
+#define GNC_PREF_DAYS_IN_ADVANCE "days_in_advance"
 
 #define LAST_POSTED_TO_ACCT "last-posted-to-acct"
 
@@ -3217,7 +3217,7 @@
 
     if (!gnc_current_session_exist()) return;
     book = qof_session_get_book(gnc_get_current_session());
-    days = gnc_gconf_get_float(GCONF_SECTION_BILL, "days_in_advance", NULL);
+    days = gnc_prefs_get_float(GNC_PREFS_GROUP_BILL, GNC_PREF_DAYS_IN_ADVANCE);
 
     gnc_invoice_show_bills_due(book, days);
 }

Modified: gnucash/trunk/src/business/business-gnome/gtkbuilder/business-prefs.glade
===================================================================
--- gnucash/trunk/src/business/business-gnome/gtkbuilder/business-prefs.glade	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/business/business-gnome/gtkbuilder/business-prefs.glade	2013-10-07 14:13:51 UTC (rev 23240)
@@ -65,7 +65,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkSpinButton" id="gconf/dialogs/business/bill/days_in_advance">
+          <object class="GtkSpinButton" id="pref/dialogs.business.bill/days_in_advance">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="has_tooltip">True</property>
@@ -97,7 +97,7 @@
             <property name="xalign">0</property>
             <property name="label" translatable="yes">_Days in advance:</property>
             <property name="use_underline">True</property>
-            <property name="mnemonic_widget">gconf/dialogs/business/bill/days_in_advance</property>
+            <property name="mnemonic_widget">pref/dialogs.business.bill/days_in_advance</property>
           </object>
           <packing>
             <property name="left_attach">2</property>

Modified: gnucash/trunk/src/gnome/dialog-print-check.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-print-check.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome/dialog-print-check.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -72,22 +72,22 @@
 #define KEY_CHECK_POSITION     "check_position"
 #define KEY_FIRST_PAGE_COUNT   "first_page_count"
 #define KEY_DATE_FORMAT_USER   "date_format_custom"
-#define KEY_CUSTOM_PAYEE       "custom_payee"
-#define KEY_CUSTOM_DATE        "custom_date"
-#define KEY_CUSTOM_WORDS       "custom_amount_words"
-#define KEY_CUSTOM_NUMBER      "custom_amount_number"
-#define KEY_CUSTOM_ADDRESS     "custom_address"
-#define KEY_CUSTOM_NOTES       "custom_memo" /* historically misnamed */
-#define KEY_CUSTOM_MEMO        "custom_memo2"
-#define KEY_CUSTOM_TRANSLATION "custom_translation"
-#define KEY_CUSTOM_ROTATION    "custom_rotation"
+#define GNC_PREF_CUSTOM_PAYEE       "custom_payee"
+#define GNC_PREF_CUSTOM_DATE        "custom_date"
+#define GNC_PREF_CUSTOM_WORDS       "custom_amount_words"
+#define GNC_PREF_CUSTOM_NUMBER      "custom_amount_number"
+#define GNC_PREF_CUSTOM_ADDRESS     "custom_address"
+#define GNC_PREF_CUSTOM_NOTES       "custom_notes"
+#define GNC_PREF_CUSTOM_MEMO        "custom_memo"
+#define GNC_PREF_CUSTOM_TRANSLATION "custom_translation"
+#define GNC_PREF_CUSTOM_ROTATION    "custom_rotation"
 #define KEY_CUSTOM_UNITS       "custom_units"
 #define GNC_PREF_PRINT_DATE_FMT     "print_date_format"
 #define GNC_PREF_DEFAULT_FONT       "default_font"
 #define GNC_PREF_BLOCKING_CHARS     "blocking_chars"
-#define KEY_SPLITS_AMOUNT      "splits_amount"
-#define KEY_SPLITS_MEMO        "splits_memo"
-#define KEY_SPLITS_ACCOUNT     "splits_account"
+#define GNC_PREF_SPLITS_AMOUNT      "splits_amount"
+#define GNC_PREF_SPLITS_MEMO        "splits_memo"
+#define GNC_PREF_SPLITS_ACCOUNT     "splits_account"
 
 
 #define DEFAULT_FONT            "sans 12"
@@ -357,39 +357,30 @@
 
 
 /* This function is used by the custom format dialog to save position values
- * to the GConf database.
+ * in the preferences database.
  */
 static void
-save_float_pair (const char *section, const char *key, double a, double b)
+save_float_pair (const char *group, const char *pref, double a, double b)
 {
-    GSList *coord_list = NULL;
-
-    coord_list = g_slist_append(coord_list, &a);
-    coord_list = g_slist_append(coord_list, &b);
-    gnc_gconf_set_list(section, key, GCONF_VALUE_FLOAT, coord_list, NULL);
-    g_slist_free(coord_list);
+    GVariant *coords = g_variant_new ("(dd)", a, b);
+    gnc_prefs_set_value (group, pref, coords);
 }
 
 
 /* This function is used by the custom format dialog to restore position
- * values from the GConf database.
+ * values from the preferences database.
  */
 static void
-get_float_pair (const char *section, const char *key, double *a, double *b)
+get_float_pair (const char *group, const char *pref, double *a, double *b)
 {
-    GSList *coord_list;
+    GVariant *coords = gnc_prefs_get_value (group, pref);
 
-    coord_list = gnc_gconf_get_list (section, key, GCONF_VALUE_FLOAT, NULL);
-    if (NULL == coord_list)
-    {
-        *a = 0;
-        *b = 0;
-        return;
-    }
+    *a = 0;
+    *b = 0;
 
-    *a = *(gdouble*)g_slist_nth_data(coord_list, 0);
-    *b = *(gdouble*)g_slist_nth_data(coord_list, 1);
-    g_slist_free(coord_list);
+    if (g_variant_is_of_type (coords, (const GVariantType *) "(dd)") )
+        g_variant_get (coords, "(dd)", a, b);
+    g_variant_unref (coords);
 }
 
 
@@ -594,42 +585,41 @@
     }
 
     /* Custom format page */
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_PAYEE,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_PAYEE,
                     gtk_spin_button_get_value(pcd->payee_x),
                     gtk_spin_button_get_value(pcd->payee_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_DATE,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_DATE,
                     gtk_spin_button_get_value(pcd->date_x),
                     gtk_spin_button_get_value(pcd->date_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_WORDS,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_WORDS,
                     gtk_spin_button_get_value(pcd->words_x),
                     gtk_spin_button_get_value(pcd->words_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_NUMBER,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NUMBER,
                     gtk_spin_button_get_value(pcd->number_x),
                     gtk_spin_button_get_value(pcd->number_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_NOTES,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NOTES,
                     gtk_spin_button_get_value(pcd->notes_x),
                     gtk_spin_button_get_value(pcd->notes_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_MEMO,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_MEMO,
                     gtk_spin_button_get_value(pcd->memo_x),
                     gtk_spin_button_get_value(pcd->memo_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_ADDRESS,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ADDRESS,
                     gtk_spin_button_get_value(pcd->address_x),
                     gtk_spin_button_get_value(pcd->address_y));
-    save_float_pair(GCONF_SECTION, KEY_SPLITS_AMOUNT,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_AMOUNT,
                     gtk_spin_button_get_value(pcd->splits_amount_x),
                     gtk_spin_button_get_value(pcd->splits_amount_y));
-    save_float_pair(GCONF_SECTION, KEY_SPLITS_MEMO,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_MEMO,
                     gtk_spin_button_get_value(pcd->splits_memo_x),
                     gtk_spin_button_get_value(pcd->splits_memo_y));
-    save_float_pair(GCONF_SECTION, KEY_SPLITS_ACCOUNT,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_ACCOUNT,
                     gtk_spin_button_get_value(pcd->splits_account_x),
                     gtk_spin_button_get_value(pcd->splits_account_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_TRANSLATION,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_TRANSLATION,
                     gtk_spin_button_get_value(pcd->translation_x),
                     gtk_spin_button_get_value(pcd->translation_y));
-    gnc_gconf_set_float(GCONF_SECTION, KEY_CUSTOM_ROTATION,
-                        gtk_spin_button_get_value(pcd->check_rotation),
-                        NULL);
+    gnc_prefs_set_float(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ROTATION,
+                        gtk_spin_button_get_value(pcd->check_rotation));
     active = gtk_combo_box_get_active(GTK_COMBO_BOX(pcd->units_combobox));
     gnc_gconf_set_int(GCONF_SECTION, KEY_CUSTOM_UNITS, active, NULL);
 }
@@ -690,41 +680,41 @@
     }
 
     /* Custom format page */
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_PAYEE, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_PAYEE, &x, &y);
     gtk_spin_button_set_value(pcd->payee_x, x);
     gtk_spin_button_set_value(pcd->payee_y, y);
 
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_DATE, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_DATE, &x, &y);
     gtk_spin_button_set_value(pcd->date_x, x);
     gtk_spin_button_set_value(pcd->date_y, y);
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_WORDS, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_WORDS, &x, &y);
     gtk_spin_button_set_value(pcd->words_x, x);
     gtk_spin_button_set_value(pcd->words_y, y);
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_NUMBER, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NUMBER, &x, &y);
     gtk_spin_button_set_value(pcd->number_x, x);
     gtk_spin_button_set_value(pcd->number_y, y);
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_ADDRESS, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ADDRESS, &x, &y);
     gtk_spin_button_set_value(pcd->address_x, x);
     gtk_spin_button_set_value(pcd->address_y, y);
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_NOTES, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NOTES, &x, &y);
     gtk_spin_button_set_value(pcd->notes_x, x);
     gtk_spin_button_set_value(pcd->notes_y, y);
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_MEMO, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_MEMO, &x, &y);
     gtk_spin_button_set_value(pcd->memo_x, x);
     gtk_spin_button_set_value(pcd->memo_y, y);
-    get_float_pair(GCONF_SECTION, KEY_SPLITS_AMOUNT, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_AMOUNT, &x, &y);
     gtk_spin_button_set_value(pcd->splits_amount_x, x);
     gtk_spin_button_set_value(pcd->splits_amount_y, y);
-    get_float_pair(GCONF_SECTION, KEY_SPLITS_MEMO, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_MEMO, &x, &y);
     gtk_spin_button_set_value(pcd->splits_memo_x, x);
     gtk_spin_button_set_value(pcd->splits_memo_y, y);
-    get_float_pair(GCONF_SECTION, KEY_SPLITS_ACCOUNT, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_ACCOUNT, &x, &y);
     gtk_spin_button_set_value(pcd->splits_account_x, x);
     gtk_spin_button_set_value(pcd->splits_account_y, y);
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_TRANSLATION, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_TRANSLATION, &x, &y);
     gtk_spin_button_set_value(pcd->translation_x, x);
     gtk_spin_button_set_value(pcd->translation_y, y);
-    x = gnc_gconf_get_float(GCONF_SECTION, KEY_CUSTOM_ROTATION, NULL);
+    x = gnc_prefs_get_float(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ROTATION);
     gtk_spin_button_set_value(pcd->check_rotation, x);
     active = gnc_gconf_get_int(GCONF_SECTION, KEY_CUSTOM_UNITS, NULL);
     gtk_combo_box_set_active(GTK_COMBO_BOX(pcd->units_combobox), active);

Modified: gnucash/trunk/src/gnome/dialog-print-check2.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-print-check2.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome/dialog-print-check2.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -72,22 +72,22 @@
 #define KEY_CHECK_POSITION     "check_position"
 #define KEY_FIRST_PAGE_COUNT   "first_page_count"
 #define KEY_DATE_FORMAT_USER   "date_format_custom"
-#define KEY_CUSTOM_PAYEE       "custom_payee"
-#define KEY_CUSTOM_DATE        "custom_date"
-#define KEY_CUSTOM_WORDS       "custom_amount_words"
-#define KEY_CUSTOM_NUMBER      "custom_amount_number"
-#define KEY_CUSTOM_ADDRESS     "custom_address"
-#define KEY_CUSTOM_NOTES       "custom_memo" /* historically misnamed */
-#define KEY_CUSTOM_MEMO        "custom_memo2"
-#define KEY_CUSTOM_TRANSLATION "custom_translation"
-#define KEY_CUSTOM_ROTATION    "custom_rotation"
+#define GNC_PREF_CUSTOM_PAYEE       "custom_payee"
+#define GNC_PREF_CUSTOM_DATE        "custom_date"
+#define GNC_PREF_CUSTOM_WORDS       "custom_amount_words"
+#define GNC_PREF_CUSTOM_NUMBER      "custom_amount_number"
+#define GNC_PREF_CUSTOM_ADDRESS     "custom_address"
+#define GNC_PREF_CUSTOM_NOTES       "custom_notes"
+#define GNC_PREF_CUSTOM_MEMO        "custom_memo"
+#define GNC_PREF_CUSTOM_TRANSLATION "custom_translation"
+#define GNC_PREF_CUSTOM_ROTATION    "custom_rotation"
 #define KEY_CUSTOM_UNITS       "custom_units"
 #define GNC_PREF_PRINT_DATE_FMT     "print_date_format"
 #define GNC_PREF_DEFAULT_FONT       "default_font"
 #define GNC_PREF_BLOCKING_CHARS     "blocking_chars"
-#define KEY_SPLITS_AMOUNT      "splits_amount"
-#define KEY_SPLITS_MEMO        "splits_memo"
-#define KEY_SPLITS_ACCOUNT     "splits_account"
+#define GNC_PREF_SPLITS_AMOUNT      "splits_amount"
+#define GNC_PREF_SPLITS_MEMO        "splits_memo"
+#define GNC_PREF_SPLITS_ACCOUNT     "splits_account"
 
 
 #define DEFAULT_FONT            "sans 12"
@@ -357,39 +357,31 @@
 
 
 /* This function is used by the custom format dialog to save position values
- * to the GConf database.
+ * in the preferences database.
  */
 static void
-save_float_pair (const char *section, const char *key, double a, double b)
+save_float_pair (const char *group, const char *pref, double a, double b)
 {
-    GSList *coord_list = NULL;
-
-    coord_list = g_slist_append(coord_list, &a);
-    coord_list = g_slist_append(coord_list, &b);
-    gnc_gconf_set_list(section, key, GCONF_VALUE_FLOAT, coord_list, NULL);
-    g_slist_free(coord_list);
+    GVariant *coords = g_variant_new ("(dd)", a, b);
+    gnc_prefs_set_value (group, pref, coords);
+    g_variant_unref (coords);
 }
 
 
 /* This function is used by the custom format dialog to restore position
- * values from the GConf database.
+ * values from the preferences database.
  */
 static void
-get_float_pair (const char *section, const char *key, double *a, double *b)
+get_float_pair (const char *group, const char *pref, double *a, double *b)
 {
-    GSList *coord_list;
+    GVariant *coords = gnc_prefs_get_value (group, pref);
 
-    coord_list = gnc_gconf_get_list (section, key, GCONF_VALUE_FLOAT, NULL);
-    if (NULL == coord_list)
-    {
-        *a = 0;
-        *b = 0;
-        return;
-    }
+    *a = 0;
+    *b = 0;
 
-    *a = *(gdouble*)g_slist_nth_data(coord_list, 0);
-    *b = *(gdouble*)g_slist_nth_data(coord_list, 1);
-    g_slist_free(coord_list);
+    if (g_variant_is_of_type (coords, (const GVariantType *) "(dd)") )
+        g_variant_get (coords, "(dd)", a, b);
+    g_variant_unref (coords);
 }
 
 
@@ -594,42 +586,41 @@
     }
 
     /* Custom format page */
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_PAYEE,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_PAYEE,
                     gtk_spin_button_get_value(pcd->payee_x),
                     gtk_spin_button_get_value(pcd->payee_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_DATE,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_DATE,
                     gtk_spin_button_get_value(pcd->date_x),
                     gtk_spin_button_get_value(pcd->date_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_WORDS,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_WORDS,
                     gtk_spin_button_get_value(pcd->words_x),
                     gtk_spin_button_get_value(pcd->words_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_NUMBER,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NUMBER,
                     gtk_spin_button_get_value(pcd->number_x),
                     gtk_spin_button_get_value(pcd->number_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_NOTES,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NOTES,
                     gtk_spin_button_get_value(pcd->notes_x),
                     gtk_spin_button_get_value(pcd->notes_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_MEMO,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_MEMO,
                     gtk_spin_button_get_value(pcd->memo_x),
                     gtk_spin_button_get_value(pcd->memo_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_ADDRESS,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ADDRESS,
                     gtk_spin_button_get_value(pcd->address_x),
                     gtk_spin_button_get_value(pcd->address_y));
-    save_float_pair(GCONF_SECTION, KEY_SPLITS_AMOUNT,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_AMOUNT,
                     gtk_spin_button_get_value(pcd->splits_amount_x),
                     gtk_spin_button_get_value(pcd->splits_amount_y));
-    save_float_pair(GCONF_SECTION, KEY_SPLITS_MEMO,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_MEMO,
                     gtk_spin_button_get_value(pcd->splits_memo_x),
                     gtk_spin_button_get_value(pcd->splits_memo_y));
-    save_float_pair(GCONF_SECTION, KEY_SPLITS_ACCOUNT,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_ACCOUNT,
                     gtk_spin_button_get_value(pcd->splits_account_x),
                     gtk_spin_button_get_value(pcd->splits_account_y));
-    save_float_pair(GCONF_SECTION, KEY_CUSTOM_TRANSLATION,
+    save_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_TRANSLATION,
                     gtk_spin_button_get_value(pcd->translation_x),
                     gtk_spin_button_get_value(pcd->translation_y));
-    gnc_gconf_set_float(GCONF_SECTION, KEY_CUSTOM_ROTATION,
-                        gtk_spin_button_get_value(pcd->check_rotation),
-                        NULL);
+    gnc_prefs_set_float(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ROTATION,
+                        gtk_spin_button_get_value(pcd->check_rotation));
     active = gtk_combo_box_get_active(GTK_COMBO_BOX(pcd->units_combobox));
     gnc_gconf_set_int(GCONF_SECTION, KEY_CUSTOM_UNITS, active, NULL);
 }
@@ -690,41 +681,41 @@
     }
 
     /* Custom format page */
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_PAYEE, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_PAYEE, &x, &y);
     gtk_spin_button_set_value(pcd->payee_x, x);
     gtk_spin_button_set_value(pcd->payee_y, y);
 
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_DATE, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_DATE, &x, &y);
     gtk_spin_button_set_value(pcd->date_x, x);
     gtk_spin_button_set_value(pcd->date_y, y);
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_WORDS, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_WORDS, &x, &y);
     gtk_spin_button_set_value(pcd->words_x, x);
     gtk_spin_button_set_value(pcd->words_y, y);
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_NUMBER, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NUMBER, &x, &y);
     gtk_spin_button_set_value(pcd->number_x, x);
     gtk_spin_button_set_value(pcd->number_y, y);
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_ADDRESS, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ADDRESS, &x, &y);
     gtk_spin_button_set_value(pcd->address_x, x);
     gtk_spin_button_set_value(pcd->address_y, y);
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_NOTES, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_NOTES, &x, &y);
     gtk_spin_button_set_value(pcd->notes_x, x);
     gtk_spin_button_set_value(pcd->notes_y, y);
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_MEMO, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_MEMO, &x, &y);
     gtk_spin_button_set_value(pcd->memo_x, x);
     gtk_spin_button_set_value(pcd->memo_y, y);
-    get_float_pair(GCONF_SECTION, KEY_SPLITS_AMOUNT, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_AMOUNT, &x, &y);
     gtk_spin_button_set_value(pcd->splits_amount_x, x);
     gtk_spin_button_set_value(pcd->splits_amount_y, y);
-    get_float_pair(GCONF_SECTION, KEY_SPLITS_MEMO, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_MEMO, &x, &y);
     gtk_spin_button_set_value(pcd->splits_memo_x, x);
     gtk_spin_button_set_value(pcd->splits_memo_y, y);
-    get_float_pair(GCONF_SECTION, KEY_SPLITS_ACCOUNT, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_SPLITS_ACCOUNT, &x, &y);
     gtk_spin_button_set_value(pcd->splits_account_x, x);
     gtk_spin_button_set_value(pcd->splits_account_y, y);
-    get_float_pair(GCONF_SECTION, KEY_CUSTOM_TRANSLATION, &x, &y);
+    get_float_pair(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_TRANSLATION, &x, &y);
     gtk_spin_button_set_value(pcd->translation_x, x);
     gtk_spin_button_set_value(pcd->translation_y, y);
-    x = gnc_gconf_get_float(GCONF_SECTION, KEY_CUSTOM_ROTATION, NULL);
+    x = gnc_prefs_get_float(GNC_PREFS_GROUP, GNC_PREF_CUSTOM_ROTATION);
     gtk_spin_button_set_value(pcd->check_rotation, x);
     active = gnc_gconf_get_int(GCONF_SECTION, KEY_CUSTOM_UNITS, NULL);
     gtk_combo_box_set_active(GTK_COMBO_BOX(pcd->units_combobox), active);

Modified: gnucash/trunk/src/gnome/dialog-sx-editor.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-editor.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome/dialog-sx-editor.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -54,7 +54,6 @@
 #include "gnc-embedded-window.h"
 #include "gnc-engine.h"
 #include "gnc-frequency.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-gui-query.h"
 #include "gnc-hooks.h"
 #include "gnc-ledger-display.h"
@@ -1429,7 +1428,7 @@
     if ( sxed->newsxP )
     {
         daysInAdvance =
-            gnc_gconf_get_float( SXED_GCONF_SECTION, KEY_CREATE_DAYS, NULL );
+            gnc_prefs_get_float (GNC_PREFS_GROUP_SXED, GNC_PREF_CREATE_DAYS);
     }
     else
     {
@@ -1447,7 +1446,7 @@
     if ( sxed->newsxP )
     {
         daysInAdvance =
-            gnc_gconf_get_float( SXED_GCONF_SECTION, KEY_REMIND_DAYS, NULL );
+            gnc_prefs_get_float (GNC_PREFS_GROUP_SXED, GNC_PREF_REMIND_DAYS);
     }
     else
     {

Modified: gnucash/trunk/src/gnome/dialog-sx-editor.h
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-editor.h	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome/dialog-sx-editor.h	2013-10-07 14:13:51 UTC (rev 23240)
@@ -28,9 +28,8 @@
 #define DIALOG_SCHEDXACTION_CM_CLASS "dialog-scheduledtransactions"
 #define DIALOG_SCHEDXACTION_EDITOR_CM_CLASS "dialog-scheduledtransaction-editor"
 
-#define SXED_GCONF_SECTION "dialogs/scheduled_trans/transaction_editor"
-#define KEY_CREATE_DAYS	"create_days"
-#define KEY_REMIND_DAYS	"remind_days"
+#define GNC_PREF_CREATE_DAYS "create_days"
+#define GNC_PREF_REMIND_DAYS "remind_days"
 #define GNC_PREFS_GROUP_SXED "dialogs.sxs.transaction_editor"
 #define GNC_PREF_CREATE_AUTO "create_auto"
 #define GNC_PREF_NOTIFY      "notify"

Modified: gnucash/trunk/src/gnome/dialog-sx-editor2.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-editor2.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome/dialog-sx-editor2.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -54,7 +54,6 @@
 #include "gnc-embedded-window.h"
 #include "gnc-engine.h"
 #include "gnc-frequency.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-gui-query.h"
 #include "gnc-hooks.h"
 #include "gnc-ledger-display.h"
@@ -1421,7 +1420,7 @@
     if ( sxed->newsxP )
     {
         daysInAdvance =
-            gnc_gconf_get_float (SXED_GCONF_SECTION, KEY_CREATE_DAYS, NULL);
+            gnc_prefs_get_float (GNC_PREFS_GROUP_SXED, GNC_PREF_CREATE_DAYS);
     }
     else
     {
@@ -1439,7 +1438,7 @@
     if (sxed->newsxP)
     {
         daysInAdvance =
-            gnc_gconf_get_float (SXED_GCONF_SECTION, KEY_REMIND_DAYS, NULL);
+            gnc_prefs_get_float (GNC_PREFS_GROUP_SXED, GNC_PREF_REMIND_DAYS);
     }
     else
     {

Modified: gnucash/trunk/src/gnome/dialog-sx-editor2.h
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-editor2.h	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome/dialog-sx-editor2.h	2013-10-07 14:13:51 UTC (rev 23240)
@@ -28,9 +28,8 @@
 #define DIALOG_SCHEDXACTION2_CM_CLASS "dialog-scheduledtransactions"
 #define DIALOG_SCHEDXACTION2_EDITOR_CM_CLASS "dialog-scheduledtransaction-editor"
 
-#define SXED_GCONF_SECTION "dialogs/scheduled_trans/transaction_editor"
-#define KEY_CREATE_DAYS	"create_days"
-#define KEY_REMIND_DAYS	"remind_days"
+#define GNC_PREF_CREATE_DAYS "create_days"
+#define GNC_PREF_REMIND_DAYS "remind_days"
 #define GNC_PREFS_GROUP_SXED "dialogs.sxs.transaction_editor"
 #define GNC_PREF_CREATE_AUTO "create_auto"
 #define GNC_PREF_NOTIFY      "notify"

Modified: gnucash/trunk/src/gnome/dialog-sx-from-trans.c
===================================================================
--- gnucash/trunk/src/gnome/dialog-sx-from-trans.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome/dialog-sx-from-trans.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -36,7 +36,6 @@
 #include "gnc-dense-cal.h"
 #include "gnc-engine.h"
 #include "engine-helpers.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-prefs.h"
 #include "gnc-ui-util.h"
 #include "gnc-ui.h"
@@ -507,11 +506,11 @@
                                        (autoCreateState & notifyState) );
 
         daysInAdvance =
-            gnc_gconf_get_float( SXED_GCONF_SECTION, KEY_CREATE_DAYS, NULL );
+            gnc_prefs_get_float (GNC_PREFS_GROUP_SXED, GNC_PREF_CREATE_DAYS);
         xaccSchedXactionSetAdvanceCreation( sx, daysInAdvance );
 
         daysInAdvance =
-            gnc_gconf_get_float( SXED_GCONF_SECTION, KEY_REMIND_DAYS, NULL );
+            gnc_prefs_get_float (GNC_PREFS_GROUP_SXED, GNC_PREF_REMIND_DAYS);
         xaccSchedXactionSetAdvanceReminder( sx, daysInAdvance );
     }
 

Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register2.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-register2.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-register2.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -3900,7 +3900,7 @@
     else
     {
         /* Force updates */
-        gnc_tree_view_split_reg_refresh_from_gconf (view);
+        gnc_tree_view_split_reg_refresh_from_prefs (view);
     }
     gnc_plugin_page_register2_ui_update (NULL, page);
 }

Modified: gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.checkprinting.gschema.xml.in
===================================================================
--- gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.checkprinting.gschema.xml.in	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome/gschemas/org.gnucash.dialogs.checkprinting.gschema.xml.in	2013-10-07 14:13:51 UTC (rev 23240)
@@ -20,36 +20,71 @@
       <summary>Custom date format</summary>
       <description>If the 'date_format' is set to indicate a custom date format, this value is used as an argument to strftime to produce the date to be printed.  It may be any valid strftime string; for more information about this format, read the manual page of strftime by "man 3 strftime".</description>
     </key>
-    <key name="custom_payee" type="ai">
-      <default>[]</default>
+    <key name="custom_units" type="i">
+      <default>0</default>
+      <summary>Units in which the custom coordinates are expressed</summary>
+      <description>Units in which the custom coordinates are expressed (inches, mm, ...).</description>
+    </key>
+    <key name="custom_payee" type="(dd)">
+      <default>(0,0)</default>
       <summary>Position of payee name</summary>
       <description>This value contains the X,Y coordinates for the start of the payee line on the check.</description>
     </key>
-    <key name="custom_date" type="ai">
-      <default>[]</default>
+    <key name="custom_date" type="(dd)">
+      <default>(0,0)</default>
       <summary>Position of date line</summary>
       <description>This value contains the X,Y coordinates for the start of the date line on the check.  Coordinates are from the lower left corner of the specified check position.</description>
     </key>
-    <key name="custom_amount_words" type="ai">
-      <default>[]</default>
+    <key name="custom_amount_words" type="(dd)">
+      <default>(0,0)</default>
       <summary>Position of check amount in words</summary>
       <description>This value contains the X,Y coordinates for the start of the written amount line on the check.  Coordinates are from the lower left corner of the specified check position.</description>
     </key>
-    <key name="custom_amount_number" type="ai">
-      <default>[]</default>
+    <key name="custom_amount_number" type="(dd)">
+      <default>(0,0)</default>
       <summary>Position of check amount in numbers</summary>
       <description>This value contains the X,Y coordinates for the start of the numerical amount line on the check.  Coordinates are from the lower left corner of the specified check position.</description>
     </key>
-    <key name="custom_memo" type="ai">
-      <default>[]</default>
+    <key name="custom_address" type="(dd)">
+      <default>(0,0)</default>
+      <summary>Position of payee address</summary>
+      <description>This value contains the X,Y coordinates for the start of the payee address line on the check.  Coordinates are from the lower left corner of the specified check position.</description>
+    </key>
+    <key name="custom_notes" type="(dd)">
+      <default>(0,0)</default>
+      <summary>Position of notes line</summary>
+      <description>This value contains the X,Y coordinates for the start of the notes line on the check.  Coordinates are from the lower left corner of the specified check position.</description>
+    </key>
+    <key name="custom_memo" type="(dd)">
+      <default>(0,0)</default>
       <summary>Position of memo line</summary>
       <description>This value contains the X,Y coordinates for the start of the memo line on the check.  Coordinates are from the lower left corner of the specified check position.</description>
     </key>
-    <key name="custom_position" type="ai">
-      <default>[]</default>
-      <summary>Position of check on page</summary>
-      <description>This value contains the Y coordinate for the bottom edge of the check.  This coordinate is from the bottom edge of the sheet of paper.</description>
+    <key name="custom_translation" type="(dd)">
+      <default>(0,0)</default>
+      <summary>Offset for complete check</summary>
+      <description>This value contains the X,Y offset for the complete check.  Coordinates are from the lower left corner of the specified check position.</description>
     </key>
+    <key name="custom_rotation" type="d">
+      <default>0.0</default>
+      <summary>Rotation angle</summary>
+      <description>Number of degrees to rotate the check.</description>
+    </key>
+    <key name="splits_amount" type="(dd)">
+      <default>(0,0)</default>
+      <summary>Position of split's amount in numbers</summary>
+      <description>This value contains the X,Y coordinates for the start of the split's amount line on the check.  Coordinates are from the lower left corner of the specified check position.</description>
+    </key>
+    <key name="splits_memo" type="(dd)">
+      <default>(0,0)</default>
+      <summary>Position of split's memo line</summary>
+      <description>This value contains the X,Y coordinates for the start of the split's memo line on the check.  Coordinates are from the lower left corner of the specified check position.</description>
+    </key>
+    <key name="splits_account" type="(dd)">
+      <default>(0,0)</default>
+      <summary>Position of split's account line</summary>
+      <description>This value contains the X,Y coordinates for the start of the split's account line on the check.  Coordinates are from the lower left corner of the specified check position.</description>
+    </key>
     <key name="print_date_format" type="b">
       <default>false</default>
       <summary>Print the date format below the date.</summary>

Modified: gnucash/trunk/src/gnome/gtkbuilder/dialog-sx.glade
===================================================================
--- gnucash/trunk/src/gnome/gtkbuilder/dialog-sx.glade	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome/gtkbuilder/dialog-sx.glade	2013-10-07 14:13:51 UTC (rev 23240)
@@ -202,7 +202,7 @@
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">Crea_te in advance:</property>
                 <property name="use_underline">True</property>
-                <property name="mnemonic_widget">gconf/dialogs/scheduled_trans/transaction_editor/create_days</property>
+                <property name="mnemonic_widget">pref/dialogs.sxs.transaction_editor/create_days</property>
               </object>
             </child>
           </object>
@@ -225,6 +225,7 @@
                 <property name="xalign">0</property>
                 <property name="label" translatable="yes">R_emind in advance:</property>
                 <property name="use_underline">True</property>
+                <property name="mnemonic_widget">pref/dialogs.sxs.transaction_editor/remind_days</property>
               </object>
             </child>
           </object>
@@ -241,7 +242,7 @@
             <property name="can_focus">False</property>
             <property name="spacing">6</property>
             <child>
-              <object class="GtkSpinButton" id="gconf/dialogs/scheduled_trans/transaction_editor/remind_days">
+              <object class="GtkSpinButton" id="pref/dialogs.sxs.transaction_editor/remind_days">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="tooltip_text" translatable="yes">Begin notifications this many days before the transaction is created.</property>
@@ -287,7 +288,7 @@
             <property name="can_focus">False</property>
             <property name="spacing">6</property>
             <child>
-              <object class="GtkSpinButton" id="gconf/dialogs/scheduled_trans/transaction_editor/create_days">
+              <object class="GtkSpinButton" id="pref/dialogs.sxs.transaction_editor/create_days">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="tooltip_text" translatable="yes">Create the transaction this many days before its effective date.</property>

Modified: gnucash/trunk/src/gnome-utils/dialog-preferences.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-preferences.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome-utils/dialog-preferences.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -752,79 +752,6 @@
 
 /****************************************************************************/
 
-/** The user updated a spin button.  Update gconf.  Spin button
- *  choices are stored as a float.
- *
- *  @internal
- *
- *  @param button A pointer to the spin button that was clicked.
- *
- *  @param user_data Unused.
- */
-static void
-gnc_prefs_spin_button_user_cb_gconf (GtkSpinButton *spin,
-                               gpointer user_data)
-{
-    const gchar *name;
-    gdouble value;
-
-    g_return_if_fail(GTK_IS_SPIN_BUTTON(spin));
-    name = gtk_buildable_get_name(GTK_BUILDABLE(spin)) + PREFIX_LEN;
-    value = gtk_spin_button_get_value(spin);
-    DEBUG("Spin button %s has value %f", name, value);
-    gnc_gconf_set_float(name, NULL, value, NULL);
-}
-
-
-/** A spin button choice was updated in gconf.  Update the user
- *  visible dialog.
- *
- *  @internal
- *
- *  @param button A pointer to the spin button that changed.
- *
- *  @param value The new value of the spin button.
- */
-static void
-gnc_prefs_spin_button_gconf_cb_gconf (GtkSpinButton *spin,
-                                gdouble value)
-{
-    g_return_if_fail(GTK_IS_SPIN_BUTTON(spin));
-    ENTER("button %p, value %f", spin, value);
-    g_signal_handlers_block_by_func(G_OBJECT(spin),
-                                    G_CALLBACK(gnc_prefs_spin_button_user_cb_gconf), NULL);
-    gtk_spin_button_set_value(spin, value);
-    g_signal_handlers_unblock_by_func(G_OBJECT(spin),
-                                      G_CALLBACK(gnc_prefs_spin_button_user_cb_gconf), NULL);
-    LEAVE(" ");
-}
-
-
-/** Connect a spin button widget to the user callback function.  Set
- *  the starting state of the button from its value in gconf.
- *
- *  @internal
- *
- *  @param button A pointer to the spin button that should be
- *  connected.
- */
-static void
-gnc_prefs_connect_spin_button_gconf (GtkSpinButton *spin)
-{
-    const gchar *name;
-    gdouble value;
-
-    g_return_if_fail(GTK_IS_SPIN_BUTTON(spin));
-    name = gtk_buildable_get_name(GTK_BUILDABLE(spin)) + PREFIX_LEN;
-    value = gnc_gconf_get_float(name, NULL, NULL);
-    gtk_spin_button_set_value(spin, value);
-    DEBUG(" Spin button %s has initial value %f", name, value);
-    g_signal_connect(G_OBJECT(spin), "value-changed",
-                     G_CALLBACK(gnc_prefs_spin_button_user_cb_gconf), NULL);
-}
-
-/****************************************************************************/
-
 /** The user changed a combo box.  Update gconf.  Combo box
  *  choices are stored as an int.
  *
@@ -1307,8 +1234,37 @@
     g_free (pref);
 }
 
+/****************************************************************************/
 
+/** Connect a GtkSpinButton widget to its stored value in the preferences database.
+ *
+ *  @internal
+ *
+ *  @param button A pointer to the spin button that should be
+ *  connected.
+ */
+static void
+gnc_prefs_connect_spin_button (GtkSpinButton *spin)
+{
+    gchar *group, *pref;
+    gdouble value;
 
+    g_return_if_fail(GTK_IS_SPIN_BUTTON(spin));
+
+    gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(spin)), &group, &pref);
+
+//    value = gnc_prefs_get_float (group, pref);
+//    gtk_spin_button_set_value(spin, value);
+//    DEBUG(" Spin button %s/%s has initial value %f", group, pref, value);
+
+    gnc_prefs_bind (group, pref, G_OBJECT (spin), "value");
+
+    g_free (group);
+    g_free (pref);
+}
+
+
+
 /****************************************************************************/
 
 /********************/
@@ -1382,11 +1338,6 @@
         DEBUG("  %s - radio button", name);
         gnc_prefs_connect_radio_button_gconf(GTK_RADIO_BUTTON(widget));
     }
-    else if (GTK_IS_SPIN_BUTTON(widget))
-    {
-        DEBUG("  %s - spin button", name);
-        gnc_prefs_connect_spin_button_gconf(GTK_SPIN_BUTTON(widget));
-    }
     else if (GTK_IS_COMBO_BOX(widget))
     {
         DEBUG("  %s - combo box", name);
@@ -1460,6 +1411,11 @@
         DEBUG("  %s - check button", name);
         gnc_prefs_connect_check_button(GTK_CHECK_BUTTON(widget));
     }
+    else if (GTK_IS_SPIN_BUTTON(widget))
+    {
+        DEBUG("  %s - spin button", name);
+        gnc_prefs_connect_spin_button(GTK_SPIN_BUTTON(widget));
+    }
     else
     {
         DEBUG("  %s - unsupported %s", name,
@@ -1713,12 +1669,6 @@
             DEBUG("widget %p - radio button", widget);
             gnc_prefs_radio_button_gconf_cb_gconf(GTK_RADIO_BUTTON(widget));
         }
-        else if (GTK_IS_SPIN_BUTTON(widget))
-        {
-            DEBUG("widget %p - spin button", widget);
-            gnc_prefs_spin_button_gconf_cb_gconf(GTK_SPIN_BUTTON(widget),
-                                           gconf_value_get_float(entry->value));
-        }
         else if (GTK_IS_COMBO_BOX(widget))
         {
             DEBUG("widget %p - combo_box", widget);

Modified: gnucash/trunk/src/gnome-utils/gnc-autosave.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-autosave.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome-utils/gnc-autosave.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -37,7 +37,7 @@
 #include "gnc-gui-query.h"
 
 #define GNC_PREF_AUTOSAVE_SHOW_EXPLANATION "autosave_show_explanation"
-#define KEY_AUTOSAVE_INTERVAL "autosave_interval_minutes"
+#define GNC_PREF_AUTOSAVE_INTERVAL         "autosave_interval_minutes"
 #define AUTOSAVE_SOURCE_ID "autosave_source_id"
 
 #ifdef G_LOG_DOMAIN
@@ -80,7 +80,7 @@
 {
     GtkWidget *dialog;
     guint interval_mins =
-        gnc_gconf_get_float(GCONF_GENERAL, KEY_AUTOSAVE_INTERVAL, NULL);
+        gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTOSAVE_INTERVAL);
     gboolean switch_off_autosave, show_expl_again, save_now;
     gint response;
 
@@ -158,7 +158,7 @@
     /* Should we switch off autosave? */
     if (switch_off_autosave)
     {
-        gnc_gconf_set_float(GCONF_GENERAL, KEY_AUTOSAVE_INTERVAL, 0, NULL);
+        gnc_prefs_set_float(GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTOSAVE_INTERVAL, 0);
         g_debug("autosave_timeout_cb: User chose to disable auto-save.\n");
     }
 
@@ -253,7 +253,7 @@
 static void gnc_autosave_add_timer(QofBook *book)
 {
     guint interval_mins =
-        gnc_gconf_get_float(GCONF_GENERAL, KEY_AUTOSAVE_INTERVAL, NULL);
+        gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTOSAVE_INTERVAL);
 
     /* Interval zero means auto-save is turned off. */
     if ( interval_mins > 0

Modified: gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -168,8 +168,8 @@
 {
     char *date_completion = gnc_gconf_get_string(GCONF_GENERAL,
                             KEY_DATE_COMPLETION, NULL);
-    int backmonths = gnc_gconf_get_float(GCONF_GENERAL,
-                                         KEY_DATE_BACKMONTHS, NULL);
+    int backmonths = gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL,
+                                         GNC_PREF_DATE_BACKMONTHS);
     QofDateCompletion dc;
 
     if (backmonths < 0)
@@ -196,7 +196,7 @@
         dc = QOF_DATE_COMPLETION_THISYEAR;
         backmonths = 6;
         gnc_gconf_set_string (GCONF_GENERAL, KEY_DATE_COMPLETION, "thisyear", NULL);
-        gnc_gconf_set_float (GCONF_GENERAL, KEY_DATE_BACKMONTHS, 6.0, NULL);
+        gnc_prefs_set_float (GNC_PREFS_GROUP_GENERAL, GNC_PREF_DATE_BACKMONTHS, 6.0);
     }
     qof_date_completion_set(dc, backmonths);
 
@@ -647,8 +647,10 @@
         KEY_DATE_FORMAT, (GncGconfGeneralCb)gnc_configure_date_format, NULL);
     gnc_gconf_general_register_cb(
         KEY_DATE_COMPLETION, (GncGconfGeneralCb)gnc_configure_date_completion, NULL);
-    gnc_gconf_general_register_cb(
-        KEY_DATE_BACKMONTHS, (GncGconfGeneralCb)gnc_configure_date_completion, NULL);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                           GNC_PREF_DATE_BACKMONTHS,
+                           gnc_configure_date_completion,
+                           NULL);
     gnc_gconf_general_register_any_cb(
         (GncGconfGeneralAnyCb)gnc_gui_refresh_all, NULL);
 

Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -96,7 +96,7 @@
 #define GNC_PREF_SHOW_CLOSE_BUTTON    "tab_close_buttons"
 #define GNC_PREF_TAB_NEXT_RECENT      "tab_next_recent"
 #define KEY_TAB_POSITION         "tab_position"
-#define KEY_TAB_WIDTH            "tab_width"
+#define GNC_PREF_TAB_WIDTH            "tab_width"
 #define GNC_PREF_TAB_COLOR            "show_account_color_tabs"
 
 #define GNC_MAIN_WINDOW_NAME "GncMainWindow"
@@ -1883,9 +1883,10 @@
  *
  *  @internal
  *
- *  @param entry A pointer to the GConfEntry which describes the new
- *  state of whether close buttons should be visible on notebook tabs.
+ *  @param prefs Unused.
  *
+ *  @param pref Unused.
+ *
  *  @param user_data Unused.
  */
 static void
@@ -1947,13 +1948,14 @@
  *
  *  @internal
  *
- *  @param entry A pointer to the GConfEntry which describes the new
- *  state of whether the account color should be visible on notebook tabs.
+ *  @param prefs Unused.
  *
+ *  @param pref Name of the preference that was changed.
+ *
  *  @param user_data GncMainWindow.
  */
 static void
-gnc_main_window_update_tab_color (gpointer gsettings, gchar *key, gpointer user_data)
+gnc_main_window_update_tab_color (gpointer gsettings, gchar *pref, gpointer user_data)
 {
     GncMainWindowPrivate *priv;
     GncMainWindow        *window;
@@ -1962,7 +1964,7 @@
     g_return_if_fail(GNC_IS_MAIN_WINDOW(user_data));
     window = user_data;
     priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);
-    if (g_strcmp0 (GNC_PREF_TAB_COLOR, key) == 0)
+    if (g_strcmp0 (GNC_PREF_TAB_COLOR, pref) == 0)
         priv->show_color_tabs = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_COLOR);
     gnc_main_window_foreach_page (gnc_main_window_update_tab_color_one_page, window);
     LEAVE(" ");
@@ -1972,7 +1974,7 @@
 /** Update the width of the label in the tab of a notebook page.  This
  *  function adjusts both the width and the ellipsize mode so that the tab
  *  label looks correct.  The special check for a zero value handles the
- *  case where a user hasn't set a tab width and the gconf default isn't
+ *  case where a user hasn't set a tab width and the preference default isn't
  *  detected.
  *
  *  @internal
@@ -2016,18 +2018,19 @@
  *
  *  @internal
  *
- *  @param entry A pointer to the GConfEntry which describes the new
- *  size of the tab label width.
+ *  @param prefs Unused.
  *
+ *  @param pref Unused.
+ *
  *  @param user_data Unused.
  */
 static void
-gnc_main_window_update_tab_width (GConfEntry *entry, gpointer user_data)
+gnc_main_window_update_tab_width (gpointer prefs, gchar *pref, gpointer user_data)
 {
     gint new_value;
 
     ENTER(" ");
-    new_value = gconf_value_get_float(entry->value);
+    new_value = gnc_prefs_get_float (GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_WIDTH);
     gnc_main_window_foreach_page(
         gnc_main_window_update_tab_width_one_page,
         &new_value);
@@ -2435,9 +2438,10 @@
                            GNC_PREF_SHOW_CLOSE_BUTTON,
                            gnc_main_window_update_tab_close,
                            NULL);
-    gnc_gconf_general_register_cb (KEY_TAB_WIDTH,
-                                   gnc_main_window_update_tab_width,
-                                   NULL);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                           GNC_PREF_TAB_WIDTH,
+                           gnc_main_window_update_tab_width,
+                           NULL);
 
     gnc_hook_add_dangler(HOOK_BOOK_SAVED,
                          (GFunc)gnc_main_window_update_all_titles, NULL);
@@ -2468,7 +2472,7 @@
     priv->event_handler_id =
         qof_event_register_handler(gnc_main_window_event_handler, window);
 
-    /* Get the show_color_tabs value from gconf */
+    /* Get the show_color_tabs value preference */
     priv->show_color_tabs = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_COLOR);
 
     gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
@@ -2829,7 +2833,7 @@
     /*
      * The page tab.
      */
-    width = gnc_gconf_get_float(GCONF_GENERAL, KEY_TAB_WIDTH, NULL);
+    width = gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_WIDTH);
     icon = GNC_PLUGIN_PAGE_GET_CLASS(page)->tab_icon;
     label = gtk_label_new (gnc_plugin_page_get_page_name(page));
     if (width != 0)

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -39,7 +39,6 @@
 #include "gnc-tree-util-split-reg.h"
 #include "gnc-ui.h"
 #include "dialog-utils.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-prefs.h"
 #include "Transaction.h"
 #include "engine-helpers.h"
@@ -295,6 +294,7 @@
 #define GNC_PREF_SHOW_EXTRA_DATES_ON_SEL "show_extra_dates_on_selection"
 #define GNC_PREF_SHOW_CAL_BUTTONS        "show_calendar_buttons"
 #define GNC_PREF_SEL_TO_BLANK_ON_EXPAND  "selection_to_blank_on_expand"
+#define GNC_PREF_KEY_LENGTH              "key_length"
 
 /* This could be a preference setting, show currency / commodity symbols */
 #define SHOW_SYMBOL FALSE
@@ -478,7 +478,7 @@
     view->show_extra_dates = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_SHOW_EXTRA_DATES);
     view->priv->show_extra_dates_on_selection = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_SHOW_EXTRA_DATES_ON_SEL);
     view->priv->selection_to_blank_on_expand = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_SEL_TO_BLANK_ON_EXPAND);
-    view->priv->key_length = gnc_gconf_get_float(GCONF_GENERAL_REGISTER, "key_length", NULL);
+    view->priv->key_length = gnc_prefs_get_float (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_KEY_LENGTH);
 
     view->priv->acct_short_names = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_SHOW_LEAF_ACCT_NAMES);
     view->priv->negative_in_red = gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_NEGATIVE_IN_RED);
@@ -567,7 +567,7 @@
 
 /* Update internal settings based on preferences */
 void
-gnc_tree_view_split_reg_refresh_from_gconf (GncTreeViewSplitReg *view)
+gnc_tree_view_split_reg_refresh_from_prefs (GncTreeViewSplitReg *view)
 {
     GncTreeModelSplitReg *model;
 

Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.h
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.h	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view-split-reg.h	2013-10-07 14:13:51 UTC (rev 23240)
@@ -139,7 +139,7 @@
 
 gboolean gnc_tree_view_split_reg_call_uiupdate_cb(GncTreeViewSplitReg *view);
 
-void gnc_tree_view_split_reg_refresh_from_gconf (GncTreeViewSplitReg *view);
+void gnc_tree_view_split_reg_refresh_from_prefs (GncTreeViewSplitReg *view);
 
 GtkWidget * gnc_tree_view_split_reg_get_parent (GncTreeViewSplitReg *view);
 

Modified: gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade
===================================================================
--- gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade	2013-10-07 14:13:51 UTC (rev 23240)
@@ -1392,7 +1392,7 @@
                   <placeholder/>
                 </child>
                 <child>
-                  <object class="GtkSpinButton" id="gconf/general/date_backmonths">
+                  <object class="GtkSpinButton" id="pref/general/date_backmonths">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="has_tooltip">True</property>
@@ -1610,7 +1610,7 @@
                     <property name="can_focus">False</property>
                     <property name="spacing">6</property>
                     <child>
-                      <object class="GtkSpinButton" id="gconf/general/retain_days">
+                      <object class="GtkSpinButton" id="pref/general/retain_days">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="has_tooltip">True</property>
@@ -1728,7 +1728,7 @@
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">_Decimal places:</property>
                     <property name="use_underline">True</property>
-                    <property name="mnemonic_widget">gconf/general/auto_decimal_places</property>
+                    <property name="mnemonic_widget">pref/general/auto_decimal_places</property>
                   </object>
                   <packing>
                     <property name="top_attach">9</property>
@@ -1739,7 +1739,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkSpinButton" id="gconf/general/auto_decimal_places">
+                  <object class="GtkSpinButton" id="pref/general/auto_decimal_places">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="has_tooltip">True</property>
@@ -1855,7 +1855,7 @@
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">New search _limit:</property>
                     <property name="use_underline">True</property>
-                    <property name="mnemonic_widget">gconf/dialogs/search/new_search_limit</property>
+                    <property name="mnemonic_widget">pref/dialogs.search/new_search_limit</property>
                   </object>
                   <packing>
                     <property name="top_attach">21</property>
@@ -1866,7 +1866,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkSpinButton" id="gconf/dialogs/search/new_search_limit">
+                  <object class="GtkSpinButton" id="pref/dialogs.search/new_search_limit">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="has_tooltip">True</property>
@@ -1918,7 +1918,7 @@
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Auto-save time _interval:</property>
                     <property name="use_underline">True</property>
-                    <property name="mnemonic_widget">gconf/general/autosave_interval_minutes</property>
+		    <property name="mnemonic_widget">pref/general/autosave_interval_minutes</property>
                   </object>
                   <packing>
                     <property name="top_attach">14</property>
@@ -1934,7 +1934,7 @@
                     <property name="can_focus">False</property>
                     <property name="spacing">6</property>
                     <child>
-                      <object class="GtkSpinButton" id="gconf/general/autosave_interval_minutes">
+		      <object class="GtkSpinButton" id="pref/general/autosave_interval_minutes">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="has_tooltip">True</property>
@@ -2893,7 +2893,7 @@
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Number of _transactions:</property>
                     <property name="use_underline">True</property>
-                    <property name="mnemonic_widget">gconf/general/register/max_transactions</property>
+                    <property name="mnemonic_widget">pref/general.register/max_transactions</property>
                   </object>
                   <packing>
                     <property name="top_attach">9</property>
@@ -2904,7 +2904,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkSpinButton" id="gconf/general/register/max_transactions">
+                  <object class="GtkSpinButton" id="pref/general.register/max_transactions">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="has_tooltip">True</property>
@@ -3001,7 +3001,7 @@
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Number of _characters for auto complete:</property>
                     <property name="use_underline">True</property>
-                    <property name="mnemonic_widget">gconf/general/register/key_length</property>
+                    <property name="mnemonic_widget">pref/general.register/key_length</property>
                   </object>
                   <packing>
                     <property name="top_attach">10</property>
@@ -3012,7 +3012,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkSpinButton" id="gconf/general/register/key_length">
+                  <object class="GtkSpinButton" id="pref/general.register/key_length">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="has_tooltip">True</property>
@@ -3836,7 +3836,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkSpinButton" id="gconf/general/tab_width">
+                      <object class="GtkSpinButton" id="pref/general/tab_width">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="has_tooltip">True</property>
@@ -3921,7 +3921,7 @@
   </object>
   <object class="GtkAdjustment" id="max_transactions_adj">
     <property name="upper">999999</property>
-    <property name="value">1</property>
+    <property name="value">0</property>
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>

Modified: gnucash/trunk/src/import-export/dialog-import.glade
===================================================================
--- gnucash/trunk/src/import-export/dialog-import.glade	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/import-export/dialog-import.glade	2013-10-07 14:13:51 UTC (rev 23240)
@@ -71,7 +71,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkSpinButton" id="gconf/dialogs/import/generic_matcher/atm_fee_threshold">
+          <object class="GtkSpinButton" id="pref/dialogs.import.generic/atm_fee_threshold">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="has_tooltip">True</property>
@@ -99,7 +99,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkSpinButton" id="gconf/dialogs/import/generic_matcher/auto_clear_threshold">
+          <object class="GtkSpinButton" id="pref/dialogs.import.generic/auto_clear_threshold">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="has_tooltip">True</property>
@@ -126,7 +126,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkSpinButton" id="gconf/dialogs/import/generic_matcher/auto_add_threshold">
+          <object class="GtkSpinButton" id="pref/dialogs.import.generic/auto_add_threshold">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="has_tooltip">True</property>
@@ -153,7 +153,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkSpinButton" id="gconf/dialogs/import/generic_matcher/match_threshold">
+          <object class="GtkSpinButton" id="pref/dialogs.import.generic/match_threshold">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="has_tooltip">True</property>
@@ -186,7 +186,7 @@
             <property name="xalign">0</property>
             <property name="label" translatable="yes">Commercial ATM _fees threshold</property>
             <property name="use_underline">True</property>
-            <property name="mnemonic_widget">gconf/dialogs/import/generic_matcher/atm_fee_threshold</property>
+            <property name="mnemonic_widget">pref/dialogs.import.generic/atm_fee_threshold</property>
           </object>
           <packing>
             <property name="top_attach">7</property>
@@ -203,7 +203,7 @@
             <property name="xalign">0</property>
             <property name="label" translatable="yes">Auto-c_lear threshold</property>
             <property name="use_underline">True</property>
-            <property name="mnemonic_widget">gconf/dialogs/import/generic_matcher/auto_clear_threshold</property>
+            <property name="mnemonic_widget">pref/dialogs.import.generic/auto_clear_threshold</property>
           </object>
           <packing>
             <property name="top_attach">6</property>
@@ -220,7 +220,7 @@
             <property name="xalign">0</property>
             <property name="label" translatable="yes">Auto-_add threshold</property>
             <property name="use_underline">True</property>
-            <property name="mnemonic_widget">gconf/dialogs/import/generic_matcher/auto_add_threshold</property>
+            <property name="mnemonic_widget">pref/dialogs.import.generic/auto_add_threshold</property>
           </object>
           <packing>
             <property name="top_attach">5</property>
@@ -237,7 +237,7 @@
             <property name="xalign">0</property>
             <property name="label" translatable="yes">Match _display threshold</property>
             <property name="use_underline">True</property>
-            <property name="mnemonic_widget">gconf/dialogs/import/generic_matcher/match_threshold</property>
+            <property name="mnemonic_widget">pref/dialogs.import.generic/match_threshold</property>
           </object>
           <packing>
             <property name="top_attach">4</property>

Modified: gnucash/trunk/src/import-export/import-settings.c
===================================================================
--- gnucash/trunk/src/import-export/import-settings.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/import-export/import-settings.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -29,7 +29,6 @@
 #include <glib.h>
 
 #include "import-settings.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-prefs.h"
 
 /********************************************************************\
@@ -90,14 +89,14 @@
     settings->action_add_enabled = DEFAULT_ACTION_ADD_ENABLED;
     settings->action_clear_enabled = DEFAULT_ACTION_CLEAR_ENABLED;
     settings->clear_threshold =
-        (int)gnc_gconf_get_float(GCONF_IMPORT_SECTION, "auto_clear_threshold", NULL);
+        (int)gnc_prefs_get_float (GNC_PREFS_GROUP_IMPORT, GNC_PREF_AUTO_CLEAR_THRESHOLD);
     settings->add_threshold =
-        (int)gnc_gconf_get_float(GCONF_IMPORT_SECTION, "auto_add_threshold", NULL);
+        (int)gnc_prefs_get_float (GNC_PREFS_GROUP_IMPORT, GNC_PREF_AUTO_ADD_THRESHOLD);
     settings->display_threshold =
-        (int)gnc_gconf_get_float(GCONF_IMPORT_SECTION, "match_threshold", NULL);
+        (int)gnc_prefs_get_float (GNC_PREFS_GROUP_IMPORT, GNC_PREF_MATCH_THRESHOLD);
 
     settings->fuzzy_amount =
-        gnc_gconf_get_float(GCONF_IMPORT_SECTION, "atm_fee_threshold", NULL);
+        gnc_prefs_get_float (GNC_PREFS_GROUP_IMPORT, GNC_PREF_ATM_FEE_THRESHOLD);
 
     settings->match_date_hardlimit = 42; /* 6 weeks */
     return settings;

Modified: gnucash/trunk/src/import-export/import-utilities.h
===================================================================
--- gnucash/trunk/src/import-export/import-utilities.h	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/import-export/import-utilities.h	2013-10-07 14:13:51 UTC (rev 23240)
@@ -26,12 +26,15 @@
 #define IMPORT_UTILITIES_H
 
 
-/** The GConf section of the importer */
-#define GCONF_IMPORT_SECTION "dialogs/import/generic_matcher"
-#define GNC_PREFS_GROUP_IMPORT "dialogs.import.generic"
-#define GNC_PREF_ENABLE_SKIP   "enable_skip"
-#define GNC_PREF_ENABLE_UPDATE "enable_update"
-#define GNC_PREF_USE_BAYES     "use_bayes"
+/** The preferences used by the importer */
+#define GNC_PREFS_GROUP_IMPORT        "dialogs.import.generic"
+#define GNC_PREF_ENABLE_SKIP          "enable_skip"
+#define GNC_PREF_ENABLE_UPDATE        "enable_update"
+#define GNC_PREF_USE_BAYES            "use_bayes"
+#define GNC_PREF_ATM_FEE_THRESHOLD    "atm_fee_threshold"
+#define GNC_PREF_AUTO_CLEAR_THRESHOLD "auto_clear_threshold"
+#define GNC_PREF_AUTO_ADD_THRESHOLD   "auto_add_threshold"
+#define GNC_PREF_MATCH_THRESHOLD      "match_threshold"
 
 
 #include "Account.h"

Modified: gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -48,6 +48,7 @@
 #define REGISTER_TEMPLATE_CM_CLASS   "register-template"
 
 #define GNC_PREF_DOUBLE_LINE_MODE "double_line_mode"
+#define GNC_PREF_MAX_TRANS        "max_transactions"
 
 
 struct gnc_ledger_display
@@ -776,7 +777,7 @@
     ld->get_parent = NULL;
     ld->user_data = NULL;
 
-    limit = gnc_gconf_get_float(GCONF_GENERAL_REGISTER, "max_transactions", NULL);
+    limit = gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_MAX_TRANS);
 
     /* set up the query filter */
     if (q)

Modified: gnucash/trunk/src/register/ledger-core/gnc-ledger-display2.c
===================================================================
--- gnucash/trunk/src/register/ledger-core/gnc-ledger-display2.c	2013-10-07 14:13:11 UTC (rev 23239)
+++ gnucash/trunk/src/register/ledger-core/gnc-ledger-display2.c	2013-10-07 14:13:51 UTC (rev 23240)
@@ -52,6 +52,7 @@
 #define REGISTER_TEMPLATE_CM_CLASS   "register-template"
 
 #define GNC_PREF_DOUBLE_LINE_MODE "double_line_mode"
+#define GNC_PREF_MAX_TRANS        "max_transactions"
 
 
 struct gnc_ledger_display2
@@ -795,7 +796,7 @@
     ld->get_parent = NULL;
     ld->user_data = NULL;
 
-    limit = gnc_gconf_get_float(GCONF_GENERAL_REGISTER, "max_transactions", NULL);
+    limit = gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_MAX_TRANS);
 
     /* set up the query filter */
     if (q)



More information about the gnucash-changes mailing list