mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Guile-side clean-up for --namespace option.
Also one bit of uncommitted code from gwrap change. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12912 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -395,8 +395,7 @@ determines formatting details.")
|
||||
'gnc:commodity-table-get-quotable-commodities-info
|
||||
'(gw:glist-of <gnc:quote-info-scm> caller-owned)
|
||||
"gnc_commodity_table_get_quotable_commodities"
|
||||
'((<gnc:commodity-table*> table)
|
||||
((<gw:mchars> caller-owned const) namespace))
|
||||
'((<gnc:commodity-table*> table))
|
||||
"Return a list of all the quotable commodities in a given namespace in the table.")
|
||||
|
||||
|
||||
|
||||
@@ -729,7 +729,7 @@ to another account, it will be removed from that account first.")
|
||||
"xaccAccountFixSplitDateOrder"
|
||||
'((<gnc:Account*> a) (<gnc:Split*> s))
|
||||
"Check to see if split s is in proper sorted date order with respect
|
||||
to the other splits in account a.")
|
||||
to the other splits in account a.")
|
||||
|
||||
(gw:wrap-function
|
||||
ws
|
||||
|
||||
@@ -125,6 +125,9 @@
|
||||
(define gnc:html-style-sheet-style
|
||||
(record-accessor <html-style-sheet> 'style))
|
||||
|
||||
(define gnc:current-saved-stylesheets
|
||||
(gnc:build-dotgnucash-path "stylesheets-2.0"))
|
||||
|
||||
(define (gnc:save-style-sheet-options)
|
||||
(let ((port (false-if-exception
|
||||
(open gnc:current-saved-stylesheets
|
||||
|
||||
@@ -397,6 +397,9 @@
|
||||
(gnc:report-name report)
|
||||
(gnc:report-type report))))
|
||||
|
||||
(define gnc:current-saved-reports
|
||||
(gnc:build-dotgnucash-path "saved-reports-2.0"))
|
||||
|
||||
(define (gnc:report-save-to-savefile report)
|
||||
(let ((conf-file-name gnc:current-saved-reports))
|
||||
;;(display conf-file-name)
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
(define gnc:*share-path* #f)
|
||||
(define gnc:*doc-path* #f)
|
||||
(define gnc:*namespace-regexp* #f)
|
||||
|
||||
(define (gnc:expand-path new-list current-list default-generator)
|
||||
(define (expand-path-item item)
|
||||
@@ -76,13 +75,6 @@
|
||||
eq?
|
||||
#f))
|
||||
|
||||
(set! gnc:*namespace-regexp*
|
||||
(gnc:make-config-var
|
||||
(N_ "Limit price quotes retrieved to commodities whose namespace matched this regexp.")
|
||||
(lambda (var value) (if (string? value) (list value) #f))
|
||||
eq?
|
||||
#f))
|
||||
|
||||
;; Convert the temporary startup value into a config var.
|
||||
(let ((current-value gnc:*debugging?*))
|
||||
(set!
|
||||
@@ -212,6 +204,7 @@ the current value of the path.")
|
||||
(set! gnc:*batch-mode-things-to-do*
|
||||
(cons
|
||||
(lambda ()
|
||||
(gnc:debug "Beginning to add price-quote")
|
||||
(gnc:use-guile-module-here! '(gnucash price-quotes))
|
||||
(gnc:suspend-gui-refresh)
|
||||
(gnc:engine-suspend-events)
|
||||
@@ -225,13 +218,6 @@ the current value of the path.")
|
||||
"FILE"
|
||||
(N_ "Add price quotes to given FILE."))
|
||||
|
||||
(list "namespace"
|
||||
'string
|
||||
(lambda (val)
|
||||
(gnc:debug "parsing --namespace " val)
|
||||
(gnc:config-var-value-set! gnc:*namespace-regexp* #f val))
|
||||
#f
|
||||
(N_ "Regular expression determining which namespace commodities will be retrieved"))
|
||||
|
||||
))
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
(use-modules (srfi srfi-8))
|
||||
|
||||
(use-modules (gnucash gnc-module))
|
||||
;;(use-modules (gnucash price-quotes))
|
||||
|
||||
(use-modules (ice-9 slib))
|
||||
(require 'printf)
|
||||
|
||||
@@ -60,15 +62,9 @@
|
||||
(re-export hash-fold)
|
||||
(re-export string-split)
|
||||
|
||||
;; from path.scm
|
||||
(export gnc:current-config-auto)
|
||||
(export gnc:current-saved-reports)
|
||||
(export gnc:current-saved-stylesheets)
|
||||
|
||||
;; from command-line.scm
|
||||
(export gnc:*share-path*)
|
||||
(export gnc:*doc-path*)
|
||||
(export gnc:*namespace-regexp*)
|
||||
|
||||
;; from doc.scm
|
||||
(export gnc:find-doc-file)
|
||||
@@ -352,7 +348,6 @@ string and 'directories' must be a list of strings."
|
||||
(gnc:setup-debugging)
|
||||
|
||||
;; Now we can load a bunch of files.
|
||||
(load-from-path "path.scm")
|
||||
(load-from-path "command-line.scm") ;; depends on app-utils (N_, etc.)...
|
||||
|
||||
(gnc:initialize-config-vars) ;; in command-line.scm
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
;; This program is free software; you can redistribute it and/or
|
||||
;; modify it under the terms of the GNU General Public License as
|
||||
;; published by the Free Software Foundation; either version 2 of
|
||||
;; the License, or (at your option) any later version.
|
||||
;;
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program; if not, contact:
|
||||
;;
|
||||
;; Free Software Foundation Voice: +1-617-542-5942
|
||||
;; 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
|
||||
;; Boston, MA 02110-1301, USA gnu@gnu.org
|
||||
|
||||
(define gnc:current-saved-reports
|
||||
(gnc:build-dotgnucash-path "saved-reports-2.0"))
|
||||
|
||||
(define gnc:current-saved-stylesheets
|
||||
(gnc:build-dotgnucash-path "stylesheets-2.0"))
|
||||
|
||||
Reference in New Issue
Block a user