Commit Graph

31 Commits

Author SHA1 Message Date
Geert Janssens
ad8b602fe2 I18n - Uppercase option name to align with other option names 2020-09-09 22:22:48 +02:00
Geert Janssens
56210de9a2 Rename report option for consistency
In English each word in option and menu names starts with a capital letter.
Also eliminates a redundant translatable string.
2020-08-18 15:28:51 +02:00
Christopher Lam
428c8c501c [guile-3] change _ to G_
In guile-3 _ is a reserved symbol. Change to G_ by guile gettext
convention.
2020-07-12 19:03:26 +08:00
Geert Janssens
d777128e6f app-utils - simplify and move gettext wrappers
1. Instead of creating a C wrapper around gettext to then wrap in
guile, use guile's builtin gettext support directly.

The code still defines the _ and N_ shorthands. However it doesn't
really warant a separate module just for these two shorthands.
Instead define them in core-utils. So all code wanting to use
_ or N_ in guile should now use the (gnucash core-utils) module.

The bulk of this commit is actually deleting the scm-gettext
target and using (gnucash core-utils) instead of (gnucash gettext).

2. As the definition of _ and N_ is removed from app-utils.scm,
the app-utils test for a functional N_ macro has been moved to a
new test file in the guile bindinds tests.

3. The (gnucash gettext) module has been deprecated. Use
(gnucash core-utils) from now on.
2019-12-06 19:59:12 +01:00
Christopher Lam
5bd854c550 Merge branch 'maint' 2019-08-04 13:44:12 +08:00
Christopher Lam
e8a41bbf54 [options] compact lookup-option 2019-07-28 12:16:58 +08:00
Geert Janssens
30ac2cf266 Remove guile functions that were marked as deprecated in gnucash the 3.x series 2019-06-12 16:55:53 +02:00
Christopher Lam
885689b42d [options] bugfix don't override inbuilt list keyword
fixing a 17 year old bug.

previous version had defined (save-acc list count) and (save-item list
count) thereby overwriting the inbuilt 'list' keyword, and tried to use
the it later on with (list key)... best rewrite with neater code.
2019-05-31 23:31:54 +08:00
Christopher Lam
6e246ef8ad [options] compact option-setter in generator
slightly more compact, avoids confusing structure whereby 'option' is
both the lambda's argument and the definition of argument.
2019-05-04 06:19:59 +08:00
Christopher Lam
a4eb5b1a59 [options] compact book-currency-acounting functions 2019-03-30 01:39:55 +08:00
Christopher Lam
faf1b08cec [options] compact valid-gains-loss-account? 2019-03-30 00:59:24 +08:00
Christopher Lam
0b8ff4b5d6 [options] deprecate gnc:save-options
this is unused.
2019-03-25 17:38:50 +08:00
Christopher Lam
4f6344963d [options] simplify gnc:value->string 2019-03-25 17:38:50 +08:00
Christopher Lam
4f0e9a5168 [options] gnc:warn when looking up old option names
the option lookup mechanism will dynamically translate option
names. warn the user if this takes place so that the report writer may
use new option names.
2019-02-19 22:28:12 +08:00
Christopher Lam
a4789fcac5 bugfix: fix crasher when loading saved-report with unknown choices.
If a saved-report with e.g. relative date, multichoice option is
unknown, the report would crash, and the Report-Options would
segfault. This commit fixes both: report-date defaults to 'today',
multichoice-options defaults to default-value.

Following this commit, if a report loads a saved-report or .gcm from a
future version, a gnc:warn will be emitted and the report will not
crash; it will use relative-date today. Multichoice will remain the
default value. Report Options will not segfault.

The user will be notified via a gnc:gui-warn dialog
2019-02-17 11:25:06 +08:00
Christopher Lam
0d4575da6c [income-gst-statement] rename options
Further commit to fix 3466ce78b

Discussion as follows
https://code.gnucash.org/logs/2018/12/27.html#T12:31:58
https://code.gnucash.org/logs/2018/12/28.html#T19:12:18
2018-12-29 04:03:45 +01:00
Geert Janssens
f13d21b973 Bug 498072 - GnuCash show taxes on invoice when individual taxes is not checked
Use more descriptive option name and tool tip as proposed in the bug.
2018-11-18 15:38:59 +01:00
Christopher Lam
7ef4c00579 [easy-invoice] Display/Charge Type rename back to Display/Action
This report had renamed "Action" to "Charge Type". For consistency,
let's rename it back, and add migration path in options.scm for
saved-options. 2 fewer strings for translation.
2018-08-07 20:59:35 +08:00
Christopher Lam
4a27285edd html-utilities.scm: new home (gnc:html-render-options-changed)
We want to sanitize render-options-changed, therefore it must return
an html-object. Unfortunately this is not accessible to
app-utils/options.scm. If we move this function to
report-system/html-utilities.scm, it can access html-objects.

Also rename it to gnc:html-render-options-changed
2018-05-10 13:19:03 +08:00
Christopher Lam
d8d552ee8a options.scm: tidy (gnc:render-options-changed)
This small change introduces \n into the HTML render.
2018-03-01 05:30:48 +08:00
Christopher Lam
f7378e9332 TR & options: upgrade HTML to XHTML
Upgrade <br> tags to <br /> to allow well-formed XML parsing.
2018-02-23 18:19:59 +08:00
Christopher Lam
b261eb18b3 Revert options.scm lookup-options renaming
and use (gnc:error) as advised
2018-02-17 08:17:01 +08:00
Christopher Lam
276a7d24d2 REWRITE income-gst-statement.scm
This commit rewrites income-gst-statement.scm to be a derivation
of transaction.scm, modifying the options database and passing
custom arguments to the trep-renderer.

This should hopefully reduce risk of errors.
2018-02-17 08:17:01 +08:00
Christopher Lam
88b3446299 ADD-API: gnc:option-make-internal!, gnc:unregister-option
This commit adds 2 additional helper calls, primarily useful for
derived reports.

gnc:option-make-internal! will hide an existing option. e.g.
a derived report can set the value for a Display/* option and
hide it from the user.

gnc:unregister-option will unregister option. This is primarily
useful for derived options e.g. another report copies from
transaction.scm and removes some options and recreates them with
different parameters.

For example, unregister existing option from section "Accounts"
name "Accounts", and recreate with different parameters e.g.
limited account types.
2018-02-17 08:16:23 +08:00
Christopher Lam
12f3099f59 (infobox)->(gnc:render-options-changed) in options.scm
This commit will change (infobox) to a general-purpose
renderer for "all options changed by user" in options.scm
and can be inserted into any report. It reduces the
number of strings required.
2018-02-17 08:16:23 +08:00
Christopher Lam
d41ad85f0a TP->T64 COMPATIBILITY SHIM: gnucash/libgnucash/app-utils/options.scm
This commit adds a compatibiliy shim. Although the rest of gnucash
can be converted to time64, this shim allows a Gnucash session to
load reports saved with timepairs.
2018-01-08 13:01:29 +11:00
Christopher Lam
43cbe65282 REFACTOR:Move Void-status filter to filter tab
Also upgrade lookup-value Void Transactions now in Filter tab
2017-12-24 00:13:39 +08:00
Christopher Lam
8990553e2e ENH: Move Account matcher to Filter tab
This commit moves the Account matcher into the Filtering tab in preparation for further options
2017-12-24 00:13:39 +08:00
Christopher Lam
d93d4f68b0 options.scm: upgrade lookup-value to learn section changes 2017-12-24 00:13:39 +08:00
Geert Janssens
3d910ad2b1 Drop guile 1.8 support
And with it all quirks we still had in the code to support that version.
2017-12-20 14:55:40 +01:00
Geert Janssens
83d14e1c1c Restructure the src directory
It is split into
- /libgnucash (for the non-gui bits)
- /gnucash (for the gui)
- /common (misc source files used by both)
- /bindings (currently only holds python bindings)

This is the first step in restructuring the code. It will need much
more fine tuning later on.
2017-08-10 18:45:00 +02:00