mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/scm/tip-of-the-day.scm (gnc:read-tips): use
%search-load-path to find the tips, not gnc:find-in-directories and gnc:*load-path*. In truth, the tips should be in sharedir anyway, but we'll handle that later. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6106 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
958dcdd6fa
commit
9bcb791fcd
@ -47,22 +47,21 @@
|
||||
(define gnc:*tip-list* '())
|
||||
|
||||
(define (gnc:read-tips)
|
||||
(let ((in-port (open-input-file
|
||||
(gnc:find-in-directories
|
||||
(gnc:config-var-value-get gnc:*tip-file*)
|
||||
(gnc:config-var-value-get gnc:*load-path*)))))
|
||||
(set! gnc:*tip-list* (read in-port))
|
||||
(set! gnc:*tip-list*
|
||||
(map (lambda (pair) (cadr pair)) gnc:*tip-list*))
|
||||
(if (not (= (length gnc:*tip-list*) (gnc:current-tip-number)))
|
||||
(begin
|
||||
(gnc:config-var-value-set! gnc:*number-of-tips* #t
|
||||
(length gnc:*tip-list*))
|
||||
(if (<= (gnc:config-var-value-get gnc:*number-of-tips*)
|
||||
(gnc:current-tip-number))
|
||||
(gnc:reset-tip-number))))
|
||||
(close-port in-port)
|
||||
#f))
|
||||
(let ((in-port
|
||||
(open-input-file
|
||||
(%search-load-path (gnc:config-var-value-get gnc:*tip-file*)))))
|
||||
(set! gnc:*tip-list* (read in-port))
|
||||
(set! gnc:*tip-list*
|
||||
(map (lambda (pair) (cadr pair)) gnc:*tip-list*))
|
||||
(if (not (= (length gnc:*tip-list*) (gnc:current-tip-number)))
|
||||
(begin
|
||||
(gnc:config-var-value-set! gnc:*number-of-tips* #t
|
||||
(length gnc:*tip-list*))
|
||||
(if (<= (gnc:config-var-value-get gnc:*number-of-tips*)
|
||||
(gnc:current-tip-number))
|
||||
(gnc:reset-tip-number))))
|
||||
(close-port in-port)
|
||||
#f))
|
||||
|
||||
(define (gnc:current-tip-number)
|
||||
(let ((num (gnc:option-value
|
||||
|
Loading…
Reference in New Issue
Block a user