diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-22 01:16:29 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-22 01:27:05 -0400 |
commit | 81bf38584e43e5fc31e316246f11e210418548a9 (patch) | |
tree | f1a99e54d63737fcfd4ed4e48c6f9cd6b431bcc1 /src/report.cc | |
parent | 7d005b8d98b5547e5847895140d52a2707545ed5 (diff) | |
download | fork-ledger-81bf38584e43e5fc31e316246f11e210418548a9.tar.gz fork-ledger-81bf38584e43e5fc31e316246f11e210418548a9.tar.bz2 fork-ledger-81bf38584e43e5fc31e316246f11e210418548a9.zip |
Added new --bold-if option
Diffstat (limited to 'src/report.cc')
-rw-r--r-- | src/report.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/report.cc b/src/report.cc index df37f9dc..77cfaffd 100644 --- a/src/report.cc +++ b/src/report.cc @@ -457,6 +457,14 @@ value_t report_t::fn_display_total(call_scope_t& scope) return HANDLER(display_total_).expr.calc(scope); } +value_t report_t::fn_should_bold(call_scope_t& scope) +{ + if (HANDLED(bold_if_)) + return HANDLER(bold_if_).expr.calc(scope); + else + return false; +} + value_t report_t::fn_market(call_scope_t& args) { optional<datetime_t> moment = (args.has<datetime_t>(1) ? @@ -905,6 +913,7 @@ option_t<report_t> * report_t::lookup_option(const char * p) else OPT(base); else OPT_ALT(basis, cost); else OPT_(begin_); + else OPT(bold_if_); else OPT(budget); else OPT(by_payee); break; @@ -1226,6 +1235,8 @@ expr_t::ptr_op_t report_t::lookup(const symbol_t::kind_t kind, return MAKE_FUNCTOR(report_t::fn_scrub); else if (is_eq(p, "strip")) return MAKE_FUNCTOR(report_t::fn_strip); + else if (is_eq(p, "should_bold")) + return MAKE_FUNCTOR(report_t::fn_should_bold); break; case 't': |