[Gnucash-changes] Convert the reconcile window preferences over to gconf.

David Hampton hampton at cvs.gnucash.org
Wed Sep 21 22:10:51 EDT 2005


Log Message:
-----------
Convert the reconcile window preferences over to gconf.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash/src/gnome:
        reconcile-list.c
        reconcile-list.h
        window-reconcile.c
    gnucash/src/gnome/schemas:
        Makefile.am

Added Files:
-----------
    gnucash/src/gnome/schemas:
        apps_gnucash_dialog_reconcile.schemas

Revision Data
-------------
Index: reconcile-list.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/reconcile-list.c,v
retrieving revision 1.61.4.7
retrieving revision 1.61.4.8
diff -Lsrc/gnome/reconcile-list.c -Lsrc/gnome/reconcile-list.c -u -r1.61.4.7 -r1.61.4.8
--- src/gnome/reconcile-list.c
+++ src/gnome/reconcile-list.c
@@ -34,6 +34,7 @@
 #include "dialog-utils.h"
 #include "global-options.h"
 #include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 #include "messages.h"
 #include "reconcile-list.h"
 #include "search-param.h"
@@ -171,9 +172,8 @@
   gnc_reconcile_list_construct (list, query);
 
   /* find the list of splits to auto-reconcile */
-  auto_check = gnc_lookup_boolean_option ("Reconcile",
-                                          "Check off cleared transactions",
-                                          TRUE);
+  auto_check = gnc_gconf_get_bool(GCONF_RECONCILE_SECTION,
+				  "check_cleared", NULL);
 
   if (auto_check) {
     for (splits = xaccQueryGetSplits(query); splits; splits = splits->next) {
@@ -638,9 +638,8 @@
   GList *splits;
   Split *split;
 
-  auto_check = gnc_lookup_boolean_option ("Reconcile",
-                                          "Check off cleared transactions",
-                                          TRUE);
+  auto_check = gnc_gconf_get_bool(GCONF_RECONCILE_SECTION,
+				  "check_cleared", NULL);
 
   strings[5] = NULL;
 
Index: window-reconcile.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/window-reconcile.c,v
retrieving revision 1.103.4.12
retrieving revision 1.103.4.13
diff -Lsrc/gnome/window-reconcile.c -Lsrc/gnome/window-reconcile.c -u -r1.103.4.12 -r1.103.4.13
--- src/gnome/window-reconcile.c
+++ src/gnome/window-reconcile.c
@@ -360,10 +360,11 @@
 static gboolean
 gnc_recn_interest_xfer_get_auto_interest_xfer_allowed( Account *account )
 {
-  return( xaccAccountGetAutoInterestXfer( account,
-               gnc_lookup_boolean_option( "Reconcile",
-                                          "Automatic interest transfer",
-                                          FALSE ) ) );
+  gboolean auto_xfer;
+
+  auto_xfer = gnc_gconf_get_bool(GCONF_RECONCILE_SECTION,
+				 "auto_interest_transfer", NULL);
+  return xaccAccountGetAutoInterestXfer( account, auto_xfer );
 }
 
 /********************************************************************\
@@ -2030,9 +2031,8 @@
   gnc_reconcile_list_commit(GNC_RECONCILE_LIST(recnData->credit), date);
   gnc_reconcile_list_commit(GNC_RECONCILE_LIST(recnData->debit), date);
 
-  auto_payment = gnc_lookup_boolean_option ("Reconcile",
-                                            "Automatic credit card payments",
-                                            TRUE);
+  auto_payment = gnc_gconf_get_bool(GCONF_RECONCILE_SECTION,
+				    "auto_cc_payment", NULL);
 
   account = recn_get_account (recnData);
 
Index: reconcile-list.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/reconcile-list.h,v
retrieving revision 1.20.4.3
retrieving revision 1.20.4.4
diff -Lsrc/gnome/reconcile-list.h -Lsrc/gnome/reconcile-list.h -u -r1.20.4.3 -r1.20.4.4
--- src/gnome/reconcile-list.h
+++ src/gnome/reconcile-list.h
@@ -63,6 +63,8 @@
 			      Split            *split);
 } GNCReconcileListClass;
 
+#define GCONF_RECONCILE_SECTION "dialogs/reconcile"
+
 /***********************************************************
  *                public functions                         *
  ***********************************************************/
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/schemas/Attic/Makefile.am,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -Lsrc/gnome/schemas/Makefile.am -Lsrc/gnome/schemas/Makefile.am -u -r1.1.2.8 -r1.1.2.9
--- src/gnome/schemas/Makefile.am
+++ src/gnome/schemas/Makefile.am
@@ -3,6 +3,7 @@
   apps_gnucash_dialog_common.schemas \
   apps_gnucash_dialog_commodities.schemas \
   apps_gnucash_dialog_prices.schemas \
+  apps_gnucash_dialog_reconcile.schemas \
   apps_gnucash_dialog_totd.schemas \
   apps_gnucash_general.schemas \
   apps_gnucash_warnings.schemas \
--- /dev/null
+++ src/gnome/schemas/apps_gnucash_dialog_reconcile.schemas
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<gconfschemafile>
+  <schemalist>
+
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/reconcile/check_cleared</key>
+      <applyto>/apps/gnucash/dialogs/reconcile/check_cleared</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>TRUE</default>
+      <locale name="C">
+        <short>Pre-select cleared transactions.</short>
+        <long>
+	  This setting controls whether or not any transactions are
+	  celected when a reconciliation dialog is created.  If set to
+	  TRUE, then all transactions marked as cleared in the
+	  register will appear already selected in this dialog. If
+	  FALSE, then no transactions will be initially selected.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/reconcile/auto_interest_transfer</key>
+      <applyto>/apps/gnucash/dialogs/reconcile/auto_interest_transfer</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>FALSE</default>
+      <locale name="C">
+        <short>Prompt for interest charges.</short>
+        <long>
+	  Prior to reconciling an account which charges or pays
+	  interest, prompt the user to enter a transaction for the
+	  interest charge or payment.  Currently only enabled for
+	  Bank, Credit, Mutual, Asset, Receivable, Payable, and
+	  Liability accounts.
+	</long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/gnucash/dialogs/reconcile/auto_cc_payment</key>
+      <applyto>/apps/gnucash/dialogs/reconcile/auto_cc_payment</applyto>
+      <owner>gnucash</owner>
+      <type>bool</type>
+      <default>TRUE</default>
+      <locale name="C">
+        <short>Prompt for credit card payment.</short>
+        <long>
+	  After reconciling a credit card account, prompt the user to
+	  enter a credit card payment.
+	</long>
+      </locale>
+    </schema>
+
+  </schemalist>
+</gconfschemafile>


More information about the gnucash-changes mailing list