From f121f917ce5753468551b6113e1e29422de8cb04 Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Wed, 28 Mar 2001 01:00:25 +0000 Subject: [PATCH] * configure.in: add --enable-etags argument to turn on automatic TAGS creation * src/scm/report/register.scm: add notes field git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3845 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 5 ++++ configure.in | 16 +++++++++++-- src/gnome/window-register.c | 3 +++ src/scm/report/register.scm | 48 +++++++++++++++++++++++++++---------- 4 files changed, 58 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 728550a0b3..ba8ecb6e77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2001-03-27 Dave Peticolas + * configure.in: add --enable-etags argument to turn on + automatic TAGS creation + + * src/scm/report/register.scm: add notes field + * src/scm/report/stylesheet-plain.scm: more reports centered by default diff --git a/configure.in b/configure.in index 652133a2d2..7ac76499f8 100644 --- a/configure.in +++ b/configure.in @@ -193,12 +193,24 @@ AC_ARG_WITH( help-prefix, AC_SUBST(GNC_HELPDIR) + ### -------------------------------------------------------------------------- ### Check for etags -AC_CHECK_PROG(GNC_TAGS_FILE, etags, TAGS) +AC_ARG_ENABLE( etags, + [ --enable-etags enable automatic create of TAGS file], + if test $enableval = yes; then + USE_ETAGS=1 + fi, + USE_ETAGS=0) + +if test ${USE_ETAGS} = 1; then + AC_CHECK_PROG(GNC_TAGS_FILE, etags, TAGS) +fi + AM_CONDITIONAL(GNC_TAGS_FILE, test x${GNC_TAGS_FILE} = xTAGS) + ### -------------------------------------------------------------------------- ### Check for glade @@ -364,7 +376,7 @@ AC_ARG_ENABLE( guppi, fi, USE_GUPPI=1 ) -if test $USE_GUPPI = 0; then +if test ${USE_GUPPI} = 0; then AC_MSG_WARN([Compiling without guppi support]) else AC_DEFINE(USE_GUPPI) diff --git a/src/gnome/window-register.c b/src/gnome/window-register.c index 94d96b1d20..8edec4aaf8 100644 --- a/src/gnome/window-register.c +++ b/src/gnome/window-register.c @@ -3027,6 +3027,9 @@ report_helper (RegWindow *regData, SCM func) args = gh_cons (arg, args); g_free (str); + arg = gh_bool2scm (reg->use_double_line); + args = gh_cons (arg, args); + arg = gh_bool2scm (reg->style == REG_STYLE_JOURNAL); args = gh_cons (arg, args); diff --git a/src/scm/report/register.scm b/src/scm/report/register.scm index 2ab6e776f4..021acf4bb1 100644 --- a/src/scm/report/register.scm +++ b/src/scm/report/register.scm @@ -110,7 +110,7 @@ (reverse heading-list))) (define (add-split-row table split column-vector row-style - transaction-info? split-info?) + transaction-info? split-info? double?) (let* ((row-contents '()) (parent (gnc:split-get-parent split)) (account (gnc:split-get-account split)) @@ -201,6 +201,24 @@ (gnc:html-table-append-row! table (reverse row-contents)) (apply set-last-row-style! (cons table (cons "tr" row-style))) + (if (and double? transaction-info? (description-col column-vector)) + (begin + (let ((count 0)) + (set! row-contents '()) + (if (date-col column-vector) + (begin + (set! count (+ count 1)) + (addto! row-contents " "))) + (if (num-col column-vector) + (begin + (set! count (+ count 1)) + (addto! row-contents " "))) + (addto! row-contents + (gnc:make-html-table-cell/size + 1 (- (num-columns-required column-vector) count) + (gnc:transaction-get-notes parent))) + (gnc:html-table-append-row! table (reverse row-contents)) + (apply set-last-row-style! (cons table (cons "tr" row-style)))))) split-value)) (define (lookup-sort-key sort-option) @@ -219,6 +237,8 @@ (gnc:make-internal-option "__reg" "query" #f)) (gnc:register-reg-option (gnc:make-internal-option "__reg" "journal" #f)) + (gnc:register-reg-option + (gnc:make-internal-option "__reg" "double" #f)) (gnc:register-reg-option (gnc:make-internal-option "__reg" "debit-string" (_ "Debit"))) (gnc:register-reg-option @@ -361,12 +381,15 @@ (define (reg-report-journal?) (opt-val "__reg" "journal")) + (define (reg-report-double?) + (opt-val "__reg" "double")) + (define (add-other-split-rows split table used-columns row-style) (define (other-rows-driver split parent table used-columns i) (let ((current (gnc:transaction-get-split parent i))) (if current (begin - (add-split-row table current used-columns row-style #f #t) + (add-split-row table current used-columns row-style #f #t #f) (other-rows-driver split parent table used-columns (+ i 1)))))) @@ -378,6 +401,7 @@ used-columns width multi-rows? + double? odd-row? main-row-style alternate-row-style @@ -398,7 +422,8 @@ used-columns current-row-style #t - (not multi-rows?)))) + (not multi-rows?) + double?))) (if multi-rows? (add-other-split-rows @@ -413,6 +438,7 @@ used-columns width multi-rows? + double? (not odd-row?) main-row-style alternate-row-style @@ -423,6 +449,7 @@ (used-columns (build-column-used options)) (width (num-columns-required used-columns)) (multi-rows? (reg-report-journal?)) + (double? (reg-report-double?)) (grand-total-style (get-grand-total-style options)) (odd-row-style @@ -439,6 +466,7 @@ used-columns width multi-rows? + double? #t odd-row-style even-row-style @@ -473,13 +501,7 @@ debit-string credit-string)) (gnc:html-document-set-title! document title) -; (gnc:html-document-add-object! -; document -; (gnc:make-html-text -; (gnc:html-markup-h3 (display-date-interval begindate enddate)))) - (gnc:html-document-add-object! - document - table) + (gnc:html-document-add-object! document table) document)) @@ -490,17 +512,19 @@ 'renderer reg-renderer 'in-menu? #f)) -(define (gnc:apply-register-report func query journal? title - debit-string credit-string) +(define (gnc:apply-register-report func query journal? double? + title debit-string credit-string) (let* ((options (gnc:make-report-options "Register")) (query-op (gnc:lookup-option options "__reg" "query")) (journal-op (gnc:lookup-option options "__reg" "journal")) + (double-op (gnc:lookup-option options "__reg" "double")) (title-op (gnc:lookup-option options "Report Options" "Title")) (debit-op (gnc:lookup-option options "__reg" "debit-string")) (credit-op (gnc:lookup-option options "__reg" "credit-string"))) (gnc:option-set-value query-op query) (gnc:option-set-value journal-op journal?) + (gnc:option-set-value double-op double?) (gnc:option-set-value title-op title) (gnc:option-set-value debit-op debit-string) (gnc:option-set-value credit-op credit-string)