From d9d4ffaff2fc888d26d59120d4a36d8c4523e545 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Mon, 27 Nov 2017 08:01:48 +0800 Subject: [PATCH] ENH: disable filter accounts selector if filter-mode=none --- gnucash/report/standard-reports/transaction.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gnucash/report/standard-reports/transaction.scm b/gnucash/report/standard-reports/transaction.scm index abcb03ea04..ee13b1be91 100644 --- a/gnucash/report/standard-reports/transaction.scm +++ b/gnucash/report/standard-reports/transaction.scm @@ -370,13 +370,13 @@ tags within description, notes or memo. ") (gnc:register-trep-option (gnc:make-account-list-option gnc:pagename-accounts optname-filterby - "b" (N_ "Filter on these accounts.") + "c1" (N_ "Filter on these accounts.") (lambda () '()) #f #t)) (gnc:register-trep-option - (gnc:make-multichoice-option + (gnc:make-multichoice-callback-option gnc:pagename-accounts optname-filtertype "c" (N_ "Filter account.") 'none @@ -388,7 +388,12 @@ tags within description, notes or memo. ") (N_ "Include transactions to/from filter accounts only.")) (vector 'exclude (N_ "Exclude Transactions to/from Filter Accounts") - (N_ "Exclude transactions to/from all filter accounts."))))) + (N_ "Exclude transactions to/from all filter accounts."))) + #f + (lambda (x) + (gnc-option-db-set-option-selectable-by-name + options gnc:pagename-accounts optname-filterby + (not (eq? x 'none)))))) ;; (gnc:register-trep-option