From a6fddef16ab5f23444b52fd6a8643ef4226b0b94 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Thu, 31 Dec 1998 07:47:05 +0000 Subject: [PATCH] enbale some of the preferences code git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1508 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/scm/startup/prefs.scm | 72 +++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/scm/startup/prefs.scm b/src/scm/startup/prefs.scm index 7929a21165..ca29cbc3a6 100644 --- a/src/scm/startup/prefs.scm +++ b/src/scm/startup/prefs.scm @@ -1,42 +1,42 @@ -;;;; Preferences... +;; Preferences... -;; (define gnc:*double-entry-restriction* -;; (gnc:make-config-var -;; "Determines how the splits in a transaction will be balanced. -;; The following values have significance: -;; -;; #f anything goes -;; -;; 'force The sum of all splits in a transaction will be -;; forced to be zero, even if this requires the -;; creation of additional splits. Note that a split -;; whose value is zero (e.g. a stock price) can exist -;; by itself. Otherwise, all splits must come in at -;; least pairs. -;; -;; 'collect splits without parents will be forced into a -;; lost & found account. (Not implemented)" -;; (lambda (var value) -;; (cond -;; ((eq? value #f) -;; (_gnc_set_force_double_entry_ 0) -;; (list value)) -;; ((eq? value 'force) -;; (_gnc_set_force_double_entry_ 1) -;; (list value)) -;; ((eq? value 'collect) -;; (gnc:warn -;; "gnc:*double-entry-restriction* -- 'collect not supported yet. " -;; "Ignoring.") -;; #f) -;; (else -;; (gnc:warn -;; "gnc:*double-entry-restriction* -- " value " not supported. Ignoring.") -;; #f))) -;; eq? -;; #f)) +(define gnc:*double-entry-restriction* + (gnc:make-config-var + "Determines how the splits in a transaction will be balanced. + The following values have significance: + + #f anything goes + + 'force The sum of all splits in a transaction will be + forced to be zero, even if this requires the + creation of additional splits. Note that a split + whose value is zero (e.g. a stock price) can exist + by itself. Otherwise, all splits must come in at + least pairs. + + 'collect splits without parents will be forced into a + lost & found account. (Not implemented)" + (lambda (var value) + (cond + ((eq? value #f) + (xaccConfigSetForceDoubleEntry 0) + (list value)) + ((eq? value 'force) + (xaccConfigSetForceDoubleEntry 1) + (list value)) + ((eq? value 'collect) + (gnc:warn + "gnc:*double-entry-restriction* -- 'collect not supported yet. " + "Ignoring.") + #f) + (else + (gnc:warn + "gnc:*double-entry-restriction* -- " value " not supported. Ignoring.") + #f))) + eq? + #f)) (define gnc:*arg-show-usage* (gnc:make-config-var