From bc959f071b7f8a4e81435684fded7f27d240d274 Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Tue, 11 Dec 2001 10:50:10 +0000 Subject: [PATCH] * src/report/report-system/report.scm: don't use gw-gnc * src/report/report-system/report-system.scm: don't use gw-gnc git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6326 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/report/report-system/report-system.scm | 4 +++- src/report/report-system/report.scm | 21 +++++++++++++++------ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/report/report-system/report-system.scm b/src/report/report-system/report-system.scm index 9c4a25747b..e1980f594e 100644 --- a/src/report/report-system/report-system.scm +++ b/src/report/report-system/report-system.scm @@ -6,7 +6,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-module (gnucash report report-system)) -(use-modules (gnucash main) (g-wrapped gw-gnc)) ;; FIXME: delete after we finish modularizing. +(use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. (use-modules (ice-9 slib)) (use-modules (ice-9 regex)) (use-modules (srfi srfi-1)) @@ -116,6 +116,7 @@ (export gnc:report-template-menu-path) (export gnc:report-template-menu-name) (export gnc:report-template-menu-tip) +(export gnc:report-template-export-types) (export gnc:report-template-export-thunk) (export gnc:report-type) (export gnc:report-set-type!) @@ -134,6 +135,7 @@ (export gnc:make-report) (export gnc:restore-report) (export gnc:make-report-options) +(export gnc:report-export-types) (export gnc:report-export-thunk) (export gnc:report-menu-name) (export gnc:report-name) diff --git a/src/report/report-system/report.scm b/src/report/report-system/report.scm index 5d8419e144..57f413d192 100644 --- a/src/report/report-system/report.scm +++ b/src/report/report-system/report.scm @@ -54,7 +54,7 @@ '(version name options-generator options-cleanup-cb options-changed-cb renderer in-menu? menu-path menu-name - menu-tip export-thunk))) + menu-tip export-types export-thunk))) (define (gnc:define-report . args) ;; For now the version is ignored, but in the future it'll let us @@ -76,6 +76,7 @@ #f ;; menu-path #f ;; menu-name #f ;; menu-tip + #f ;; export-types #f ;; export-thunk )) @@ -118,6 +119,8 @@ (record-accessor 'menu-name)) (define gnc:report-template-menu-tip (record-accessor 'menu-tip)) +(define gnc:report-template-export-types + (record-accessor 'export-types)) (define gnc:report-template-export-thunk (record-accessor 'export-thunk)) @@ -264,17 +267,23 @@ (gnc:report-template-new-options template) #f))) +(define (gnc:report-export-types report) + (let ((template (hash-ref *gnc:_report-templates_* + (gnc:report-type report)))) + (if template + (gnc:report-template-export-types template) + #f))) + (define (gnc:report-export-thunk report) - (let ((template - (hash-ref *gnc:_report-templates_* - (gnc:report-type report)))) + (let ((template (hash-ref *gnc:_report-templates_* + (gnc:report-type report)))) (if template (gnc:report-template-export-thunk template) #f))) (define (gnc:report-menu-name report) - (let ((template (hash-ref *gnc:_report-templates_* - (gnc:report-type report)))) + (let ((template (hash-ref *gnc:_report-templates_* + (gnc:report-type report)))) (if template (or (gnc:report-template-menu-name template) (gnc:report-name report))