[Gnucash-changes] Begin migrating preferences over to the new dialog.

David Hampton hampton at cvs.gnucash.org
Fri Jul 22 14:53:05 EDT 2005


Log Message:
-----------
Begin migrating preferences over to the new dialog.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash:
        ChangeLog
    gnucash/src/app-utils:
        Makefile.am
        gnc-ui-util.c
        gnc-ui-util.h
        guile-util.c
        prefs.scm
    gnucash/src/backend:
        gnc-backend-api.h
    gnucash/src/backend/file:
        Makefile.am
        gnc-backend-file.c
    gnucash/src/gnome:
        gnc-plugin-page-register.c
        gnc-split-reg.c
        top-level.c
        window-reconcile.c
    gnucash/src/gnome/schemas:
        apps_gnucash_dialog_common.schemas
        apps_gnucash_general.schemas
    gnucash/src/gnome-utils:
        QuickFill.c
        QuickFill.h
        account-quickfill.c
        dialog-transfer.c
        dialog-utils.c
        gnc-tree-model-account.c
    gnucash/src/register/ledger-core:
        gnc-ledger-display.c
        split-register-load.c
        split-register-model.c
        split-register.c
        split-register.h
    gnucash/src/register/register-core:
        combocell.h
    gnucash/src/register/register-gnome:
        combocell-gnome.c
        gnucash-sheet.c

Revision Data
-------------
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.244
retrieving revision 1.1487.2.245
diff -LChangeLog -LChangeLog -u -r1.1487.2.244 -r1.1487.2.245
--- ChangeLog
+++ ChangeLog
@@ -1,5 +1,80 @@
+2005-07-22  David Hampton  <hampton at employees.org>
+
+	* numerous file: Begin migrating preferences over to the new
+	dialog.
+
+	* src/gnome-utils/Makefile.am:
+	* src/gnome-utils/dialog-preferences.[ch]:
+	* src/gnome-utils/gnc-main-window.c:
+	* src/gnome-utils/preferences.glade:
+	* src/gnome-utils/ui/gnc-main-window-ui.xml: Add the
+	infrastructure for the new preferences dialog.  Begin migrating
+	preferences over to the new dialog.
+
+	* src/core-utils/gnc-gconf-utils.[ch]: Add central notification
+	dispatcher for the "general" set of gconf keys.  This is needed
+	because lots of file need callbacks for just one or two keys from
+	this section.  Add routines to get/set float values in gconf.
+	Miscellaneous tweaks.
+
+2005-07-20  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/gnc-gui-query.c: Skipping a dialog permanently
+	takes precedence over skipping it temporarily.  Make sure to set
+	only one flag per dialog.  Actually wire up the callbacks.
+
+	* src/gnome/schemas/Makefile.am:
+	* src/gnome/schemas/apps_gnucash_warnings.schemas:
+	* src/register/ledger-core/split-register-control.c:
+	* src/register/ledger-core/split-register-model.c: Use the new
+	dialog that remembers whether or not it should suppress further
+	instances.
+
+	* src/business/business-gnome/dialog-invoice.h:
+	* src/business/business-gnome/gnc-plugin-page-invoice.c:
+	* src/business/business-gnome/schemas/apps_gnucash_dialog_business_common.schemas:
+	* src/core-utils/gnc-gconf-utils.h:
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/schemas/apps_gnucash_general.schemas:
+	* src/gnome-utils/gnc-main-window.[ch]:
+	* src/gnome-utils/gnc-plugin-page.[ch[:
+	* src/register/register-core/table-allgui.h:
+	* src/report/report-gnome/gnc-plugin-page-report.c: Allow pages to
+	state whether they should be loaded in the current window or in a
+	new window.  This will soon be controlled by preferences.
+
+	* src/gnome/gnc-plugin-page-register.c: Propagate window changes
+	to the register.  Fix the "transaction report" to use the current
+	window's status bar for updates.
+
+	* src/gnome/gnc-plugin-basic-commands.c: Example "important"
+	actions.  Subject to review.
+
+	* src/gnome-utils/gnc-plugin.[ch]: Add support for marking actions
+	as "important".  This is a setting used by the toolbar when it is
+	set to GTK_TOOLBAR_BOTH_HORIZ.
+
+	* src/core-utils/gnc-gconf-utils.c: Handle what was thought to be
+	an unexpected case when building gconf keys.
+
 2005-07-19  David Hampton  <hampton at employees.org>
 
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gw-gnc-spec.scm:
+	* src/gnome/top-level.c:
+	* src/gnome-utils/Makefile.am:
+	* src/gnome-utils/gnc-main-window.c:
+	* src/gnome-utils/gnc-mdi-utils.[ch]:
+	* src/gnome-utils/gnc-window.c:
+	* src/gnome-utils/gw-gnome-utils-spec.scm:
+	* src/report/report-gnome/window-report.h:
+	* src/report/report-system/report-utilities.scm:
+	* src/scm/main-window.scm: Remove the remnants of the gtk1/gnome1
+	MDI code.
+
+	* src/report/report-gnome/gnc-plugin-page-report.c: Use the
+	progress bar in the current window, not always the first window.
+
 	* src/gnome-utils/gnc-main-window.c: Spruce up the delete window
 	dialog to make it more HIG compliant.
 
Index: gnc-backend-api.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/gnc-backend-api.h,v
retrieving revision 1.3.4.1
retrieving revision 1.3.4.2
diff -Lsrc/backend/gnc-backend-api.h -Lsrc/backend/gnc-backend-api.h -u -r1.3.4.1 -r1.3.4.2
--- src/backend/gnc-backend-api.h
+++ src/backend/gnc-backend-api.h
@@ -27,7 +27,5 @@
 #include "qofbackend.h"
 
 QofBackend * gnc_backend_new (void);
-void gnc_file_be_set_retention_days (int days);
-void gnc_file_be_set_compression (gboolean compress);
 
 #endif
Index: gnc-backend-file.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-backend-file.c,v
retrieving revision 1.23.4.7
retrieving revision 1.23.4.8
diff -Lsrc/backend/file/gnc-backend-file.c -Lsrc/backend/file/gnc-backend-file.c -u -r1.23.4.7 -r1.23.4.8
--- src/backend/file/gnc-backend-file.c
+++ src/backend/file/gnc-backend-file.c
@@ -44,6 +44,7 @@
 #include "TransLog.h"
 #include "gnc-engine.h"
 #include "gnc-date.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-trace.h"
 #include "gnc-engine-util.h"
 #include "gnc-filepath-utils.h"
@@ -62,20 +63,6 @@
 
 static short module = MOD_BACKEND;
 
-static int file_retention_days = 0;
-static gboolean file_compression = FALSE;
-
-void
-gnc_file_be_set_retention_days (int days)
-{
-    file_retention_days = days;
-}
-
-void
-gnc_file_be_set_compression (gboolean compress)
-{
-    file_compression = compress;
-}
 
 /* ================================================================= */
 
@@ -467,6 +454,7 @@
     struct stat statbuf;
     int rc;
     QofBackendError be_err;
+    gboolean file_compression;
 
     ENTER (" book=%p file=%s", book, datafile);
 
@@ -492,6 +480,7 @@
         }
     }
   
+    file_compression = gnc_gconf_get_bool(GCONF_GENERAL, "compress_files", NULL);
     if(gnc_book_write_to_xml_file_v2(book, tmp_name, file_compression)) 
     {
         /* Record the file's permissions before unlinking it */
@@ -598,6 +587,7 @@
 static void
 gnc_file_be_remove_old_files(FileBackend *be)
 {
+    int file_retention_days;
     struct dirent *dent;
     DIR *dir;
     struct stat lockstatbuf, statbuf;
@@ -631,6 +621,7 @@
         return;
 
     now = time(NULL);
+    file_retention_days = gnc_gconf_get_float(GCONF_GENERAL, "retain_days", NULL);
     while((dent = readdir(dir)) != NULL) {
         char *name;
         int len;
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/Makefile.am,v
retrieving revision 1.16.4.4
retrieving revision 1.16.4.5
diff -Lsrc/backend/file/Makefile.am -Lsrc/backend/file/Makefile.am -u -r1.16.4.4 -r1.16.4.5
--- src/backend/file/Makefile.am
+++ src/backend/file/Makefile.am
@@ -11,7 +11,8 @@
   -I${top_srcdir}/lib/libc\
   -I${top_srcdir}/src/backend/qsf \
   ${XML_CFLAGS} \
-  ${GLIB_CFLAGS}
+  ${GLIB_CFLAGS} \
+  ${GCONF_CFLAGS}
 
 libgncmod_backend_file_la_SOURCES = \
   gncmod-backend-file.c \
@@ -56,7 +57,7 @@
 
 libgncmod_backend_file_la_LDFLAGS = -module
 libgncmod_backend_file_la_LIBADD = \
-   ${GLIB_LIBS} ${XML_LIBS} \
+   ${GLIB_LIBS} ${GCONF_LIBS} ${XML_LIBS} \
    ${top_builddir}/src/engine/libgncmod-engine.la \
    ${top_builddir}/src/backend/qsf/libqof-backend-qsf.la
 
Index: gnc-plugin-page-register.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Attic/gnc-plugin-page-register.c,v
retrieving revision 1.1.2.33
retrieving revision 1.1.2.34
diff -Lsrc/gnome/gnc-plugin-page-register.c -Lsrc/gnome/gnc-plugin-page-register.c -u -r1.1.2.33 -r1.1.2.34
--- src/gnome/gnc-plugin-page-register.c
+++ src/gnome/gnc-plugin-page-register.c
@@ -62,9 +62,9 @@
 /* This static indicates the debugging module that this .o belongs to.  */
 static short module = MOD_GUI;
 
-#define DEFAULT_LINES_OPTION_PAGE "_+Advanced"
-#define DEFAULT_LINES_OPTION_NAME "Number of Rows"
-#define DEFAULT_LINES_AMOUNT      20
+#define DEFAULT_LINES_OPTION_SECTION GCONF_GENERAL_REGISTER
+#define DEFAULT_LINES_OPTION_NAME    KEY_NUMBER_OF_ROWS
+#define DEFAULT_LINES_AMOUNT         20
 
 static void gnc_plugin_page_register_class_init (GncPluginPageRegisterClass *klass);
 static void gnc_plugin_page_register_init (GncPluginPageRegister *plugin_page);
@@ -305,7 +305,7 @@
 
 	gint component_manager_id;
 
-	const char *lines_opt_page;
+	const char *lines_opt_section;
 	const char *lines_opt_name;
 	gint lines_default;
 	gint disallowCaps;
@@ -488,11 +488,11 @@
 
 	priv->ui_description = g_strdup("gnc-plugin-page-register-ui.xml");
 
-	priv->lines_opt_page = DEFAULT_LINES_OPTION_PAGE;
-	priv->lines_opt_name = DEFAULT_LINES_OPTION_NAME;
-	priv->lines_default  = DEFAULT_LINES_AMOUNT;
-	priv->disallowCaps = 0;
-	priv->fd.cleared_match = CLEARED_ALL;
+	priv->lines_opt_section = DEFAULT_LINES_OPTION_SECTION;
+	priv->lines_opt_name    = DEFAULT_LINES_OPTION_NAME;
+	priv->lines_default     = DEFAULT_LINES_AMOUNT;
+	priv->disallowCaps      = 0;
+	priv->fd.cleared_match  = CLEARED_ALL;
 }
 
 static void
@@ -590,12 +590,16 @@
 	priv->widget = gtk_vbox_new (FALSE, 0);
 	gtk_widget_show (priv->widget);
 	
-	numRows = (guint) gnc_lookup_number_option (priv->lines_opt_page,
-						    priv->lines_opt_name,
-						    priv->lines_default);
+	if (priv->lines_opt_section) {
+	  numRows = gnc_gconf_get_float (priv->lines_opt_section,
+					 priv->lines_opt_name, NULL);
+	} else {
+	  numRows = priv->lines_default;
+	}
 
-	gsr = gnc_split_reg_new(priv->ledger, NULL, numRows,
-				0, priv->disallowCaps);
+	gsr = gnc_split_reg_new(priv->ledger,
+				GTK_WINDOW(GNC_PLUGIN_PAGE(page)->window),
+				numRows, 0, priv->disallowCaps);
 	priv->gsr = (GNCSplitReg *)gsr;
 	gtk_widget_show (gsr);
 	gtk_box_pack_start (GTK_BOX (priv->widget), gsr, TRUE, TRUE, 0);
@@ -2222,7 +2226,7 @@
 
 void
 gnc_plugin_page_register_set_options (GncPluginPage *plugin_page,
-				      const char *lines_opt_page,
+				      const char *lines_opt_section,
 				      const char *lines_opt_name,
 				      gint lines_default,
 				      gint disallowCaps)
@@ -2234,10 +2238,10 @@
 
 	page = GNC_PLUGIN_PAGE_REGISTER (plugin_page);
 	priv = page->priv;
-	priv->lines_opt_page = lines_opt_page;
-	priv->lines_opt_name = lines_opt_name;
-	priv->lines_default  = lines_default;
-	priv->disallowCaps   = disallowCaps;
+	priv->lines_opt_section = lines_opt_section;
+	priv->lines_opt_name 	= lines_opt_name;
+	priv->lines_default  	= lines_default;
+	priv->disallowCaps   	= disallowCaps;
 }
 
 void
Index: window-reconcile.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/window-reconcile.c,v
retrieving revision 1.103.4.11
retrieving revision 1.103.4.12
diff -Lsrc/gnome/window-reconcile.c -Lsrc/gnome/window-reconcile.c -u -r1.103.4.11 -r1.103.4.12
--- src/gnome/window-reconcile.c
+++ src/gnome/window-reconcile.c
@@ -92,8 +92,6 @@
   GtkWidget *debit_frame;   /* Frame around debit matrix            */
   GtkWidget *credit_frame;  /* Frame around credit matrix           */
 
-  SCM title_change_cb_id;   /* id for label preference cb           */
-
   GtkWidget *edit_item;     /* Edit transaction menu item           */
   GtkWidget *delete_item;   /* Delete transaction menu item         */
 
@@ -724,7 +722,7 @@
     else if( account_type_has_auto_interest_charge( data.account_type ) )
       gtk_button_set_label(GTK_BUTTON(interest), _("Enter Interest Charge...") );
     else {
-      gtk_widget_destroy(interest);
+      gtk_widget_hide(interest);
       interest = NULL;
     }
 
@@ -897,8 +895,7 @@
   gboolean formal;
   gchar *title;
 
-  formal = gnc_lookup_boolean_option("General",
-                                     "Use accounting labels", FALSE);
+  formal = gnc_gconf_get_bool(GCONF_GENERAL, KEY_ACCOUNTING_LABELS, NULL);
 
   if (formal)
     title = _("Debits");
@@ -921,12 +918,6 @@
     g_free(title);
 }
 
-static void
-set_titles_cb(void *data)
-{
-  gnc_reconcile_window_set_titles(data);
-}
-
 static GtkWidget *
 gnc_reconcile_window_create_list_box(Account *account,
                                      GNCReconcileListType type,
@@ -1591,6 +1582,7 @@
     }
   }
 
+  gnc_reconcile_window_set_titles(recnData);
   recn_set_watches (recnData);
 
   recnRefresh (recnData);
@@ -1884,10 +1876,6 @@
 
   gnc_reconcile_window_set_titles(recnData);
 
-  recnData->title_change_cb_id =
-    gnc_register_option_change_callback(set_titles_cb, recnData,
-                                        "General", "Use accounting labels");
-
   recnRecalculateBalance(recnData);
 
   gnc_recn_refresh_toolbar(recnData);
@@ -1939,9 +1927,6 @@
   id = recnData->toolbar_change_cb_id;
   gnc_unregister_option_change_callback_id (id);
 
-  id = recnData->title_change_cb_id;
-  gnc_unregister_option_change_callback_id (id);
-
   if (recnData->delete_refresh)
     gnc_resume_gui_refresh ();
 
Index: gnc-split-reg.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/gnc-split-reg.c,v
retrieving revision 1.19.4.21
retrieving revision 1.19.4.22
diff -Lsrc/gnome/gnc-split-reg.c -Lsrc/gnome/gnc-split-reg.c -u -r1.19.4.21 -r1.19.4.22
--- src/gnome/gnc-split-reg.c
+++ src/gnome/gnc-split-reg.c
@@ -365,8 +365,8 @@
   gsr->width = -1;
   gsr->height = -1;
   gsr->disallowedCaps = 0;
-  gsr->numRows = (guint) gnc_lookup_number_option ( "_+Advanced",
-                                                    "Number of Rows", 20.0 );
+  gsr->numRows = gnc_gconf_get_float(GCONF_GENERAL_REGISTER,
+				     KEY_NUMBER_OF_ROWS, NULL);
   gsr->read_only = FALSE;
 
   /* IMPORTANT: If we set this to anything other than GTK_RESIZE_QUEUE, we
@@ -1823,9 +1823,8 @@
   SplitRegister *sr = gnc_ledger_display_get_split_register( gsr->ledger );
   gboolean goto_blank;
 
-  goto_blank = gnc_lookup_boolean_option( "Register",
-                                          "'Enter' moves to blank transaction",
-                                          FALSE );
+  goto_blank = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
+				  "enter_moves_to_end", NULL);
 
   /* If we are in single or double line mode and we hit enter
    * on the blank split, go to the blank split instead of the
Index: top-level.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/top-level.c,v
retrieving revision 1.140.4.24
retrieving revision 1.140.4.25
diff -Lsrc/gnome/top-level.c -Lsrc/gnome/top-level.c -u -r1.140.4.24 -r1.140.4.25
--- src/gnome/top-level.c
+++ src/gnome/top-level.c
@@ -32,7 +32,6 @@
 #include <X11/Xlib.h>
 
 #include "TransLog.h"
-#include "backend/gnc-backend-api.h"
 #include "combocell.h"
 #include "dialog-account.h"
 #include "dialog-commodity.h"
@@ -44,6 +43,7 @@
 #include "gnc-component-manager.h"
 #include "gnc-date.h"
 #include "gnc-engine-util.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-file.h"
 #include "gnc-hooks.h"
 #include "gnc-main-window.h"
@@ -72,7 +72,6 @@
 #include "qofbook.h"
 #include "qofsession.h"
 #include "messages.h"
-#include "split-register.h"
 #include "top-level.h"
 #include "window-report.h"
 
@@ -80,19 +79,6 @@
 /** PROTOTYPES ******************************************************/
 static void gnc_configure_date_format_cb(gpointer);
 static void gnc_configure_date_format(void);
-static void gnc_configure_account_separator_cb(gpointer);
-static void gnc_configure_auto_raise_cb(gpointer);
-static void gnc_configure_auto_raise(void);
-static void gnc_configure_negative_color_cb(gpointer);
-static void gnc_configure_negative_color(void);
-static void gnc_configure_auto_decimal_cb(gpointer);
-static void gnc_configure_auto_decimal(void);
-static void gnc_configure_auto_decimal_places_cb(gpointer);
-static void gnc_configure_auto_decimal_places(void);
-static void gnc_configure_file_be_retention_days_cb(gpointer);
-static void gnc_configure_file_be_retention_days(void);
-static void gnc_configure_file_be_compression_cb(gpointer);
-static void gnc_configure_file_be_compression(void);
 
 
 /** GLOBALS *********************************************************/
@@ -105,15 +91,6 @@
 static int gnome_is_terminating = FALSE;
 
 static SCM date_callback_id = SCM_UNDEFINED;
-static SCM account_separator_callback_id = SCM_UNDEFINED;
-static SCM auto_raise_callback_id = SCM_UNDEFINED;
-static SCM negative_color_callback_id = SCM_UNDEFINED;
-static SCM auto_decimal_callback_id = SCM_UNDEFINED;
-static SCM auto_decimal_places_callback_id = SCM_UNDEFINED;
-static SCM log_retention_days_callback_id = SCM_UNDEFINED;
-static SCM compression_callback_id = SCM_UNDEFINED;
-static SCM register_font_callback_id = SCM_UNDEFINED;
-static SCM register_hint_font_callback_id = SCM_UNDEFINED;
 
 
 gboolean
@@ -305,52 +282,14 @@
     /* load default HTML action handlers */ 
     // gnc_network_init();
 
+    gnc_ui_util_init();
+    gnc_gconf_general_register_any_cb((GncGconfGeneralAnyCb)gnc_gui_refresh_all, NULL);
+
     gnc_configure_date_format();
     date_callback_id =
       gnc_register_option_change_callback(gnc_configure_date_format_cb, NULL,
                                           "International", "Date Format");
 
-    account_separator_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_account_separator_cb,
-                                          NULL, "Accounts",
-                                          "Account Separator");
-
-    gnc_configure_auto_raise();
-    auto_raise_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_auto_raise_cb,
-                                          NULL, "_+Advanced",
-                                          "Auto-Raise Lists");
-
-    gnc_configure_negative_color();
-    negative_color_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_negative_color_cb,
-                                          NULL, "General",
-                                          "Display negative amounts in red");
-
-    gnc_configure_auto_decimal();
-    auto_decimal_callback_id =
-      gnc_register_option_change_callback(gnc_configure_auto_decimal_cb,
-                                          NULL, "General",
-                                          "Automatic Decimal Point");
-
-    gnc_configure_auto_decimal_places();
-    auto_decimal_places_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_auto_decimal_places_cb,
-                                          NULL, "General",
-                                          "Auto Decimal Places");
-
-    gnc_configure_file_be_retention_days();
-    log_retention_days_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_file_be_retention_days_cb,
-                                          NULL, "General",
-                                          "Days to retain log files");
-
-    gnc_configure_file_be_compression();
-    compression_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_file_be_compression_cb,
-                                          NULL, "General",
-                                          "Use file compression");
-
     if (!gnucash_style_init())
       gnc_shutdown(1);
     gnucash_color_init();
@@ -418,11 +357,6 @@
     return;
 
   gnc_unregister_option_change_callback_id(date_callback_id);
-  gnc_unregister_option_change_callback_id(account_separator_callback_id);
-  gnc_unregister_option_change_callback_id(auto_raise_callback_id);
-  gnc_unregister_option_change_callback_id(negative_color_callback_id);
-  gnc_unregister_option_change_callback_id(register_font_callback_id);
-  gnc_unregister_option_change_callback_id(register_hint_font_callback_id);
 
   gnc_extensions_shutdown ();
 }
@@ -550,192 +484,30 @@
     free(format_code);
 }
 
-/* gnc_configure_account_separator_cb
- *    Callback called when options change - sets account separator
- *    to the current value on the scheme side
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void 
-gnc_configure_account_separator_cb (gpointer data)
-{
-  gnc_gui_refresh_all ();
-}
-
-/* gnc_configure_auto_raise_cb
- *    Callback called when options change - sets
- *    auto-raise status of combocell class
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_auto_raise_cb (gpointer data)
-{
-  gnc_configure_auto_raise ();
-}
-
-/* gnc_configure_auto_raise
- *    sets combocell auto raise status
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_auto_raise (void)
-{
-  gboolean auto_pop;
-
-  auto_pop = gnc_lookup_boolean_option("_+Advanced", "Auto-Raise Lists", TRUE);
-
-  gnc_combo_cell_set_autopop (auto_pop);
-}
-
-/* gnc_configure_negative_color_cb
- *    Callback called when options change - sets
- *    negative amount color flags
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_negative_color_cb (gpointer data)
-{
-  gnc_configure_negative_color ();
-
-  gnc_gui_refresh_all ();
-}
-
-/* gnc_configure_negative_color
- *    sets negative amount color flags
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_negative_color(void)
-{
-  gboolean use_red;
-
-  use_red = gnc_lookup_boolean_option("General",
-                                      "Display negative amounts in red",
-                                      TRUE);
-
-  gnc_split_register_colorize_negative (use_red);
-}
-
-
-/* gnc_configure_auto_decimal_cb
- *     Callback called when options change -
- *     sets auto decimal option.
- * 
- *  Args: Nothing
- *  Returns: Nothing
- */
-static void
-gnc_configure_auto_decimal_cb(gpointer not_used)
-{
-  gnc_configure_auto_decimal();
-}
-
-/* gnc_configure_auto_decimal
- *     Pass the global value for the auto decimal field to the engine.
- * 
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_auto_decimal(void)
-{
-  gboolean enabled;
-
-  enabled = gnc_lookup_boolean_option("General",
-                                      "Automatic Decimal Point",
-                                      FALSE);
-
-  gnc_set_auto_decimal_enabled(enabled);
-}
-
-/* gnc_configure_auto_decimal_places_cb
- *     Callback called when options change -
- *     sets auto decimal places option.
- * 
- *  Args: Nothing
- *  Returns: Nothing
- */
-static void
-gnc_configure_auto_decimal_places_cb (gpointer not_used)
-{
-  gnc_configure_auto_decimal_places ();
-}
-
-/* gnc_configure_auto_decimal_places
- *     Pass the global value for the auto decimal places range to the engine.
- * 
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_auto_decimal_places (void)
-{
-   gnc_set_auto_decimal_places
-     (gnc_lookup_number_option("General",
-                               "Auto Decimal Places", 2));
-}
-
 
-/* gnc_configure_file_be_retention_days_cb
- *     Callback called when options change -
- *     sets days retained for the file backend.
- * 
- *  Args: Nothing
- *  Returns: Nothing
- */
-static void
-gnc_configure_file_be_retention_days_cb (gpointer not_used)
-{
-  gnc_configure_file_be_retention_days ();
-}
 
-/* gnc_configure_file_be_retention_days
- *     Pass the global value for the number of days to retain files to the file backend.
- * 
- * Args: Nothing
- * Returns: Nothing
+/*  Shutdown gnucash.  This function will call the Scheme side of
+ *  GnuCash to initiate an orderly shutdown, and when that has
+ *  finished it will exit the program.
  */
-static void
-gnc_configure_file_be_retention_days (void)
-{
-  gnc_file_be_set_retention_days
-    (gnc_lookup_number_option("General",
-                              "Days to retain log files", 0));
-}
-
-/* gnc_configure_file_be_retention_days_cb
- *     Callback called when options change -
- *     sets days retained for the file backend.
- * 
- *  Args: Nothing
- *  Returns: Nothing
- */
-static void
-gnc_configure_file_be_compression_cb (gpointer not_used)
+void
+gnc_shutdown (int exit_status)
 {
-  gnc_configure_file_be_compression ();
-}
+  /*SCM scm_shutdown = gnc_scm_lookup("gnucash bootstrap", "gnc:shutdown");*/
+  SCM scm_shutdown = scm_c_eval_string("gnc:shutdown");
 
-/* gnc_configure_file_be_retention_days
- *     Pass the global value for the number of days to retain files to the file backend.
- * 
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_file_be_compression (void)
-{
-  gnc_file_be_set_compression
-    (gnc_lookup_boolean_option("General", "Use file compression", FALSE));
+  if(scm_procedure_p(scm_shutdown) != SCM_BOOL_F)
+  {
+    SCM scm_exit_code = scm_long2num(exit_status);    
+    scm_call_1(scm_shutdown, scm_exit_code);
+  }
+  else
+  {
+    /* Either guile is not running, or for some reason we
+       can't find gnc:shutdown. Either way, just exit. */
+    g_warning("couldn't find gnc:shutdown -- exiting anyway.");
+    exit(exit_status);
+  }
 }
 
 /****************** END OF FILE **********************/
Index: account-quickfill.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/account-quickfill.c,v
retrieving revision 1.2.4.1
retrieving revision 1.2.4.2
diff -Lsrc/gnome-utils/account-quickfill.c -Lsrc/gnome-utils/account-quickfill.c -u -r1.2.4.1 -r1.2.4.2
--- src/gnome-utils/account-quickfill.c
+++ src/gnome-utils/account-quickfill.c
@@ -23,6 +23,7 @@
 
 #include "config.h"
 #include "account-quickfill.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-engine-util.h"
 #include "gnc-event.h"
 #include "gnc-trace.h"
@@ -31,6 +32,8 @@
 /* This static indicates the debugging module that this .o belongs to. */
 static short module = MOD_REGISTER;
 
+static void shared_quickfill_gconf_changed (GConfEntry *entry, gpointer qfb);
+
 /* ===================================================================== */
 /* In order to speed up register starts for registers htat have a huge
  * number of accounts in them (where 'huge' is >500) we build a quickfill
@@ -44,6 +47,7 @@
 typedef struct {
   QuickFill *qf;
   QofBook *book;
+  AccountGroup *group;
   gint  listener;
   AccountBoolCB dont_add_cb;
   gpointer dont_add_data;
@@ -53,6 +57,9 @@
 shared_quickfill_destroy (QofBook *book, gpointer key, gpointer user_data)
 {
   QFB *qfb = user_data;
+  gnc_gconf_general_remove_cb(KEY_ACCOUNT_SEPARATOR,
+			      shared_quickfill_gconf_changed,
+			      qfb);
   gnc_quickfill_destroy (qfb->qf);
   gnc_engine_unregister_event_handler (qfb->listener);
   g_free (qfb);
@@ -128,6 +135,17 @@
   return NULL;
 }
 
+static void
+shared_quickfill_gconf_changed (GConfEntry *entry, gpointer user_data)
+{
+  QFB *qfb = user_data;
+
+  /* Reload the quickfill */
+  gnc_quickfill_purge(qfb->qf);
+  xaccGroupForEachAccount (qfb->group, load_shared_qf_cb, qfb, TRUE);
+}
+
+
 /* Build the quickfill list out of account names. 
  * Essentially same loop as in gnc_load_xfer_cell() above.
  */
@@ -140,10 +158,15 @@
   qfb = g_new0(QFB, 1);
   qfb->qf = gnc_quickfill_new ();
   qfb->book = book;
+  qfb->group = group;
   qfb->listener = 0;
   qfb->dont_add_cb = cb;
   qfb->dont_add_data = data;
 
+  gnc_gconf_general_register_cb(KEY_ACCOUNT_SEPARATOR,
+				shared_quickfill_gconf_changed,
+				qfb);
+
   xaccGroupForEachAccount (group, load_shared_qf_cb, qfb, TRUE);
 
   qfb->listener = 
Index: QuickFill.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/QuickFill.h,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.5
diff -Lsrc/gnome-utils/QuickFill.h -Lsrc/gnome-utils/QuickFill.h -u -r1.1.4.4 -r1.1.4.5
--- src/gnome-utils/QuickFill.h
+++ src/gnome-utils/QuickFill.h
@@ -68,6 +68,7 @@
 
 QuickFill *  gnc_quickfill_new (void);
 void         gnc_quickfill_destroy (QuickFill *qf);
+void         gnc_quickfill_purge (QuickFill *qf);
 
 /** For the given node 'qf', return the best-guess matching string.
  */
Index: gnc-tree-model-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-tree-model-account.c,v
retrieving revision 1.1.2.18
retrieving revision 1.1.2.19
diff -Lsrc/gnome-utils/gnc-tree-model-account.c -Lsrc/gnome-utils/gnc-tree-model-account.c -u -r1.1.2.18 -r1.1.2.19
--- src/gnome-utils/gnc-tree-model-account.c
+++ src/gnome-utils/gnc-tree-model-account.c
@@ -33,6 +33,7 @@
 #include "Account.h"
 #include "Group.h"
 #include "gnc-commodity.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-engine-util.h"
 #include "gnc-gobject-utils.h"
 #include "gnc-ui-util.h"
@@ -96,9 +97,34 @@
 	AccountGroup *root;
 	Account *toplevel;
 	gint event_handler_id;
+	const gchar *negative_color;
 };
 
 
+
+/************************************************************/
+/*           Account Tree Model - Misc Functions            */
+/************************************************************/
+
+/** Tell the GncTreeModelAccount code to update the color that it will
+ *  use for negative numbers.  This function will iterate over all
+ *  existing models and update their setting from gconf.
+ *
+ *  @internal
+ */
+static void
+gnc_tree_model_account_update_color (GConfEntry *entry, gpointer user_data)
+{
+	GncTreeModelAccount *model;
+	GConfValue *value;
+	gboolean use_red;
+
+	g_return_if_fail(GNC_IS_TREE_MODEL_ACCOUNT(user_data));
+	model = user_data;
+	value = gconf_entry_get_value(entry);
+	use_red = gconf_value_get_bool(value);
+	model->priv->negative_color = use_red ? "red" : "black";
+}
 /************************************************************/
 /*               g_object required functions                */
 /************************************************************/
@@ -162,16 +188,25 @@
 static void
 gnc_tree_model_account_init (GncTreeModelAccount *model)
 {
+	gboolean red;
+
 	ENTER("model %p", model);
 	while (model->stamp == 0) {
 		model->stamp = g_random_int ();
 	}
 
+	red = gnc_gconf_get_bool(GCONF_GENERAL, KEY_NEGATIVE_IN_RED, NULL);
+
 	model->priv = g_new0 (GncTreeModelAccountPrivate, 1);
 	model->priv->book = NULL;
 	model->priv->root = NULL;
 	model->priv->toplevel = NULL;
+	model->priv->negative_color = red ? "red" : "black";
 
+	gnc_gconf_general_register_cb(KEY_NEGATIVE_IN_RED,
+				      gnc_tree_model_account_update_color,
+				      model);
+	
 	LEAVE(" ");
 }
 
@@ -186,6 +221,10 @@
 
 	model = GNC_TREE_MODEL_ACCOUNT (object);
 
+	gnc_gconf_general_remove_cb(KEY_NEGATIVE_IN_RED,
+				    gnc_tree_model_account_update_color,
+				    model);
+
 	model->priv->book = NULL;
 	g_free (model->priv);
 
@@ -521,6 +560,17 @@
 }
 
 static void
+gnc_tree_model_account_set_color(GncTreeModelAccount *model,
+				 gboolean negative,
+				 GValue *value)
+{
+	if (negative)
+	  g_value_set_static_string (value, model->priv->negative_color);
+	else 
+	  g_value_set_static_string (value, "black");
+}
+
+static void
 gnc_tree_model_account_get_value (GtkTreeModel *tree_model,
 				  GtkTreeIter *iter,
 				  int column,
@@ -583,7 +633,7 @@
 			g_value_init (value, G_TYPE_STRING);
 			string = gnc_ui_account_get_print_balance(xaccAccountGetPresentBalanceInCurrency,
 								  account, FALSE, &negative);
-			g_value_set_static_string (value, negative ? "red" : "black");
+			gnc_tree_model_account_set_color(model, negative, value);
 			g_free(string);
 			break;
 
@@ -603,7 +653,7 @@
 			g_value_init (value, G_TYPE_STRING);
 			string = gnc_ui_account_get_print_balance(xaccAccountGetBalanceInCurrency,
 								  account, FALSE, &negative);
-			g_value_set_static_string (value, negative ? "red" : "black");
+			gnc_tree_model_account_set_color(model, negative, value);
 			g_free(string);
 			break;
 
@@ -623,7 +673,7 @@
 			g_value_init (value, G_TYPE_STRING);
 			string = gnc_ui_account_get_print_balance(xaccAccountGetClearedBalanceInCurrency,
 								  account, FALSE, &negative);
-			g_value_set_static_string (value, negative ? "red" : "black");
+			gnc_tree_model_account_set_color(model, negative, value);
 			g_free(string);
 			break;
 
@@ -643,7 +693,7 @@
 			g_value_init (value, G_TYPE_STRING);
 			string = gnc_ui_account_get_print_balance(xaccAccountGetReconciledBalanceInCurrency,
 								  account, FALSE, &negative);
-			g_value_set_static_string (value, negative ? "red" : "black");
+			gnc_tree_model_account_set_color(model, negative, value);
 			g_free (string);
 			break;
 
@@ -663,7 +713,7 @@
 			g_value_init (value, G_TYPE_STRING);
 			string = gnc_ui_account_get_print_balance(xaccAccountGetProjectedMinimumBalanceInCurrency,
 								  account, FALSE, &negative);
-			g_value_set_static_string (value, negative ? "red" : "black");
+			gnc_tree_model_account_set_color(model, negative, value);
 			g_free (string);
 			break;
 
@@ -683,7 +733,7 @@
 			g_value_init (value, G_TYPE_STRING);
 			string = gnc_ui_account_get_print_balance(xaccAccountGetBalanceInCurrency,
 								  account, TRUE, &negative);
-			g_value_set_static_string (value, negative ? "red" : "black");
+			gnc_tree_model_account_set_color(model, negative, value);
 			g_free (string);
 			break;
 
Index: dialog-transfer.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-transfer.c,v
retrieving revision 1.9.4.20
retrieving revision 1.9.4.21
diff -Lsrc/gnome-utils/dialog-transfer.c -Lsrc/gnome-utils/dialog-transfer.c -u -r1.9.4.20 -r1.9.4.21
--- src/gnome-utils/dialog-transfer.c
+++ src/gnome-utils/dialog-transfer.c
@@ -36,6 +36,7 @@
 #include "gnc-engine-util.h"
 #include "gnc-euro.h"
 #include "gnc-exp-parser.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-gui-query.h"
 #include "gnc-pricedb.h"
 #include "gnc-tree-view-account.h"
@@ -433,9 +434,8 @@
   GtkTreeSelection *selection;
   gboolean  use_accounting_labels;
 
-  use_accounting_labels = gnc_lookup_boolean_option("Accounts",
-						    "Use accounting labels",
-						    FALSE);
+  use_accounting_labels = gnc_gconf_get_bool(GCONF_GENERAL,
+					     KEY_ACCOUNTING_LABELS, NULL);
 
   /* In "normal" mode (non accounting terms) the account where the
    * money comes from is displayed on the left side and the account
@@ -1627,9 +1627,8 @@
   GladeXML  *xml;
   gboolean  use_accounting_labels;
 
-  use_accounting_labels = gnc_lookup_boolean_option("Accounts",
-						    "Use accounting labels",
-						    FALSE);
+  use_accounting_labels = gnc_gconf_get_bool(GCONF_GENERAL,
+					     KEY_ACCOUNTING_LABELS, NULL);
 
   ENTER(" ");
   xml = gnc_glade_xml_new ("transfer.glade", "Transfer Dialog");
Index: dialog-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-utils.c,v
retrieving revision 1.13.4.15
retrieving revision 1.13.4.16
diff -Lsrc/gnome-utils/dialog-utils.c -Lsrc/gnome-utils/dialog-utils.c -u -r1.13.4.15 -r1.13.4.16
--- src/gnome-utils/dialog-utils.c
+++ src/gnome-utils/dialog-utils.c
@@ -46,9 +46,13 @@
 /* This static indicates the debugging module that this .o belongs to. */
 static short module = MOD_GUI;
 
+#define KEY_SAVE_GEOMETRY	"save_window_geometry"
 #define WINDOW_POSITION		"window_position"
 #define WINDOW_GEOMETRY		"window_geometry"
 
+#define DESKTOP_GNOME_INTERFACE "/desktop/gnome/interface"
+#define KEY_TOOLBAR_STYLE	"toolbar_style"
+
 /* =========================================================== */
 
 static void
@@ -150,17 +154,17 @@
   GtkToolbarStyle tbstyle = GTK_TOOLBAR_BOTH;
   char *style_string;
 
-  style_string = gnc_lookup_multichoice_option("General",
-                                               "Toolbar Buttons",
-                                               "icons_and_text");
-
-  if (safe_strcmp(style_string, "icons_and_text") == 0)
-    tbstyle = GTK_TOOLBAR_BOTH;
-  else if (safe_strcmp(style_string, "icons_only") == 0)
-    tbstyle = GTK_TOOLBAR_ICONS;
-  else if (safe_strcmp(style_string, "text_only") == 0)
-    tbstyle = GTK_TOOLBAR_TEXT;
+  style_string = gnc_gconf_get_string(GCONF_GENERAL,
+				      KEY_TOOLBAR_STYLE, NULL);
+  if (!style_string || strcmp(style_string, "system") == 0) {
+    if (style_string)
+      g_free(style_string);
+    style_string = gnc_gconf_get_string(DESKTOP_GNOME_INTERFACE,
+					KEY_TOOLBAR_STYLE, NULL);
+  }
 
+  tbstyle = gnc_enum_from_nick(GTK_TYPE_TOOLBAR_STYLE, style_string,
+			       GTK_TOOLBAR_BOTH);
   if (style_string != NULL)
     free(style_string);
 
@@ -198,7 +202,7 @@
   GdkColormap *cm;
   GtkStyle *style;
 
-  if (!gnc_color_deficits())
+  if (!gnc_gconf_get_bool(GCONF_GENERAL, "red_for_negative", NULL))
     return;
 
   cm = gtk_widget_get_colormap(GTK_WIDGET(label));
@@ -242,7 +246,7 @@
   g_return_if_fail(section != NULL);
   g_return_if_fail(window != NULL);
 
-  if (!gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", FALSE))
+  if (!gnc_gconf_get_bool(GCONF_GENERAL, KEY_SAVE_GEOMETRY, NULL))
     return;
   
   coord_list = gnc_gconf_get_list(section, WINDOW_POSITION,
@@ -288,7 +292,7 @@
   if (GTK_OBJECT_FLAGS(window) & GTK_IN_DESTRUCTION)
     return;
 
-  if (!gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", FALSE))
+  if (!gnc_gconf_get_bool(GCONF_GENERAL, KEY_SAVE_GEOMETRY, NULL))
     return;
 
   gtk_window_get_size(GTK_WINDOW(window), &coords[0], &coords[1]);
Index: QuickFill.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/QuickFill.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -Lsrc/gnome-utils/QuickFill.c -Lsrc/gnome-utils/QuickFill.c -u -r1.1.4.2 -r1.1.4.3
--- src/gnome-utils/QuickFill.c
+++ src/gnome-utils/QuickFill.c
@@ -102,10 +102,11 @@
 /********************************************************************\
 \********************************************************************/
 
-static void
+static gboolean
 destroy_helper (gpointer key, gpointer value, gpointer data)
 {
   gnc_quickfill_destroy (value);
+  return TRUE;
 }
 
 void
@@ -114,7 +115,7 @@
   if (qf == NULL)
     return;
 
-  g_hash_table_foreach (qf->matches, destroy_helper, NULL);
+  g_hash_table_foreach (qf->matches, (GHFunc)destroy_helper, NULL);
   g_hash_table_destroy (qf->matches);
   qf->matches = NULL;
 
@@ -126,6 +127,20 @@
   g_free (qf);
 }
 
+void
+gnc_quickfill_purge (QuickFill *qf)
+{
+  if (qf == NULL)
+    return;
+
+  g_hash_table_foreach_remove (qf->matches, destroy_helper, NULL);
+
+  if (qf->text)
+    g_cache_remove (qf_string_cache, qf->text);
+  qf->text = NULL;
+  qf->len = 0;
+}
+
 /********************************************************************\
 \********************************************************************/
 
Index: split-register.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register.c,v
retrieving revision 1.40.2.6
retrieving revision 1.40.2.7
diff -Lsrc/register/ledger-core/split-register.c -Lsrc/register/ledger-core/split-register.c -u -r1.40.2.6 -r1.40.2.7
--- src/register/ledger-core/split-register.c
+++ src/register/ledger-core/split-register.c
@@ -38,6 +38,7 @@
 #include "global-options.h"
 #include "gnc-component-manager.h"
 #include "gnc-engine-util.h"
+#include "gnc-gconf-utils.h"
 #include "split-register-p.h"
 #include "gnc-ledger-display.h"
 #include "gnc-ui-util.h"
@@ -2162,6 +2163,31 @@
   gnc_split_register_config_action (reg);
 }
 
+static void
+split_register_gconf_changed (GConfEntry *entry, gpointer user_data)
+{
+  SplitRegister * reg = user_data;
+  SRInfo *info;
+
+  if (reg == NULL)
+    return;
+
+  info = reg->sr_info;
+  if (!info)
+    return;
+
+  /* Release current strings. Will be reloaded at next reference. */
+  g_free (info->debit_str);
+  g_free (info->tdebit_str);
+  g_free (info->credit_str);
+  g_free (info->tcredit_str);
+
+  info->debit_str = NULL;
+  info->tdebit_str = NULL;
+  info->credit_str = NULL;
+  info->tcredit_str = NULL;
+}
+
 static void 
 gnc_split_register_init (SplitRegister *reg,
                          SplitRegisterType type,
@@ -2175,6 +2201,9 @@
 
   /* Register 'destroy' callback */
   gnc_ui_register_account_destroy_callback (gnc_ledger_display_destroy_by_account);
+  gnc_gconf_general_register_cb(KEY_ACCOUNTING_LABELS,
+				split_register_gconf_changed,
+				reg);
 
   reg->sr_info = NULL;
 
@@ -2391,6 +2420,9 @@
   if (!reg)
     return;
 
+  gnc_gconf_general_remove_cb(KEY_ACCOUNTING_LABELS,
+			      split_register_gconf_changed,
+			      reg);
   gnc_split_register_cleanup (reg);
 
   gnc_table_destroy (reg->table);
Index: split-register.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register.h,v
retrieving revision 1.16.4.5
retrieving revision 1.16.4.6
diff -Lsrc/register/ledger-core/split-register.h -Lsrc/register/ledger-core/split-register.h -u -r1.16.4.5 -r1.16.4.6
--- src/register/ledger-core/split-register.h
+++ src/register/ledger-core/split-register.h
@@ -401,9 +401,6 @@
 void gnc_split_register_show_present_divider (SplitRegister *reg,
                                               gboolean show_present);
 
-/** If use_red is TRUE, negative amounts will be printed in red. */
-void gnc_split_register_colorize_negative (gboolean use_red);
-
 /** Expand the current transaction if it is collapsed. */
 void gnc_split_register_expand_current_trans (SplitRegister *reg,
                                               gboolean expand);
Index: gnc-ledger-display.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/gnc-ledger-display.c,v
retrieving revision 1.24.4.4
retrieving revision 1.24.4.5
diff -Lsrc/register/ledger-core/gnc-ledger-display.c -Lsrc/register/ledger-core/gnc-ledger-display.c -u -r1.24.4.4 -r1.24.4.5
--- src/register/ledger-core/gnc-ledger-display.c
+++ src/register/ledger-core/gnc-ledger-display.c
@@ -37,6 +37,7 @@
 #include "gnc-book.h"
 #include "gnc-date.h"
 #include "gnc-engine-util.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-ledger-display.h"
 #include "gnc-ui-util.h"
 #include "split-register-control.h"
@@ -225,16 +226,14 @@
 #endif
 
   default:
-    style_string = gnc_lookup_multichoice_option("Register", 
-                                                 "Default Register Style",
-                                                 "ledger");
-
-    if (safe_strcmp(style_string, "ledger") == 0)
-      new_style = REG_STYLE_LEDGER;
+    style_string = gnc_gconf_get_string(GCONF_GENERAL_REGISTER,
+					"default_style", NULL);
+    if (safe_strcmp(style_string, "journal") == 0)
+      new_style = REG_STYLE_JOURNAL;
     else if (safe_strcmp(style_string, "auto_ledger") == 0)
       new_style = REG_STYLE_AUTO_LEDGER;
-    else if (safe_strcmp(style_string, "journal") == 0)
-      new_style = REG_STYLE_JOURNAL;
+    else
+      new_style = REG_STYLE_LEDGER;
     
     if (style_string != NULL)
       free(style_string);
@@ -377,7 +376,7 @@
 gnc_ledger_display_default_double_line (GNCLedgerDisplay *gld)
 {
   return (gld->use_double_line_default ||
-          gnc_lookup_boolean_option ("Register", "Double Line Mode", FALSE));
+          gnc_gconf_get_bool(GCONF_GENERAL_REGISTER, "double_line_mode", NULL));
 }
 
 /* Opens up a register window to display a single account */
@@ -613,7 +612,7 @@
 
 static void
 gnc_ledger_display_make_query (GNCLedgerDisplay *ld,
-                               gboolean show_all,
+                               gint limit,
                                SplitRegisterType type)
 {
   Account *leader;
@@ -643,8 +642,8 @@
    * configurable, or maybe we should go back a time range instead
    * of picking a number, or maybe we should be able to exclude
    * based on reconciled status. Anyway, this works for now. */
-  if (!show_all && (type != SEARCH_LEDGER))
-    xaccQuerySetMaxSplits (ld->query, 30);
+  if ((limit != 0) && (type != SEARCH_LEDGER))
+    xaccQuerySetMaxSplits (ld->query, limit);
 
   xaccQuerySetBook (ld->query, gnc_get_current_book());
 
@@ -681,7 +680,7 @@
                              gboolean is_template )
 {
   GNCLedgerDisplay *ld;
-  gboolean show_all;
+  gint limit;
   const char *class;
   GList *splits;
 
@@ -761,15 +760,13 @@
   ld->get_parent = NULL;
   ld->user_data = NULL;
 
-  show_all = gnc_lookup_boolean_option ("_+Advanced",
-                                        "Show All Transactions",
-                                        TRUE);
+  limit = gnc_gconf_get_float(GCONF_GENERAL_REGISTER, "max_transactions", NULL);
 
   /* set up the query filter */
   if (q)
     ld->query = xaccQueryCopy (q);
   else
-    gnc_ledger_display_make_query (ld, show_all, reg_type);
+    gnc_ledger_display_make_query (ld, limit, reg_type);
 
   ld->component_id = gnc_register_gui_component (class,
                                                  refresh_handler,
@@ -825,12 +822,11 @@
   if (!ld || ld->loading)
     return;
 
-  if (!gnc_split_register_full_refresh_ok (ld->reg))
-  {
     gnc_split_register_load_xfer_cells (ld->reg,
                                         gnc_ledger_display_leader (ld));
+
+  if (!gnc_split_register_full_refresh_ok (ld->reg))
     return;
-  }
 
   ld->loading = TRUE;
 
Index: split-register-model.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-model.c,v
retrieving revision 1.50.2.5
retrieving revision 1.50.2.6
diff -Lsrc/register/ledger-core/split-register-model.c -Lsrc/register/ledger-core/split-register-model.c -u -r1.50.2.5 -r1.50.2.6
--- src/register/ledger-core/split-register-model.c
+++ src/register/ledger-core/split-register-model.c
@@ -2064,10 +2064,34 @@
     *to = *from;
 }
 
+
+static void
+gnc_split_register_colorize_negative (GConfEntry *entry, gpointer unused)
+{
+  GConfValue *value;
+
+  value = gconf_entry_get_value(entry);
+  use_red_for_negative = gconf_value_get_bool(value);
+}
+
+
+static gpointer
+gnc_split_register_model_add_hooks (gpointer unused)
+{
+  gnc_gconf_general_register_cb(KEY_NEGATIVE_IN_RED,
+				gnc_split_register_colorize_negative,
+				NULL);
+  return NULL;
+}
+
+
 TableModel *
 gnc_split_register_model_new (void)
 {
   TableModel *model;
+  static GOnce once = G_ONCE_INIT;
+
+  g_once(&once, gnc_split_register_model_add_hooks, NULL);
 
   model = gnc_table_model_new ();
 
@@ -2533,9 +2557,3 @@
 
   return model;
 }
-
-void
-gnc_split_register_colorize_negative (gboolean use_red)
-{
-  use_red_for_negative = use_red;
-}
Index: split-register-load.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-load.c,v
retrieving revision 1.23.4.3
retrieving revision 1.23.4.4
diff -Lsrc/register/ledger-core/split-register-load.c -Lsrc/register/ledger-core/split-register-load.c -u -r1.23.4.3 -r1.23.4.4
--- src/register/ledger-core/split-register-load.c
+++ src/register/ledger-core/split-register-load.c
@@ -554,7 +554,7 @@
 
   name = xaccAccountGetFullName (account, gnc_get_account_separator ());
   if (NULL == name) return NULL;
-  gnc_combo_cell_add_menu_item (cell, name);
+  gnc_combo_cell_add_account_menu_item (cell, name);
   g_free(name);
 
   return NULL;
Index: combocell.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/combocell.h,v
retrieving revision 1.4.6.1
retrieving revision 1.4.6.2
diff -Lsrc/register/register-core/combocell.h -Lsrc/register/register-core/combocell.h -u -r1.4.6.1 -r1.4.6.2
--- src/register/register-core/combocell.h
+++ src/register/register-core/combocell.h
@@ -59,6 +59,11 @@
 /** Add a menu item to the list. */
 void         gnc_combo_cell_add_menu_item (ComboCell *cell, char * menustr);
 
+/** Add a 'account name' menu item to the list. When testing for
+ *  equality with the currently selected item, this function will
+ *  ignore the characters normally used to separate account names. */
+void         gnc_combo_cell_add_account_menu_item (ComboCell *cell, char * menustr);
+
 /** Determines whether the cell will accept strings not in the
  * menu. Defaults to strict, i.e., only menu items are accepted. */
 void         gnc_combo_cell_set_strict (ComboCell *cell, gboolean strict);
@@ -76,10 +81,6 @@
  * all available space. FALSE by default. */
 void         gnc_combo_cell_set_autosize (ComboCell *cell, gboolean autosize);
 
-/** Determines whether combocells are automatically raised upon typing.
- * Defaults to false. This is a 'class' method. */
-void         gnc_combo_cell_set_autopop (gboolean auto_pop_combos);
-
 /** Tell the combocell to use a shared QuickFill object.  Using this routine
  *  can dramatically improve performance when creating combocells with a 
  *  large number of entries.  For example, users with thousands of accounts
Index: prefs.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/prefs.scm,v
retrieving revision 1.28.4.9
retrieving revision 1.28.4.10
diff -Lsrc/app-utils/prefs.scm -Lsrc/app-utils/prefs.scm -u -r1.28.4.9 -r1.28.4.10
--- src/app-utils/prefs.scm
+++ src/app-utils/prefs.scm
@@ -183,45 +183,6 @@
   "e" (N_ "The default date format used for fancy printed dates") #f))
 
 
-;;; Register options
-
-(gnc:register-configuration-option
- (gnc:make-multichoice-option
-  (N_ "Register") (N_ "Default Register Style")
-  "a" (N_ "Default style for register windows")
-  'ledger
-  (list (list->vector
-         (list 'ledger
-               (N_ "Basic Ledger")
-               (N_ "Show transactions on one or two lines")))
-        (list->vector
-         (list 'auto_ledger
-               (N_ "Auto-Split Ledger")
-               (N_ "Show transactions on one or two lines \
-and expand the current transaction")))
-        (list->vector
-         (list 'journal
-               (N_ "Transaction Journal")
-               (N_ "Show expanded transactions with all splits"))))))
-
-(gnc:register-configuration-option     
- (gnc:make-simple-boolean-option
-  (N_ "Register") (N_ "Double Line Mode")
-  "aa" (N_ "Show two lines of information for each transaction") #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Register") (N_ "'Enter' moves to blank transaction")
-  "g" (N_ "If selected, move to the blank transaction after the user presses \
-'Enter'. Otherwise, move down one row.") #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Register") (N_ "Confirm before changing reconciled")
-  "h" (N_ "If selected, use a dialog to confirm a change to a reconciled \
-transaction.") #t))
-
-
 ;;; Summarybar Options
 
 (gnc:register-configuration-option
@@ -287,130 +248,15 @@
   "a" (N_ "Allow modification of less commonly used settings.") #f))
 
 (gnc:register-configuration-option
- (gnc:make-multichoice-option
-  (N_ "General") (N_ "Toolbar Buttons")
-  "b" (N_ "Choose whether to display icons, text, or both for toolbar buttons")
-  'icons_and_text
-  (list (list->vector
-         (list 'icons_and_text
-               (N_ "Icons and Text")
-               (N_ "Show both icons and text")))
-        (list->vector
-         (list 'icons_only
-               (N_ "Icons only")
-               (N_ "Show icons only")))
-        (list->vector
-         (list 'text_only
-               (N_ "Text only")
-               (N_ "Show text only"))))))
-
-(gnc:register-configuration-option
- (gnc:make-radiobutton-option
-  (N_ "Accounts") (N_ "Account Separator")
-  "c" (N_ "The character used to separate fully-qualified account names")
-  'colon
-  (list (list->vector
-         (list 'colon
-               (N_ ": (Colon)")
-               (N_ "Income:Salary:Taxable")))
-        (list->vector
-         (list 'slash
-               (N_ "/ (Slash)")
-               (N_ "Income/Salary/Taxable")))
-        (list->vector
-         (list 'backslash
-               (N_ "\\ (Backslash)")
-               (N_ "Income\\Salary\\Taxable")))
-        (list->vector
-         (list 'dash
-               (N_ "- (Dash)")
-               (N_ "Income-Salary-Taxable")))
-        (list->vector
-         (list 'period
-               (N_ ". (Period)")
-               (N_ "Income.Salary.Taxable"))))))
-
-(gnc:register-configuration-option
- (gnc:make-multichoice-option
-  (N_ "Accounts") (N_ "Reversed-balance account types")
-  "d" (N_ "The types of accounts for which balances are sign-reversed")
- 'credit
-  (list (list->vector
-         (list 'income-expense
-               (N_ "Income & Expense")
-               (N_ "Reverse Income and Expense Accounts")))
-        (list->vector
-         (list 'credit
-               (N_ "Credit Accounts")
-               (N_ "Reverse Credit Card, Payable, Liability, Equity, and Income \
-Accounts")))
-        (list->vector
-         (list 'none
-               (N_ "None")
-               (N_ "Don't reverse any accounts"))))))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Accounts") (N_ "Use accounting labels")
-  "e" (N_ "Only use 'debit' and 'credit' instead of informal synonyms") #f))
-
-(gnc:register-configuration-option
  (gnc:make-simple-boolean-option
   (N_ "General") (N_ "Display \"Tip of the Day\"")
   "f" (N_ "Display hints for using GnuCash at startup") #t))
 
 (gnc:register-configuration-option
  (gnc:make-simple-boolean-option
-  (N_ "General") (N_ "Display negative amounts in red")
-  "g" (N_ "Display negative amounts in red") #t))
-
-; this option also changes the next option so that its
-; selectability matches the state of this option.
-(gnc:register-configuration-option
- (gnc:make-complex-boolean-option
-  (N_ "General") (N_ "Automatic Decimal Point")
-  "h" 
-  (N_ "Automatically insert a decimal point into values that are entered \
-without one.") 
-  #f #f
-  (lambda (x) (gnc:set-option-selectable-by-name "General"
-                                                 "Auto Decimal Places"
-                                                 x))))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  (N_ "General") (N_ "Auto Decimal Places")
-  "i" (N_ "How many automatic decimal places will be filled in.")
-    ;; current range is 1-8 with default from the locale
-    (gnc:locale-decimal-places) ;; default
-    1.0 ;; lower bound
-    8.0 ;; upper bound
-    0.0 ;; number of decimals used for this range calculation
-    1.0 ;; step size
-  ))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
   (N_ "General") (N_ "No account list setup on new file")
   "j" (N_ "Don't popup the new account list dialog when you choose \"New File\" from the \"File\" menu") #f))
 
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "General") (N_ "Use file compression")
-  "k" (N_ "Compress the data file.")
-  #f))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  (N_ "General") (N_ "Days to retain log files")
-  "k" (N_ "Delete old log/backup files after this many days (0 = never).")
-    30.0 ;; default
-    0.0 ;; lower bound
-    99999.0 ;; upper bound
-    0.0 ;; number of decimals used for this range calculation
-    1.0 ;; step size
-  ))
-
 ;; QIF Import options. 
 
 (gnc:register-configuration-option
@@ -509,33 +355,6 @@
 ;;; Advanced Options
 
 (gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "_+Advanced") (N_ "Save Window Geometry")
-  "a" (N_ "Save window sizes and positions.") #t))
-
-(gnc:register-configuration-option     
- (gnc:make-simple-boolean-option
-  (N_ "_+Advanced") (N_ "Auto-Raise Lists")
-  "e" (N_ "Automatically raise the list of accounts or actions during input.")
-  #t))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "_+Advanced") (N_ "Show All Transactions")
-  "f" (N_ "By default, show every transaction in an account.") #t))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  (N_ "_+Advanced") (N_ "Number of Rows")
-  "g" (N_ "Default number of register rows to display.")
-   20.0 ;; default
-    1.0 ;; lower bound
-  200.0 ;; upper bound
-    0.0 ;; number of decimals
-    1.0 ;; step size
-  ))
-
-(gnc:register-configuration-option
  (gnc:make-number-range-option
   (N_ "_+Advanced") (N_ "New Search Limit")
   "j" (N_ "Default to 'new search' if fewer than this number of items is returned.")
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/Makefile.am,v
retrieving revision 1.29.4.9
retrieving revision 1.29.4.10
diff -Lsrc/app-utils/Makefile.am -Lsrc/app-utils/Makefile.am -u -r1.29.4.9 -r1.29.4.10
--- src/app-utils/Makefile.am
+++ src/app-utils/Makefile.am
@@ -7,6 +7,7 @@
   -I${top_srcdir}/src \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/calculation \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   ${GUILE_INCS} \
   ${G_WRAP_COMPILE_ARGS} \
Index: guile-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/guile-util.c,v
retrieving revision 1.9.4.2
retrieving revision 1.9.4.3
diff -Lsrc/app-utils/guile-util.c -Lsrc/app-utils/guile-util.c -u -r1.9.4.2 -r1.9.4.3
--- src/app-utils/guile-util.c
+++ src/app-utils/guile-util.c
@@ -26,6 +26,7 @@
 #include "gnc-engine-util.h"
 #include "engine-helpers.h"
 #include "glib-helpers.h"
+#include "gnc-gconf-utils.h"
 #include "guile-util.h"
 #include "messages.h"
 
@@ -1096,7 +1097,7 @@
 
   initialize_scm_functions();
 
-  if (gnc_lookup_boolean_option("Accounts", "Use accounting labels", FALSE))
+  if (gnc_gconf_get_bool(GCONF_GENERAL, KEY_ACCOUNTING_LABELS, NULL))
     return g_strdup(_("Debit"));
 
   if ((account_type < NO_TYPE) || (account_type >= NUM_ACCOUNT_TYPES))
@@ -1141,7 +1142,7 @@
 
   initialize_scm_functions();
 
-  if (gnc_lookup_boolean_option("Accounts", "Use accounting labels", FALSE))
+  if (gnc_gconf_get_bool(GCONF_GENERAL, KEY_ACCOUNTING_LABELS, NULL))
     return g_strdup(_("Credit"));
 
   if ((account_type < NO_TYPE) || (account_type >= NUM_ACCOUNT_TYPES))
Index: gnc-ui-util.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-ui-util.h,v
retrieving revision 1.22.2.9
retrieving revision 1.22.2.10
diff -Lsrc/app-utils/gnc-ui-util.h -Lsrc/app-utils/gnc-ui-util.h -u -r1.22.2.9 -r1.22.2.10
--- src/app-utils/gnc-ui-util.h
+++ src/app-utils/gnc-ui-util.h
@@ -48,8 +48,6 @@
 
 
 /* User Settings ****************************************************/
-gboolean gnc_color_deficits (void);
-
 char gnc_get_account_separator (void);
 
 gboolean gnc_reverse_balance(Account *account);
@@ -294,14 +292,9 @@
 			 char group_separator, char *group, char *ignore_list,
 			 gnc_numeric *result, char **endstr);
 
-/* Automatic decimal place conversion *******************************/
-
-/* enable/disable the auto decimal option */
-void gnc_set_auto_decimal_enabled(gboolean enabled);
-
-/* set how many auto decimal places to use */
-void gnc_set_auto_decimal_places(int places);
+/* Initialization ***************************************************/
 
+void gnc_ui_util_init (void);
 
 /* Missing functions ************************************************/
 
Index: gnc-ui-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-ui-util.c,v
retrieving revision 1.39.2.7
retrieving revision 1.39.2.8
diff -Lsrc/app-utils/gnc-ui-util.c -Lsrc/app-utils/gnc-ui-util.c -u -r1.39.2.7 -r1.39.2.8
--- src/app-utils/gnc-ui-util.c
+++ src/app-utils/gnc-ui-util.c
@@ -42,6 +42,7 @@
 #include "gnc-engine-util.h"
 #include "gnc-engine.h"
 #include "gnc-euro.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-module.h"
 #include "gnc-session.h"
 #include "gnc-ui-util.h"
@@ -57,27 +58,9 @@
 static int auto_decimal_places = 2;    /* default, can be changed */
 
 static gboolean reverse_balance_inited = FALSE;
-static SCM reverse_balance_callback_id = SCM_UNDEFINED;
 static gboolean reverse_type[NUM_ACCOUNT_TYPES];
 
 /********************************************************************\
- * gnc_color_deficits                                               *
- *   return a boolean value indicating whether deficit quantities   *
- *   should be displayed using the gnc_get_deficit_color().         *
- *                                                                  *
- * Args: none                                                       *
- * Returns: boolean deficit color indicator                         *
- \*******************************************************************/
-gboolean
-gnc_color_deficits (void)
-{
-  return gnc_lookup_boolean_option ("General",
-                                    "Display negative amounts in red",
-                                    TRUE);
-}
-
-
-/********************************************************************\
  * gnc_get_account_separator                                        *
  *   returns the current account separator character                *
  *                                                                  *
@@ -90,11 +73,9 @@
   char separator = ':';
   char *string;
 
-  string = gnc_lookup_multichoice_option("Accounts",
-                                         "Account Separator",
-                                         "colon");
+  string = gnc_gconf_get_string(GCONF_GENERAL, KEY_ACCOUNT_SEPARATOR, NULL);
 
-  if (safe_strcmp(string, "colon") == 0)
+  if (!string || safe_strcmp(string, "colon") == 0)
     separator = ':';
   else if (safe_strcmp(string, "slash") == 0)
     separator = '/';
@@ -121,56 +102,36 @@
   for (i = 0; i < NUM_ACCOUNT_TYPES; i++)
     reverse_type[i] = FALSE;
 
-  choice = gnc_lookup_multichoice_option ("Accounts",
-                                          "Reversed-balance account types",
-                                          "credit");
+  choice = gnc_gconf_get_string(GCONF_GENERAL, "reversed_accounts", NULL);
 
-  if (safe_strcmp (choice, "income-expense") == 0)
+  if (safe_strcmp (choice, "none") == 0)
+  {
+  }
+  else if (safe_strcmp (choice, "income_expense") == 0)
   {
     reverse_type[INCOME]  = TRUE;
     reverse_type[EXPENSE] = TRUE;
   }
-  else if (safe_strcmp (choice, "credit") == 0)
+  else
   {
+    if (safe_strcmp (choice, "credit") != 0)
+      PERR("bad value '%s'", choice);
     reverse_type[LIABILITY] = TRUE;
     reverse_type[PAYABLE]   = TRUE;
     reverse_type[EQUITY]    = TRUE;
     reverse_type[INCOME]    = TRUE;
     reverse_type[CREDIT]    = TRUE;
   }
-  else if (safe_strcmp (choice, "none") == 0)
-  {
-  }
-  else
-  {
-    PERR("bad value\n");
-
-    reverse_type[INCOME]  = TRUE;
-    reverse_type[EXPENSE] = TRUE;
-  }
 
   if (choice != NULL)
     free (choice);
 }
 
 static void
-gnc_configure_reverse_balance_cb (gpointer not_used)
-{
-  gnc_configure_reverse_balance ();
-  gnc_gui_refresh_all ();
-}
-
-static void
 gnc_reverse_balance_init (void)
 {
   gnc_configure_reverse_balance ();
-
-  reverse_balance_callback_id = 
-    gnc_register_option_change_callback (gnc_configure_reverse_balance_cb,
-                                         NULL, "Accounts",
-                                         "Reversed-balance account types");
-
-  reverse_balance_inited = (reverse_balance_callback_id != SCM_UNDEFINED);
+  reverse_balance_inited = TRUE;
 }
 
 gboolean
@@ -1989,17 +1950,38 @@
 }
 
 /* enable/disable the auto_decimal_enabled option */
-void
-gnc_set_auto_decimal_enabled(gboolean enabled)
+static void
+gnc_set_auto_decimal_enabled (GConfEntry *entry, gpointer user_data)
 {
-  auto_decimal_enabled = enabled;
+  GConfValue *value;
+
+  value = gconf_entry_get_value(entry);
+  auto_decimal_enabled = gconf_value_get_bool(value);
 }
 
 /* set the number of auto decimal places to use */
+static void
+gnc_set_auto_decimal_places  (GConfEntry *entry, gpointer user_data)
+{
+  GConfValue *value;
+
+  value = gconf_entry_get_value(entry);
+  auto_decimal_places = gconf_value_get_float(value);
+}
+
 void
-gnc_set_auto_decimal_places( int places )
+gnc_ui_util_init (void)
 {
-  auto_decimal_places = places;
+  gnc_gconf_general_register_cb("reversed_accounts",
+				(GncGconfGeneralCb)gnc_configure_reverse_balance,
+				NULL);
+  gnc_gconf_general_register_cb("auto_decimal_point",
+				gnc_set_auto_decimal_enabled,
+				NULL);
+  gnc_gconf_general_register_cb("auto_decimal_places",
+				gnc_set_auto_decimal_places,
+				NULL);
+ 
 }
 
 /* These implementations are rather lame. */
Index: apps_gnucash_general.schemas
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/schemas/Attic/apps_gnucash_general.schemas,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -Lsrc/gnome/schemas/apps_gnucash_general.schemas -Lsrc/gnome/schemas/apps_gnucash_general.schemas -u -r1.1.2.2 -r1.1.2.3
--- src/gnome/schemas/apps_gnucash_general.schemas
+++ src/gnome/schemas/apps_gnucash_general.schemas
@@ -3,6 +3,161 @@
   <schemalist>
 
     <schema>
+      <key>/schemas/apps/gnucash/general/save_window_geometry</key>
+      <applyto>/apps/gnucash/general/save_window_geometry</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>TRUE</default>
+      <locale name="C">
+        <short>Save window sizes and locations.</short>
+        <long>
+	  Save the size and location of each dialog window when it is
+	  closed.  The sizes and locations of content windows will be
+	  remembered when you quit gnucash.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/account_separator</key>
+      <applyto>/apps/gnucash/account_separator</applyto>
+      <owner>gnucash</owner>
+      <type>string</type>
+      <default>colon</default>
+      <locale name="C">
+        <short>What character to use between account names</short>
+        <long>
+	  This setting determines the character that will be used
+	  between components of an account name.  The legal settings
+	  are "colon" "slash", "backslash", "dash" and "period".
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/general/file_compression</key>
+      <applyto>/apps/gnucash/general/file_compression</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>TRUE</default>
+      <locale name="C">
+        <short>Compress the data file.</short>
+        <long>Compress the data file.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/general/negative_in_red</key>
+      <applyto>/apps/gnucash/general/negative_in_red</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>TRUE</default>
+      <locale name="C">
+        <short>Display negative amounts in red</short>
+        <long>Display negative amounts in red</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/general/auto_decimal_point</key>
+      <applyto>/apps/gnucash/general/auto_decimal_point</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>FALSE</default>
+      <locale name="C">
+        <short>Automatically insert a decimal point.</short>
+        <long>
+	  If TRUE, Gnucash will automatically insert a decimal point
+	  into values that are entered without one.  If FALSE, Gnucash
+	  will not modify entered numbers.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/general/auto_decimal_places</key>
+      <applyto>/apps/gnucash/general/auto_decimal_places</applyto>
+      <owner>gnucash</owner>
+      <type>float</type>
+      <default>2.0</default>
+      <locale name="C">
+        <short>How many automatic decimal places will be filled in.</short>
+        <long>How many automatic decimal places will be filled in.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/general/retain_days</key>
+      <applyto>/apps/gnucash/general/retain_days</applyto>
+      <owner>gnucash</owner>
+      <type>float</type>
+      <default>30.0</default>
+      <locale name="C">
+        <short>Delete old log/backup files after this many days (0 = never).</short>
+        <long>Delete old log/backup files after this many days (0 = never).</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/reversed_accounts</key>
+      <applyto>/apps/gnucash/reversed_accounts</applyto>
+      <owner>gnucash</owner>
+      <type>string</type>
+      <default>credit</default>
+      <locale name="C">
+        <short>Accounts to reverse the balance</short>
+        <long>
+	  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.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/general/toolbar_style</key>
+      <applyto>/apps/gnucash/general/toolbar_style</applyto>
+      <owner>gnucash</owner>
+      <type>string</type>
+      <default>system</default>
+      <locale name="C">
+        <short>How to draw the toolbar.</short>
+        <long>
+	  This setting controls how the toolbar is drawn.  If set to
+	  "system" then GnuCash will use the desktop setting for how
+	  to draw toolbar buttons.  If set to "icon" then only icons
+	  will be show on toolbar buttons..  If set to "text" only the
+	  labels will be shown.  If set to "both" then both icons and
+	  labels will be shown.  If set to "both-horiz" then icons
+	  will be shown for all buttons with labels added on important
+	  buttons.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/general/use_accounting_labels</key>
+      <applyto>/apps/gnucash/general/use_accounting_labels</applyto>
+      <owner>gnucash</owner>
+      <type>boolean</type>
+      <default>FALSE</default>
+      <locale name="C">
+        <short>Use formal account labels.</short>
+        <long>
+	  Setting this value to TRUE tells Gnucash to use the formal
+	  accounting labels "Credit" and "Debit" when designating
+	  fields on screen.  If false, Gnucash will use informal
+	  labels such as Increase/Decrease, "Funds In"/"Funds Out",
+	  etc.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/gnucash/general/register/use_theme_colors</key>
       <applyto>/apps/gnucash/general/register/use_theme_colors</applyto>
       <owner>gnucash</owner>
@@ -21,32 +176,43 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/gnucash/general/register/use_new_window</key>
-      <applyto>/apps/gnucash/general/register/use_new_window</applyto>
+      <key>/schemas/apps/gnucash/general/register/enter_moves_to_end</key>
+      <applyto>/apps/gnucash/general/register/enter_moves_to_end</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>FALSE</default>
       <locale name="C">
-        <short>Create a new window for each new register.</short>
+        <short>"Enter" key moves to bottom of register.</short>
         <long>
-	  Set this value to TRUE to have gnucash open each new
-	  register in its own window.  Set to FALSE to have gnucash
-	  open new registers as tabs in the front window.
+	  If set to TRUE, pressing the enter key will move to the
+	  bottom of the register.
 	</long>
       </locale>
     </schema>
 
     <schema>
-      <key>/schemas/apps/gnucash/general/report/use_new_window</key>
-      <applyto>/apps/gnucash/general/report/use_new_window</applyto>
+      <key>/schemas/apps/gnucash/general/register/auto_raise_lists</key>
+      <applyto>/apps/gnucash/general/register/auto_raise_lists</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>TRUE</default>
+      <locale name="C">
+        <short>Automatically raise the list of accounts or actions during input.</short>
+        <long>Automatically raise the list of accounts or actions during input.</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/general/register/use_new_window</key>
+      <applyto>/apps/gnucash/general/register/use_new_window</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>FALSE</default>
       <locale name="C">
-        <short>Create a new window for each new report.</short>
+        <short>Create a new window for each new register.</short>
         <long>
 	  Set this value to TRUE to have gnucash open each new
-	  report in its own window.  Set to FALSE to have gnucash
+	  register in its own window.  Set to FALSE to have gnucash
 	  open new registers as tabs in the front window.
 	</long>
       </locale>
@@ -69,8 +235,8 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/gnucash/general/register/use_horizontal_lines</key>
-      <applyto>/apps/gnucash/general/register/use_horizontal_lines</applyto>
+      <key>/schemas/apps/gnucash/general/register/draw_horizontal_lines</key>
+      <applyto>/apps/gnucash/general/register/draw_horizontal_lines</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>TRUE</default>
@@ -85,8 +251,8 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/gnucash/general/register/use_vertical_lines</key>
-      <applyto>/apps/gnucash/general/register/use_vertical_lines</applyto>
+      <key>/schemas/apps/gnucash/general/register/draw_vertical_lines</key>
+      <applyto>/apps/gnucash/general/register/draw_vertical_lines</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>TRUE</default>
@@ -100,5 +266,58 @@
       </locale>
     </schema>
 
+    <schema>
+      <key>/schemas/apps/gnucash/general/register/default_style</key>
+      <applyto>/apps/gnucash/general/register/default_style</applyto>
+      <owner>gnucash</owner>
+      <type>string</type>
+      <default>ledger</default>
+      <locale name="C">
+        <short>Use this style when opening a new register.</short>
+        <long>
+	  This field specifies the type of ledger to use when first
+	  opening a register window.  Legal 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.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/general/register/double_line_mode</key>
+      <applyto>/apps/gnucash/general/register/double_line_mode</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>FALSE</default>
+      <locale name="C">
+        <short>Show two lines of information for each transaction.</short>
+        <long>
+	  Show two lines of information for each transaction in a
+	  register.  This is the default setting for when a register
+	  is first opened.  The setting can be changed at any time via
+	  the "View->Double Line" menu item.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/general/report/use_new_window</key>
+      <applyto>/apps/gnucash/general/report/use_new_window</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>FALSE</default>
+      <locale name="C">
+        <short>Create a new window for each new report.</short>
+        <long>
+	  Set this value to TRUE to have gnucash open each new
+	  report in its own window.  Set to FALSE to have gnucash
+	  open new registers as tabs in the front window.
+	</long>
+      </locale>
+    </schema>
+
   </schemalist>
 </gconfschemafile>
Index: apps_gnucash_dialog_common.schemas
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/schemas/Attic/apps_gnucash_dialog_common.schemas,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -Lsrc/gnome/schemas/apps_gnucash_dialog_common.schemas -Lsrc/gnome/schemas/apps_gnucash_dialog_common.schemas -u -r1.1.2.2 -r1.1.2.3
--- src/gnome/schemas/apps_gnucash_dialog_common.schemas
+++ src/gnome/schemas/apps_gnucash_dialog_common.schemas
@@ -117,5 +117,20 @@
       </locale>
     </schema>
 
+
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/new_hierarchy/show_on_new_file</key>
+      <applyto>/apps/gnucash/dialogs/new_hierarchy/show_on_new_file</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>TRUE</default>
+      <locale name="C">
+        <short>Show the new hierarchy dialog whenever the "New File" menu item is chosen.</short>
+        <long>
+	 Show the new hierarchy dialog whenever the "New File" menu item is chosen.
+	</long>
+      </locale>
+    </schema>
+
   </schemalist>
 </gconfschemafile>
Index: gnucash-sheet.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-sheet.c,v
retrieving revision 1.19.4.14
retrieving revision 1.19.4.15
diff -Lsrc/register/register-gnome/gnucash-sheet.c -Lsrc/register/register-gnome/gnucash-sheet.c -u -r1.19.4.14 -r1.19.4.15
--- src/register/register-gnome/gnucash-sheet.c
+++ src/register/register-gnome/gnucash-sheet.c
@@ -1432,9 +1432,9 @@
 	sheet->use_theme_colors = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
 						     "use_theme_colors", NULL);
 	sheet->use_horizontal_lines = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
-							 "use_horizontal_lines", NULL);
+							 "draw_horizontal_lines", NULL);
 	sheet->use_vertical_lines = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
-						       "use_vertical_lines", NULL);
+						       "draw_vertical_lines", NULL);
 }
 
 void
Index: combocell-gnome.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/combocell-gnome.c,v
retrieving revision 1.11.4.8
retrieving revision 1.11.4.9
diff -Lsrc/register/register-gnome/combocell-gnome.c -Lsrc/register/register-gnome/combocell-gnome.c -u -r1.11.4.8 -r1.11.4.9
--- src/register/register-gnome/combocell-gnome.c
+++ src/register/register-gnome/combocell-gnome.c
@@ -38,7 +38,7 @@
 
 #include "QuickFill.h"
 #include "combocell.h"
-#include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 #include "gnucash-item-edit.h"
 #include "gnucash-item-list.h"
 #include "gnucash-sheet.h"
@@ -85,14 +85,35 @@
 static void gnc_combo_cell_leave (BasicCell *bcell);
 static void gnc_combo_cell_destroy (BasicCell *bcell);
 
+static GOnce auto_pop_init_once = G_ONCE_INIT;
 static gboolean auto_pop_combos = FALSE;
 
 
+static void
+gnc_combo_cell_set_autopop (GConfEntry *entry, gpointer user_data)
+{
+	GConfValue *value;
+
+	value = gconf_entry_get_value(entry);
+	auto_pop_combos = gconf_value_get_bool(value);
+}
+
+static gpointer
+gnc_combo_cell_autopop_init (gpointer unused)
+{
+	gnc_gconf_general_register_cb("auto_raise_lists",
+				      gnc_combo_cell_set_autopop,
+				      NULL);
+	return NULL;
+}
+
 BasicCell *
 gnc_combo_cell_new (void)
 {
 	ComboCell * cell;
 
+	g_once(&auto_pop_init_once, gnc_combo_cell_autopop_init, NULL);
+
         cell = g_new0 (ComboCell, 1);
 
 	gnc_combo_cell_init (cell);
@@ -451,6 +472,54 @@
         box->list_sorted = FALSE;
 }
 
+void 
+gnc_combo_cell_add_account_menu_item (ComboCell *cell, char * menustr)
+{ 
+	PopBox *box;
+	gchar *menu_copy, *value_copy;
+
+	if (cell == NULL)
+		return;
+	if (menustr == NULL)
+		return;
+
+	box = cell->cell.gui_private;
+	box->menustrings = g_list_append (box->menustrings,
+                                          g_strdup (menustr));
+
+	gnc_combo_sync_edit_list(box);
+
+	if (box->item_list != NULL)
+        {
+                block_list_signals (cell);
+
+                gnc_item_list_append (box->item_list, menustr);
+                if (cell->cell.value) {
+		    menu_copy = g_strdelimit(g_strdup(menustr), "-:/\\.", ' ');
+		    value_copy =
+			g_strdelimit(g_strdup(cell->cell.value), "-:/\\.", ' ');
+		    if (strcmp (menu_copy, value_copy) == 0) {
+			gnc_combo_cell_set_value (cell, menustr);
+                        gnc_item_list_select (box->item_list, menustr);
+		    }
+		    g_free(value_copy);
+		    g_free(menu_copy);
+		}
+                unblock_list_signals (cell);
+        }
+	else
+		box->list_in_sync = FALSE;
+
+        /* If we're going to be using a pre-fab quickfill, 
+         * then don't fill it in here */
+        if (FALSE == box->use_quickfill_cache)
+        {
+                gnc_quickfill_insert (box->qf, menustr, QUICKFILL_ALPHA);
+        }
+
+        box->list_sorted = FALSE;
+}
+
 void
 gnc_combo_cell_set_value (ComboCell *cell, const char *str)
 {
@@ -921,12 +990,6 @@
         box->autosize = autosize;
 }
 
-void
-gnc_combo_cell_set_autopop (gboolean auto_pop_combos_arg)
-{
-        auto_pop_combos = auto_pop_combos_arg;
-}
-
 /*
   Local Variables:
   c-basic-offset: 8


More information about the gnucash-changes mailing list