mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
show report titles when displaying report "no data" and "no account"
error messages. . . git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4278 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
df3d5d5d58
commit
150af5d9ab
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2001-05-25 Robert Graham Merkel <rgmerk@mira.net>
|
||||
|
||||
* src/scm/html-utilities.scm: display report title
|
||||
string in gnc:html-no-account-warning and
|
||||
gnc:html-make-empty-data-warning. API changed.
|
||||
|
||||
* src/scm/report/*.scm: update to use changed
|
||||
functions described above.
|
||||
|
||||
* src/scm/tip-list.scm: fix spelling mistake.
|
||||
|
||||
2001-05-24 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* po/gnc-glossary.txt: added file for all our translators.
|
||||
|
@ -655,20 +655,25 @@
|
||||
|
||||
table))
|
||||
|
||||
(define (gnc:html-make-no-account-warning)
|
||||
(define (gnc:html-make-no-account-warning report-title-string)
|
||||
(let ((p (gnc:make-html-text)))
|
||||
(gnc:html-text-append!
|
||||
p
|
||||
(gnc:html-markup-h2 (string-append
|
||||
report-title-string
|
||||
":"))
|
||||
(gnc:html-markup-h2 (_ "No accounts selected"))
|
||||
(gnc:html-markup-p
|
||||
(_ "This report requires accounts to be selected.")))
|
||||
p))
|
||||
|
||||
(define (gnc:html-make-empty-data-warning)
|
||||
(define (gnc:html-make-empty-data-warning report-title-string)
|
||||
(let ((p (gnc:make-html-text)))
|
||||
(gnc:html-text-append!
|
||||
p
|
||||
(gnc:html-markup-h2
|
||||
(string-append report-title-string ":"))
|
||||
(gnc:html-markup-h2 (_ "No data"))
|
||||
(gnc:html-markup-p
|
||||
(_ "The selected accounts contain no data (or only zeroes) for the selected time period")))
|
||||
(_ "The selected accounts contain no data/transactions (or only zeroes) for the selected time period")))
|
||||
p))
|
@ -392,11 +392,11 @@ the global Preference \"Display Tip of the Day\".")))))
|
||||
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-empty-data-warning))))
|
||||
(gnc:html-make-empty-data-warning report-title))))
|
||||
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-no-account-warning)))
|
||||
(gnc:html-make-no-account-warning report-title)))
|
||||
|
||||
document)))
|
||||
|
||||
|
@ -151,10 +151,12 @@
|
||||
(gnc:date-option-absolute-time
|
||||
(get-option gnc:pagename-general
|
||||
optname-date))))
|
||||
(report-title (get-option gnc:pagename-general
|
||||
optname-reportname))
|
||||
(doc (gnc:make-html-document))
|
||||
(txt (gnc:make-html-text)))
|
||||
|
||||
(gnc:html-document-set-title! doc (_ "Account Summary"))
|
||||
(gnc:html-document-set-title! doc report-title))
|
||||
(if (not (null? accounts))
|
||||
;; if no max. tree depth is given we have to find the
|
||||
;; maximum existing depth
|
||||
@ -192,7 +194,7 @@
|
||||
;; error condition: no accounts specified
|
||||
(gnc:html-document-add-object!
|
||||
doc
|
||||
(gnc:html-make-no-account-warning)))
|
||||
(gnc:html-make-no-account-warning report-title))
|
||||
doc))
|
||||
|
||||
(gnc:define-report
|
||||
|
@ -325,7 +325,7 @@
|
||||
;; error condition: no accounts specified
|
||||
|
||||
(gnc:html-document-add-object!
|
||||
doc (gnc:html-make-no-account-warning)))
|
||||
doc (gnc:html-make-no-account-warning (_ "Balance Sheet"))))
|
||||
doc))
|
||||
|
||||
(gnc:define-report
|
||||
|
@ -468,12 +468,12 @@ the global Preference \"Display Tip of the Day\".")))))
|
||||
;; else if empty data
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-empty-data-warning))))
|
||||
(gnc:html-make-empty-data-warning report-title))))
|
||||
|
||||
;; else if no accounts selected
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-no-account-warning)))
|
||||
(gnc:html-make-no-account-warning report-title)))
|
||||
|
||||
document))
|
||||
|
||||
|
@ -172,7 +172,8 @@
|
||||
gnc:timepair-end-day-time) from-date-tp)
|
||||
(gnc:timepair-end-day-time to-date-tp)
|
||||
(eval interval)))
|
||||
|
||||
(report-title (if inc-exp? (_ "Income/Expense Chart")
|
||||
(_ "Net Worth Chart")))
|
||||
(classified-accounts (gnc:decompose-accountlist accounts))
|
||||
(document (gnc:make-html-document))
|
||||
(chart (gnc:make-html-barchart))
|
||||
@ -245,8 +246,7 @@
|
||||
dates-list)))
|
||||
|
||||
(gnc:html-barchart-set-title!
|
||||
chart (if inc-exp? (_ "Income/Expense Chart")
|
||||
(_ "Net Worth Chart")))
|
||||
chart report-title)
|
||||
(gnc:html-barchart-set-subtitle!
|
||||
chart (sprintf #f
|
||||
(_ "%s to %s")
|
||||
@ -335,12 +335,12 @@
|
||||
(gnc:html-document-add-object! document chart)
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-empty-data-warning))))
|
||||
(gnc:html-make-empty-data-warning report-title))))
|
||||
|
||||
;; else no accounts selected
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-no-account-warning)))
|
||||
(gnc:html-make-no-account-warning report-title)))
|
||||
|
||||
document))
|
||||
|
||||
|
@ -122,7 +122,7 @@
|
||||
(gnc:report-options report-obj) pagename optname)))
|
||||
|
||||
;; get all option's values
|
||||
(let ((display-depth (get-option gnc:pagename-accounts
|
||||
(let* ((display-depth (get-option gnc:pagename-accounts
|
||||
optname-display-depth))
|
||||
(show-subaccts? (get-option gnc:pagename-accounts
|
||||
optname-show-subaccounts))
|
||||
@ -151,13 +151,14 @@
|
||||
(gnc:date-option-absolute-time
|
||||
(get-option gnc:pagename-general
|
||||
optname-from-date))))
|
||||
(report-title (sprintf #f
|
||||
(_ "Profit and Loss - %s to %s")
|
||||
(gnc:timepair-to-datestring from-date-tp)
|
||||
(gnc:timepair-to-datestring to-date-tp)))
|
||||
(doc (gnc:make-html-document)))
|
||||
|
||||
(gnc:html-document-set-title!
|
||||
doc (sprintf #f
|
||||
(_ "Profit and Loss - %s to %s")
|
||||
(gnc:timepair-to-datestring from-date-tp)
|
||||
(gnc:timepair-to-datestring to-date-tp)))
|
||||
doc report-title)
|
||||
(if (not (null? accounts))
|
||||
;; if no max. tree depth is given we have to find the
|
||||
;; maximum existing depth
|
||||
@ -195,7 +196,7 @@
|
||||
;; error condition: no accounts specified
|
||||
|
||||
(gnc:html-document-add-object!
|
||||
doc (gnc:html-make-no-account-warning)))
|
||||
doc (gnc:html-make-no-account-warning report-title)))
|
||||
doc))
|
||||
|
||||
(gnc:define-report
|
||||
|
@ -217,7 +217,7 @@
|
||||
|
||||
;if no accounts selected.
|
||||
(gnc:html-document-add-object!
|
||||
document (gnc:html-make-no-account-warning)))
|
||||
document (gnc:html-make-no-account-warning report-title)))
|
||||
|
||||
|
||||
document))
|
||||
|
@ -1052,7 +1052,7 @@ match the given time interval and account selection.")))
|
||||
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-no-account-warning)))
|
||||
(gnc:html-make-no-account-warning report-title)))
|
||||
|
||||
document))
|
||||
|
||||
|
@ -94,7 +94,7 @@ Join them on #gnucash at irc.gnome.org")
|
||||
|
||||
(N_ "There is a theory that if ever anyone discovers what
|
||||
the Universe is for and why it is here, it will instantly
|
||||
disappear and be replace with something even more bizarre and
|
||||
disappear and be replaced with something even more bizarre and
|
||||
inexplicable.
|
||||
There is another theory that this has already happened.
|
||||
Douglas Adams, \"The Restaurant at the End of the Universe\"")
|
||||
|
Loading…
Reference in New Issue
Block a user