mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Load sub-topic if main topic is blank.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3700 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
00e2ba294b
commit
b82a184849
@ -28,9 +28,32 @@
|
||||
(remove-i18n-macros (cdr input))))))
|
||||
(else input)))
|
||||
|
||||
(define (fill-out-topics input)
|
||||
(define (first-non-blank-url input)
|
||||
(cond ((null? input) "")
|
||||
((list? input)
|
||||
(cond ((and (string? (car input)) (not (eq? "" (cadr input))))
|
||||
(cadr input))
|
||||
(else (let ((first (first-non-blank-url (car input))))
|
||||
(if (not (eq? "" first))
|
||||
first
|
||||
(first-non-blank-url (cdr input)))))))
|
||||
(else "")))
|
||||
|
||||
(cond ((null? input) input)
|
||||
((list? input)
|
||||
(cond ((and (string? (car input)) (eq? "" (cadr input)))
|
||||
(cons (car input)
|
||||
(cons (first-non-blank-url (caddr input))
|
||||
(fill-out-topics (cddr input)))))
|
||||
(else (cons (fill-out-topics (car input))
|
||||
(fill-out-topics (cdr input))))))
|
||||
(else input)))
|
||||
|
||||
(define (gnc:load-help-topics fname)
|
||||
(with-input-from-file
|
||||
(gnc:find-in-directories fname
|
||||
(gnc:config-var-value-get gnc:*load-path*))
|
||||
(lambda () (remove-i18n-macros (read)))))
|
||||
(lambda ()
|
||||
(fill-out-topics (remove-i18n-macros (read))))))
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
(((N_ "GnuCash Manual") ""
|
||||
(((N_ "GnuCash Manual") "gnc-help:index.html"
|
||||
(((N_ "Overview") ""
|
||||
(((N_ "Introduction") "gnc-help:xacc-about.html" #f)
|
||||
((N_ "Help") "gnc-help:xacc-userdocs.html" #f)))
|
||||
|
Loading…
Reference in New Issue
Block a user