mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
prepare report system to handle newer reports in case user downgrades from > 2.2.x
The incoming changes to the report system are not backwards compatible with 2.2 branch. This should allow the reports opened or saved by the new system to function in 2.2.x. BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16804 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
add9cdd3ee
commit
99ad583dd2
@ -106,8 +106,10 @@
|
||||
(export gnc:define-report)
|
||||
(export <report>)
|
||||
(export gnc:report-template-new-options/name)
|
||||
(export gnc:report-template-new-options/report-guid)
|
||||
(export gnc:report-template-menu-name/name)
|
||||
(export gnc:report-template-renderer/name)
|
||||
(export gnc:report-template-renderer/report-guid)
|
||||
(export gnc:report-template-new-options)
|
||||
(export gnc:report-template-version)
|
||||
(export gnc:report-template-name)
|
||||
@ -137,6 +139,7 @@
|
||||
(export gnc:report-set-ctext!)
|
||||
(export gnc:make-report)
|
||||
(export gnc:restore-report)
|
||||
(export gnc:restore-report-by-guid)
|
||||
(export gnc:make-report-options)
|
||||
(export gnc:report-export-types)
|
||||
(export gnc:report-export-thunk)
|
||||
|
@ -47,7 +47,7 @@
|
||||
(define <report-template>
|
||||
(make-record-type "<report-template>"
|
||||
;; The data items in a report record
|
||||
'(version name options-generator
|
||||
'(version name report-guid parent-type options-generator
|
||||
options-cleanup-cb options-changed-cb
|
||||
renderer in-menu? menu-path menu-name
|
||||
menu-tip export-types export-thunk)))
|
||||
@ -65,6 +65,8 @@
|
||||
((record-constructor <report-template>)
|
||||
#f ;; version
|
||||
#f ;; name
|
||||
#f ;; report-guid for backwards compat of newer reports
|
||||
#f ;; parent-type for backwards compat of newer reports
|
||||
#f ;; options-generator
|
||||
#f ;; options-cleanup-cb
|
||||
#f ;; options-changed-cb
|
||||
@ -138,6 +140,10 @@
|
||||
(gnc:report-template-new-options templ)
|
||||
#f)))
|
||||
|
||||
;; dummy function to enable backwards compatibility of newer reports
|
||||
(define (gnc:report-template-new-options/report-guid template-id template-name)
|
||||
(gnc:report-template-new-options/name template-name))
|
||||
|
||||
(define (gnc:report-template-menu-name/name template-name)
|
||||
(let ((templ (hash-ref *gnc:_report-templates_* template-name)))
|
||||
(if templ
|
||||
@ -151,6 +157,10 @@
|
||||
(gnc:report-template-renderer templ)
|
||||
#f)))
|
||||
|
||||
;; dummy function to enable backwards compatibility of newer reports
|
||||
(define (gnc:report-template-renderer/report-guid template-id template-name)
|
||||
(gnc:report-template-renderer/name template-name))
|
||||
|
||||
(define (gnc:report-template-new-options report-template)
|
||||
(let ((generator (gnc:report-template-options-generator report-template))
|
||||
(namer
|
||||
@ -277,6 +287,10 @@
|
||||
(gnc-report-add r))
|
||||
)
|
||||
|
||||
;; dummy function to enable backwards compatibility with newer reports
|
||||
(define (gnc:restore-report-by-guid id template-id template-name options)
|
||||
(gnc:restore-report id template-name options))
|
||||
|
||||
|
||||
(define (gnc:make-report-options template-name)
|
||||
(let ((template (hash-ref *gnc:_report-templates_* template-name)))
|
||||
|
Loading…
Reference in New Issue
Block a user