File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 115
115
116
116
; ; otherwise, do the trivial render.
117
117
(let* ((retval '() )
118
- (push (lambda (l ) (set! retval (cons l retval)))))
118
+ (push (lambda (l ) (set! retval (cons l retval))))
119
+ (objs (gnc:html-document-objects doc))
120
+ (work-to-do (length objs))
121
+ (work-done 0 ))
119
122
; ; compile the doc style
120
123
(gnc:html-style-table-compile (gnc:html-document-style doc)
121
124
(gnc:html-document-style-stack doc))
122
125
; ; push it
123
126
(gnc:html-document-push-style doc (gnc:html-document-style doc))
124
127
128
+ (gnc:report-render-starting (gnc:html-document-title doc))
125
129
(if (not (null? headers?))
126
130
(begin
127
131
(push " <html>\n " )
138
142
; ; now render the children
139
143
(for-each
140
144
(lambda (child )
141
- (push (gnc:html-object-render child doc)))
142
- (gnc:html-document-objects doc))
145
+ (begin
146
+ (push (gnc:html-object-render child doc))
147
+ (set! work-done (+ 1 work-done))
148
+ (gnc:report-percent-done (* 100 (/ work-done work-to-do)))))
149
+ objs)
143
150
144
151
(if (not (null? headers?))
145
152
(begin
146
153
(push " </body>\n " )
147
154
(push " </html>\n " )))
148
155
156
+ (gnc:report-finished)
149
157
(gnc:html-document-pop-style doc)
150
158
(gnc:html-style-table-uncompile (gnc:html-document-style doc))
151
159
Original file line number Diff line number Diff line change 545
545
(export gnc:query-set-match-voids-only!)
546
546
(export gnc:split-voided?)
547
547
(export gnc:report-starting)
548
+ (export gnc:report-render-starting)
548
549
(export gnc:report-percent-done)
549
550
(export gnc:report-finished)
550
551
(export gnc:accounts-count-splits)
Original file line number Diff line number Diff line change 674
674
(gnc:gettext report-name))
675
675
0 ))
676
676
677
+ (define (gnc:report-render-starting report-name )
678
+ (gnc:mdi_show_progress (sprintf #f
679
+ (_ " Rendering '%s' report ..." )
680
+ (if (string-null? report-name)
681
+ (gnc:gettext " Untitled" )
682
+ (gnc:gettext report-name)))
683
+ 0 ))
684
+
677
685
(define (gnc:report-percent-done percent )
678
686
(gnc:mdi_show_progress #f (truncate percent)))
679
687
You can’t perform that action at this time.
0 commit comments