* app-utils/options.scm -- fix (find-first-account) to search subaccounts

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7369 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2002-10-22 03:28:35 +00:00
parent e83f6643f5
commit bd1e487913
2 changed files with 12 additions and 11 deletions

View File

@ -1,6 +1,10 @@
2002-10-21 Derek Atkins <derek@ihtfp.com>
* app-utils/options.scm -- fix (find-first-account) to search subaccounts
2002-10-20 Benoit Grégoire <bock@step.polymtl.ca>
* src/import-export/Trasaction-matcher.c: Fix compiler warnings.
* src/import-export/ofx/gnc-ofx-import.c: Give the user more information for account creation.
* src/import-export/ofx/gnc-ofx-import.c: Give the user more information
for account creation.
2002-10-20 Derek Atkins <derek@ihtfp.com>
* configure.in -- remove -Wno-uninitialized -Wno-unused, in preparation

View File

@ -672,22 +672,19 @@
item))
(define (find-first-account)
(define (find-first group num-accounts index)
(if (>= index num-accounts)
(define (find-first account-list)
(if (null? account-list)
#f
(let* ((this-account (gnc:group-get-account group index))
(let* ((this-account (car account-list))
(account-type (gw:enum-<gnc:AccountType>-val->sym
(gnc:account-get-type this-account) #f)))
(if (if (null? acct-type-list) #t (member account-type acct-type-list))
this-account
(find-first group num-accounts (+ index 1))))))
(find-first (cdr account-list))))))
(let* ((current-group (gnc:get-current-group))
(num-accounts (gnc:group-get-num-accounts
current-group)))
(if (> num-accounts 0)
(find-first current-group num-accounts 0)
#f)))
(account-list (gnc:group-get-subaccounts current-group)))
(find-first account-list)))
(define (get-default)
(if default-getter