[Gnucash-changes] Remember geometry of more dialogs and restore it when the dialog is next

David Hampton hampton at cvs.gnucash.org
Thu Apr 28 11:15:58 EDT 2005


Log Message:
-----------
Remember geometry of more dialogs and restore it when the dialog is
next used.  Migrate most of Gnucash's hidden preferences over to
gconf.  Collapse current knowledge of the desktop gconf keys into a
single file.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash:
        ChangeLog
        GNOME2_STATUS
        configure.in
    gnucash/src/app-file:
        gnc-file.c
    gnucash/src/app-utils:
        prefs.scm
    gnucash/src/business/business-gnome:
        Makefile.am
        business-gnome-utils.h
        dialog-customer.c
        dialog-employee.c
        dialog-invoice.c
        dialog-job.c
        dialog-order.c
        dialog-vendor.c
    gnucash/src/business/business-utils:
        business-prefs.scm
    gnucash/src/core-utils:
        gnc-gconf-utils.h
    gnucash/src/gnome:
        dialog-commodities.c
        dialog-find-transactions.c
        dialog-new-user.c
        dialog-price-edit-db.c
        dialog-price-editor.c
        dialog-scheduledxaction.c
        dialog-sxsincelast.c
        dialog-tax-info.c
        dialog-totd.c
        gnc-plugin-page-account-tree.c
        window-register.c
    gnucash/src/gnome/glade:
        price.glade
    gnucash/src/gnome/schemas:
        Makefile.am
        apps_gnucash_dialog_commodities.schemas
        apps_gnucash_dialog_prices.schemas
    gnucash/src/gnome-search:
        dialog-search.c
        dialog-search.h
    gnucash/src/gnome-utils:
        dialog-account.c
        dialog-utils.c
        dialog-utils.h
        gnc-tree-view-account.c
        gnc-tree-view-account.h
    gnucash/src/import-export/hbci:
        Makefile.am
        hbci-interaction.c
        hbci.scm
    gnucash/src/import-export/log-replay:
        Makefile.am
        gnc-log-replay.c
    gnucash/src/import-export/mt940:
        gnc-mt940-import.c
    gnucash/src/import-export/ofx:
        gnc-ofx-import.c
    gnucash/src/import-export/qif-import:
        druid-qif-import.c
    gnucash/src/register/ledger-core:
        split-register.h
    gnucash/src/register/register-gnome:
        Makefile.am
        table-gnome.c
    gnucash/src/scm:
        main.scm

Added Files:
-----------
    gnucash/src/business/business-gnome/schemas:
        .cvsignore
        Makefile.am
        apps_gnucash_dialog_business_common.schemas
    gnucash/src/gnome/schemas:
        apps_gnucash_dialog_common.schemas
        apps_gnucash_window_pages_register.schemas
    gnucash/src/import-export/hbci/schemas:
        .cvsignore
        Makefile.am
        apps_gnucash_dialog_hbci.schemas

Revision Data
-------------
Index: gnc-tree-view-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-tree-view-account.c,v
retrieving revision 1.1.2.16
retrieving revision 1.1.2.17
diff -Lsrc/gnome-utils/gnc-tree-view-account.c -Lsrc/gnome-utils/gnc-tree-view-account.c -u -r1.1.2.16 -r1.1.2.17
--- src/gnome-utils/gnc-tree-view-account.c
+++ src/gnome-utils/gnc-tree-view-account.c
@@ -1,7 +1,7 @@
 /********************************************************************\
  * gnc-tree-view-account.c -- GtkTreeView implementation to display *
  *                            accounts in a GtkTreeView.            *
- * Copyright (C) 2003 David Hampton <hampton at employees.org>         *
+ * Copyright (C) 2003,2005 David Hampton <hampton at employees.org>    *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -59,7 +59,7 @@
 };
 
 /* Defined at the end of the file */
-static gnc_view_column gnc_tree_view_account_defaults[];
+static gnc_view_column view_column_defaults[];
 
 
 /************************************************************/
@@ -404,7 +404,7 @@
   gnc_tree_view_account_init_view_info(&account_view->priv->avi);
 
   gnc_tree_view_common_create_columns (tree_view, "Accounts", GNC_STOCK_ACCOUNT,
-				       gnc_tree_view_account_defaults);
+				       view_column_defaults);
 
   gtk_widget_show(GTK_WIDGET(tree_view));
   LEAVE("%p", tree_view);
@@ -579,7 +579,7 @@
   g_return_val_if_fail ((pref_name != NULL), GNC_TREE_MODEL_ACCOUNT_COL_NAME);
 
   for (i = 0; i <= GNC_TREE_MODEL_ACCOUNT_COL_LAST_VISIBLE; i++)
-    if (safe_strcmp(gnc_tree_view_account_defaults[i].pref_name, pref_name) == 0)
+    if (safe_strcmp(view_column_defaults[i].pref_name, pref_name) == 0)
       return i;
   return(GNC_TREE_MODEL_ACCOUNT_COL_NAME);
 }
@@ -589,7 +589,7 @@
 {
   g_return_val_if_fail ((field >= 0) && (field <= GNC_TREE_MODEL_ACCOUNT_COL_LAST_VISIBLE), NULL);
 
-  return(gettext(gnc_tree_view_account_defaults[field].field_name));
+  return(gettext(view_column_defaults[field].field_name));
 }
 
 
@@ -1197,10 +1197,29 @@
 
 
 /************************************************************/
+/*          Account Tree View Get/Save Settings             */
+/************************************************************/
+
+void
+gnc_tree_view_account_save_settings (GncTreeViewAccount *view, const gchar *section)
+{
+  gnc_tree_view_common_save_settings (GTK_TREE_VIEW(view), section,
+				      view_column_defaults);
+}
+
+void
+gnc_tree_view_account_restore_settings (GncTreeViewAccount *view, const gchar *section)
+{
+  gnc_tree_view_common_restore_settings (GTK_TREE_VIEW(view), section,
+					 view_column_defaults);
+}
+
+
+/************************************************************/
 /*                    Column Definitions                    */
 /************************************************************/
 
-static gnc_view_column gnc_tree_view_account_defaults[] = {
+static gnc_view_column view_column_defaults[] = {
   {GNC_TREE_MODEL_ACCOUNT_COL_NAME,
    GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
    GNC_TREE_VIEW_COLUMN_COLOR_NONE,
Index: dialog-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-utils.h,v
retrieving revision 1.6.4.6
retrieving revision 1.6.4.7
diff -Lsrc/gnome-utils/dialog-utils.h -Lsrc/gnome-utils/dialog-utils.h -u -r1.6.4.6 -r1.6.4.7
--- src/gnome-utils/dialog-utils.h
+++ src/gnome-utils/dialog-utils.h
@@ -2,6 +2,7 @@
  * dialog-utils.h -- utility functions for creating dialogs         *
  *                   for GnuCash                                    *
  * Copyright (C) 1999-2000 Linas Vepstas                            *
+ * Copyright (C) 2005 David Hampton <hampton at employees.org>         *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -66,7 +67,7 @@
  *       height - pointer to height                                 *
  * Returns: nothing                                                 *
  \*******************************************************************/
-void gnc_get_window_size (const char *prefix, int *width, int *height);
+void gnc_restore_window_size (const char *prefix, GtkWindow *window);
 
 /********************************************************************\
  * Save the window size into options whose names are determined     *
@@ -77,7 +78,7 @@
  *       height - height of the window to save                      *
  * Returns: nothing                                                 *
 \********************************************************************/
-void gnc_save_window_size (const char *prefix, int width, int height);
+void gnc_save_window_size (const char *section, GtkWindow *window);
 
 
 /********************************************************************\
Index: dialog-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-account.c,v
retrieving revision 1.5.4.20
retrieving revision 1.5.4.21
diff -Lsrc/gnome-utils/dialog-account.c -Lsrc/gnome-utils/dialog-account.c -u -r1.5.4.20 -r1.5.4.21
--- src/gnome-utils/dialog-account.c
+++ src/gnome-utils/dialog-account.c
@@ -2,6 +2,7 @@
  * dialog-account.c -- window for creating and editing accounts for *
  *                     GnuCash                                      *
  * Copyright (C) 2000 Dave Peticolas <dave at krondo.com>              *
+ * Copyright (C) 2003,2005 David Hampton <hampton at employees.org>    *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -49,6 +50,7 @@
 
 #define DIALOG_NEW_ACCOUNT_CM_CLASS "dialog-new-account"
 #define DIALOG_EDIT_ACCOUNT_CM_CLASS "dialog-edit-account"
+#define GCONF_SECTION "dialogs/account"
 
 typedef enum
 {
@@ -105,9 +107,6 @@
 /** Static Globals *******************************************************/
 static short module = MOD_GUI;
 
-static gint last_width = 0;
-static gint last_height = 0;
-
 static int last_used_account_type = BANK;
 
 static GList *ac_destroy_cb_list = NULL;
@@ -1409,11 +1408,7 @@
   aw->type_list = glade_xml_get_widget (xml, "type_list");
   gnc_account_type_list_create (aw);
 
-  if (last_width == 0)
-    gnc_get_window_size("account_win", &last_width, &last_height);
-
-  gtk_window_set_default_size(GTK_WINDOW(aw->dialog),
-                              last_width, last_height);
+  gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(aw->dialog));
 
   gtk_widget_grab_focus(GTK_WIDGET(aw->name_entry));
   LEAVE(" ");
@@ -1499,10 +1494,7 @@
   AccountWindow *aw = user_data;
 
   ENTER("aw %p, modal %d", aw, aw->modal);
-  gdk_window_get_geometry (GTK_WIDGET(aw->dialog)->window, NULL, NULL,
-                           &last_width, &last_height, NULL);
-
-  gnc_save_window_size ("account_win", last_width, last_height);
+  gnc_save_window_size (GCONF_SECTION, GTK_WINDOW(aw->dialog));
 
   gtk_widget_destroy (GTK_WIDGET (aw->dialog));
   LEAVE(" ");
Index: gnc-tree-view-account.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Attic/gnc-tree-view-account.h,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -Lsrc/gnome-utils/gnc-tree-view-account.h -Lsrc/gnome-utils/gnc-tree-view-account.h -u -r1.1.2.10 -r1.1.2.11
--- src/gnome-utils/gnc-tree-view-account.h
+++ src/gnome-utils/gnc-tree-view-account.h
@@ -1,7 +1,7 @@
 /********************************************************************\
  * gnc-tree-view-account.h -- GtkTreeView implementation to display *
  *                            accounts in a GtkTreeView.            *
- * Copyright (C) 2003 David Hampton <hampton at employees.org>         *
+ * Copyright (C) 2003,2005 David Hampton <hampton at employees.org>    *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -367,8 +367,35 @@
 
 /** @} */
 
+
+
+
+/** @name Account Tree View Save/Restore Functions */
+/** @{ */
+
+/** This function saves the settings of a account tree.  This saves
+ *  column order, sort order, etc.
+ *
+ *  @param view A pointer to an account tree view.
+ *
+ *  @param section The name of a gconf section where the tree
+ *  information should be saved. */
+void gnc_tree_view_account_save_settings (GncTreeViewAccount *view,
+					  const gchar *section);
+
+/** This function restores the settings of a account tree.  This saves
+ *  column order, sort order, etc.
+ *
+ *  @param view A pointer to an account tree view.
+ *
+ *  @param section The name of a gconf section where the tree
+ *  information should be restores from. */
+void gnc_tree_view_account_restore_settings (GncTreeViewAccount *view,
+					     const gchar *section);
 /** @} */
 
 G_END_DECLS
 
 #endif /* __GNC_TREE_VIEW_ACCOUNT_H */
+
+/** @} */
Index: dialog-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-utils.c,v
retrieving revision 1.13.4.12
retrieving revision 1.13.4.13
diff -Lsrc/gnome-utils/dialog-utils.c -Lsrc/gnome-utils/dialog-utils.c -u -r1.13.4.12 -r1.13.4.13
--- src/gnome-utils/dialog-utils.c
+++ src/gnome-utils/dialog-utils.c
@@ -2,6 +2,7 @@
  * dialog-utils.c -- utility functions for creating dialogs         *
  *                   for GnuCash                                    *
  * Copyright (C) 1999-2000 Linas Vepstas                            *
+ * Copyright (C) 2005 David Hampton <hampton at employees.org>         *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -40,10 +41,13 @@
 #include "gnc-engine-util.h"
 #include "gnc-euro.h"
 #include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 
 /* This static indicates the debugging module that this .o belongs to. */
 static short module = MOD_GUI;
 
+#define WINDOW_POSITION		"window_position"
+#define WINDOW_GEOMETRY		"window_geometry"
 
 /* =========================================================== */
 
@@ -248,7 +252,7 @@
 
 
 /********************************************************************\
- * gnc_get_window_size                                              *
+ * gnc_restore_window_size                                          *
  *   returns the window size to use for the given option prefix,    *
  *   if window sizes are being saved, otherwise returns 0 for both. *
  *                                                                  *
@@ -258,32 +262,35 @@
  * Returns: nothing                                                 *
  \*******************************************************************/
 void
-gnc_get_window_size(const char *prefix, int *width, int *height)
+gnc_restore_window_size(const char *section, GtkWindow *window)
 {
-  int w, h;
-  char *name;
+  GSList *coord_list;
+  gint coords[2];
 
-  if (gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", TRUE))
-  {
-    name = g_strconcat(prefix, "_width", NULL);
-    w = gnc_lookup_number_option("__gui", name, 0.0);
-    g_free(name);
+  g_return_if_fail(section != NULL);
+  g_return_if_fail(window != NULL);
 
-    name = g_strconcat(prefix, "_height", NULL);
-    h = gnc_lookup_number_option("__gui", name, 0.0);
-    g_free(name);
-  }
-  else
-  {
-    w = 0;
-    h = 0;
+  if (!gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", FALSE))
+    return;
+  
+  coord_list = gnc_gconf_get_list(section, WINDOW_POSITION,
+				  GCONF_VALUE_INT, NULL);
+  if (coord_list) {
+    coords[0] = GPOINTER_TO_INT(g_slist_nth_data(coord_list, 0));
+    coords[1] = GPOINTER_TO_INT(g_slist_nth_data(coord_list, 1));
+    gtk_window_move(window, coords[0], coords[1]);
+    g_slist_free(coord_list);
+  }
+
+  coord_list = gnc_gconf_get_list(section, WINDOW_GEOMETRY,
+				  GCONF_VALUE_INT, NULL);
+  if (coord_list) {
+    coords[0] = GPOINTER_TO_INT(g_slist_nth_data(coord_list, 0));
+    coords[1] = GPOINTER_TO_INT(g_slist_nth_data(coord_list, 1));
+    if ((coords[0] != 0) && (coords[1] != 0))
+      gtk_window_resize(window, coords[0], coords[1]);
+    g_slist_free(coord_list);
   }
-
-  if (width != NULL)
-    *width = w;
-
-  if (height != NULL)
-    *height = h;
 }
 
 
@@ -298,26 +305,31 @@
  * Returns: nothing                                                 *
 \********************************************************************/
 void
-gnc_save_window_size(const char *prefix, int width, int height)
+gnc_save_window_size(const char *section, GtkWindow *window)
 {
-  char *name;
-  gboolean save;
+  GSList *coord_list = NULL;
+  gint coords[2];
 
-  save = gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", FALSE);
+  g_return_if_fail(section != NULL);
+  g_return_if_fail(window != NULL);
 
-  name = g_strconcat(prefix, "_width", NULL);
-  if (save)
-    gnc_set_number_option("__gui", name, width);
-  else
-    gnc_set_option_default("__gui", name);
-  g_free(name);
+  if (!gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", FALSE))
+    return;
 
-  name = g_strconcat(prefix, "_height", NULL);
-  if (save)
-    gnc_set_number_option("__gui", name, height);
-  else
-    gnc_set_option_default("__gui", name);
-  g_free(name);
+  gtk_window_get_size(GTK_WINDOW(window), &coords[0], &coords[1]);
+  coord_list = g_slist_append(coord_list, GUINT_TO_POINTER(coords[0]));
+  coord_list = g_slist_append(coord_list, GUINT_TO_POINTER(coords[1]));
+  gnc_gconf_set_list(section, WINDOW_GEOMETRY, GCONF_VALUE_INT,
+		     coord_list, NULL);
+  g_slist_free(coord_list);
+  coord_list = NULL;
+
+  gtk_window_get_position(GTK_WINDOW(window), &coords[0], &coords[1]);
+  coord_list = g_slist_append(coord_list, GUINT_TO_POINTER(coords[0]));
+  coord_list = g_slist_append(coord_list, GUINT_TO_POINTER(coords[1]));
+  gnc_gconf_set_list(section, WINDOW_POSITION, GCONF_VALUE_INT,
+		     coord_list, NULL);
+  g_slist_free(coord_list);
 }
 
 
Index: price.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/price.glade,v
retrieving revision 1.3.4.5
retrieving revision 1.3.4.6
diff -Lsrc/gnome/glade/price.glade -Lsrc/gnome/glade/price.glade -u -r1.3.4.5 -r1.3.4.6
--- src/gnome/glade/price.glade
+++ src/gnome/glade/price.glade
@@ -4,7 +4,6 @@
 <glade-interface>
 
 <widget class="GtkDialog" id="Prices Dialog">
-  <property name="visible">True</property>
   <property name="title" translatable="yes">Price Editor</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
Index: configure.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/configure.in,v
retrieving revision 1.359.2.47
retrieving revision 1.359.2.48
diff -Lconfigure.in -Lconfigure.in -u -r1.359.2.47 -r1.359.2.48
--- configure.in
+++ configure.in
@@ -1244,6 +1244,7 @@
           src/import-export/log-replay/Makefile
           src/import-export/hbci/Makefile
           src/import-export/hbci/glade/Makefile
+          src/import-export/hbci/schemas/Makefile
           src/import-export/hbci/test/Makefile
           src/network-utils/Makefile
           src/network-utils/test/Makefile
@@ -1288,6 +1289,7 @@
           src/business/dialog-tax-table/Makefile
           src/business/business-gnome/Makefile
           src/business/business-gnome/glade/Makefile
+          src/business/business-gnome/schemas/Makefile
           src/business/business-gnome/ui/Makefile
           src/business/business-ledger/Makefile
           src/business/business-reports/Makefile
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1487.2.198
retrieving revision 1.1487.2.199
diff -LChangeLog -LChangeLog -u -r1.1487.2.198 -r1.1487.2.199
--- ChangeLog
+++ ChangeLog
@@ -1,5 +1,19 @@
 2005-04-28  David Hampton  <hampton at employees.org>
 
+	* lots-o-files: Migrate most hidden preferences over to gconf.
+	Remember geometry of more dialogs and restore it when the dialog
+	is next used.
+
+	* src/business/business-gnome/dialog-billterms.c:
+	* src/business/business-gnome/dialog-invoice.c:
+	* src/core-utils/gnc-gconf-utils.h:
+	* src/gnome/gnc-split-reg.c:
+	* src/gnome/window-main.c:
+	* src/gnome/window-reconcile.c:
+	* src/gnome/window-register.c:
+	* src/gnome-utils/gnc-mdi-utils.c: Collapse knowledge of desktop
+	gconf keys into a single file.
+
 	* src/gnome/gnc-totd-dialog.[ch]:
 	* src/gnome/tip-of-the-day.[ch]:
 	* src/scm/tip-list.scm:
Index: GNOME2_STATUS
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/Attic/GNOME2_STATUS,v
retrieving revision 1.1.2.48
retrieving revision 1.1.2.49
diff -LGNOME2_STATUS -LGNOME2_STATUS -u -r1.1.2.48 -r1.1.2.49
--- GNOME2_STATUS
+++ GNOME2_STATUS
@@ -93,8 +93,12 @@
 
   - Window size/position not being saved or used.
 
+    - Dialog window positions are now saved.  Saving position of the
+      main window is in progress.  Please annotate this file with any
+      windows whose positions are not saved but you think they should be.
+
     - Gnome MDI support used to handle this for us, but now we will need to
-      manage it ourselves. :/
+      manage it ourselves. :/  (On my list - DRH)
 
   - Weird pango_layout_set_text "string not UTF-8" issues reported by Neil Williams:
     
@@ -104,7 +108,7 @@
 
 - Main Window
 
-  - [low-priority] New registers should open in new top-level windows.
+  - [low-priority] New registers should open in new top-level windows. (On my list - DRH)
 
 - Register Core - mostly functional
 
@@ -142,12 +146,6 @@
         #11 0x40327076 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
         #12 0x40326047 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
 
-- Transfer
-
-  - Top 5 fields and don't expand width-wise.
-
-  - Bottom 2 fields [Currency Transfer] don't expand width-wise.
-
 - View Lots
 
   - Dialog opens too small [whole bottom panel is invisible]
Index: gnc-file.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-file/gnc-file.c,v
retrieving revision 1.25.4.11
retrieving revision 1.25.4.12
diff -Lsrc/app-file/gnc-file.c -Lsrc/app-file/gnc-file.c -u -r1.25.4.11 -r1.25.4.12
--- src/app-file/gnc-file.c
+++ src/app-file/gnc-file.c
@@ -41,12 +41,15 @@
 #include "gnc-splash.h"
 #include "gnc-ui.h"
 #include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 #include "qofbackend.h"
 #include "qofbook.h"
 #include "qofsession.h"
 #include "messages.h"
 #include "TransLog.h"
 
+#define GCONF_SECTION "dialogs/export_accounts"
+
 /** GLOBALS *********************************************************/
 /* This static indicates the debugging module that this .o belongs to.  */
 static short module = MOD_GUI;
@@ -689,7 +692,7 @@
   QofBackendError io_err = ERR_BACKEND_NO_ERR;
   char *default_dir;
 
-  default_dir = gnc_lookup_string_option("__paths", "Export Accounts", NULL);
+  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
   if (default_dir == NULL)
     gnc_init_default_directory(&default_dir);
 
@@ -700,13 +703,14 @@
     }
 
     newfile =  file_dialog_func (_("Export"), NULL, default_dir);
+    g_free(default_dir);
     if (!newfile)
       return;
   }
 
   /* Remember the directory as the default. */
   gnc_extract_directory(&default_dir, newfile);
-  gnc_set_string_option("__paths", "Export Accounts", default_dir);
+  gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
   g_free(default_dir);
   
   gnc_engine_suspend_events();
Index: prefs.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/prefs.scm,v
retrieving revision 1.28.4.3
retrieving revision 1.28.4.4
diff -Lsrc/app-utils/prefs.scm -Lsrc/app-utils/prefs.scm -u -r1.28.4.3 -r1.28.4.4
--- src/app-utils/prefs.scm
+++ src/app-utils/prefs.scm
@@ -673,98 +673,6 @@
 
 (gnc:register-configuration-option
  (gnc:make-internal-option
-  "__gui" "account_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "account_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "commodities_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "commodities_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "help_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "help_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "main_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "main_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "prices_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "prices_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "reg_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "reg_stock_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "reg_column_widths" '()))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "report_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "report_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "tax_info_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "tax_info_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "sx_list_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "sx_list_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "sx_editor_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "sx_editor_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "sx_sincelast_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "sx_sincelast_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
   "__exp_parser" "defined_variables" '()))
 
 (gnc:register-configuration-option
@@ -774,25 +682,3 @@
 (gnc:register-configuration-option
  (gnc:make-internal-option
   "__gnc_network" "uid" ""))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__paths"  "Export Accounts" #f))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__paths"  "Import QIF" #f))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__paths"  "Import OFX" #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  "__gui" "search_for_active_only"
-  "" ""
-  #t))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "commodity_include_iso" 0))
Index: dialog-order.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-order.c,v
retrieving revision 1.53.4.6
retrieving revision 1.53.4.7
diff -Lsrc/business/business-gnome/dialog-order.c -Lsrc/business/business-gnome/dialog-order.c -u -r1.53.4.6 -r1.53.4.7
--- src/business/business-gnome/dialog-order.c
+++ src/business/business-gnome/dialog-order.c
@@ -50,6 +50,8 @@
 #define DIALOG_EDIT_ORDER_CM_CLASS "dialog-edit-order"
 #define DIALOG_VIEW_ORDER_CM_CLASS "dialog-view-order"
 
+#define GCONF_SECTION_SEARCH "dialogs/business/order_search"
+
 void gnc_order_window_ok_cb (GtkWidget *widget, gpointer data);
 void gnc_order_window_cancel_cb (GtkWidget *widget, gpointer data);
 void gnc_order_window_help_cb (GtkWidget *widget, gpointer data);
@@ -913,7 +915,7 @@
 
   return gnc_search_dialog_create (type, params, columns, q, q2,
 				   buttons, NULL, new_order_cb,
-				   sw, free_order_cb);
+				   sw, free_order_cb, GCONF_SECTION_SEARCH);
 }
 
 GNCSearchWindow *
Index: business-gnome-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/business-gnome-utils.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -Lsrc/business/business-gnome/business-gnome-utils.h -Lsrc/business/business-gnome/business-gnome-utils.h -u -r1.1.4.1 -r1.1.4.2
--- src/business/business-gnome/business-gnome-utils.h
+++ src/business/business-gnome/business-gnome-utils.h
@@ -30,6 +30,12 @@
 #include "gncBillTerm.h"
 #include "gncTaxTable.h"
 
+#define GCONF_SECTION_ORDER    "dialogs/business/order"
+#define GCONF_SECTION_JOB      "dialogs/business/job"
+#define GCONF_SECTION_CUSTOMER "dialogs/business/customer"
+#define GCONF_SECTION_VENDOR   "dialogs/business/vendor"
+#define GCONF_SECTION_EMPLOYEE "dialogs/business/employee"
+
 GtkWidget * gnc_owner_select_create (GtkWidget *label, GtkWidget *hbox,
 				     GNCBook *book, GncOwner *owner);
 
Index: dialog-invoice.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-invoice.c,v
retrieving revision 1.81.4.15
retrieving revision 1.81.4.16
diff -Lsrc/business/business-gnome/dialog-invoice.c -Lsrc/business/business-gnome/dialog-invoice.c -u -r1.81.4.15 -r1.81.4.16
--- src/business/business-gnome/dialog-invoice.c
+++ src/business/business-gnome/dialog-invoice.c
@@ -68,6 +68,11 @@
 #define DIALOG_NEW_INVOICE_CM_CLASS "dialog-new-invoice"
 #define DIALOG_VIEW_INVOICE_CM_CLASS "dialog-view-invoice"
 
+#define GCONF_SECTION_INVOICE "dialogs/business/invoice"
+#define GCONF_SECTION_BILL    "dialogs/business/bill"
+#define GCONF_SECTION_VOUCHER "dialogs/business/voucher"
+#define GCONF_SECTION_SEARCH  "dialogs/business/invoice_search"
+
 void gnc_invoice_window_ok_cb (GtkWidget *widget, gpointer data);
 void gnc_invoice_window_cancel_cb (GtkWidget *widget, gpointer data);
 void gnc_invoice_window_help_cb (GtkWidget *widget, gpointer data);
@@ -228,9 +233,6 @@
 #define INV_WIDTH_PREFIX "invoice_reg"
 #define BILL_WIDTH_PREFIX "bill_reg"
 #define VOUCHER_WIDTH_PREFIX "voucher_reg"
-static int inv_last_width = 0;
-static int bill_last_width = 0;
-static int voucher_last_width = 0;
 
 static void gnc_invoice_update_window (InvoiceWindow *iw);
 static InvoiceWindow * gnc_ui_invoice_modify (GncInvoice *invoice);
@@ -1078,46 +1080,29 @@
 }
 
 static char *
-gnc_invoice_get_width_prefix (InvoiceWindow *iw)
-{
-  switch (gncOwnerGetType (&iw->owner)) {
-  case GNC_OWNER_CUSTOMER:
-    return INV_WIDTH_PREFIX;
-  case GNC_OWNER_VENDOR:
-    return BILL_WIDTH_PREFIX;
-  case GNC_OWNER_EMPLOYEE:
-    return VOUCHER_WIDTH_PREFIX;
-  default:
-    g_warning ("invalid owner");
-    return INV_WIDTH_PREFIX;
-  }
-}
-
-static int *
-gnc_invoice_get_width_integer (InvoiceWindow *iw)
+gnc_invoice_get_gconf_section (InvoiceWindow *iw)
 {
   switch (gncOwnerGetType (&iw->owner)) {
   case GNC_OWNER_CUSTOMER:
-    return &inv_last_width;
+    return GCONF_SECTION_INVOICE;
   case GNC_OWNER_VENDOR:
-    return &bill_last_width;
+    return GCONF_SECTION_BILL;
   case GNC_OWNER_EMPLOYEE:
-    return &voucher_last_width; 
+    return GCONF_SECTION_VOUCHER;
   default:
     g_warning ("invalid owner");
-    return &inv_last_width;
+    return NULL;
   }
 }
 
 static void
 gnc_invoice_save_size (InvoiceWindow *iw)
 {
-  int *last_width = gnc_invoice_get_width_integer (iw);
-
-  gdk_window_get_geometry (iw->dialog->window, NULL, NULL,
-			   last_width, NULL, NULL);
-
-  gnc_save_window_size (gnc_invoice_get_width_prefix (iw), *last_width, 0);
+  const gchar *section = gnc_invoice_get_gconf_section(iw);
+  
+  if (!section)
+    return;
+  gnc_save_window_size( section, GTK_WINDOW(iw->dialog) );
 }
 
 static void
@@ -1613,20 +1598,10 @@
 
   if (!iw->width_inited)
   {
-    int * last_width = gnc_invoice_get_width_integer (iw);
-
-    switch (iw->dialog_type) {
-    case VIEW_INVOICE:
-    case EDIT_INVOICE:
-      if (*last_width == 0)
-	gnc_get_window_size (gnc_invoice_get_width_prefix (iw), last_width,
-			     NULL);
+    const gchar *section = gnc_invoice_get_gconf_section (iw);
 
-      gtk_window_set_default_size (GTK_WINDOW (iw->dialog), *last_width, 0);
-      break;
-    default:
-      break;
-    }
+    if (section)
+      gnc_restore_window_size (section, GTK_WINDOW (iw->dialog));
 
     iw->width_inited = TRUE;
   }
@@ -2449,7 +2424,7 @@
 
   return gnc_search_dialog_create (type, params, columns, q, q2,
 				   buttons, NULL, new_invoice_cb,
-				   sw, free_invoice_cb);
+				   sw, free_invoice_cb, GCONF_SECTION_SEARCH);
 
 }
 
Index: dialog-job.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-job.c,v
retrieving revision 1.27.4.8
retrieving revision 1.27.4.9
diff -Lsrc/business/business-gnome/dialog-job.c -Lsrc/business/business-gnome/dialog-job.c -u -r1.27.4.8 -r1.27.4.9
--- src/business/business-gnome/dialog-job.c
+++ src/business/business-gnome/dialog-job.c
@@ -45,6 +45,8 @@
 #define DIALOG_NEW_JOB_CM_CLASS "dialog-new-job"
 #define DIALOG_EDIT_JOB_CM_CLASS "dialog-edit-job"
 
+#define GCONF_SECTION_SEARCH "dialogs/business/job_search"
+
 void gnc_job_window_ok_cb (GtkWidget *widget, gpointer data);
 void gnc_job_window_cancel_cb (GtkWidget *widget, gpointer data);
 void gnc_job_window_help_cb (GtkWidget *widget, gpointer data);
@@ -586,7 +588,8 @@
 
   return gnc_search_dialog_create (type, params, columns,
 				   q, q2, buttons, NULL,
-				   new_job_cb, sw, free_userdata_cb);
+				   new_job_cb, sw, free_userdata_cb,
+				   GCONF_SECTION_SEARCH);
 }
 
 /* Functions for widgets for job selection */
Index: dialog-employee.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-employee.c,v
retrieving revision 1.23.4.8
retrieving revision 1.23.4.9
diff -Lsrc/business/business-gnome/dialog-employee.c -Lsrc/business/business-gnome/dialog-employee.c -u -r1.23.4.8 -r1.23.4.9
--- src/business/business-gnome/dialog-employee.c
+++ src/business/business-gnome/dialog-employee.c
@@ -50,6 +50,8 @@
 #define DIALOG_NEW_EMPLOYEE_CM_CLASS "dialog-new-employee"
 #define DIALOG_EDIT_EMPLOYEE_CM_CLASS "dialog-edit-employee"
 
+#define GCONF_SECTION_SEARCH "dialogs/business/employee_search"
+
 void gnc_employee_window_ok_cb (GtkWidget *widget, gpointer data);
 void gnc_employee_window_cancel_cb (GtkWidget *widget, gpointer data);
 void gnc_employee_window_help_cb (GtkWidget *widget, gpointer data);
@@ -722,7 +724,8 @@
 
   return gnc_search_dialog_create (type, params, columns, q, q2,
 				   buttons, NULL, new_employee_cb,
-				   sw, free_employee_cb);
+				   sw, free_employee_cb,
+				   GCONF_SECTION_SEARCH);
 }
 
 GNCSearchWindow *
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/Makefile.am,v
retrieving revision 1.31.4.9
retrieving revision 1.31.4.10
diff -Lsrc/business/business-gnome/Makefile.am -Lsrc/business/business-gnome/Makefile.am -u -r1.31.4.9 -r1.31.4.10
--- src/business/business-gnome/Makefile.am
+++ src/business/business-gnome/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = . glade ui
+SUBDIRS = . glade schemas ui
 PWD := $(shell pwd)
 
 pkglib_LTLIBRARIES = libgncmod-business-gnome.la libgw-business-gnome.la
Index: dialog-customer.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-customer.c,v
retrieving revision 1.34.4.8
retrieving revision 1.34.4.9
diff -Lsrc/business/business-gnome/dialog-customer.c -Lsrc/business/business-gnome/dialog-customer.c -u -r1.34.4.8 -r1.34.4.9
--- src/business/business-gnome/dialog-customer.c
+++ src/business/business-gnome/dialog-customer.c
@@ -52,6 +52,8 @@
 #define DIALOG_NEW_CUSTOMER_CM_CLASS "dialog-new-customer"
 #define DIALOG_EDIT_CUSTOMER_CM_CLASS "dialog-edit-customer"
 
+#define GCONF_SECTION_SEARCH "dialogs/business/customer_search"
+
 void gnc_customer_taxtable_check_cb (GtkToggleButton *togglebutton,
 				     gpointer user_data);
 
@@ -826,7 +828,8 @@
 
   return gnc_search_dialog_create (type, params, columns,
 				   q, q2, buttons, NULL,
-				   new_customer_cb, sw, free_userdata_cb);
+				   new_customer_cb, sw, free_userdata_cb,
+				   GCONF_SECTION_SEARCH);
 }
 
 GNCSearchWindow *
Index: dialog-vendor.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-vendor.c,v
retrieving revision 1.32.4.9
retrieving revision 1.32.4.10
diff -Lsrc/business/business-gnome/dialog-vendor.c -Lsrc/business/business-gnome/dialog-vendor.c -u -r1.32.4.9 -r1.32.4.10
--- src/business/business-gnome/dialog-vendor.c
+++ src/business/business-gnome/dialog-vendor.c
@@ -50,6 +50,8 @@
 #define DIALOG_NEW_VENDOR_CM_CLASS "dialog-new-vendor"
 #define DIALOG_EDIT_VENDOR_CM_CLASS "dialog-edit-vendor"
 
+#define GCONF_SECTION_SEARCH "dialogs/business/vendor_search"
+
 void gnc_vendor_taxtable_check_cb (GtkToggleButton *togglebutton, gpointer user_data);
 void gnc_vendor_window_ok_cb (GtkWidget *widget, gpointer data);
 void gnc_vendor_window_cancel_cb (GtkWidget *widget, gpointer data);
@@ -688,7 +690,8 @@
 
   return gnc_search_dialog_create (type, params, columns, q, q2,
 				   buttons, NULL,
-				   new_vendor_cb, sw, free_vendor_cb);
+				   new_vendor_cb, sw, free_vendor_cb,
+				   GCONF_SECTION_SEARCH);
 }
 
 GNCSearchWindow *
--- /dev/null
+++ src/business/business-gnome/schemas/.cvsignore
@@ -0,0 +1,8 @@
+*.diff
+*.la
+*.lo
+.deps
+.libs
+.scm-links
+Makefile
+Makefile.in
--- /dev/null
+++ src/business/business-gnome/schemas/Makefile.am
@@ -0,0 +1,14 @@
+schemadir   = @GCONF_SCHEMA_FILE_DIR@
+schema_DATA = \
+  apps_gnucash_dialog_business_common.schemas
+
+install-data-local:
+if GCONF_SCHEMAS_INSTALL
+	-GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-install-rule $(srcdir)/$(schema_DATA)
+endif
+
+uninstall-local:
+if GCONF_SCHEMAS_INSTALL
+	-GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-uninstall-rule $(srcdir)/$(schema_DATA)
+endif
+
--- /dev/null
+++ src/business/business-gnome/schemas/apps_gnucash_dialog_business_common.schemas
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+  <schemalist>
+
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/business/coordinates</key>
+      <applyto>/apps/gnucash/dialogs/business/bill/window_coordinates</applyto>
+      <applyto>/apps/gnucash/dialogs/business/customer_search/window_coordinates</applyto>
+      <applyto>/apps/gnucash/dialogs/business/employee_search/window_coordinates</applyto>
+      <applyto>/apps/gnucash/dialogs/business/invoice/window_coordinates</applyto>
+      <applyto>/apps/gnucash/dialogs/business/invoice_search/window_coordinates</applyto>
+      <applyto>/apps/gnucash/dialogs/business/job_search/window_coordinates</applyto>
+      <applyto>/apps/gnucash/dialogs/business/order_search/window_coordinates</applyto>
+      <applyto>/apps/gnucash/dialogs/business/vendor_search/window_coordinates</applyto>
+      <applyto>/apps/gnucash/dialogs/business/voucher/window_coordinates</applyto>
+      <owner>gnucash</owner>
+      <type>list</type>
+      <list_type>int</list_type>
+      <locale name="C">
+        <short>Window position and size</short>
+        <long>
+	  This key contains the coordinates describing the last
+	  location of the window.  The numbers are the X and Y
+	  coordinates of the top left corner of the window, and the
+	  width and height of the window.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/search_for_active_only</key>
+      <applyto>/apps/gnucash/dialogs/business/customer_search/search_for_active_only</applyto>
+      <applyto>/apps/gnucash/dialogs/business/employee_search/search_for_active_only</applyto>
+      <applyto>/apps/gnucash/dialogs/business/invoice_search/search_for_active_only</applyto>
+      <applyto>/apps/gnucash/dialogs/business/job_search/search_for_active_only</applyto>
+      <applyto>/apps/gnucash/dialogs/business/order_search/search_for_active_only</applyto>
+      <applyto>/apps/gnucash/dialogs/business/vendor_search/search_for_active_only</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <locale name="C">
+        <short>Search only in active items</short>
+        <long>
+	  This key indicates whether to search in all items in the
+	  current class, or only in 'active' items in the current
+	  class.
+	</long>
+      </locale>
+    </schema>
+
+  </schemalist>
+</gconfschemafile>
Index: business-prefs.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-utils/business-prefs.scm,v
retrieving revision 1.2.4.3
retrieving revision 1.2.4.4
diff -Lsrc/business/business-utils/business-prefs.scm -Lsrc/business/business-utils/business-prefs.scm -u -r1.2.4.3 -r1.2.4.4
--- src/business/business-utils/business-prefs.scm
+++ src/business/business-utils/business-prefs.scm
@@ -20,18 +20,6 @@
 ;; Boston, MA  02111-1307,  USA       gnu at gnu.org
 
 (gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "invoice_reg_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "bill_reg_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "voucher_reg_width" 0))
-
-(gnc:register-configuration-option
  (gnc:make-number-range-option
   gnc:*business-label* (N_ "Number of Rows")
   "a" (N_ "Default number of register rows to display in Invoices.")
Index: gnc-gconf-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/core-utils/Attic/gnc-gconf-utils.h,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -Lsrc/core-utils/gnc-gconf-utils.h -Lsrc/core-utils/gnc-gconf-utils.h -u -r1.1.2.2 -r1.1.2.3
--- src/core-utils/gnc-gconf-utils.h
+++ src/core-utils/gnc-gconf-utils.h
@@ -47,6 +47,9 @@
 
 #include <gconf/gconf-client.h>
 
+/* Keys used across multiple modules */
+#define KEY_LAST_PATH "last_path"
+
 /** @name GConf Miscellaneous Functions */
 /** @{ */
 
Index: hbci.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/hbci.scm,v
retrieving revision 1.17.4.1
retrieving revision 1.17.4.2
diff -Lsrc/import-export/hbci/hbci.scm -Lsrc/import-export/hbci/hbci.scm -u -r1.17.4.1 -r1.17.4.2
--- src/import-export/hbci/hbci.scm
+++ src/import-export/hbci/hbci.scm
@@ -12,10 +12,6 @@
   "b" (N_ "Remember the PIN for HBCI in memory during a session")
   #f))
 
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "hbci_close_on_finish" 1))
-
 ;(gnc:register-configuration-option
 ; (gnc:make-simple-boolean-option
 ;  (N_ "Online Banking & Importing") (N_ "HBCI Use generic import matcher")
Index: hbci-interaction.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/hbci-interaction.c,v
retrieving revision 1.16.4.10
retrieving revision 1.16.4.11
diff -Lsrc/import-export/hbci/hbci-interaction.c -Lsrc/import-export/hbci/hbci-interaction.c -u -r1.16.4.10 -r1.16.4.11
--- src/import-export/hbci/hbci-interaction.c
+++ src/import-export/hbci/hbci-interaction.c
@@ -34,6 +34,7 @@
 #include "gnc-ui-util.h"
 #include "gnc-ui.h"
 #include "global-options.h"
+#include "gnc-gconf-utils.h"
 
 #include "dialog-pass.h"
 #include "gnc-hbci-utils.h"
@@ -44,6 +45,8 @@
 #include <iconv.h>
 
 #define PREF_TAB_ONLINE_BANKING N_("Online Banking & Importing")
+#define GCONF_SECTION "dialogs/import/hbci"
+#define KEY_CLOSE_ON_FINISH "close_on_finish"
 
 gchar *gnc__extractText(const char *text);
 
@@ -79,9 +82,10 @@
   if (data == NULL)
     return;
   if (data->dialog != NULL) {
-    gnc_set_boolean_option ("__gui", "hbci_close_on_finish",
-			    gtk_toggle_button_get_active 
-			    (GTK_TOGGLE_BUTTON (data->close_checkbutton)));
+    gnc_gconf_set_bool(GCONF_SECTION, KEY_CLOSE_ON_FINISH,
+		       gtk_toggle_button_get_active 
+		       (GTK_TOGGLE_BUTTON (data->close_checkbutton)),
+		       NULL);
     gtk_object_unref (GTK_OBJECT (data->dialog));
     gtk_widget_destroy (data->dialog);
   }
@@ -173,9 +177,10 @@
   if (gtk_toggle_button_get_active 
       (GTK_TOGGLE_BUTTON (i->close_checkbutton)))
     gtk_widget_hide_all (i->dialog);
-  gnc_set_boolean_option ("__gui", "hbci_close_on_finish",
-			  gtk_toggle_button_get_active 
-			  (GTK_TOGGLE_BUTTON (i->close_checkbutton)));
+  gnc_gconf_set_bool(GCONF_SECTION, KEY_CLOSE_ON_FINISH,
+		     gtk_toggle_button_get_active 
+		     (GTK_TOGGLE_BUTTON (i->close_checkbutton)),
+		     NULL);
 }
 
 gboolean GNCInteractor_get_cache_valid(const GNCInteractor *i)
@@ -759,7 +764,7 @@
   gtk_widget_set_sensitive (data->action_progress, FALSE);
   gtk_toggle_button_set_active 
     (GTK_TOGGLE_BUTTON (data->close_checkbutton), 
-     gnc_lookup_boolean_option("__gui", "hbci_close_on_finish", TRUE));
+     gnc_gconf_get_bool(GCONF_SECTION, KEY_CLOSE_ON_FINISH, NULL));
 
   gtk_signal_connect (GTK_OBJECT (data->abort_button), "clicked", 
 		      GTK_SIGNAL_FUNC (on_button_clicked), data);
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/Makefile.am,v
retrieving revision 1.22.4.10
retrieving revision 1.22.4.11
diff -Lsrc/import-export/hbci/Makefile.am -Lsrc/import-export/hbci/Makefile.am -u -r1.22.4.10 -r1.22.4.11
--- src/import-export/hbci/Makefile.am
+++ src/import-export/hbci/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = . glade test
+SUBDIRS = . glade schemas test
 
 pkglib_LTLIBRARIES = libgncmod-hbci.la
 
Index: dialog-totd.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-totd.c,v
retrieving revision 1.13.4.3
retrieving revision 1.13.4.4
diff -Lsrc/gnome/dialog-totd.c -Lsrc/gnome/dialog-totd.c -u -r1.13.4.3 -r1.13.4.4
--- src/gnome/dialog-totd.c
+++ src/gnome/dialog-totd.c
@@ -106,7 +106,7 @@
 
   ENTER("button %p, dialog %p", button, user_data);
   dialog = GTK_WIDGET(user_data);
-  /* Save size here */
+  gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(dialog));
   gtk_widget_destroy(dialog);
   LEAVE("");
 }
@@ -209,6 +209,6 @@
   button = glade_xml_get_widget(xml, "show_checkbutton");
   gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (button), show_tips);
 
-  gtk_widget_set_size_request (GTK_WIDGET (dialog), -1, -1);
+  gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(dialog));
   gtk_widget_show(GTK_WIDGET (dialog));
 }
Index: dialog-price-editor.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-price-editor.c,v
retrieving revision 1.30.4.5
retrieving revision 1.30.4.6
diff -Lsrc/gnome/dialog-price-editor.c -Lsrc/gnome/dialog-price-editor.c -u -r1.30.4.5 -r1.30.4.6
--- src/gnome/dialog-price-editor.c
+++ src/gnome/dialog-price-editor.c
@@ -44,6 +44,7 @@
 
 
 #define DIALOG_PRICE_EDIT_CM_CLASS "dialog-price-edit"
+#define GCONF_SECTION "dialogs/price_editor"
 
 /* This static indicates the debugging module that this .o belongs to.  */
 /* static short module = MOD_GUI; */
@@ -437,11 +438,7 @@
 {
   PriceEditDialog *pedit_dialog = user_data;
 
-  //  gdk_window_get_geometry (GTK_WIDGET(pedit_dialog->dialog)->window,
-  //                           NULL, NULL, &last_width, &last_height, NULL);
-
-  //  gnc_save_window_size ("prices_win", last_width, last_height);
-
+  gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(pedit_dialog->dialog));
   gtk_widget_destroy (GTK_WIDGET (pedit_dialog->dialog));
 }
 
@@ -487,6 +484,7 @@
 
   pedit_dialog = g_new0 (PriceEditDialog, 1);
   gnc_price_pedit_dialog_create (parent, pedit_dialog);
+  gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(pedit_dialog->dialog));
 
   switch (type) {
    case GNC_PRICE_NEW:
Index: dialog-new-user.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-new-user.c,v
retrieving revision 1.4.4.8
retrieving revision 1.4.4.9
diff -Lsrc/gnome/dialog-new-user.c -Lsrc/gnome/dialog-new-user.c -u -r1.4.4.8 -r1.4.4.9
--- src/gnome/dialog-new-user.c
+++ src/gnome/dialog-new-user.c
@@ -30,8 +30,11 @@
 #include "druid-hierarchy.h"
 #include "global-options.h"
 #include "gnc-engine-util.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-ui.h"
 
+#define GCONF_SECTION "dialogs/new_user"
+#define FIRST_STARTUP "first_startup"
 
 /* This static indicates the debugging module that this .o belongs to.  */
 static short module = MOD_GUI;
@@ -53,7 +56,7 @@
 void
 gnc_set_first_startup (gboolean first_startup)
 {
-  gnc_set_boolean_option ("__new_user", "first_startup", first_startup);
+  gnc_gconf_set_bool(GCONF_SECTION, FIRST_STARTUP, first_startup, NULL);
 }
 
 void
Index: dialog-find-transactions.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-find-transactions.c,v
retrieving revision 1.37.4.3
retrieving revision 1.37.4.4
diff -Lsrc/gnome/dialog-find-transactions.c -Lsrc/gnome/dialog-find-transactions.c -u -r1.37.4.3 -r1.37.4.4
--- src/gnome/dialog-find-transactions.c
+++ src/gnome/dialog-find-transactions.c
@@ -40,6 +40,8 @@
 #include "messages.h"
 #include "search-param.h"
 
+#define GCONF_SECTION "dialogs/find"
+
 struct _ftd_data {
   QueryNew *		q;
   QueryNew *		ledger_q;
@@ -168,7 +170,7 @@
 
   ftd->sw = gnc_search_dialog_create (type, params, NULL, start_q, show_q,
 				      NULL, do_find_cb, NULL,
-				      ftd, free_ftd_cb);
+				      ftd, free_ftd_cb, GCONF_SECTION);
 
   if (!ftd->sw) {
     free_ftd_cb (ftd);
Index: dialog-price-edit-db.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-price-edit-db.c,v
retrieving revision 1.5.4.12
retrieving revision 1.5.4.13
diff -Lsrc/gnome/dialog-price-edit-db.c -Lsrc/gnome/dialog-price-edit-db.c -u -r1.5.4.12 -r1.5.4.13
--- src/gnome/dialog-price-edit-db.c
+++ src/gnome/dialog-price-edit-db.c
@@ -2,6 +2,7 @@
  * dialog-price-editor.c -- price selector dialog                   *
  * Copyright (C) 2001 Gnumatic, Inc.                                *
  * Author: Dave Peticolas <dave at krondo.com>                         *
+ * Copyright (C) 2003,2005 David Hampton                            *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -40,13 +41,13 @@
 #include "gnc-tree-view-price.h"
 #include "gnc-ui.h"
 #include "gnc-ui-util.h"
-#include "gnc-gconf-utils.h"
 #include "guile-util.h"
 #include "engine-helpers.h"
 #include "messages.h"
 
 
 #define DIALOG_PRICE_DB_CM_CLASS "dialog-price-edit-db"
+#define GCONF_SECTION "dialogs/edit_prices"
 
 /* This static indicates the debugging module that this .o belongs to.  */
 static short module = MOD_GUI;
@@ -73,13 +74,8 @@
 
   GNCPriceDB *price_db;
   GNCPrice  * price;		/* Currently selected price */
-
-  gchar *gconf_section;
 } PricesDialog;
 
-static gint last_width = 0;
-static gint last_height = 0;
-
 
 void
 gnc_prices_dialog_window_destroy_cb (GtkObject *object, gpointer data)
@@ -95,7 +91,6 @@
     pdb_dialog->price = NULL;
   }
 
-  g_free (pdb_dialog->gconf_section);
   g_free (pdb_dialog);
   LEAVE(" ");
 }
@@ -332,7 +327,6 @@
 
   dialog = glade_xml_get_widget (xml, "Prices Dialog");
   pdb_dialog->dialog = dialog;
-  pdb_dialog->gconf_section = gnc_gconf_section_name ("dialogs/prices_dialog");
   pdb_dialog->price_db = gnc_pricedb_get_db(gnc_get_current_book());
 
   glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func, pdb_dialog);
@@ -374,17 +368,8 @@
     pdb_dialog->remove_old_button = button;
   }
 
-  if (last_width == 0)
-    gnc_get_window_size ("prices_win", &last_width, &last_height);
-
-  if (last_height == 0)
-    last_height = 400;
-
-  if (last_width != 0)
-    gtk_window_resize (GTK_WINDOW(pdb_dialog->dialog), last_width, last_height);
-
-  gnc_tree_view_price_restore_settings (pdb_dialog->price_tree,
-					pdb_dialog->gconf_section);
+  gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(pdb_dialog->dialog));
+  gnc_tree_view_price_restore_settings(pdb_dialog->price_tree, GCONF_SECTION);
   LEAVE(" ");
 }
 
@@ -394,13 +379,8 @@
   PricesDialog *pdb_dialog = user_data;
 
   ENTER(" ");
-  gdk_window_get_geometry (GTK_WIDGET(pdb_dialog->dialog)->window,
-                           NULL, NULL, &last_width, &last_height, NULL);
-
-  gnc_save_window_size ("prices_win", last_width, last_height);
-
-  gnc_tree_view_price_save_settings (pdb_dialog->price_tree,
-				     pdb_dialog->gconf_section);
+  gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(pdb_dialog->dialog));
+  gnc_tree_view_price_save_settings(pdb_dialog->price_tree, GCONF_SECTION);
 
   gtk_widget_destroy (GTK_WIDGET (pdb_dialog->dialog));
   LEAVE(" ");
Index: dialog-tax-info.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-tax-info.c,v
retrieving revision 1.18.6.8
retrieving revision 1.18.6.9
diff -Lsrc/gnome/dialog-tax-info.c -Lsrc/gnome/dialog-tax-info.c -u -r1.18.6.8 -r1.18.6.9
--- src/gnome/dialog-tax-info.c
+++ src/gnome/dialog-tax-info.c
@@ -37,6 +37,7 @@
 
 
 #define DIALOG_TAX_INFO_CM_CLASS "dialog-tax-info"
+#define GCONF_SECTION "dialogs/tax_info"
 
 /* This static indicates the debugging module that this .o belongs to.  */
 /* static short module = MOD_GUI; */
@@ -84,8 +85,6 @@
 
 
 static gboolean getters_initialized = FALSE;
-static gint last_width = 0;
-static gint last_height = 0;
 
 
 static void
@@ -754,17 +753,7 @@
   clear_gui (ti_dialog);
   gnc_tax_info_set_changed (ti_dialog, FALSE);
 
-  if (last_width == 0)
-    gnc_get_window_size ("tax_info_win", &last_width, &last_height);
-
-  if (last_height == 0)
-  {
-    last_height = 400;
-    last_width = 500;
-  }
-
-  gtk_window_set_default_size (GTK_WINDOW(ti_dialog->dialog),
-                               last_width, last_height);
+  gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(ti_dialog->dialog));
 }
 
 static void
@@ -772,11 +761,7 @@
 {
   TaxInfoDialog *ti_dialog = user_data;
 
-  gdk_window_get_geometry (GTK_WIDGET(ti_dialog->dialog)->window,
-                           NULL, NULL, &last_width, &last_height, NULL);
-
-  gnc_save_window_size ("tax_info_win", last_width, last_height);
-
+  gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(ti_dialog->dialog));
   gtk_widget_destroy (ti_dialog->dialog);
 }
 
Index: window-register.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/window-register.c,v
retrieving revision 1.198.4.17
retrieving revision 1.198.4.18
diff -Lsrc/gnome/window-register.c -Lsrc/gnome/window-register.c -u -r1.198.4.17 -r1.198.4.18
--- src/gnome/window-register.c
+++ src/gnome/window-register.c
@@ -992,9 +992,6 @@
         break;
     }
 
-    if (*width == 0)
-      gnc_get_window_size (prefix, width, NULL);
-
     gtk_window_set_default_size (GTK_WINDOW(regData->window), *width, 0);
   }
 
@@ -1290,8 +1287,6 @@
 
   gdk_window_get_geometry (regData->window->window, NULL, NULL,
                            width, NULL, NULL);
-
-  gnc_save_window_size (prefix, *width, 0);
 }
 
 void 
Index: gnc-plugin-page-account-tree.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Attic/gnc-plugin-page-account-tree.c,v
retrieving revision 1.1.2.37
retrieving revision 1.1.2.38
diff -Lsrc/gnome/gnc-plugin-page-account-tree.c -Lsrc/gnome/gnc-plugin-page-account-tree.c -u -r1.1.2.37 -r1.1.2.38
--- src/gnome/gnc-plugin-page-account-tree.c
+++ src/gnome/gnc-plugin-page-account-tree.c
@@ -61,6 +61,7 @@
 static GList *active_pages = NULL;
 
 #define PLUGIN_PAGE_ACCT_TREE_CM_CLASS "plugin-page-acct-tree"
+#define GCONF_SECTION "window/pages/account_tree"
 
 enum {
   ACCOUNT_SELECTED,
@@ -531,6 +532,8 @@
 				       gnc_get_current_session());
 
 	plugin_page->summarybar = gnc_main_window_summary_new();
+	gnc_tree_view_account_restore_settings(GNC_TREE_VIEW_ACCOUNT(tree_view),
+					       GCONF_SECTION);
 	gtk_widget_show(plugin_page->summarybar);
 
 	LEAVE("widget = %p", page->priv->widget);
@@ -544,6 +547,10 @@
 
 	ENTER("page %p", plugin_page);
 	page = GNC_PLUGIN_PAGE_ACCOUNT_TREE (plugin_page);
+
+	gnc_tree_view_account_save_settings(GNC_TREE_VIEW_ACCOUNT(page->priv->tree_view),
+					    GCONF_SECTION);
+
 	if (page->priv->widget) {
 	  g_object_unref(G_OBJECT(page->priv->widget));
 	  page->priv->widget = NULL;
Index: dialog-sxsincelast.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-sxsincelast.c,v
retrieving revision 1.65.4.10
retrieving revision 1.65.4.11
diff -Lsrc/gnome/dialog-sxsincelast.c -Lsrc/gnome/dialog-sxsincelast.c -u -r1.65.4.10 -r1.65.4.11
--- src/gnome/dialog-sxsincelast.c
+++ src/gnome/dialog-sxsincelast.c
@@ -97,6 +97,7 @@
 #define DIALOG_SXSINCELAST_GLADE_NAME "Since Last Run Druid"
 #define SXSLD_DRUID_GLADE_NAME "sincelast_druid"
 #define SXSLD_WIN_PREFIX "sx_sincelast_win"
+#define GCONF_SECTION "dialogs/scheduled_trans/since_last_run"
 
 #define SINCELAST_DRUID   "sincelast_druid"
 #define WHAT_TO_DO_PG "what_to_do"
@@ -1650,14 +1651,7 @@
         create_created_ledger( sxsld );
         create_to_create_ledger( sxsld );
 
-        {
-                int width, height;
-                gnc_get_window_size( SXSLD_WIN_PREFIX, &width, &height );
-                if ( width != 0 && height != 0 ) {
-                        gtk_window_set_default_size( GTK_WINDOW(sxsld->sincelast_window),
-                                                     width, height );
-                }
-        }
+	gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(sxsld->sincelast_window));
 
 	/* Do not call show_all here. Screws up the gtkuimanager code */
         gtk_widget_show( sxsld->sincelast_window );
@@ -1680,10 +1674,7 @@
 void
 sxsincelast_save_size( sxSinceLastData *sxsld )
 {
-        gint x, y, w, h, d;
-        gdk_window_get_geometry( sxsld->sincelast_window->window,
-                                 &x, &y, &w, &h, &d );
-        gnc_save_window_size( SXSLD_WIN_PREFIX, w, h );
+  gnc_save_window_size( GCONF_SECTION, GTK_WINDOW(sxsld->sincelast_window) );
 }
 
 static void
Index: dialog-scheduledxaction.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-scheduledxaction.c,v
retrieving revision 1.71.2.12
retrieving revision 1.71.2.13
diff -Lsrc/gnome/dialog-scheduledxaction.c -Lsrc/gnome/dialog-scheduledxaction.c -u -r1.71.2.12 -r1.71.2.13
--- src/gnome/dialog-scheduledxaction.c
+++ src/gnome/dialog-scheduledxaction.c
@@ -63,6 +63,7 @@
 
 static short module = MOD_SX;
 
+#define SX_LIST_GCONF_SECTION "dialogs/scheduled_trans/transaction_list"
 #define SX_LIST_WIN_PREFIX "sx_list_win"
 #define SX_LIST_GLADE_NAME "Scheduled Transaction List"
 #define SX_LIST "sched_xact_list"
@@ -70,6 +71,7 @@
 #define SX_EDITOR_GLADE_NAME "Scheduled Transaction Editor"
 #define SX_OPT_STR "Scheduled Transactions"
 
+#define SXED_GCONF_SECTION "dialogs/scheduled_trans/transaction_editor"
 #define SXED_WIN_PREFIX "sx_editor_win"
 #define SXED_NAME_ENTRY "sxe_name"
 #define SXED_LAST_OCCUR_LABEL "last_occur_label"
@@ -1249,15 +1251,7 @@
         gnc_sxd_set_sort_compare( GTK_CLIST(w), sxd->currentSortCol );
         gtk_clist_set_auto_sort( GTK_CLIST(w), TRUE );
 
-        {
-                int width, height;
-
-                gnc_get_window_size( SX_LIST_WIN_PREFIX, &width, &height );
-                if ( width != 0 && height != 0 ) {
-                        gtk_window_set_default_size( GTK_WINDOW(sxd->dialog),
-                                                     width, height );
-                }
-        }
+	gnc_restore_window_size(SX_LIST_GCONF_SECTION, GTK_WINDOW(sxd->dialog));
 
         gnc_register_gui_component( DIALOG_SCHEDXACTION_CM_CLASS,
                                     NULL, /* no refresh_handler */
@@ -1275,10 +1269,7 @@
 void
 gnc_sxl_record_size( SchedXactionDialog *sxd )
 {
-        gint x, y, w, h, d;
-        gdk_window_get_geometry( sxd->dialog->window,
-                                 &x, &y, &w, &h, &d );
-        gnc_save_window_size( SX_LIST_WIN_PREFIX, w, h );
+	gnc_save_window_size(SX_LIST_GCONF_SECTION, GTK_WINDOW(sxd->dialog));
 }
 
 void
@@ -1505,14 +1496,7 @@
 	/* Allow grow, allow shrink, auto-shrink */
         gtk_window_set_policy (GTK_WINDOW(sxed->dialog), TRUE, TRUE, FALSE);
 
-        {
-                int width, height;
-                gnc_get_window_size( SXED_WIN_PREFIX, &width, &height );
-                if ( width != 0 && height != 0 ) {
-                        gtk_window_set_default_size( GTK_WINDOW( sxed->dialog ),
-                                                     width, height );
-                }
-        }
+	gnc_restore_window_size(SXED_GCONF_SECTION, GTK_WINDOW(sxed->dialog));
 
         /* create the frequency-selection macrowidget and example
          * [dense-]calendar. */
@@ -1536,10 +1520,7 @@
 void
 gnc_sxed_record_size( SchedXactionEditorDialog *sxed )
 {
-        gint x, y, w, h, d;
-        gdk_window_get_geometry( sxed->dialog->window,
-                                 &x, &y, &w, &h, &d );
-        gnc_save_window_size( SXED_WIN_PREFIX, w, h );
+	gnc_save_window_size( SXED_GCONF_SECTION, GTK_WINDOW(sxed->dialog) );
 }
 
 static
Index: dialog-commodities.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-commodities.c,v
retrieving revision 1.14.4.10
retrieving revision 1.14.4.11
diff -Lsrc/gnome/dialog-commodities.c -Lsrc/gnome/dialog-commodities.c -u -r1.14.4.10 -r1.14.4.11
--- src/gnome/dialog-commodities.c
+++ src/gnome/dialog-commodities.c
@@ -2,6 +2,7 @@
  * dialog-commodities.c -- commodities dialog                       *
  * Copyright (C) 2001 Gnumatic, Inc.                                *
  * Author: Dave Peticolas <dave at krondo.com>                         *
+ * Copyright (C) 2003,2005 David Hampton                            *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -58,9 +59,6 @@
 } CommoditiesDialog;
 
 
-static gint last_width = 0;
-static gint last_height = 0;
-
 void gnc_commodities_window_destroy_cb (GtkObject *object, CommoditiesDialog *cd);
 void gnc_commodities_dialog_response (GtkDialog *dialog, gint response, CommoditiesDialog *cd);
 void gnc_commodities_show_currencies_toggled (GtkToggleButton *toggle, CommoditiesDialog *cd);
@@ -310,12 +308,7 @@
     button = glade_xml_get_widget (xml, "show_currencies_button");
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(button), cd->show_currencies);
 
-  if (last_width == 0)
-    gnc_get_window_size ("commodities_win", &last_width, &last_height);
-
-  if (last_width != 0)
-    gtk_window_resize (GTK_WINDOW(cd->dialog), last_width, last_height);
-
+  gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(cd->dialog));
   gnc_tree_view_commodity_restore_settings (cd->commodity_tree,
 					    GCONF_SECTION);
 }
@@ -325,8 +318,7 @@
 {
   CommoditiesDialog *cd = user_data;
 
-  gtk_window_get_size(GTK_WINDOW(cd->dialog), &last_width, &last_height);
-  gnc_save_window_size("commodities_win", last_width, last_height);
+  gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(cd->dialog));
 
   gnc_gconf_set_bool(GCONF_SECTION, "include_iso", cd->show_currencies, NULL);
   gnc_tree_view_commodity_save_settings (cd->commodity_tree, GCONF_SECTION);
--- /dev/null
+++ src/import-export/hbci/schemas/.cvsignore
@@ -0,0 +1,8 @@
+*.diff
+*.la
+*.lo
+.deps
+.libs
+.scm-links
+Makefile
+Makefile.in
--- /dev/null
+++ src/import-export/hbci/schemas/apps_gnucash_dialog_hbci.schemas
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+  <schemalist>
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/import/hbci/close_on_finish</key>
+      <applyto>/apps/gnucash/dialogs/import/hbci/close_on_finish</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>True</default>
+      <locale name="C">
+        <short>Close dialog when finished</short>
+        <long>
+	  Set this key to TRUE to automatically close the window when
+	  you finish the HBCI import process.
+	</long>
+      </locale>
+    </schema>
+
+  </schemalist>
+</gconfschemafile>
--- /dev/null
+++ src/import-export/hbci/schemas/Makefile.am
@@ -0,0 +1,14 @@
+schemadir   = @GCONF_SCHEMA_FILE_DIR@
+schema_DATA = \
+  apps_gnucash_dialog_hbci.schemas
+
+install-data-local:
+if GCONF_SCHEMAS_INSTALL
+	-GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-install-rule $(srcdir)/$(schema_DATA)
+endif
+
+uninstall-local:
+if GCONF_SCHEMAS_INSTALL
+	-GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) gconftool-2 --makefile-uninstall-rule $(srcdir)/$(schema_DATA)
+endif
+
--- /dev/null
+++ src/gnome/schemas/apps_gnucash_window_pages_register.schemas
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+  <schemalist>
+    <schema>
+      <key>/schemas/apps/gnucash/window/pages/register/width</key>
+      <applyto>/apps/gnucash/window/pages/register/balance_width</applyto>
+      <applyto>/apps/gnucash/window/pages/register/credit_width</applyto>
+      <applyto>/apps/gnucash/window/pages/register/date-due_width</applyto>
+      <applyto>/apps/gnucash/window/pages/register/debit_width</applyto>
+      <applyto>/apps/gnucash/window/pages/register/num_width</applyto>
+      <applyto>/apps/gnucash/window/pages/register/split-type_width</applyto>
+      <applyto>/apps/gnucash/window/pages/register/transfer_width</applyto>
+      <owner>gnucash</owner>
+      <type>int</type>
+      <locale name="C">
+        <short>Width of a column in the dialog</short>
+        <long>
+	  This key contains the width of the named column in the most
+	  recently closed register window.  Changing these values will
+	  change the sizes of the columns in the next opened register
+	</long>
+      </locale>
+    </schema>
+
+  </schemalist>
+</gconfschemafile>
Index: apps_gnucash_dialog_prices.schemas
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/schemas/Attic/apps_gnucash_dialog_prices.schemas,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -Lsrc/gnome/schemas/apps_gnucash_dialog_prices.schemas -Lsrc/gnome/schemas/apps_gnucash_dialog_prices.schemas -u -r1.1.2.2 -r1.1.2.3
--- src/gnome/schemas/apps_gnucash_dialog_prices.schemas
+++ src/gnome/schemas/apps_gnucash_dialog_prices.schemas
@@ -2,8 +2,8 @@
 <gconfschemafile>
   <schemalist>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/prices_dialog/column_order</key>
-      <applyto>/apps/gnucash/dialogs/prices_dialog/column_order</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_prices/column_order</key>
+      <applyto>/apps/gnucash/dialogs/edit_prices/column_order</applyto>
       <owner>gnucash</owner>
       <type>list</type>
       <list_type>string</list_type>
@@ -18,8 +18,8 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/prices_dialog/commodity_visible</key>
-      <applyto>/apps/gnucash/dialogs/prices_dialog/commodity_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_prices/commodity_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_prices/commodity_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>TRUE</default>
@@ -29,8 +29,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/prices_dialog/currency_visible</key>
-      <applyto>/apps/gnucash/dialogs/prices_dialog/currency_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_prices/currency_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_prices/currency_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>TRUE</default>
@@ -40,8 +40,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/prices_dialog/date_visible</key>
-      <applyto>/apps/gnucash/dialogs/prices_dialog/date_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_prices/date_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_prices/date_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>TRUE</default>
@@ -51,8 +51,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/prices_dialog/source_visible</key>
-      <applyto>/apps/gnucash/dialogs/prices_dialog/source_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_prices/source_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_prices/source_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>TRUE</default>
@@ -62,8 +62,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/prices_dialog/type_visible</key>
-      <applyto>/apps/gnucash/dialogs/prices_dialog/type_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_prices/type_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_prices/type_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>TRUE</default>
@@ -73,8 +73,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/prices_dialog/price_visible</key>
-      <applyto>/apps/gnucash/dialogs/prices_dialog/price_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_prices/price_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_prices/price_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>TRUE</default>
--- /dev/null
+++ src/gnome/schemas/apps_gnucash_dialog_common.schemas
@@ -0,0 +1,117 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+  <schemalist>
+
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/position</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/window_position</applyto>
+      <applyto>/apps/gnucash/dialogs/find/window_position</applyto>
+      <applyto>/apps/gnucash/dialogs/edit_prices/window_position</applyto>
+      <applyto>/apps/gnucash/dialogs/scheduled_trans/since_last_run/window_position</applyto>
+      <applyto>/apps/gnucash/dialogs/scheduled_trans/transaction_editor/window_position</applyto>
+      <applyto>/apps/gnucash/dialogs/scheduled_trans/transaction_list/window_position</applyto>
+      <applyto>/apps/gnucash/dialogs/tax_info/window_position</applyto>
+      <owner>gnucash</owner>
+      <type>list</type>
+      <list_type>int</list_type>
+      <locale name="C">
+        <short>Window position</short>
+        <long>
+	  The X,Y coordinates of the top left corner of the dialog
+	  when it was last closed.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/geometry</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/window_geometry</applyto>
+      <applyto>/apps/gnucash/dialogs/find/window_geometry</applyto>
+      <applyto>/apps/gnucash/dialogs/edit_prices/window_geometry</applyto>
+      <applyto>/apps/gnucash/dialogs/scheduled_trans/since_last_run/window_geometry</applyto>
+      <applyto>/apps/gnucash/dialogs/scheduled_trans/transaction_editor/window_geometry</applyto>
+      <applyto>/apps/gnucash/dialogs/scheduled_trans/transaction_list/window_geometry</applyto>
+      <applyto>/apps/gnucash/dialogs/tax_info/window_geometry</applyto>
+      <owner>gnucash</owner>
+      <type>list</type>
+      <list_type>int</list_type>
+      <locale name="C">
+        <short>Window geometry</short>
+        <long>
+	  The width and size of the dialog when it was last closed.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/search_for_active_only</key>
+      <applyto>/apps/gnucash/dialogs/find/search_for_active_only</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <locale name="C">
+        <short>Search only in active items</short>
+        <long>
+	  This key indicates whether to search in all items in the
+	  current class, or only in 'active' items in the current
+	  class.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/last_path</key>
+      <applyto>/apps/gnucash/dialogs/export_accounts/last_path</applyto>
+      <applyto>/apps/gnucash/dialogs/log_replay/last_path</applyto>
+      <applyto>/apps/gnucash/dialogs/import/mt940/last_path</applyto>
+      <applyto>/apps/gnucash/dialogs/import/ofx/last_path</applyto>
+      <applyto>/apps/gnucash/dialogs/import/qif/last_path</applyto>
+      <owner>gnucash</owner>
+      <type>string</type>
+      <locale name="C">
+        <short>Last pathname used</short>
+        <long>
+	  This key contains the last pathname used by this dialog.  It
+	  will be used as the initial filename/pathname the next time
+	  this dialog is opened.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/sort_column</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/sort_column</applyto>
+      <applyto>/apps/gnucash/dialogs/edit_prices/sort_column</applyto>
+      <applyto>/apps/gnucash/window/pages/account_tree/sort_column</applyto>
+      <owner>gnucash</owner>
+      <type>list</type>
+      <list_type>string</list_type>
+      <locale name="C">
+        <short>How is the key column sorted</short>
+        <long>
+	  This key indicates which column in the tree is used for
+	  sorting.  Legal values for this key are the name of any
+	  column in this dialog (see the column_order key) or the
+	  keyword 'none'.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/sort_order</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/sort_order</applyto>
+      <applyto>/apps/gnucash/dialogs/edit_prices/sort_order</applyto>
+      <applyto>/apps/gnucash/window/pages/account_tree/sort_order</applyto>
+      <owner>gnucash</owner>
+      <type>list</type>
+      <list_type>string</list_type>
+      <locale name="C">
+        <short>How is the key column sorted</short>
+        <long>
+	  This key indicates how the key column is sorted.  Legal
+	  values for this key are 'ascending' and 'descending'.
+	</long>
+      </locale>
+    </schema>
+
+  </schemalist>
+</gconfschemafile>
Index: apps_gnucash_dialog_commodities.schemas
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/schemas/Attic/apps_gnucash_dialog_commodities.schemas,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -Lsrc/gnome/schemas/apps_gnucash_dialog_commodities.schemas -Lsrc/gnome/schemas/apps_gnucash_dialog_commodities.schemas -u -r1.1.2.2 -r1.1.2.3
--- src/gnome/schemas/apps_gnucash_dialog_commodities.schemas
+++ src/gnome/schemas/apps_gnucash_dialog_commodities.schemas
@@ -2,8 +2,8 @@
 <gconfschemafile>
   <schemalist>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/commodities_dialog/column_order</key>
-      <applyto>/apps/gnucash/dialogs/commodities_dialog/column_order</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_commodities/column_order</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/column_order</applyto>
       <owner>gnucash</owner>
       <type>list</type>
       <list_type>string</list_type>
@@ -18,8 +18,8 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/commodities_dialog/namespace_visible</key>
-      <applyto>/apps/gnucash/dialogs/commodities_dialog/namespace_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_commodities/namespace_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/namespace_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>TRUE</default>
@@ -29,8 +29,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/commodities_dialog/symbol_visible</key>
-      <applyto>/apps/gnucash/dialogs/commodities_dialog/symbol_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_commodities/symbol_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/symbol_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>TRUE</default>
@@ -40,8 +40,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/commodities_dialog/name_visible</key>
-      <applyto>/apps/gnucash/dialogs/commodities_dialog/name_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_commodities/name_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/name_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>TRUE</default>
@@ -51,8 +51,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/commodities_dialog/fullname_visible</key>
-      <applyto>/apps/gnucash/dialogs/commodities_dialog/fullname_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_commodities/fullname_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/fullname_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>FALSE</default>
@@ -62,8 +62,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/commodities_dialog/printname_visible</key>
-      <applyto>/apps/gnucash/dialogs/commodities_dialog/printname_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_commodities/printname_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/printname_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>FALSE</default>
@@ -73,8 +73,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/commodities_dialog/uniquename_visible</key>
-      <applyto>/apps/gnucash/dialogs/commodities_dialog/uniquename_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_commodities/uniquename_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/uniquename_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>FALSE</default>
@@ -84,8 +84,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/commodities_dialog/code_visible</key>
-      <applyto>/apps/gnucash/dialogs/commodities_dialog/code_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_commodities/code_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/code_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>TRUE</default>
@@ -95,8 +95,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/commodities_dialog/fraction_visible</key>
-      <applyto>/apps/gnucash/dialogs/commodities_dialog/fraction_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_commodities/fraction_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/fraction_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>TRUE</default>
@@ -106,8 +106,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/commodities_dialog/quote_flag_visible</key>
-      <applyto>/apps/gnucash/dialogs/commodities_dialog/quote_flag_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_commodities/quote_flag_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/quote_flag_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>FALSE</default>
@@ -117,8 +117,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/commodities_dialog/quote_source_visible</key>
-      <applyto>/apps/gnucash/dialogs/commodities_dialog/quote_source_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_commodities/quote_source_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/quote_source_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>FALSE</default>
@@ -128,8 +128,8 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/commodities_dialog/quote_timezone_visible</key>
-      <applyto>/apps/gnucash/dialogs/commodities_dialog/quote_timezone_visible</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_commodities/quote_timezone_visible</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/quote_timezone_visible</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>FALSE</default>
@@ -140,8 +140,8 @@
     </schema>
 
     <schema>
-      <key>/schemas/apps/gnucash/dialogs/commodities_dialog/include_iso</key>
-      <applyto>/apps/gnucash/dialogs/commodities_dialog/include_iso</applyto>
+      <key>/schemas/apps/gnucash/dialogs/edit_commodities/include_iso</key>
+      <applyto>/apps/gnucash/dialogs/edit_commodities/include_iso</applyto>
       <owner>gnucash</owner>
       <type>bool</type>
       <default>FALSE</default>
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/schemas/Attic/Makefile.am,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -Lsrc/gnome/schemas/Makefile.am -Lsrc/gnome/schemas/Makefile.am -u -r1.1.2.4 -r1.1.2.5
--- src/gnome/schemas/Makefile.am
+++ src/gnome/schemas/Makefile.am
@@ -1,7 +1,9 @@
 schemadir   = @GCONF_SCHEMA_FILE_DIR@
 schema_DATA = \
+  apps_gnucash_dialog_common.schemas \
   apps_gnucash_dialog_commodities.schemas \
   apps_gnucash_dialog_prices.schemas \
+  apps_gnucash_window_pages_register.schemas \
   apps_gnucash_dialog_totd.schemas
 
 install-data-local:
Index: gnc-log-replay.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/log-replay/gnc-log-replay.c,v
retrieving revision 1.4.2.5
retrieving revision 1.4.2.6
diff -Lsrc/import-export/log-replay/gnc-log-replay.c -Lsrc/import-export/log-replay/gnc-log-replay.c -u -r1.4.2.5 -r1.4.2.6
--- src/import-export/log-replay/gnc-log-replay.c
+++ src/import-export/log-replay/gnc-log-replay.c
@@ -44,10 +44,13 @@
 #include "gnc-engine-util.h"
 #include "gnc-book.h"
 #include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 
 #include "dialog-utils.h"
 
 
+#define GCONF_SECTION "dialogs/log_replay"
+
 /*static short module = MOD_IMPORT;*/
 static short module = MOD_TEST;
 
@@ -502,18 +505,19 @@
   gnc_set_log_level(MOD_IMPORT, GNC_LOG_DEBUG);
   ENTER(" ");
 
-  default_dir = gnc_lookup_string_option("__paths", "Log Files", NULL);
+  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
   if (default_dir == NULL)
     gnc_init_default_directory(&default_dir);
   selected_filename = gnc_file_dialog(_("Select a .log file to replay"),
 				      NULL,
 				      default_dir);
+  g_free(default_dir);
 
   if(selected_filename!=NULL)
     {
       /* Remember the directory as the default. */
       gnc_extract_directory(&default_dir, selected_filename);
-      gnc_set_string_option("__paths", "Log Files", default_dir);
+      gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
       g_free(default_dir);
 
       /*strncpy(file,selected_filename, 255);*/
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/log-replay/Makefile.am,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -Lsrc/import-export/log-replay/Makefile.am -Lsrc/import-export/log-replay/Makefile.am -u -r1.1.4.3 -r1.1.4.4
--- src/import-export/log-replay/Makefile.am
+++ src/import-export/log-replay/Makefile.am
@@ -15,12 +15,14 @@
 
 libgncmod_log_replay_la_LIBADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${top_builddir}/src/engine/libgncmod-engine.la \
   ${top_builddir}/src/import-export/libgncmod-generic-import.la \
   ${GLIB_LIBS}
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/app-utils \
Index: dialog-search.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/dialog-search.h,v
retrieving revision 1.10.4.2
retrieving revision 1.10.4.3
diff -Lsrc/gnome-search/dialog-search.h -Lsrc/gnome-search/dialog-search.h -u -r1.10.4.2 -r1.10.4.3
--- src/gnome-search/dialog-search.h
+++ src/gnome-search/dialog-search.h
@@ -92,7 +92,8 @@
 			  GNCSearchCallbackButton *callbacks,
 			  GNCSearchResultCB result_callback,
 			  GNCSearchNewItemCB new_item_cb,
-			  gpointer user_data, GNCSearchFree free_user_data);
+			  gpointer user_data, GNCSearchFree free_user_data,
+			  const gchar *gconf_section);
 
 void gnc_search_dialog_destroy (GNCSearchWindow *sw);
 void gnc_search_dialog_raise (GNCSearchWindow *sw);
Index: dialog-search.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/dialog-search.c,v
retrieving revision 1.35.4.15
retrieving revision 1.35.4.16
diff -Lsrc/gnome-search/dialog-search.c -Lsrc/gnome-search/dialog-search.c -u -r1.35.4.15 -r1.35.4.16
--- src/gnome-search/dialog-search.c
+++ src/gnome-search/dialog-search.c
@@ -33,6 +33,7 @@
 #include "gnc-gui-query.h"
 #include "global-options.h"
 #include "gnc-query-list.h"
+#include "gnc-gconf-utils.h"
 #include "gncObject.h"
 #include "QueryNew.h"
 #include "QueryObject.h"
@@ -45,6 +46,7 @@
 #include "search-param.h"
 
 #define DIALOG_SEARCH_CM_CLASS "dialog-search"
+#define KEY_ACTIVE_ONLY "search_for_active_only"
 
 typedef enum {
   GNC_SEARCH_MATCH_ALL = 0,
@@ -104,6 +106,7 @@
   GList *	crit_list;	/* list of crit_data */
 
   gint		component_id;
+  const gchar * gconf_section;
 };
 
 struct _crit_data {
@@ -320,8 +323,9 @@
 static void
 search_active_only_cb (GtkToggleButton *button, GNCSearchWindow *sw)
 {
-  gnc_set_boolean_option("__gui", "search_for_active_only",
-			 gtk_toggle_button_get_active (button));
+
+  gnc_gconf_set_bool(sw->gconf_section, KEY_ACTIVE_ONLY,
+		     gtk_toggle_button_get_active (button), NULL);
 }
 
 static void
@@ -747,6 +751,7 @@
   GtkWidget *menu, *item, *omenu;
   GtkWidget *new_item_button;
   const char * type_label;
+  gboolean active;
 
   xml = gnc_glade_xml_new ("search.glade", "Search Dialog");
 
@@ -800,11 +805,10 @@
   sw->add_rb = glade_xml_get_widget (xml, "add_search_radiobutton");
   sw->del_rb = glade_xml_get_widget (xml, "delete_search_radiobutton");
 
+  active = gnc_gconf_get_bool(sw->gconf_section, KEY_ACTIVE_ONLY, NULL);
   sw->active_only_check = glade_xml_get_widget (xml, "active_only_check");
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sw->active_only_check),
-				gnc_lookup_boolean_option ("__gui",
-							   "search_for_active_only",
-							   TRUE));
+				active);
 
   /* Figure out if we this object-type has an "active" parameter, and
    * if not, then set the active-check button insensitive
@@ -876,6 +880,8 @@
 gnc_search_dialog_destroy (GNCSearchWindow *sw)
 {
   if (!sw) return;
+  if (sw->gconf_section)
+    gnc_save_window_size(sw->gconf_section, GTK_WINDOW(sw->dialog));
   gnc_close_gui_component (sw->component_id);
 }
 
@@ -893,7 +899,8 @@
 			  GNCSearchCallbackButton *callbacks,
 			  GNCSearchResultCB result_callback,
 			  GNCSearchNewItemCB new_item_cb,
-			  gpointer user_data, GNCSearchFree free_cb)
+			  gpointer user_data, GNCSearchFree free_cb,
+			  const gchar *gconf_section)
 {
   GNCSearchWindow *sw = g_new0 (GNCSearchWindow, 1);
 
@@ -916,6 +923,7 @@
   sw->new_item_cb = new_item_cb;
   sw->user_data = user_data;
   sw->free_cb = free_cb;
+  sw->gconf_section = gconf_section;
 
   /* Grab the get_guid function */
   sw->get_guid = qof_class_get_parameter (sw->search_for, QOF_PARAM_GUID);
@@ -924,6 +932,8 @@
   sw->q = show_start_query;
 
   gnc_search_dialog_init_widgets (sw);
+  if (sw->gconf_section)
+    gnc_restore_window_size(sw->gconf_section, GTK_WINDOW(sw->dialog));
 
   /* Maybe display the original query results? */
   if (callbacks && show_start_query) {
@@ -1056,5 +1066,6 @@
     display = get_display_list (GNC_ID_SPLIT);
 
   sw = gnc_search_dialog_create (GNC_ID_SPLIT, params, display,
-				 NULL, NULL, buttons, NULL, NULL, NULL, NULL);
+				 NULL, NULL, buttons, NULL, NULL, NULL, NULL,
+				 NULL);
 }
Index: gnc-mt940-import.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/mt940/gnc-mt940-import.c,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -Lsrc/import-export/mt940/gnc-mt940-import.c -Lsrc/import-export/mt940/gnc-mt940-import.c -u -r1.2.2.2 -r1.2.2.3
--- src/import-export/mt940/gnc-mt940-import.c
+++ src/import-export/mt940/gnc-mt940-import.c
@@ -47,10 +47,12 @@
 #include "gnc-engine-util.h"
 #include "gnc-file-dialog.h"
 #include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-hbci-utils.h"
 
 #include "gnc-mt940-import.h"
 
+#define GCONF_SECTION "dialogs/import/mt940"
 
 static short module = MOD_IMPORT;
 
@@ -72,18 +74,19 @@
   /* gnc_should_log(MOD_IMPORT, GNC_LOG_TRACE); */
   DEBUG("gnc_file_mt940_import(): Begin...\n");
 
-  default_dir = gnc_lookup_string_option("__paths", "Import MT940", NULL);
+  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
   if (default_dir == NULL)
     gnc_init_default_directory(&default_dir);
   selected_filename = gnc_file_dialog(_("Select an MT940 file to process"),
 				      NULL,
 				      default_dir);
+  g_free(default_dir);
 
   if(selected_filename!=NULL)
     {
       /* Remember the directory as the default. */
       gnc_extract_directory(&default_dir, selected_filename);
-      gnc_set_string_option("__paths", "Import MT940", default_dir);
+      gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
       g_free(default_dir);
 
       /*strncpy(file,selected_filename, 255);*/
Index: gnc-ofx-import.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/ofx/gnc-ofx-import.c,v
retrieving revision 1.28.4.7
retrieving revision 1.28.4.8
diff -Lsrc/import-export/ofx/gnc-ofx-import.c -Lsrc/import-export/ofx/gnc-ofx-import.c -u -r1.28.4.7 -r1.28.4.8
--- src/import-export/ofx/gnc-ofx-import.c
+++ src/import-export/ofx/gnc-ofx-import.c
@@ -50,10 +50,11 @@
 #include "gnc-engine-util.h"
 #include "gnc-book.h"
 #include "gnc-ui-util.h"
-
+#include "gnc-gconf-utils.h"
 
 #include "dialog-utils.h"
 
+#define GCONF_SECTION "dialogs/import/ofx"
 
 static short module = MOD_IMPORT;
 
@@ -618,18 +619,19 @@
   gnc_should_log(MOD_IMPORT, GNC_LOG_TRACE);
   DEBUG("gnc_file_ofx_import(): Begin...\n");
 
-  default_dir = gnc_lookup_string_option("__paths", "Import OFX", NULL);
+  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
   if (default_dir == NULL)
     gnc_init_default_directory(&default_dir);
   selected_filename = gnc_file_dialog(_("Select an OFX/QFX file to process"),
 				      NULL,
 				      default_dir);
+  g_free(default_dir);
 
   if(selected_filename!=NULL)
     {
       /* Remember the directory as the default. */
       gnc_extract_directory(&default_dir, selected_filename);
-      gnc_set_string_option("__paths", "Import OFX", default_dir);
+      gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
       g_free(default_dir);
 
       /*strncpy(file,selected_filename, 255);*/
Index: druid-qif-import.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/druid-qif-import.c,v
retrieving revision 1.22.4.10
retrieving revision 1.22.4.11
diff -Lsrc/import-export/qif-import/druid-qif-import.c -Lsrc/import-export/qif-import/druid-qif-import.c -u -r1.22.4.10 -r1.22.4.11
--- src/import-export/qif-import/druid-qif-import.c
+++ src/import-export/qif-import/druid-qif-import.c
@@ -45,6 +45,7 @@
 #include "gnc-file-dialog.h"
 #include "gnc-gui-query.h"
 #include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-ui.h"
 #include "messages.h"
 #include "guile-mappings.h"
@@ -52,6 +53,7 @@
 #include <g-wrap-wct.h>
 
 #define DRUID_QIF_IMPORT_CM_CLASS "druid-qif-import"
+#define GCONF_SECTION "dialogs/import/qif"
 
 struct _qifimportwindow {
   GtkWidget * window;
@@ -354,10 +356,11 @@
   char *file_name, *default_dir;
 
   /* Default to whatever's already present */
-  default_dir = gnc_lookup_string_option("__paths", "Import QIF", NULL);
+  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
   if (default_dir == NULL)
     gnc_init_default_directory(&default_dir);
   new_file_name = gnc_file_dialog (_("Select QIF File"), "*.qif", default_dir);
+  g_free(default_dir);
 
   /* Insure valid data, and something that can be freed. */
   if (new_file_name == NULL) {
@@ -374,7 +377,7 @@
 
   /* Update the working directory */
   gnc_extract_directory(&default_dir, file_name);
-  gnc_set_string_option("__paths", "Import QIF", default_dir);
+  gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
   g_free(default_dir);
   g_free(file_name);
 
Index: split-register.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register.h,v
retrieving revision 1.16.4.3
retrieving revision 1.16.4.4
diff -Lsrc/register/ledger-core/split-register.h -Lsrc/register/ledger-core/split-register.h -u -r1.16.4.3 -r1.16.4.4
--- src/register/ledger-core/split-register.h
+++ src/register/ledger-core/split-register.h
@@ -183,7 +183,7 @@
 #define DEBT_CELL  "debit"
 #define DESC_CELL  "description"
 #define FCRED_CELL "credit-formula"
-#define FDEBT_CELL "debit formula"
+#define FDEBT_CELL "debit-formula"
 #define MEMO_CELL  "memo"
 #define MXFRM_CELL "transfer"
 #define NOTES_CELL "notes"
Index: table-gnome.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/table-gnome.c,v
retrieving revision 1.12.4.5
retrieving revision 1.12.4.6
diff -Lsrc/register/register-gnome/table-gnome.c -Lsrc/register/register-gnome/table-gnome.c -u -r1.12.4.5 -r1.12.4.6
--- src/register/register-gnome/table-gnome.c
+++ src/register/register-gnome/table-gnome.c
@@ -51,14 +51,17 @@
 #include "table-allgui.h"
 #include "table-gnome.h"
 #include "guile-mappings.h"
+#include "gnc-gconf-utils.h"
 
+#define GCONF_SECTION "window/pages/register"
 
 void
 gnc_table_save_state (Table *table)
 {
         GnucashSheet *sheet;
         GNCHeaderWidths widths;
-        SCM alist;
+	GList *node;
+	gchar *key;
 
         if (!table)
                 return;
@@ -66,40 +69,32 @@
         if (table->ui_data == NULL)
                 return;
 
+        if (!gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", TRUE))
+		return;
+
         sheet = GNUCASH_SHEET (table->ui_data);
 
         widths = gnc_header_widths_new ();
 
         gnucash_sheet_get_header_widths (sheet, widths);
 
-        alist = SCM_EOL;
-        if (gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", TRUE))
-        {
-                GList *node = gnc_table_layout_get_cells (table->layout);
-
-                for (; node; node = node->next)
-                {
-                        BasicCell *cell = node->data;
-                        int width;
-                        SCM assoc;
-
-                        width = gnc_header_widths_get_width (widths,
-                                                             cell->cell_name);
-                        if (width <= 0)
-                                continue;
-
-                        if (cell->expandable)
-                                continue;
-
-                        assoc = scm_cons (scm_makfrom0str(cell->cell_name),
-					  scm_int2num(width));
-
-                        alist = scm_cons (assoc, alist);
-                }
-        }
-
-        if (!SCM_NULLP (alist))
-                gnc_set_option ("__gui", "reg_column_widths", alist);
+	node = gnc_table_layout_get_cells (table->layout);
+	for (; node; node = node->next) {
+		BasicCell *cell = node->data;
+		int width;
+
+		width = gnc_header_widths_get_width (widths, cell->cell_name);
+		if (width <= 0)
+			continue;
+
+		if (cell->expandable)
+			continue;
+
+		/* Remember whether the column is visible */
+		key = g_strdup_printf("%s_width", cell->cell_name);
+		gnc_gconf_set_int(GCONF_SECTION, key, width, NULL);
+		g_free(key);
+	}
 
         gnc_header_widths_destroy (widths);
 }
@@ -145,7 +140,9 @@
         GnucashSheet *sheet;
         GnucashRegister *greg;
         Table *table;
-        SCM alist;
+	GList *node;
+	gchar *key;
+	guint value;
 
         g_return_if_fail (widget != NULL);
         g_return_if_fail (GNUCASH_IS_REGISTER (widget));
@@ -165,31 +162,22 @@
 
         widths = gnc_header_widths_new ();
 
-        if (gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", TRUE))
-                alist = gnc_lookup_option ("__gui", "reg_column_widths",
-                                           SCM_EOL);
-        else
-                alist = SCM_EOL;
-
-        while (SCM_LISTP (alist) && !SCM_NULLP (alist))
-        {
-                char *name;
-                SCM assoc;
-
-                assoc = SCM_CAR (alist);
-                alist = SCM_CDR (alist);
-
-                name = gh_scm2newstr(SCM_CAR (assoc), NULL);
-                if (!name)
-                        continue;
-
-                gnc_header_widths_set_width (widths, name,
-                                             scm_num2int(SCM_CDR (assoc),
-							 SCM_ARG1,
-							 __FUNCTION__));
-
-                free (name);
-        }
+        if (gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", TRUE)) {
+		node = gnc_table_layout_get_cells (table->layout);
+		for (; node; node = node->next) {
+			BasicCell *cell = node->data;
+
+			if (cell->expandable)
+				continue;
+
+			/* Remember whether the column is visible */
+			key = g_strdup_printf("%s_width", cell->cell_name);
+			value = gnc_gconf_get_int(GCONF_SECTION, key, NULL);
+			if (value != 0)
+				gnc_header_widths_set_width (widths, cell->cell_name, value);
+			g_free(key);
+		}
+	}
 
         gnucash_sheet_create_styles (sheet);
 
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/Makefile.am,v
retrieving revision 1.16.4.1
retrieving revision 1.16.4.2
diff -Lsrc/register/register-gnome/Makefile.am -Lsrc/register/register-gnome/Makefile.am -u -r1.16.4.1 -r1.16.4.2
--- src/register/register-gnome/Makefile.am
+++ src/register/register-gnome/Makefile.am
@@ -5,6 +5,7 @@
 libgncmod_register_gnome_la_LDFLAGS = -module 
 libgncmod_register_gnome_la_LIBADD = \
   ${top_builddir}/src/register/register-core/libgncmod-register-core.la \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${top_builddir}/src/engine/libgncmod-engine.la \
   ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
@@ -52,6 +53,7 @@
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/app-utils \
Index: main.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/main.scm,v
retrieving revision 1.109.2.13
retrieving revision 1.109.2.14
diff -Lsrc/scm/main.scm -Lsrc/scm/main.scm -u -r1.109.2.13 -r1.109.2.14
--- src/scm/main.scm
+++ src/scm/main.scm
@@ -623,8 +623,7 @@
           (if (and
                (not (gnc:account-file-to-load))
                (not (string? (gnc:history-get-last)))
-               (gnc:option-value
-                (gnc:lookup-global-option "__new_user" "first_startup")))
+	       (gnc:gconf-get-bool "dialogs/new_user" "first_startup"))
               (begin
                 (gnc:destroy-splash-screen)
                 (gnc:new-user-dialog))


More information about the gnucash-changes mailing list