r23247 - gnucash/trunk/src - Gnc-Prefs: migrate GtkRadiobutton widgets (and associated preferences)

Geert Janssens gjanssens at code.gnucash.org
Mon Oct 7 10:16:37 EDT 2013


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

Modified:
   gnucash/trunk/src/app-utils/gnc-accounting-period.c
   gnucash/trunk/src/app-utils/gnc-prefs-utils.c
   gnucash/trunk/src/app-utils/gnc-ui-util.c
   gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c
   gnucash/trunk/src/core-utils/gnc-prefs.h
   gnucash/trunk/src/gnome-utils/dialog-preferences.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-plugin-page.h
   gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade
   gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c
   gnucash/trunk/src/gnome/gnc-plugin-page-register.c
   gnucash/trunk/src/gnome/gnc-plugin-page-register2.c
   gnucash/trunk/src/gnome/gschemas/org.gnucash.gschema.xml.in
   gnucash/trunk/src/gnome/gschemas/org.gnucash.window.pages.account.tree.gschema.xml.in
   gnucash/trunk/src/import-export/qif-import/assistant-qif-import.c
   gnucash/trunk/src/import-export/qif-import/dialog-account-picker.glade
   gnucash/trunk/src/import-export/qif-import/gschemas/org.gnucash.dialogs.import.qif.gschema.xml.in
   gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c
   gnucash/trunk/src/register/ledger-core/gnc-ledger-display2.c
Log:
Gnc-Prefs: migrate GtkRadiobutton widgets (and associated preferences)

All GtkRadiokButtons now use the new preferences backend
so drop the GtkRadiokButton-Gconf wiring as well.

Modified: gnucash/trunk/src/app-utils/gnc-accounting-period.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-accounting-period.c	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/app-utils/gnc-accounting-period.c	2013-10-07 14:16:36 UTC (rev 23247)
@@ -52,12 +52,14 @@
 
 /* TODO: This should probably be changed eventually. */
 #define GNC_PREFS_GROUP           "window.pages.account_tree.summary"
-#define GNC_PREF_START_CHOICE "start_choice"
-#define GNC_PREF_START_DATE   "start_date"
-#define GNC_PREF_START_PERIOD "start_period"
-#define GNC_PREF_END_CHOICE   "end_choice"
-#define GNC_PREF_END_DATE     "end_date"
-#define GNC_PREF_END_PERIOD   "end_period"
+#define GNC_PREF_START_CHOICE_ABS "start_choice-absolute"
+#define GNC_PREF_START_CHOICE_REL "start_choice-relative"
+#define GNC_PREF_START_DATE       "start_date"
+#define GNC_PREF_START_PERIOD     "start_period"
+#define GNC_PREF_END_CHOICE_ABS   "end_choice-absolute"
+#define GNC_PREF_END_CHOICE_REL   "end_choice-relative"
+#define GNC_PREF_END_DATE         "end_date"
+#define GNC_PREF_END_PERIOD       "end_period"
 
 static time64 gnc_accounting_period_start_time64 (GncAccountingPeriod which,
 						   const GDate *fy_end,
@@ -67,27 +69,22 @@
 						 const GDate *contains);
 
 static time64
-lookup_start_date_option(const gchar *section,
-                         const gchar *key_choice,
-                         const gchar *key_absolute,
-                         const gchar *key_relative,
-                         GDate *fy_end)
+lookup_start_date_option(GDate *fy_end)
 {
     gchar *choice;
     time64 time;
     int which;
 
-    choice = gnc_prefs_get_string(section, key_choice);
-    if (choice && strcmp(choice, "absolute") == 0)
+
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP, GNC_PREF_START_CHOICE_ABS))
     {
-        time = gnc_prefs_get_int(section, key_absolute);
+        time = gnc_prefs_get_int(GNC_PREFS_GROUP, GNC_PREF_START_DATE);
     }
     else
     {
-        which = gnc_prefs_get_int(section, key_relative);
+        which = gnc_prefs_get_int(GNC_PREFS_GROUP, GNC_PREF_START_PERIOD);
         time = gnc_accounting_period_start_time64(which, fy_end, NULL);
     }
-    g_free(choice);
     /* we will need the balance of the last transaction before the start
        date, so subtract 1 from start date */
     /* CAS: we don't actually do what this comment says.  I think that's
@@ -96,28 +93,21 @@
 }
 
 static time64
-lookup_end_date_option(const gchar *section,
-                       const gchar *key_choice,
-                       const gchar *key_absolute,
-                       const gchar *key_relative,
-                       GDate *fy_end)
+lookup_end_date_option(GDate *fy_end)
 {
-    gchar *choice;
     time64 time;
     int which;
 
-    choice = gnc_prefs_get_string(section, key_choice);
-    if (choice && strcmp(choice, "absolute") == 0)
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP, GNC_PREF_END_CHOICE_ABS))
     {
-        time = gnc_prefs_get_int(section, key_absolute);
+        time = gnc_prefs_get_int(GNC_PREFS_GROUP, GNC_PREF_END_DATE);
         time = gnc_time64_get_day_end(time);
     }
     else
     {
-        which = gnc_prefs_get_int(section, key_relative);
+        which = gnc_prefs_get_int(GNC_PREFS_GROUP, GNC_PREF_END_PERIOD);
         time = gnc_accounting_period_end_time64(which, fy_end, NULL);
     }
-    g_free(choice);
     if (time == 0)
         time = -1;
     return time;
@@ -144,9 +134,7 @@
 {
     time64 t;
     GDate *fy_end = get_fy_end();
-    t = lookup_start_date_option(GNC_PREFS_GROUP, GNC_PREF_START_CHOICE,
-                                 GNC_PREF_START_DATE, GNC_PREF_START_PERIOD,
-                                 fy_end);
+    t = lookup_start_date_option(fy_end);
     if (fy_end)
         g_date_free(fy_end);
     return t;
@@ -158,9 +146,7 @@
     time64 t;
     GDate *fy_end = get_fy_end();
 
-    t = lookup_end_date_option(GNC_PREFS_GROUP, GNC_PREF_END_CHOICE,
-                               GNC_PREF_END_DATE, GNC_PREF_END_PERIOD,
-                               fy_end);
+    t = lookup_end_date_option(fy_end);
     if (fy_end)
         g_date_free(fy_end);
     return t;

Modified: gnucash/trunk/src/app-utils/gnc-prefs-utils.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-prefs-utils.c	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/app-utils/gnc-prefs-utils.c	2013-10-07 14:16:36 UTC (rev 23247)
@@ -32,9 +32,11 @@
 static QofLogModule log_module = G_LOG_DOMAIN;
 
 /* Keys used for core preferences */
-#define GNC_PREF_FILE_COMPRESSION  "file_compression"
-#define GNC_PREF_RETAIN_TYPE       "retain_type"
-#define GNC_PREF_RETAIN_DAYS       "retain_days"
+#define GNC_PREF_FILE_COMPRESSION    "file_compression"
+#define GNC_PREF_RETAIN_TYPE_NEVER   "retain_type-never"
+#define GNC_PREF_RETAIN_TYPE_DAYS    "retain_type-days"
+#define GNC_PREF_RETAIN_TYPE_FOREVER "retain_type-forever"
+#define GNC_PREF_RETAIN_DAYS         "retain_days"
 
 /***************************************************************
  * Initialization                                              *
@@ -47,26 +49,18 @@
 }
 
 static void
-file_retain_type_changed_cb(GConfEntry *entry, gpointer user_data)
+file_retain_type_changed_cb(gpointer gsettings, gchar *key, gpointer user_data)
 {
-    XMLFileRetentionType type;
-    gchar *choice = gnc_gconf_get_string(GCONF_GENERAL, KEY_RETAIN_TYPE, NULL);
-    if (!choice)
-        choice = g_strdup("days");
+    XMLFileRetentionType type = XML_RETAIN_ALL;
 
-    if (g_strcmp0 (choice, "never") == 0)
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_TYPE_NEVER))
         type = XML_RETAIN_NONE;
-    else if (g_strcmp0 (choice, "forever") == 0)
-        type = XML_RETAIN_ALL;
-    else
-    {
-        if (g_strcmp0 (choice, "days") != 0)
-            PERR("bad value '%s'", choice ? choice : "(null)");
+    else if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_TYPE_DAYS))
         type = XML_RETAIN_DAYS;
-    }
+    else if (!gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_TYPE_FOREVER))
+            PWARN("no file retention policy was set, assuming conservative policy 'forever'");
+
     gnc_prefs_set_file_retention_policy (type);
-
-    g_free (choice);
 }
 
 static void
@@ -81,27 +75,39 @@
 {
     gnc_gsettings_load_backend();
 
-    /* Add hooks to update core preferences whenever the associated gconf key changes */
-    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);
-
-    /* Call the hooks once manually to initialize the core preferences */
-    file_retain_changed_cb (NULL, NULL, NULL);
-    file_retain_type_changed_cb (NULL, NULL);
-    file_compression_changed_cb (NULL, NULL, NULL);
-
-    /* Backwards compatibility code. Pre 2.3.15, 0 retain_days meant
+    /* Check for invalid retain_type (days)/retain_days (0) combo.
+     * This can happen either because a user changed the preferences
+     * manually outside of GnuCash, or because the user upgraded from
+     * gnucash version 2.3.15 or older. Back then, 0 retain_days meant
      * "keep forever". From 2.3.15 on this is controlled via a multiple
-     * choice ("retain_type"). So if we find a 0 retain_days value with
-     * a "days" retain_type, we should interpret it as if we got a
-     * "forever" retain_type.
+     * choice ("retain_type").
+     * So if we find a 0 retain_days value with a "days" retain_type,
+     * we will silently and conservatively interpret is as meaning
+     * retain forever ("forever" retain_type).
      */
     if ( (gnc_prefs_get_file_retention_policy () == XML_RETAIN_DAYS) &&
             (gnc_prefs_get_file_retention_days () == 0 ) )
     {
-        gnc_gconf_set_string (GCONF_GENERAL, KEY_RETAIN_TYPE, "forever", NULL);
+        gnc_prefs_set_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_TYPE_FOREVER, TRUE);
+        gnc_prefs_set_float (GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_DAYS, 30);
+        PWARN("retain 0 days policy was set, but this is probably not what the user wanted,\n"
+              "assuming conservative policy 'forever'");
     }
+
+    /* Add hooks to update core preferences whenever the associated preference changes */
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_DAYS,
+                           file_retain_changed_cb, NULL);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_TYPE_NEVER,
+                           file_retain_type_changed_cb, NULL);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_TYPE_DAYS,
+                           file_retain_type_changed_cb, NULL);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL, GNC_PREF_RETAIN_TYPE_FOREVER,
+                           file_retain_type_changed_cb, NULL);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL, GNC_PREF_FILE_COMPRESSION,
+                           file_compression_changed_cb, NULL);
+
+    /* Call the hooks once manually to initialize the core preferences */
+    file_retain_changed_cb (NULL, NULL, NULL);
+    file_retain_type_changed_cb (NULL, 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:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c	2013-10-07 14:16:36 UTC (rev 23247)
@@ -58,9 +58,12 @@
 #include "gnc-features.h"
 #include "gnc-guile-utils.h"
 
-#define GNC_PREF_CURRENCY_CHOICE   "currency_choice"
-#define GNC_PREF_CURRENCY_OTHER    "currency_other"
-#define GNC_PREF_REVERSED_ACCOUNTS "reversed_accounts"
+#define GNC_PREF_CURRENCY_CHOICE_LOCALE "currency_choice-locale"
+#define GNC_PREF_CURRENCY_CHOICE_OTHER  "currency_choice-other"
+#define GNC_PREF_CURRENCY_OTHER         "currency_other"
+#define GNC_PREF_REVERSED_ACCTS_NONE    "reversed_accounts-none"
+#define GNC_PREF_REVERSED_ACCTS_CREDIT  "reversed_accounts-credit"
+#define GNC_PREF_REVERSED_ACCTS_INC_EXP "reversed_accounts-incomeexpense"
 
 static QofLogModule log_module = GNC_MOD_GUI;
 
@@ -120,35 +123,27 @@
 static void
 gnc_configure_reverse_balance (void)
 {
-    gchar *choice;
     gint i;
 
     for (i = 0; i < NUM_ACCOUNT_TYPES; i++)
         reverse_type[i] = FALSE;
 
-    choice = gnc_prefs_get_string(GNC_PREFS_GROUP_GENERAL, GNC_PREF_REVERSED_ACCOUNTS);
-
-    if (g_strcmp0 (choice, "none") == 0)
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_REVERSED_ACCTS_INC_EXP))
     {
-    }
-    else if (g_strcmp0 (choice, "income_expense") == 0)
-    {
         reverse_type[ACCT_TYPE_INCOME]  = TRUE;
         reverse_type[ACCT_TYPE_EXPENSE] = TRUE;
     }
-    else
+    else if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_REVERSED_ACCTS_CREDIT))
     {
-        if (g_strcmp0 (choice, "credit") != 0)
-            PERR("bad value '%s'", choice ? choice : "(null)");
         reverse_type[ACCT_TYPE_LIABILITY] = TRUE;
         reverse_type[ACCT_TYPE_PAYABLE]   = TRUE;
         reverse_type[ACCT_TYPE_EQUITY]    = TRUE;
         reverse_type[ACCT_TYPE_INCOME]    = TRUE;
         reverse_type[ACCT_TYPE_CREDIT]    = TRUE;
     }
+    else if (!gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_REVERSED_ACCTS_NONE))
+        PWARN("no reversed account preference set, using none");
 
-    if (choice != NULL)
-        free (choice);
 }
 
 static void
@@ -912,15 +907,14 @@
                              const gchar *section)
 {
     gnc_commodity *currency = NULL;
-    gchar *choice, *mnemonic;
+    gchar  *mnemonic;
 
     if (requested_currency)
         return gnc_commodity_table_lookup(gnc_get_current_commodities(),
                                           GNC_COMMODITY_NS_CURRENCY,
                                           requested_currency);
 
-    choice = gnc_prefs_get_string(section, GNC_PREF_CURRENCY_CHOICE);
-    if (g_strcmp0(choice, "other") == 0)
+    if (gnc_prefs_get_bool (section, GNC_PREF_CURRENCY_CHOICE_OTHER))
     {
         mnemonic = gnc_prefs_get_string(section, GNC_PREF_CURRENCY_OTHER);
         currency = gnc_commodity_table_lookup(gnc_get_current_commodities(),
@@ -928,7 +922,6 @@
         DEBUG("mnemonic %s, result %p", mnemonic ? mnemonic : "(null)", currency);
         g_free(mnemonic);
     }
-    g_free(choice);
 
     if (!currency)
         currency = gnc_locale_default_currency ();
@@ -2317,12 +2310,24 @@
 
     gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_ACCOUNT_SEPARATOR,
                           gnc_configure_account_separator, NULL);
-    gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_REVERSED_ACCOUNTS,
+    gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_REVERSED_ACCTS_NONE,
                           gnc_configure_reverse_balance, NULL);
-    gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_CURRENCY_CHOICE,
+    gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_REVERSED_ACCTS_CREDIT,
+                          gnc_configure_reverse_balance, NULL);
+    gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_REVERSED_ACCTS_INC_EXP,
+                          gnc_configure_reverse_balance, NULL);
+    gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_CURRENCY_CHOICE_LOCALE,
                           gnc_currency_changed_cb, NULL);
+    gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_CURRENCY_CHOICE_OTHER,
+                          gnc_currency_changed_cb, NULL);
     gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_CURRENCY_OTHER,
                           gnc_currency_changed_cb, NULL);
+    gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL_REPORT, GNC_PREF_CURRENCY_CHOICE_LOCALE,
+                          gnc_currency_changed_cb, NULL);
+    gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL_REPORT, GNC_PREF_CURRENCY_CHOICE_OTHER,
+                          gnc_currency_changed_cb, NULL);
+    gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL_REPORT, GNC_PREF_CURRENCY_OTHER,
+                          gnc_currency_changed_cb, NULL);
     gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTO_DECIMAL_POINT,
                           gnc_set_auto_decimal_enabled, NULL);
     gnc_prefs_register_cb(GNC_PREFS_GROUP_GENERAL, GNC_PREF_AUTO_DECIMAL_PLACES,

Modified: gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c
===================================================================
--- gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/business/business-gnome/gnc-plugin-page-invoice.c	2013-10-07 14:16:36 UTC (rev 23247)
@@ -33,7 +33,6 @@
 
 #include "dialog-account.h"
 #include "gnc-component-manager.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-gobject-utils.h"
 #include "gnc-gnome-utils.h"
 #include "gnc-icons.h"
@@ -55,7 +54,7 @@
 static GncPluginPage *gnc_plugin_page_invoice_recreate_page (GtkWidget *window, GKeyFile *file, const gchar *group);
 static void gnc_plugin_page_invoice_window_changed (GncPluginPage *plugin_page, GtkWidget *window);
 
-static void gnc_plugin_page_invoice_summarybar_position_changed(GConfEntry *entry, gpointer user_data);
+static void gnc_plugin_page_invoice_summarybar_position_changed(gpointer prefs, gchar* pref, gpointer user_data);
 
 /* Command callbacks */
 static void gnc_plugin_page_invoice_cmd_new_invoice (GtkAction *action, GncPluginPageInvoice *plugin_page);
@@ -469,9 +468,15 @@
 
     plugin_page->summarybar = gnc_invoice_window_create_summary_bar(priv->iw);
     gtk_box_pack_start(GTK_BOX (priv->widget), plugin_page->summarybar, FALSE, FALSE, 0);
-    gnc_plugin_page_invoice_summarybar_position_changed(NULL, page);
-    gnc_gconf_general_register_cb(KEY_SUMMARYBAR_POSITION,
-                                  gnc_plugin_page_invoice_summarybar_position_changed, page);
+    gnc_plugin_page_invoice_summarybar_position_changed(NULL, NULL, page);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                           GNC_PREF_SUMMARYBAR_POSITION_TOP,
+                           gnc_plugin_page_invoice_summarybar_position_changed,
+                           page);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                           GNC_PREF_SUMMARYBAR_POSITION_BOTTOM,
+                           gnc_plugin_page_invoice_summarybar_position_changed,
+                           page);
 
     regWidget = gnc_invoice_get_register(priv->iw);
     if (regWidget)
@@ -499,8 +504,14 @@
     page = GNC_PLUGIN_PAGE_INVOICE (plugin_page);
     priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(page);
 
-    gnc_gconf_general_remove_cb(KEY_SUMMARYBAR_POSITION,
-                                gnc_plugin_page_invoice_summarybar_position_changed, page);
+    gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL,
+                                 GNC_PREF_SUMMARYBAR_POSITION_TOP,
+                                 gnc_plugin_page_invoice_summarybar_position_changed,
+                                 page);
+    gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL,
+                                 GNC_PREF_SUMMARYBAR_POSITION_BOTTOM,
+                                 gnc_plugin_page_invoice_summarybar_position_changed,
+                                 page);
 
     if (priv->widget == NULL)
     {
@@ -599,14 +610,12 @@
 
 
 static void
-gnc_plugin_page_invoice_summarybar_position_changed(GConfEntry *entry,
-        gpointer user_data)
+gnc_plugin_page_invoice_summarybar_position_changed(gpointer prefs, gchar *pref, gpointer user_data)
 {
     GncPluginPage *plugin_page;
     GncPluginPageInvoice *page;
     GncPluginPageInvoicePrivate *priv;
     GtkPositionType position = GTK_POS_BOTTOM;
-    gchar *conf_string;
 
     g_return_if_fail(user_data != NULL);
 
@@ -614,14 +623,8 @@
     page = GNC_PLUGIN_PAGE_INVOICE (user_data);
     priv = GNC_PLUGIN_PAGE_INVOICE_GET_PRIVATE(page);
 
-    conf_string = gnc_gconf_get_string (GCONF_GENERAL,
-                                        KEY_SUMMARYBAR_POSITION, NULL);
-    if (conf_string)
-    {
-        position = gnc_enum_from_nick (GTK_TYPE_POSITION_TYPE,
-                                       conf_string, GTK_POS_BOTTOM);
-        g_free (conf_string);
-    }
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_SUMMARYBAR_POSITION_TOP))
+        position = GTK_POS_TOP;
 
     gtk_box_reorder_child(GTK_BOX(priv->widget),
                           plugin_page->summarybar,

Modified: gnucash/trunk/src/core-utils/gnc-prefs.h
===================================================================
--- gnucash/trunk/src/core-utils/gnc-prefs.h	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/core-utils/gnc-prefs.h	2013-10-07 14:16:36 UTC (rev 23247)
@@ -66,7 +66,8 @@
 #define GNC_PREF_NEGATIVE_IN_RED     "negative_in_red"
 #define GNC_PREF_NUM_SOURCE          "num_source"
 #define GNC_PREF_DATE_FORMAT         "date_format"
-#define GNC_PREF_DATE_COMPLETION     "date_completion"
+#define GNC_PREF_DATE_COMPL_THISYEAR "date_completion-thisyear"
+#define GNC_PREF_DATE_COMPL_SLIDING  "date_completion-sliding"
 #define GNC_PREF_DATE_BACKMONTHS     "date_backmonths"
 #define GNC_PREF_SHOW_LEAF_ACCT_NAMES "show_leaf_account_names"
 #define GNC_PREF_ENTER_MOVES_TO_END  "enter_moves_to_end"

Modified: gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-account-tree.c	2013-10-07 14:16:36 UTC (rev 23247)
@@ -55,6 +55,7 @@
 #include "gnc-gobject-utils.h"
 #include "gnc-icons.h"
 #include "gnc-plugin-account-tree.h"
+#include "gnc-prefs.h"
 #include "gnc-session.h"
 #include "gnc-split-reg.h"
 #include "gnc-tree-view-account.h"
@@ -114,8 +115,7 @@
 static GncPluginPage *gnc_plugin_page_account_tree_recreate_page (GtkWidget *window, GKeyFile *file, const gchar *group);
 
 /* Callbacks */
-static void gnc_plugin_page_account_tree_summarybar_position_changed(GConfEntry *entry,
-        gpointer user_data);
+static void gnc_plugin_page_account_tree_summarybar_position_changed(gpointer prefs, gchar* pref, gpointer user_data);
 static gboolean gnc_plugin_page_account_tree_button_press_cb (GtkWidget *widget,
         GdkEventButton *event,
         GncPluginPage *page);
@@ -579,10 +579,15 @@
     gtk_box_pack_start (GTK_BOX (priv->widget), plugin_page->summarybar,
                         FALSE, FALSE, 0);
     gtk_widget_show(plugin_page->summarybar);
-    gnc_plugin_page_account_tree_summarybar_position_changed(NULL, page);
-    gnc_gconf_general_register_cb(KEY_SUMMARYBAR_POSITION,
-                                  gnc_plugin_page_account_tree_summarybar_position_changed,
-                                  page);
+    gnc_plugin_page_account_tree_summarybar_position_changed(NULL, NULL, page);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                           GNC_PREF_SUMMARYBAR_POSITION_TOP,
+                           gnc_plugin_page_account_tree_summarybar_position_changed,
+                           page);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                           GNC_PREF_SUMMARYBAR_POSITION_BOTTOM,
+                           gnc_plugin_page_account_tree_summarybar_position_changed,
+                           page);
 
     LEAVE("widget = %p", priv->widget);
     return priv->widget;
@@ -598,9 +603,14 @@
     page = GNC_PLUGIN_PAGE_ACCOUNT_TREE (plugin_page);
     priv = GNC_PLUGIN_PAGE_ACCOUNT_TREE_GET_PRIVATE(page);
 
-    gnc_gconf_general_remove_cb(KEY_SUMMARYBAR_POSITION,
-                                gnc_plugin_page_account_tree_summarybar_position_changed,
-                                page);
+    gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL,
+                                 GNC_PREF_SUMMARYBAR_POSITION_TOP,
+                                 gnc_plugin_page_account_tree_summarybar_position_changed,
+                                 page);
+    gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL,
+                                 GNC_PREF_SUMMARYBAR_POSITION_BOTTOM,
+                                 gnc_plugin_page_account_tree_summarybar_position_changed,
+                                 page);
 
     if (priv->widget)
     {
@@ -720,14 +730,12 @@
 /* Callbacks */
 
 static void
-gnc_plugin_page_account_tree_summarybar_position_changed(GConfEntry *entry,
-        gpointer user_data)
+gnc_plugin_page_account_tree_summarybar_position_changed(gpointer prefs, gchar* pref, gpointer user_data)
 {
     GncPluginPage *plugin_page;
     GncPluginPageAccountTree *page;
     GncPluginPageAccountTreePrivate *priv;
     GtkPositionType position = GTK_POS_BOTTOM;
-    gchar *conf_string;
 
     g_return_if_fail(user_data != NULL);
 
@@ -735,14 +743,8 @@
     page = GNC_PLUGIN_PAGE_ACCOUNT_TREE (user_data);
     priv = GNC_PLUGIN_PAGE_ACCOUNT_TREE_GET_PRIVATE(page);
 
-    conf_string = gnc_gconf_get_string (GCONF_GENERAL,
-                                        KEY_SUMMARYBAR_POSITION, NULL);
-    if (conf_string)
-    {
-        position = gnc_enum_from_nick (GTK_TYPE_POSITION_TYPE,
-                                       conf_string, GTK_POS_BOTTOM);
-        g_free (conf_string);
-    }
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_SUMMARYBAR_POSITION_TOP))
+        position = GTK_POS_TOP;
 
     gtk_box_reorder_child(GTK_BOX(priv->widget),
                           plugin_page->summarybar,

Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-register.c	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-register.c	2013-10-07 14:16:36 UTC (rev 23247)
@@ -55,13 +55,11 @@
 #include "dialog-transfer.h"
 #include "dialog-utils.h"
 #include "assistant-stock-split.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-component-manager.h"
 #include "gnc-date.h"
 #include "gnc-date-edit.h"
 #include "gnc-engine.h"
 #include "gnc-event.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-gnome-utils.h"
 #include "gnc-gobject-utils.h"
 #include "gnc-gui-query.h"
@@ -105,7 +103,7 @@
 static gchar *gnc_plugin_page_register_get_tab_color (GncPluginPage *plugin_page);
 static gchar *gnc_plugin_page_register_get_long_name (GncPluginPage *plugin_page);
 
-static void gnc_plugin_page_register_summarybar_position_changed(GConfEntry *entry, gpointer user_data);
+static void gnc_plugin_page_register_summarybar_position_changed(gpointer prefs, gchar* pref, gpointer user_data);
 
 /* Callbacks for the "Sort By" dialog */
 void gnc_plugin_page_register_sort_button_cb(GtkToggleButton *button, GncPluginPageRegister *page);
@@ -1117,9 +1115,15 @@
         gtk_widget_show_all(plugin_page->summarybar);
         gtk_box_pack_start(GTK_BOX (priv->widget), plugin_page->summarybar,
                            FALSE, FALSE, 0);
-        gnc_plugin_page_register_summarybar_position_changed(NULL, page);
-        gnc_gconf_general_register_cb(KEY_SUMMARYBAR_POSITION,
-                                      gnc_plugin_page_register_summarybar_position_changed, page);
+        gnc_plugin_page_register_summarybar_position_changed(NULL, NULL, page);
+        gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                               GNC_PREF_SUMMARYBAR_POSITION_TOP,
+                               gnc_plugin_page_register_summarybar_position_changed,
+                               page);
+        gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                               GNC_PREF_SUMMARYBAR_POSITION_BOTTOM,
+                               gnc_plugin_page_register_summarybar_position_changed,
+                               page);
     }
 
     priv->event_handler_id = qof_event_register_handler
@@ -1155,8 +1159,14 @@
     page = GNC_PLUGIN_PAGE_REGISTER (plugin_page);
     priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(plugin_page);
 
-    gnc_gconf_general_remove_cb(KEY_SUMMARYBAR_POSITION,
-                                gnc_plugin_page_register_summarybar_position_changed, page);
+    gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL,
+                                 GNC_PREF_SUMMARYBAR_POSITION_TOP,
+                                 gnc_plugin_page_register_summarybar_position_changed,
+                                 page);
+    gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL,
+                                 GNC_PREF_SUMMARYBAR_POSITION_BOTTOM,
+                                 gnc_plugin_page_register_summarybar_position_changed,
+                                 page);
 
     if (priv->widget == NULL)
         return;
@@ -1721,14 +1731,12 @@
 }
 
 static void
-gnc_plugin_page_register_summarybar_position_changed(GConfEntry *entry,
-        gpointer user_data)
+gnc_plugin_page_register_summarybar_position_changed(gpointer prefs, gchar* pref, gpointer user_data)
 {
     GncPluginPage *plugin_page;
     GncPluginPageRegister *page;
     GncPluginPageRegisterPrivate *priv;
     GtkPositionType position = GTK_POS_BOTTOM;
-    gchar *conf_string;
 
     g_return_if_fail(user_data != NULL);
 
@@ -1736,14 +1744,8 @@
     page = GNC_PLUGIN_PAGE_REGISTER (user_data);
     priv = GNC_PLUGIN_PAGE_REGISTER_GET_PRIVATE(page);
 
-    conf_string = gnc_gconf_get_string (GCONF_GENERAL,
-                                        KEY_SUMMARYBAR_POSITION, NULL);
-    if (conf_string)
-    {
-        position = gnc_enum_from_nick (GTK_TYPE_POSITION_TYPE,
-                                       conf_string, GTK_POS_BOTTOM);
-        g_free (conf_string);
-    }
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_SUMMARYBAR_POSITION_TOP))
+        position = GTK_POS_TOP;
 
     gtk_box_reorder_child(GTK_BOX(priv->widget),
                           plugin_page->summarybar,

Modified: gnucash/trunk/src/gnome/gnc-plugin-page-register2.c
===================================================================
--- gnucash/trunk/src/gnome/gnc-plugin-page-register2.c	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/gnome/gnc-plugin-page-register2.c	2013-10-07 14:16:36 UTC (rev 23247)
@@ -66,13 +66,11 @@
 /*################## Added for Reg2 #################*/
 #include "dialog-sx-from-trans.h"
 #include "assistant-stock-split.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-component-manager.h"
 #include "gnc-date.h"
 #include "gnc-date-edit.h"
 #include "gnc-engine.h"
 #include "gnc-event.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-gnome-utils.h"
 #include "gnc-gobject-utils.h"
 #include "gnc-gui-query.h"
@@ -113,7 +111,7 @@
 static gchar *gnc_plugin_page_register2_get_tab_color (GncPluginPage *plugin_page);
 static gchar *gnc_plugin_page_register2_get_long_name (GncPluginPage *plugin_page);
 
-static void gnc_plugin_page_register2_summarybar_position_changed (GConfEntry *entry, gpointer user_data);
+static void gnc_plugin_page_register2_summarybar_position_changed (gpointer prefs, gchar* pref, gpointer user_data);
 
 /* Callbacks for the "Filter By" dialog */
 void gnc_plugin_page_register2_filter_select_range_cb (GtkRadioButton *button, GncPluginPageRegister2 *page);
@@ -1176,9 +1174,15 @@
         gtk_widget_show_all (plugin_page->summarybar);
         gtk_box_pack_start (GTK_BOX (priv->widget), plugin_page->summarybar,
                            FALSE, FALSE, 0);
-        gnc_plugin_page_register2_summarybar_position_changed (NULL, page);
-        gnc_gconf_general_register_cb (KEY_SUMMARYBAR_POSITION,
-                                      gnc_plugin_page_register2_summarybar_position_changed, page);
+        gnc_plugin_page_register2_summarybar_position_changed (NULL, NULL, page);
+        gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                               GNC_PREF_SUMMARYBAR_POSITION_TOP,
+                               gnc_plugin_page_register2_summarybar_position_changed,
+                               page);
+        gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                               GNC_PREF_SUMMARYBAR_POSITION_BOTTOM,
+                               gnc_plugin_page_register2_summarybar_position_changed,
+                               page);
     }
 
     priv->event_handler_id = qof_event_register_handler
@@ -1242,8 +1246,14 @@
     page = GNC_PLUGIN_PAGE_REGISTER2 (plugin_page);
     priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE(plugin_page);
 
-    gnc_gconf_general_remove_cb (KEY_SUMMARYBAR_POSITION,
-                                gnc_plugin_page_register2_summarybar_position_changed, page);
+    gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL,
+                                 GNC_PREF_SUMMARYBAR_POSITION_TOP,
+                                 gnc_plugin_page_register2_summarybar_position_changed,
+                                 page);
+    gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL,
+                                 GNC_PREF_SUMMARYBAR_POSITION_BOTTOM,
+                                 gnc_plugin_page_register2_summarybar_position_changed,
+                                 page);
 
     if (priv->widget == NULL)
     {
@@ -1787,14 +1797,12 @@
 }
 
 static void
-gnc_plugin_page_register2_summarybar_position_changed (GConfEntry *entry,
-        gpointer user_data)
+gnc_plugin_page_register2_summarybar_position_changed (gpointer prefs, gchar* pref, gpointer user_data)
 {
     GncPluginPage *plugin_page;
     GncPluginPageRegister2 *page;
     GncPluginPageRegister2Private *priv;
     GtkPositionType position = GTK_POS_BOTTOM;
-    gchar *conf_string;
 
     g_return_if_fail(user_data != NULL);
 
@@ -1802,16 +1810,10 @@
     page = GNC_PLUGIN_PAGE_REGISTER2 (user_data);
     priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE (page);
 
-    conf_string = gnc_gconf_get_string (GCONF_GENERAL,
-                                        KEY_SUMMARYBAR_POSITION, NULL);
-    if (conf_string)
-    {
-        position = gnc_enum_from_nick (GTK_TYPE_POSITION_TYPE,
-                                       conf_string, GTK_POS_BOTTOM);
-        g_free (conf_string);
-    }
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_SUMMARYBAR_POSITION_TOP))
+        position = GTK_POS_TOP;
 
-    gtk_box_reorder_child (GTK_BOX (priv->widget),
+    gtk_box_reorder_child(GTK_BOX(priv->widget),
                           plugin_page->summarybar,
                           (position == GTK_POS_TOP ? 0 : -1) );
 }

Modified: gnucash/trunk/src/gnome/gschemas/org.gnucash.gschema.xml.in
===================================================================
--- gnucash/trunk/src/gnome/gschemas/org.gnucash.gschema.xml.in	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/gnome/gschemas/org.gnucash.gschema.xml.in	2013-10-07 14:16:36 UTC (rev 23247)
@@ -44,21 +44,41 @@
       <summary>Number of automatic decimal places</summary>
       <description>This field specifies the number of automatic decimal places that will be filled in.</description>
     </key>
-    <key name="retain_type" type="s">
-      <default>'days'</default>
-      <summary>Keep all old log/backup files, no files or for a number of days</summary>
+    <key name="retain_type-never" type="b">
+      <default>false</default>
+      <summary>Do not create log/backup files.</summary>
       <description>This setting specifies what to do with old log/backups files. "forever" means keep all old files. "never" means no old log/backup files are kept. Each time you save, older versions of the file are removed. "days" means keep old files for a number of days. How many days is defined in key 'retain_days'</description>
     </key>
+    <key name="retain_type-days" type="b">
+      <default>true</default>
+      <summary>Delete old log/backup files after this many days (0 = never).</summary>
+      <description>This setting specifies what to do with old log/backups files. "forever" means keep all old files. "never" means no old log/backup files are kept. Each time you save, older versions of the file are removed. "days" means keep old files for a number of days. How many days is defined in key 'retain_days'</description>
+    </key>
+    <key name="retain_type-forever" type="b">
+      <default>false</default>
+      <summary>Do not delete log/backup files.</summary>
+      <description>This setting specifies what to do with old log/backups files. "forever" means keep all old files. "never" means no old log/backup files are kept. Each time you save, older versions of the file are removed. "days" means keep old files for a number of days. How many days is defined in key 'retain_days'</description>
+    </key>
     <key name="retain_days" type="d">
       <default>30.0</default>
       <summary>Delete old log/backup files after this many days (0 = never)</summary>
       <description>This setting specifies the number of days after which old log/backup files will be deleted (0 = never).</description>
     </key>
-    <key name="reversed_accounts" type="s">
-      <default>'credit'</default>
-      <summary>Accounts to reverse the balance</summary>
+    <key name="reversed_accounts-none" type="b">
+      <default>false</default>
+      <summary>Don't sign reverse any accounts.</summary>
       <description>This setting allows certain accounts to have their balances reversed in sign from positive to negative, or vice versa. The setting "income_expense" is for users who like to see negative expenses and positive income.  The setting of "credit" is for users who want to see balances reflect the debit/credit status of the account.  The setting "none" doesn't reverse the sign on any balances.</description>
     </key>
+    <key name="reversed_accounts-credit" type="b">
+      <default>true</default>
+      <summary>Sign reverse balances on the following: Credit Card, Payable, Liability, Equity, and Income.</summary>
+      <description>This setting allows certain accounts to have their balances reversed in sign from positive to negative, or vice versa. The setting "income_expense" is for users who like to see negative expenses and positive income.  The setting of "credit" is for users who want to see balances reflect the debit/credit status of the account.  The setting "none" doesn't reverse the sign on any balances.</description>
+    </key>
+    <key name="reversed_accounts-incomeexpense" type="b">
+      <default>false</default>
+      <summary>Sign reverse balances on income and expense accounts.</summary>
+      <description>This setting allows certain accounts to have their balances reversed in sign from positive to negative, or vice versa. The setting "income_expense" is for users who like to see negative expenses and positive income.  The setting of "credit" is for users who want to see balances reflect the debit/credit status of the account.  The setting "none" doesn't reverse the sign on any balances.</description>
+    </key>
     <key name="show_account_color" type="b">
       <default>false</default>
       <summary>Use account colors in the account hierarchy</summary>
@@ -84,11 +104,16 @@
       <summary>Width of notebook tabs</summary>
       <description>This key specifies the maximum width of notebook tabs. If the text in the tab is longer than this value (the test is approximate) then the tab label will have the middle cut and replaced with an ellipsis.</description>
     </key>
-    <key name="currency_choice" type="s">
-      <default>'locale'</default>
-      <summary>Source of default account currency</summary>
+    <key name="currency_choice-locale" type="b">
+      <default>true</default>
+      <summary>Use the system locale currency for all newly created accounts.</summary>
       <description>This setting controls the source of the default currency for new accounts.  If set to "locale" then GnuCash will retrieve the default currency from the user's locale setting.  If set to "other", GnuCash will use the setting specified by the currency_other key.</description>
     </key>
+    <key name="currency_choice-other" type="b">
+      <default>false</default>
+      <summary>Use the specified currency for all newly created accounts.</summary>
+      <description>This setting controls the source of the default currency for new accounts.  If set to "locale" then GnuCash will retrieve the default currency from the user's locale setting.  If set to "other", GnuCash will use the setting specified by the currency_other key.</description>
+    </key>
     <key name="currency_other" type="s">
       <default>''</default>
       <summary>Default currency for new accounts</summary>
@@ -104,11 +129,16 @@
       <summary>Date format choice</summary>
       <description>This setting chooses the way dates are displayed in GnuCash. Possible values for this setting are "locale" to use the system locale setting, "ce" for Continental Europe style dates, "iso" for ISO 8601 standard dates , "uk" for United Kingdom style dates, and "us" for United States style dates.</description>
     </key>
-    <key name="date_completion" type="s">
-      <default>'thisyear'</default>
-      <summary>How to interpret dates without a year</summary>
+    <key name="date_completion-thisyear" type="b">
+      <default>true</default>
+      <summary>In the current calendar year</summary>
       <description>When a date is entered without year it can be completed so that it will be within the current calendar year or close to the current date based on a sliding window starting a set number of months backwards in time.</description>
     </key>
+    <key name="date_completion-sliding" type="b">
+      <default>false</default>
+      <summary>In a sliding 12-month window starting a configurable number of months before the current month</summary>
+      <description>When a date is entered without year it can be completed so that it will be within the current calendar year or close to the current date based on a sliding window starting a set number of months backwards in time.</description>
+    </key>
     <key name="date_backmonths" type="d">
       <default>6.0</default>
       <summary>Maximum number of months to go back.</summary>
@@ -119,16 +149,36 @@
       <summary>Show splash screen</summary>
       <description>If active, a splash screen will be shown at startup. Otherwise no splash screen will be shown.</description>
     </key>
-    <key name="tab_position" type="s">
-      <default>'top'</default>
-      <summary>Position of the notebook tabs</summary>
+    <key name="tab_position-top" type="b">
+      <default>true</default>
+      <summary>Display the notebook tabs at the top of the window.</summary>
       <description>This setting determines the edge at which the tabs for switching pages in notebooks are drawn. Possible values are "top", "left", "bottom" and "right". It defaults to "top".</description>
     </key>
-    <key name="summarybar_position" type="s">
-      <default>'bottom'</default>
-      <summary>Position of the summary bar</summary>
+    <key name="tab_position-bottom" type="b">
+      <default>false</default>
+      <summary>Display the notebook tabs at the bottom of the window.</summary>
+      <description>This setting determines the edge at which the tabs for switching pages in notebooks are drawn. Possible values are "top", "left", "bottom" and "right". It defaults to "top".</description>
+    </key>
+    <key name="tab_position-left" type="b">
+      <default>false</default>
+      <summary>Display the notebook tabs at the left of the window.</summary>
+      <description>This setting determines the edge at which the tabs for switching pages in notebooks are drawn. Possible values are "top", "left", "bottom" and "right". It defaults to "top".</description>
+    </key>
+    <key name="tab_position-right" type="b">
+      <default>false</default>
+      <summary>Display the notebook tabs at the right of the window.</summary>
+      <description>This setting determines the edge at which the tabs for switching pages in notebooks are drawn. Possible values are "top", "left", "bottom" and "right". It defaults to "top".</description>
+    </key>
+    <key name="summarybar_position-top" type="b">
+      <default>false</default>
+      <summary>Display the summary bar at the top of the page.</summary>
       <description>This setting determines the edge at which the summary bar for various pages is drawn.  Possible values are "top" and "bottom". It defaults to "bottom".</description>
     </key>
+    <key name="summarybar_position-bottom" type="b">
+      <default>true</default>
+      <summary>Display the summary bar at the bottom of the page.</summary>
+      <description>This setting determines the edge at which the summary bar for various pages is drawn.  Possible values are "top" and "bottom". It defaults to "bottom".</description>
+    </key>
     <key name="tab_next_recent" type="b">
       <default>false</default>
       <summary>Closing a tab moves to the most recently visited tab.</summary>
@@ -184,11 +234,21 @@
       <summary>Show vertical borders in a register</summary>
       <description>Show vertical borders between columns in a register.  If active the border between cells will be indicated with a heavy line. Otherwise the border between cells will not be marked.</description>
     </key>
-    <key name="default_style" type="s">
-      <default>'ledger'</default>
-      <summary>Default view style for new register</summary>
+    <key name="default_style-ledger" type="b">
+      <default>true</default>
+      <summary>Show all transactions on one line. (Two in double line mode.)</summary>
       <description>This field specifies the default view style when opening a new register window.  Possible values are "ledger", "auto-ledger" and "journal".  The "ledger" setting says to show each transaction on one or two lines.  The "auto-ledger" setting does the same, but also expands only the current transaction to show all splits.  The "journal" setting shows all transactions in expanded form.</description>
     </key>
+    <key name="default_style-autoledger" type="b">
+      <default>false</default>
+      <summary>Automatically expand the current transaction to show all splits. All other transactions are shown on one line. (Two in double line mode.)</summary>
+      <description>This field specifies the default view style when opening a new register window.  Possible values are "ledger", "auto-ledger" and "journal".  The "ledger" setting says to show each transaction on one or two lines.  The "auto-ledger" setting does the same, but also expands only the current transaction to show all splits.  The "journal" setting shows all transactions in expanded form.</description>
+    </key>
+    <key name="default_style-journal" type="b">
+      <default>false</default>
+      <summary>All transactions are expanded to show all splits.</summary>
+      <description>This field specifies the default view style when opening a new register window.  Possible values are "ledger", "auto-ledger" and "journal".  The "ledger" setting says to show each transaction on one or two lines.  The "auto-ledger" setting does the same, but also expands only the current transaction to show all splits.  The "journal" setting shows all transactions in expanded form.</description>
+    </key>
     <key name="double_line_mode" type="b">
       <default>false</default>
       <summary>Show two lines of information for each transaction</summary>
@@ -242,10 +302,20 @@
       <summary>Source of default report currency</summary>
       <description>This setting controls the default currency used for reports. If set to "locale" then GnuCash will retrieve the default currency from the user's locale setting.  If set to "other", GnuCash will use the setting specified by the currency_other key.</description>
     </key>
+    <key name="currency_choice-locale" type="b">
+      <default>true</default>
+      <summary>Use the system locale currency for all newly created reports.</summary>
+      <description>This setting controls the default currency used for reports. If set to "locale" then GnuCash will retrieve the default currency from the user's locale setting.  If set to "other", GnuCash will use the setting specified by the currency_other key.</description>
+    </key>
+    <key name="currency_choice-other" type="b">
+      <default>false</default>
+      <summary>Use the specified currency for all newly created reports.</summary>
+      <description>This setting controls the source of the default currency for new accounts.  If set to "locale" then GnuCash will retrieve the default currency from the user's locale setting.  If set to "other", GnuCash will use the setting specified by the currency_other key.</description>
+    </key>
     <key name="currency_other" type="s">
       <default>''</default>
       <summary>Default currency for new reports</summary>
-      <description>This setting specifies the default currency used for reports if the currency_choice setting is set to "other".  This field must contain the three letter ISO 4217 code for a currency (e.g. USD, GBP, RUB).</description>
+      <description>This setting controls the default currency used for reports. If set to "locale" then GnuCash will retrieve the default currency from the user's locale setting.  If set to "other", GnuCash will use the setting specified by the currency_other key.</description>
     </key>
     <child name="pdf_export" schema="org.gnucash.general.report.pdf_export"/>
   </schema>

Modified: gnucash/trunk/src/gnome/gschemas/org.gnucash.window.pages.account.tree.gschema.xml.in
===================================================================
--- gnucash/trunk/src/gnome/gschemas/org.gnucash.window.pages.account.tree.gschema.xml.in	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/gnome/gschemas/org.gnucash.window.pages.account.tree.gschema.xml.in	2013-10-07 14:16:36 UTC (rev 23247)
@@ -10,11 +10,16 @@
       <summary>Show non currency commodities</summary>
       <description>If active, non currency commodities (stocks) will be shown. Otherwise they will be hidden.</description>
     </key>
-    <key name="start_choice" type="s">
-      <default>'relative'</default>
-      <summary>Profit/loss starting date type</summary>
+    <key name="start_choice-relative" type="b">
+      <default>true</default>
+      <summary>Use relative profit/loss starting date</summary>
       <description>This setting controls the type of starting date used in profit/loss calculations.  If set to "absolute" then GnuCash will retrieve the starting date specified by the start_date key.  If set to anything else, GnuCash will retrieve the starting date specified by the start_period key.</description>
     </key>
+    <key name="start_choice-absolute" type="b">
+      <default>false</default>
+      <summary>Use absolute profit/loss starting date</summary>
+      <description>This setting controls the type of starting date used in profit/loss calculations.  If set to "absolute" then GnuCash will retrieve the starting date specified by the start_date key.  If set to anything else, GnuCash will retrieve the starting date specified by the start_period key.</description>
+    </key>
     <key name="start_date" type="i">
       <default>0</default>
       <summary>Starting date (in seconds from Jan 1, 1970)</summary>
@@ -25,11 +30,16 @@
       <summary>Starting time period identifier</summary>
       <description>This setting controls the starting date set in profit/loss calculations if the start_choice setting is set to anything other than "absolute".  This field should contain a value between 0 and 8.</description>
     </key>
-    <key name="end_choice" type="s">
-      <default>'relative'</default>
-      <summary>Profit/loss ending date type</summary>
+    <key name="end_choice-relative" type="b">
+      <default>true</default>
+      <summary>Use relative profit/loss ending date</summary>
       <description>This setting controls the type of ending date used in profit/loss calculations.  If set to "absolute" then GnuCash will retrieve the ending date specified by the end_date key.  If set to anything else, GnuCash will retrieve the ending date specified by the end_period key.</description>
     </key>
+    <key name="end_choice-absolute" type="b">
+      <default>false</default>
+      <summary>Use absolute profit/loss ending date</summary>
+      <description>This setting controls the type of ending date used in profit/loss calculations.  If set to "absolute" then GnuCash will retrieve the ending date specified by the end_date key.  If set to anything else, GnuCash will retrieve the ending date specified by the end_period key.</description>
+    </key>
     <key name="end_date" type="i">
       <default>0</default>
       <summary>Ending date (in seconds from Jan 1, 1970)</summary>

Modified: gnucash/trunk/src/gnome-utils/dialog-preferences.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-preferences.c	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/gnome-utils/dialog-preferences.c	2013-10-07 14:16:36 UTC (rev 23247)
@@ -679,112 +679,6 @@
 /* FIXME to remove when gconf conversion of preferences is complete */
 /****************************************************************************/
 
-/** The user clicked on a radio button.  Update gconf.  Radio button
- *  group choices are stored as a string.  The last component of the
- *  widget name is the string that will be stored.  I.E. The widget name
- *  must be in this form "gconf/<some-key-name>/value".
- *
- *  @internal
- *
- *  @param button A pointer to the radio button that was clicked.
- *
- *  @param user_data Unused.
- */
-static void
-gnc_prefs_radio_button_user_cb_gconf (GtkRadioButton *button,
-                                gpointer user_data)
-{
-    gchar *key, *button_name;
-    gboolean active;
-
-    g_return_if_fail(GTK_IS_RADIO_BUTTON(button));
-    active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button));
-    if (!active)
-        return;
-
-    /* Copy the widget name and split into gconf key and button value parts */
-    key = g_strdup(gtk_buildable_get_name(GTK_BUILDABLE(button)) + PREFIX_LEN);
-    button_name = strrchr(key, '/');
-    *button_name++ = '\0';
-
-    DEBUG("Radio button group %s now set to %s", key, button_name);
-    gnc_gconf_set_string(key, NULL, button_name, NULL);
-    g_free(key);
-}
-
-
-/** A radio button group choice was updated in gconf.  Update the user
- *  visible dialog.
- *
- *  @internal
- *
- *  @param button A pointer to the radio button that should be shown
- *  as selected.
- */
-static void
-gnc_prefs_radio_button_gconf_cb_gconf (GtkRadioButton *button)
-{
-    g_return_if_fail(GTK_IS_RADIO_BUTTON(button));
-    ENTER("button %p", button);
-    g_signal_handlers_block_by_func(G_OBJECT(button),
-                                    G_CALLBACK(gnc_prefs_radio_button_user_cb_gconf), NULL);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), TRUE);
-    g_signal_handlers_unblock_by_func(G_OBJECT(button),
-                                      G_CALLBACK(gnc_prefs_radio_button_user_cb_gconf), NULL);
-    LEAVE(" ");
-}
-
-
-/** Connect a radio button widget to the user callback function.  Set
- *  the starting state of the radio button group from its value in
- *  gconf.
- *
- *  @internal
- *
- *  @param button A pointer to the radio button that should be
- *  connected.
- */
-static void
-gnc_prefs_connect_radio_button_gconf (GtkRadioButton *button)
-{
-    gchar *key, *button_name, *value;
-    gboolean active;
-    GSList *group;
-
-    g_return_if_fail(GTK_IS_RADIO_BUTTON(button));
-
-    /* Copy the widget name and split into gconf key and button name parts */
-    key = g_strdup(gtk_buildable_get_name(GTK_BUILDABLE(button)) + PREFIX_LEN);
-    button_name = strrchr(key, '/');
-    *button_name++ = '\0';
-
-    /* Get the current value. */
-    value = gnc_gconf_get_string(key, NULL, NULL);
-    if (value)
-    {
-        active = (g_utf8_collate(value, button_name) == 0);
-    }
-    else
-    {
-        /* Sigh. There's no gconf default for this key. Use the first
-         * button in the dialog, which is the last button in the list. */
-        group =  gtk_radio_button_get_group(button);
-        active = (button != g_slist_nth_data(group, g_slist_length(group)));
-    }
-    DEBUG(" Radio set %s, button %s initially set to %d", key, button_name, active);
-
-    /* Wire up the button */
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), active);
-    g_signal_connect(G_OBJECT(button), "toggled",
-                     G_CALLBACK(gnc_prefs_radio_button_user_cb_gconf), NULL);
-    g_free(value);
-    g_free(key);
-}
-
-/****************************************************************************/
-
-/****************************************************************************/
-
 /** The user changed a currency_edit.  Update gconf.  Currency_edit
  *  choices are stored as an int.
  *
@@ -1100,6 +994,35 @@
 
 /****************************************************************************/
 
+/** Connect a GtkRadioButton widget to its stored value in the preferences database.
+ *
+ *  @internal
+ *
+ *  @param button A pointer to the radio button that should be
+ *  connected.
+ */
+static void
+gnc_prefs_connect_radio_button (GtkRadioButton *button)
+{
+    gchar *group, *pref;
+    gboolean active;
+
+    g_return_if_fail(GTK_IS_RADIO_BUTTON(button));
+
+    gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(button)), &group, &pref);
+
+//    active = gnc_prefs_get_bool (group, pref);
+//    DEBUG(" Checkbox %s/%s initially %sactive", group, pref, active ? "" : "in");
+//    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), active);
+
+    gnc_prefs_bind (group, pref, G_OBJECT (button), "active");
+
+    g_free(group);
+    g_free(pref);
+}
+
+/****************************************************************************/
+
 /** Connect a GtkCheckButton widget to its stored value in the preferences database.
  *
  *  @internal
@@ -1279,13 +1202,8 @@
     /* These tests must be ordered from more specific widget to less
      * specific widget. */
 
-    if (GTK_IS_RADIO_BUTTON(widget))
+    if (GTK_IS_HBOX(widget))
     {
-        DEBUG("  %s - radio button", name);
-        gnc_prefs_connect_radio_button_gconf(GTK_RADIO_BUTTON(widget));
-    }
-    else if (GTK_IS_HBOX(widget))
-    {
         /* Test custom widgets are all children of a hbox */
         GtkWidget *widget_child;
         GList* child = gtk_container_get_children(GTK_CONTAINER(widget));
@@ -1342,6 +1260,11 @@
         DEBUG("  %s - entry", name);
         gnc_prefs_connect_font_button(GTK_FONT_BUTTON(widget));
     }
+    else if (GTK_IS_RADIO_BUTTON(widget))
+    {
+        DEBUG("  %s - radio button", name);
+        gnc_prefs_connect_radio_button(GTK_RADIO_BUTTON(widget));
+    }
     else if (GTK_IS_CHECK_BUTTON(widget))
     {
         DEBUG("  %s - check button", name);
@@ -1614,13 +1537,8 @@
         /* These tests must be ordered from more specific widget to less
          * specific widget. */
 
-        if (GTK_IS_RADIO_BUTTON(widget))
+        if (GTK_IS_HBOX(widget))
         {
-            DEBUG("widget %p - radio button", widget);
-            gnc_prefs_radio_button_gconf_cb_gconf(GTK_RADIO_BUTTON(widget));
-        }
-        else if (GTK_IS_HBOX(widget))
-        {
             /* Test custom widgets are all children of a hbox */
             GtkWidget *widget_child;
             GList* child = gtk_container_get_children(GTK_CONTAINER(widget));

Modified: gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c	2013-10-07 14:16:36 UTC (rev 23247)
@@ -155,44 +155,19 @@
 static void
 gnc_configure_date_completion (void)
 {
-    char *date_completion = gnc_gconf_get_string(GCONF_GENERAL,
-                            KEY_DATE_COMPLETION, NULL);
+    QofDateCompletion dc = QOF_DATE_COMPLETION_THISYEAR;
     int backmonths = gnc_prefs_get_float(GNC_PREFS_GROUP_GENERAL,
                                          GNC_PREF_DATE_BACKMONTHS);
-    QofDateCompletion dc;
 
     if (backmonths < 0)
-    {
         backmonths = 0;
-    }
     else if (backmonths > 11)
-    {
         backmonths = 11;
-    }
 
-    if (date_completion && strcmp(date_completion, "sliding") == 0)
-    {
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_DATE_COMPL_SLIDING))
         dc = QOF_DATE_COMPLETION_SLIDING;
-    }
-    else if (date_completion && strcmp(date_completion, "thisyear") == 0)
-    {
-        dc = QOF_DATE_COMPLETION_THISYEAR;
-    }
-    else
-    {
-        /* No preference has been set yet */
-        PINFO("Incorrect date completion code, using defaults");
-        dc = QOF_DATE_COMPLETION_THISYEAR;
-        backmonths = 6;
-        gnc_gconf_set_string (GCONF_GENERAL, KEY_DATE_COMPLETION, "thisyear", NULL);
-        gnc_prefs_set_float (GNC_PREFS_GROUP_GENERAL, GNC_PREF_DATE_BACKMONTHS, 6.0);
-    }
-    qof_date_completion_set(dc, backmonths);
 
-    if (date_completion != NULL)
-    {
-        free(date_completion);
-    }
+    qof_date_completion_set(dc, backmonths);
 }
 
 void
@@ -636,9 +611,15 @@
                            GNC_PREF_DATE_FORMAT,
                            gnc_configure_date_format,
                            NULL);
-    gnc_gconf_general_register_cb(
-        KEY_DATE_COMPLETION, (GncGconfGeneralCb)gnc_configure_date_completion, NULL);
     gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                           GNC_PREF_DATE_COMPL_THISYEAR,
+                           gnc_configure_date_completion,
+                           NULL);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                           GNC_PREF_DATE_COMPL_SLIDING,
+                           gnc_configure_date_completion,
+                           NULL);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
                            GNC_PREF_DATE_BACKMONTHS,
                            gnc_configure_date_completion,
                            NULL);

Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c	2013-10-07 14:16:36 UTC (rev 23247)
@@ -94,7 +94,10 @@
 
 #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 GNC_PREF_TAB_POSITION_TOP     "tab_position-top"
+#define GNC_PREF_TAB_POSITION_BOTTOM  "tab_position-bottom"
+#define GNC_PREF_TAB_POSITION_LEFT    "tab_position-left"
+#define GNC_PREF_TAB_POSITION_RIGHT   "tab_position-right"
 #define GNC_PREF_TAB_WIDTH            "tab_width"
 #define GNC_PREF_TAB_COLOR            "show_account_color_tabs"
 
@@ -3182,21 +3185,21 @@
 }
 
 static void
-gnc_main_window_update_tab_position (GncMainWindow *window)
+gnc_main_window_update_tab_position (gpointer prefs, gchar *pref, gpointer user_data)
 {
+    GncMainWindow *window;
     GtkPositionType position = GTK_POS_TOP;
-    gchar *conf_string;
     GncMainWindowPrivate *priv;
 
+    window = GNC_MAIN_WINDOW(user_data);
+
     ENTER ("window %p", window);
-    conf_string = gnc_gconf_get_string (GCONF_GENERAL,
-                                        KEY_TAB_POSITION, NULL);
-    if (conf_string)
-    {
-        position = gnc_enum_from_nick (GTK_TYPE_POSITION_TYPE,
-                                       conf_string, GTK_POS_TOP);
-        g_free (conf_string);
-    }
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_POSITION_BOTTOM))
+        position = GTK_POS_BOTTOM;
+    else if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_POSITION_LEFT))
+        position = GTK_POS_LEFT;
+    else if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_TAB_POSITION_RIGHT))
+        position = GTK_POS_RIGHT;
 
     priv = GNC_MAIN_WINDOW_GET_PRIVATE (window);
     gtk_notebook_set_tab_pos (GTK_NOTEBOOK (priv->notebook), position);
@@ -3316,32 +3319,6 @@
                       G_CALLBACK (gnc_main_window_edit_menu_hide_cb), window);
 }
 
-static void
-gnc_main_window_gconf_changed (GConfClient *client,
-                               guint cnxn_id,
-                               GConfEntry *entry,
-                               gpointer user_data)
-{
-    GncMainWindow *window;
-    GConfValue *value;
-    const gchar *key, *key_tail;
-
-    window = GNC_MAIN_WINDOW(user_data);
-
-    key = gconf_entry_get_key(entry);
-    value = gconf_entry_get_value(entry);
-    if (!key || !value)
-        return;
-
-    key_tail = strrchr(key, '/');
-    if (key_tail != NULL)
-        key_tail++;
-    if (strcmp(key_tail, KEY_TAB_POSITION) == 0)
-    {
-        gnc_main_window_update_tab_position(window);
-    }
-}
-
 /* CS: This callback functions will set the statusbar text to the
  * "tooltip" property of the currently selected GtkAction.
  *
@@ -3565,10 +3542,23 @@
     }
     g_free(filename);
     gnc_main_window_window_menu(window);
-    gnc_gconf_add_notification(G_OBJECT(window), GCONF_GENERAL,
-                               gnc_main_window_gconf_changed,
-                               GNC_MAIN_WINDOW_NAME);
-    gnc_main_window_update_tab_position(window);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                           GNC_PREF_TAB_POSITION_TOP,
+                           gnc_main_window_update_tab_position,
+                           window);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                           GNC_PREF_TAB_POSITION_BOTTOM,
+                           gnc_main_window_update_tab_position,
+                           window);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                           GNC_PREF_TAB_POSITION_LEFT,
+                           gnc_main_window_update_tab_position,
+                           window);
+    gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
+                           GNC_PREF_TAB_POSITION_RIGHT,
+                           gnc_main_window_update_tab_position,
+                           window);
+    //gnc_main_window_update_tab_position(NULL, NULL, window);
 
     gnc_main_window_init_menu_updaters(window);
 

Modified: gnucash/trunk/src/gnome-utils/gnc-plugin-page.h
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-plugin-page.h	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/gnome-utils/gnc-plugin-page.h	2013-10-07 14:16:36 UTC (rev 23247)
@@ -41,7 +41,8 @@
 
 G_BEGIN_DECLS
 
-#define KEY_SUMMARYBAR_POSITION "summarybar_position"
+#define GNC_PREF_SUMMARYBAR_POSITION_TOP    "summarybar_position-top"
+#define GNC_PREF_SUMMARYBAR_POSITION_BOTTOM "summarybar_position-bottom"
 
 /* type macros */
 #define GNC_TYPE_PLUGIN_PAGE            (gnc_plugin_page_get_type ())

Modified: gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade
===================================================================
--- gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade	2013-10-07 14:16:36 UTC (rev 23247)
@@ -225,7 +225,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/window/pages/account_tree/summary/start_choice/relative">
+                  <object class="GtkRadioButton" id="pref/window.pages.account_tree.summary/start_choice-relative">
                     <property name="label" translatable="yes">_Relative:</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -246,7 +246,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/window/pages/account_tree/summary/start_choice/absolute">
+                  <object class="GtkRadioButton" id="pref/window.pages.account_tree.summary/start_choice-absolute">
                     <property name="label" translatable="yes">_Absolute:</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -256,7 +256,7 @@
                     <property name="tooltip_text" translatable="yes">Use the specified absolute starting date for profit/loss calculations.</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">gconf/window/pages/account_tree/summary/start_choice/relative</property>
+                    <property name="group">pref/window.pages.account_tree.summary/start_choice-relative</property>
                   </object>
                   <packing>
                     <property name="top_attach">2</property>
@@ -267,7 +267,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/window/pages/account_tree/summary/end_choice/relative">
+                  <object class="GtkRadioButton" id="pref/window.pages.account_tree.summary/end_choice-relative">
                     <property name="label" translatable="yes">Re_lative:</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -288,7 +288,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/window/pages/account_tree/summary/end_choice/absolute">
+                  <object class="GtkRadioButton" id="pref/window.pages.account_tree.summary/end_choice-absolute">
                     <property name="label" translatable="yes">Ab_solute:</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -298,7 +298,7 @@
                     <property name="tooltip_text" translatable="yes">Use the specified absolute ending date for profit/loss calculations. Also use this date for net assets calculations.</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">gconf/window/pages/account_tree/summary/end_choice/relative</property>
+                    <property name="group">pref/window.pages.account_tree.summary/end_choice-relative</property>
                   </object>
                   <packing>
                     <property name="top_attach">6</property>
@@ -565,7 +565,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/reversed_accounts/none">
+                  <object class="GtkRadioButton" id="pref/general/reversed_accounts-none">
                     <property name="label" translatable="yes">_None</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -587,7 +587,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/reversed_accounts/credit">
+                  <object class="GtkRadioButton" id="pref/general/reversed_accounts-credit">
                     <property name="label" translatable="yes">C_redit accounts</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -597,7 +597,7 @@
                     <property name="tooltip_text" translatable="yes">Sign reverse balances on the following: Credit Card, Payable, Liability, Equity, and Income.</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">gconf/general/reversed_accounts/none</property>
+                    <property name="group">pref/general/reversed_accounts-none</property>
                   </object>
                   <packing>
                     <property name="right_attach">2</property>
@@ -609,7 +609,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/reversed_accounts/income_expense">
+                  <object class="GtkRadioButton" id="pref/general/reversed_accounts-incomeexpense">
                     <property name="label" translatable="yes">_Income & expense</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -619,7 +619,7 @@
                     <property name="tooltip_text" translatable="yes">Sign reverse balances on income and expense accounts.</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">gconf/general/reversed_accounts/none</property>
+                    <property name="group">pref/general/reversed_accounts-none</property>
                   </object>
                   <packing>
                     <property name="right_attach">2</property>
@@ -709,7 +709,7 @@
                     <property name="can_focus">False</property>
                     <property name="left_padding">12</property>
                     <child>
-                      <object class="GtkRadioButton" id="gconf/general/currency_choice/locale">
+                      <object class="GtkRadioButton" id="pref/general/currency_choice-locale">
                         <property name="label" translatable="yes">Loc_ale:</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
@@ -736,7 +736,7 @@
                     <property name="can_focus">False</property>
                     <property name="left_padding">12</property>
                     <child>
-                      <object class="GtkRadioButton" id="gconf/general/currency_choice/other">
+                      <object class="GtkRadioButton" id="pref/general/currency_choice-other">
                         <property name="label" translatable="yes">Ch_oose:</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
@@ -746,7 +746,7 @@
                         <property name="tooltip_text" translatable="yes">Use the specified currency for all newly created accounts.</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
-                        <property name="group">gconf/general/currency_choice/locale</property>
+                        <property name="group">pref/general/currency_choice-locale</property>
                       </object>
                     </child>
                   </object>
@@ -1181,7 +1181,7 @@
                   <placeholder/>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/date_completion/thisyear">
+                  <object class="GtkRadioButton" id="pref/general/date_completion-thisyear">
                     <property name="label" translatable="yes">In the current calendar year</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -1203,7 +1203,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/date_completion/sliding">
+                  <object class="GtkRadioButton" id="pref/general/date_completion-sliding">
                     <property name="label" translatable="yes">In a sliding 12-month window starting this 
 many months before the current month:</property>
                     <property name="visible">True</property>
@@ -1214,7 +1214,7 @@
                     <property name="tooltip_text" translatable="yes">Dates will be completed so that they are close to the current date. Enter the maximum number of months to go backwards in time when completing dates.</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">gconf/general/date_completion/thisyear</property>
+                    <property name="group">pref/general/date_completion-thisyear</property>
                   </object>
                   <packing>
                     <property name="right_attach">2</property>
@@ -1887,7 +1887,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/retain_type/never">
+                  <object class="GtkRadioButton" id="pref/general/retain_type-never">
                     <property name="label" translatable="yes">Never</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -1896,7 +1896,7 @@
                     <property name="tooltip_markup">Do not create log/backup files.</property>
                     <property name="tooltip_text" translatable="yes">Do not create log/backup files.</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">gconf/general/retain_type/days</property>
+                    <property name="group">pref/general/retain_type-days</property>
                   </object>
                   <packing>
                     <property name="top_attach">16</property>
@@ -1905,7 +1905,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/retain_type/days">
+                  <object class="GtkRadioButton" id="pref/general/retain_type-days">
                     <property name="label" translatable="yes">For:</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -1923,7 +1923,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/retain_type/forever">
+                  <object class="GtkRadioButton" id="pref/general/retain_type-forever">
                     <property name="label" translatable="yes">Forever</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -1932,7 +1932,7 @@
                     <property name="tooltip_markup">Do not delete log/backup files.</property>
                     <property name="tooltip_text" translatable="yes">Do not delete log/backup files.</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">gconf/general/retain_type/days</property>
+                    <property name="group">pref/general/retain_type-days</property>
                   </object>
                   <packing>
                     <property name="top_attach">18</property>
@@ -2592,7 +2592,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/register/default_style/ledger">
+                  <object class="GtkRadioButton" id="pref/general.register/default_style-ledger">
                     <property name="label" translatable="yes">_Basic ledger</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -2614,7 +2614,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/register/default_style/auto_ledger">
+                  <object class="GtkRadioButton" id="pref/general.register/default_style-autoledger">
                     <property name="label" translatable="yes">_Auto-split ledger</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -2624,7 +2624,7 @@
                     <property name="tooltip_text" translatable="yes">Automatically expand the current transaction to show all splits. All other transactions are shown on one line. (Two in double line mode.)</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">gconf/general/register/default_style/ledger</property>
+                    <property name="group">pref/general.register/default_style-ledger</property>
                   </object>
                   <packing>
                     <property name="right_attach">4</property>
@@ -2636,7 +2636,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/register/default_style/journal">
+                  <object class="GtkRadioButton" id="pref/general.register/default_style-journal">
                     <property name="label" translatable="yes">Transaction _Journal</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -2646,7 +2646,7 @@
                     <property name="tooltip_text" translatable="yes">All transactions are expanded to show all splits.</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">gconf/general/register/default_style/ledger</property>
+                    <property name="group">pref/general.register/default_style-ledger</property>
                   </object>
                   <packing>
                     <property name="right_attach">4</property>
@@ -2957,7 +2957,7 @@
                     <property name="can_focus">False</property>
                     <property name="left_padding">12</property>
                     <child>
-                      <object class="GtkRadioButton" id="gconf/general/report/currency_choice/other">
+                      <object class="GtkRadioButton" id="pref/general.report/currency_choice-other">
                         <property name="label" translatable="yes">Ch_oose:</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
@@ -2984,7 +2984,7 @@
                     <property name="can_focus">False</property>
                     <property name="left_padding">12</property>
                     <child>
-                      <object class="GtkRadioButton" id="gconf/general/report/currency_choice/locale">
+                      <object class="GtkRadioButton" id="pref/general.report/currency_choice-locale">
                         <property name="label" translatable="yes">Loc_ale:</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
@@ -2994,7 +2994,7 @@
                         <property name="tooltip_text" translatable="yes">Use the system locale currency for all newly created reports.</property>
                         <property name="use_underline">True</property>
                         <property name="draw_indicator">True</property>
-                        <property name="group">gconf/general/report/currency_choice/other</property>
+                        <property name="group">pref/general.report/currency_choice-other</property>
                       </object>
                     </child>
                   </object>
@@ -3222,7 +3222,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/tab_position/top">
+                  <object class="GtkRadioButton" id="pref/general/tab_position-top">
                     <property name="label" translatable="yes">To_p</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -3244,7 +3244,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/tab_position/bottom">
+                  <object class="GtkRadioButton" id="pref/general/tab_position-bottom">
                     <property name="label" translatable="yes">B_ottom</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -3254,7 +3254,7 @@
                     <property name="tooltip_text" translatable="yes">Display the notebook tabs at the bottom of the window.</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">gconf/general/tab_position/top</property>
+                    <property name="group">pref/general/tab_position-top</property>
                   </object>
                   <packing>
                     <property name="right_attach">2</property>
@@ -3266,7 +3266,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/tab_position/left">
+                  <object class="GtkRadioButton" id="pref/general/tab_position-left">
                     <property name="label" translatable="yes">_Left</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -3276,7 +3276,7 @@
                     <property name="tooltip_text" translatable="yes">Display the notebook tabs at the left of the window.</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">gconf/general/tab_position/top</property>
+                    <property name="group">pref/general/tab_position-top</property>
                   </object>
                   <packing>
                     <property name="right_attach">2</property>
@@ -3288,7 +3288,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/tab_position/right">
+                  <object class="GtkRadioButton" id="pref/general/tab_position-right">
                     <property name="label" translatable="yes">_Right</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -3298,7 +3298,7 @@
                     <property name="tooltip_text" translatable="yes">Display the notebook tabs at the right of the window.</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">gconf/general/tab_position/top</property>
+                    <property name="group">pref/general/tab_position-top</property>
                   </object>
                   <packing>
                     <property name="right_attach">2</property>
@@ -3327,7 +3327,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/summarybar_position/top">
+                  <object class="GtkRadioButton" id="pref/general/summarybar_position-top">
                     <property name="label" translatable="yes">Top</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -3350,7 +3350,7 @@
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkRadioButton" id="gconf/general/summarybar_position/bottom">
+                  <object class="GtkRadioButton" id="pref/general/summarybar_position-bottom">
                     <property name="label" translatable="yes">Bottom</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
@@ -3360,7 +3360,7 @@
                     <property name="tooltip_text" translatable="yes">Display the summary bar at the bottom of the page.</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
-                    <property name="group">gconf/general/summarybar_position/top</property>
+                    <property name="group">pref/general/summarybar_position-top</property>
                   </object>
                   <packing>
                     <property name="left_attach">2</property>

Modified: gnucash/trunk/src/import-export/qif-import/assistant-qif-import.c
===================================================================
--- gnucash/trunk/src/import-export/qif-import/assistant-qif-import.c	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/import-export/qif-import/assistant-qif-import.c	2013-10-07 14:16:36 UTC (rev 23247)
@@ -48,7 +48,6 @@
 #include "gnc-guile-utils.h"
 #include "gnc-currency-edit.h"
 #include "gnc-ui-util.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-gtk-utils.h"
 #include "gnc-main-window.h"
 #include "gnc-plugin-page-account-tree.h"
@@ -59,10 +58,11 @@
 #include "swig-runtime.h"
 
 #define ASSISTANT_QIF_IMPORT_CM_CLASS "assistant-qif-import"
-#define GCONF_SECTION "dialogs/import/qif"
 #define GNC_PREFS_GROUP   "dialogs.import.qif"
 #define GNC_PREF_SHOW_DOC "show_doc"
-#define GCONF_NAME_DEFAULT_TRANSACTION_STATUS "default_status"
+#define GNC_PREF_DEFAULT_TRANS_STATUS_CLEARED "default_status-cleared"
+#define GNC_PREF_DEFAULT_TRANS_STATUS_NOTCLEARED "default_status-notcleared"
+#define GNC_PREF_DEFAULT_TRANS_STATUS_RECONCILED "default_status-reconciled"
 
 #define PREV_ROW "prev_row"
 
@@ -1372,8 +1372,6 @@
 static void
 get_preferences(QIFImportWindow *wind)
 {
-    GError * err = NULL;
-    gchar *status_pref = NULL;
     gchar tmp_transaction_status = 'n';
 
     g_return_if_fail(wind);
@@ -1383,27 +1381,11 @@
         gnc_prefs_get_bool (GNC_PREFS_GROUP, GNC_PREF_SHOW_DOC);
 
     /* Clear / Reconcile transaction if not specified in QIF file. */
-    status_pref = gnc_gconf_get_string(
-                      GCONF_SECTION, GCONF_NAME_DEFAULT_TRANSACTION_STATUS, &err);
-    if (err != NULL)
-    {
-        g_warning("QIF import: gnc_gconf_get_string error: %s", err->message);
-        g_error_free(err);
-        g_warning("QIF import: Couldn't get %s setting from gconf.",
-                  GCONF_NAME_DEFAULT_TRANSACTION_STATUS);
-    }
-    else
-    {
-        if (g_strcmp0(status_pref, "cleared") == 0)
-        {
-            tmp_transaction_status = 'c';
-        }
-        else if (g_strcmp0(status_pref, "reconciled") == 0)
-        {
-            tmp_transaction_status = 'y';
-        }
-    }
-    g_free(status_pref);
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP, GNC_PREF_DEFAULT_TRANS_STATUS_CLEARED))
+        tmp_transaction_status = 'c';
+    else if (gnc_prefs_get_bool (GNC_PREFS_GROUP, GNC_PREF_DEFAULT_TRANS_STATUS_RECONCILED))
+        tmp_transaction_status = 'y';
+
     wind->transaction_status = SCM_MAKE_CHAR(tmp_transaction_status);
 }
 

Modified: gnucash/trunk/src/import-export/qif-import/dialog-account-picker.glade
===================================================================
--- gnucash/trunk/src/import-export/qif-import/dialog-account-picker.glade	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/import-export/qif-import/dialog-account-picker.glade	2013-10-07 14:16:36 UTC (rev 23247)
@@ -48,7 +48,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkRadioButton" id="gconf/dialogs/import/qif/default_status/reconciled">
+          <object class="GtkRadioButton" id="pref/dialogs.import.qif/default_status-reconciled">
             <property name="label" translatable="yes">_Reconciled</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
@@ -70,7 +70,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkRadioButton" id="gconf/dialogs/import/qif/default_status/cleared">
+          <object class="GtkRadioButton" id="pref/dialogs.import.qif/default_status-cleared">
             <property name="label" translatable="yes">_Cleared</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
@@ -81,7 +81,7 @@
             <property name="use_action_appearance">False</property>
             <property name="use_underline">True</property>
             <property name="draw_indicator">True</property>
-            <property name="group">gconf/dialogs/import/qif/default_status/reconciled</property>
+            <property name="group">pref/dialogs.import.qif/default_status-reconciled</property>
           </object>
           <packing>
             <property name="top_attach">5</property>
@@ -92,7 +92,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkRadioButton" id="gconf/dialogs/import/qif/default_status/not_cleared">
+          <object class="GtkRadioButton" id="pref/dialogs.import.qif/default_status-notcleared">
             <property name="label" translatable="yes">_Not cleared</property>
             <property name="visible">True</property>
             <property name="can_focus">True</property>
@@ -103,7 +103,7 @@
             <property name="use_action_appearance">False</property>
             <property name="use_underline">True</property>
             <property name="draw_indicator">True</property>
-            <property name="group">gconf/dialogs/import/qif/default_status/reconciled</property>
+            <property name="group">pref/dialogs.import.qif/default_status-reconciled</property>
           </object>
           <packing>
             <property name="top_attach">4</property>

Modified: gnucash/trunk/src/import-export/qif-import/gschemas/org.gnucash.dialogs.import.qif.gschema.xml.in
===================================================================
--- gnucash/trunk/src/import-export/qif-import/gschemas/org.gnucash.dialogs.import.qif.gschema.xml.in	2013-10-07 14:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/import-export/qif-import/gschemas/org.gnucash.dialogs.import.qif.gschema.xml.in	2013-10-07 14:16:36 UTC (rev 23247)
@@ -1,10 +1,20 @@
 <schemalist gettext-domain="GETTEXT_PACKAGE">
   <schema id="org.gnucash.dialogs.import.qif" path="/apps/gnucash/dialogs/import/qif/">
-    <key name="default_status" type="s">
-      <default>'not_cleared'</default>
+    <key name="default_status-notcleared" type="b">
+      <default>true</default>
       <summary>Default QIF transaction status</summary>
       <description>Default status for QIF transaction when not specified in QIF file.</description>
     </key>
+    <key name="default_status-cleared" type="b">
+      <default>false</default>
+      <summary>Default QIF transaction status</summary>
+      <description>Default status for QIF transaction when not specified in QIF file.</description>
+    </key>
+    <key name="default_status-reconciled" type="b">
+      <default>false</default>
+      <summary>When the status is not specified in a QIF file, the transactions are marked as reconciled.</summary>
+      <description>Default status for QIF transaction when not specified in QIF file.</description>
+    </key>
     <key name="last-geometry" type="(iiii)">
       <default>(-1,-1,-1,-1)</default>
       <summary>Last window position and size</summary>

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:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/register/ledger-core/gnc-ledger-display.c	2013-10-07 14:16:36 UTC (rev 23247)
@@ -34,7 +34,6 @@
 #include "gnc-date.h"
 #include "gnc-engine.h"
 #include "gnc-event.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-ledger-display.h"
 #include "gnc-prefs.h"
 #include "gnc-ui-util.h"
@@ -47,8 +46,11 @@
 #define REGISTER_GL_CM_CLASS         "register-gl"
 #define REGISTER_TEMPLATE_CM_CLASS   "register-template"
 
-#define GNC_PREF_DOUBLE_LINE_MODE "double_line_mode"
-#define GNC_PREF_MAX_TRANS        "max_transactions"
+#define GNC_PREF_DOUBLE_LINE_MODE         "double_line_mode"
+#define GNC_PREF_MAX_TRANS                "max_transactions"
+#define GNC_PREF_DEFAULT_STYLE_LEDGER     "default_style-ledger"
+#define GNC_PREF_DEFAULT_STYLE_AUTOLEDGER "default_style-autoledger"
+#define GNC_PREF_DEFAULT_STYLE_JOURNAL    "default_style-journal"
 
 
 struct gnc_ledger_display
@@ -197,33 +199,14 @@
 gnc_get_default_register_style (GNCAccountType type)
 {
     SplitRegisterStyle new_style = REG_STYLE_LEDGER;
-    gchar *style_string;
 
-    switch (type)
-    {
-#if 0
-    case ACCT_TYPE_PAYABLE:
-    case ACCT_TYPE_RECEIVABLE:
-        new_style = REG_STYLE_LEDGER;
-        break;
-#endif
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+                            GNC_PREF_DEFAULT_STYLE_JOURNAL))
+        new_style = REG_STYLE_JOURNAL;
+    else if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+                                 GNC_PREF_DEFAULT_STYLE_AUTOLEDGER))
+        new_style = REG_STYLE_AUTO_LEDGER;
 
-    default:
-        style_string = gnc_gconf_get_string(GCONF_GENERAL_REGISTER,
-                                            "default_style", NULL);
-        if (g_strcmp0(style_string, "journal") == 0)
-            new_style = REG_STYLE_JOURNAL;
-        else if (g_strcmp0(style_string, "auto_ledger") == 0)
-            new_style = REG_STYLE_AUTO_LEDGER;
-        else
-            new_style = REG_STYLE_LEDGER;
-
-        if (style_string != NULL)
-            g_free(style_string);
-
-        break;
-    }
-
     return new_style;
 }
 

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:16:11 UTC (rev 23246)
+++ gnucash/trunk/src/register/ledger-core/gnc-ledger-display2.c	2013-10-07 14:16:36 UTC (rev 23247)
@@ -35,7 +35,6 @@
 #include "gnc-date.h"
 #include "gnc-engine.h"
 #include "gnc-event.h"
-#include "gnc-gconf-utils.h"
 #include "gnc-ledger-display2.h"
 #include "gnc-prefs.h"
 #include "gnc-ui-util.h"
@@ -51,8 +50,11 @@
 #define REGISTER_GL_CM_CLASS         "register-gl"
 #define REGISTER_TEMPLATE_CM_CLASS   "register-template"
 
-#define GNC_PREF_DOUBLE_LINE_MODE "double_line_mode"
-#define GNC_PREF_MAX_TRANS        "max_transactions"
+#define GNC_PREF_DOUBLE_LINE_MODE         "double_line_mode"
+#define GNC_PREF_MAX_TRANS                "max_transactions"
+#define GNC_PREF_DEFAULT_STYLE_LEDGER     "default_style-ledger"
+#define GNC_PREF_DEFAULT_STYLE_AUTOLEDGER "default_style-autoledger"
+#define GNC_PREF_DEFAULT_STYLE_JOURNAL    "default_style-journal"
 
 
 struct gnc_ledger_display2
@@ -202,38 +204,18 @@
     return ld->model == model;
 }
 
-
-static SplitRegisterStyle2
+static SplitRegisterStyle
 gnc_get_default_register_style (GNCAccountType type)
 {
-    SplitRegisterStyle2 new_style = REG2_STYLE_LEDGER;
-    gchar *style_string;
+    SplitRegisterStyle new_style = REG2_STYLE_LEDGER;
 
-    switch (type)
-    {
-#if 0
-    case ACCT_TYPE_PAYABLE:
-    case ACCT_TYPE_RECEIVABLE:
-        new_style = REG_STYLE_LEDGER;
-        break;
-#endif
+    if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+                            GNC_PREF_DEFAULT_STYLE_JOURNAL))
+        new_style = REG2_STYLE_JOURNAL;
+    else if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL_REGISTER,
+                                 GNC_PREF_DEFAULT_STYLE_AUTOLEDGER))
+        new_style = REG2_STYLE_AUTO_LEDGER;
 
-    default:
-        style_string = gnc_gconf_get_string(GCONF_GENERAL_REGISTER,
-                                            "default_style", NULL);
-        if (g_strcmp0(style_string, "journal") == 0)
-            new_style = REG2_STYLE_JOURNAL;
-        else if (g_strcmp0(style_string, "auto_ledger") == 0)
-            new_style = REG2_STYLE_AUTO_LEDGER;
-        else
-            new_style = REG2_STYLE_LEDGER;
-
-        if (style_string != NULL)
-            g_free(style_string);
-
-        break;
-    }
-
     return new_style;
 }
 
@@ -607,7 +589,7 @@
 //FIXME Not Needed ?    gnc_ledger_display2_set_watches (ld, splits);
 //    gnc_ledger_display2_set_watches (ld, splits);
 
-    //gconf changes come this way
+    //preference changes come this way
     gnc_ledger_display2_refresh_internal (ld, splits);
 
     LEAVE(" ");



More information about the gnucash-changes mailing list