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:
Dave Peticolas 2001-02-26 23:49:22 +00:00
parent 00e2ba294b
commit b82a184849
2 changed files with 25 additions and 2 deletions

View File

@ -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))))))

View File

@ -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)))