Commit Graph

22801 Commits

Author SHA1 Message Date
Christopher Lam
bbde69ffcd [register] price shown in transaction currency rather than account's parent currency
error in commit 710b559cc4

xaccSplitGetSharePrice is priced in the transaction
currency. gnc-account-get-currency-or-parent would only output the
correct price currency if the chart of accounts was set up properly.

also: for Dr/Cr display, small modification to ensure a "$0.00" is
rendered when the split value is neither positive nor negative.
2020-05-14 19:37:54 +08:00
Robert Fewell
86dc6dcb96 Remove some spaces and tabs from dialog-options.c 2020-05-14 12:13:08 +01:00
Robert Fewell
9f59d2cbd7 Enable the Options Checkbox label to be used to toggle
With the new the options dialogue using a GtkGrid it is required that
clicking on the label of the GtkCheckBox would also toggle the
GtkCheckBox. To this end the label is added to an event box so it can
be clicked on and a callback used to toggle the checkbox.
2020-05-14 12:07:42 +01:00
Robert Fewell
6fb50d227a Complete the move of saving register filter/sort to .gcm
This commit changes the saving of register filter and sort information
from KVP entries to using the .gcm file. On register load these
settings are transferred to the .gcm file and the KVP entries removed.
A feature flag is also set when the first register is loaded by this
version.
2020-05-14 10:26:17 +01:00
Robert Fewell
bf9c44416e Remove the setting of a comment for registers 2020-05-14 10:26:17 +01:00
Robert Fewell
b6de2981b8 Remove the state key file comment for Account filter 2020-05-14 10:26:17 +01:00
Robert Fewell
2494ad1adf Add option to save Layout for Register items
Add two menu items under windows, one to save an existing register
layout based on the register type to there respective default layouts
so the user set column widths will be used when opening registers. The
second menu item will reset the column widths to defaults and remove
the associated default layout.
Open registers will also save there column widths to the page section
so these could can temporarily have different widths.
2020-05-14 10:26:17 +01:00
Robert Fewell
74abd821b3 Add enum SplitRegisterTypeGroup to group registers
Add SplitRegisterTypeGroup to group registers that have the same layout
and it will also be used to get the default user state information for
register cell widths.
2020-05-14 10:26:17 +01:00
Robert Fewell
4c8ebfe171 Change state_section parameter for gnc_table_save_state
Change state_section to a const gchar* and update where used as required
2020-05-14 10:26:17 +01:00
Robert Fewell
2f5225ad33 Add option to save Layout for Business items
Add two menu items under windows, one to save an existing layout for
Invoices, Bills and Vouchers to there respective default layouts so the
user set column widths will be used. The second menu item will reset the
column widths to defaults and remove the default layout.
Open Business items will also save there column widths to the page
section so these can temporarily have different widths.
2020-05-14 10:26:17 +01:00
Robert Fewell
b622518fce Test for a valid register state comment before trying
to add it
2020-05-14 10:26:17 +01:00
Christopher Lam
dba9ba2f8f Bug 796932 - Invoices order when assigning payments
sorts documents in dialog-payment.c by date, then by document ID.
2020-05-13 18:39:41 +08:00
Christopher Lam
a874483b70 [register] show number columns right-aligned 2020-05-13 13:55:59 +08:00
Christopher Lam
f8bad131a5 Merge branch 'maint-797743' #720 price renderers 2020-05-13 13:20:09 +08:00
Christopher Lam
710b559cc4 [register] [bugfix] use new price renderer
also bugfix: show price in account parent currency, instead of the
original currency.
2020-05-13 13:15:50 +08:00
Christopher Lam
f9fce766c3 [trep-engine] use new price renderer 2020-05-13 13:15:47 +08:00
Christopher Lam
7557c5b54e [advanced-portfolio] use new price renderer 2020-05-13 13:15:45 +08:00
Christopher Lam
8b3841b4b5 [balsheet-eg.eguile] use new price renderer 2020-05-13 13:15:45 +08:00
Christopher Lam
d8c21c4625 [balsheet-pnl] use new price renderer 2020-05-13 13:15:42 +08:00
Christopher Lam
61afe53f0f [html-utilities] use new price renderer for exchange-rate table 2020-05-13 13:15:33 +08:00
Christopher Lam
9020c967c7 [html-style-info] export gnc:default-price-renderer
converts gnc:monetary containing a price to string
2020-05-13 11:36:22 +08:00
Christopher Lam
3d25a40d1f [gnc-ui-util] add gnc_price_print_info
similar to gnc_default_price_print_info but also accepts a use_symbol
specifier. for generating print_info for prices, either exact e.g.
$1 + 2/3, or inexact e.g. $1.3333
2020-05-13 11:36:22 +08:00
Christopher Lam
182d4d9de7 Bug 797743 - Monetary amounts are occasionally rendered in fractions
If monetary is already in decimal, don't convert. If monetary is
exact (x/y) then convert to its SCU.

As a result, monetary amounts in an arbitrary precision will be
displayed unchanged, e.g. US$0.1442, whereas exact monetary amounts
will be displayed using the currency's SCU e.g. US$1/3 -> $0.33
2020-05-13 11:36:22 +08:00
John Ralls
1510f34926 Use std::unique_ptr instead of std::shared_ptr.
No need to share ownership.
2020-05-12 14:06:45 -07:00
John Ralls
bd6840e035 Fix incorrecly logging all possible messages regardless of log level. 2020-05-12 14:06:45 -07:00
Christopher Lam
57fe051565 Merge branch 'maint-trep-case-insensitive' PR #719 2020-05-12 21:47:36 +08:00
Geert Janssens
ebd9db8921 Merge branch 'maint' 2020-05-12 14:50:20 +02:00
Geert Janssens
0c633866fd Bug 797717 - Summary bar changes height when opening a menu or scrolling over an option
Apparently something changed in gtk which now calculates
layout differently for a status bar for an empty string message.
Setting a single space message doesn't trigger this different
behaviour so we use that as workaround
2020-05-12 14:49:49 +02:00
Robert Fewell
9f039a7d08 Bug 797745 - Unable to change default report currency
This option in the preference dialog was missing its group partner so
both options were selected. Added missing group and also realigned some
other entries.
2020-05-12 10:51:35 +01:00
John Ralls
94fdc42f16 Fix wrong Boost library variable names. 2020-05-11 12:35:42 -07:00
John Ralls
b9b51efa8d Don't use g_return_value_if_fail in qof_log_check.
It causes GnuCash to crash if g_log is called without having set
G_LOG_DOMAIN.

Also extract a singleton getter function to ensure that the static
root module has been created before use.
2020-05-11 12:31:49 -07:00
Christopher Lam
b4d7386d44 [trep-engine] "Transaction Filter is case insensitive"
add Filter option to make Transaction Filter case insensitive.
2020-05-11 23:15:29 +08:00
John Ralls
3d6a06d503 Fix clang error about type mismatch GtkWidget* != void* aka gpointer
in the second argument and an extra ptr level in the first.
(The declaration is
g_atomic_pointer_compare_and_exchange(void* atomic, gpointer old,
                                      gpointer new)
but that's wrong as it tests *atomic == old so atomic needs to be
void**. But we were passing &gpointer* i.e. void***.)
2020-05-10 14:49:20 -07:00
John Ralls
d58f260aa9 Reports dependency fixes. 2020-05-10 12:00:13 -07:00
John Ralls
fc637aadc7 Two more test directories needing G_LOG_DOMAIN defined.
Should fix CI failures.
2020-05-10 10:18:36 -07:00
Christopher Lam
8d64c011c5 Merge branch 'maint' 2020-05-10 17:04:39 +08:00
Frank H. Ellenberger
0b0e4c7630 HIG, I18N: Improve Budget menu entries 2020-05-10 04:02:08 +02:00
Christopher Lam
f9dfdb3e6c [c-interface] compact code, use (ice-9 match) 2020-05-10 09:52:40 +08:00
John Ralls
f23e3b2660 Fix undeclared std::find_if. 2020-05-09 18:28:20 -07:00
John Ralls
e92cd20d78 Merge Jean Laroches '797737_match_previously_matched_trans' into maint. 2020-05-09 15:41:06 -07:00
Frank H. Ellenberger
f7a85161cd I18N: fix translator comments in window-reconcile.c 2020-05-10 00:10:42 +02:00
Frank H. Ellenberger
e84e680603 I18N: Fix several issuse with 'Help not found' strings
Unify and modularize the strings
Add an unmarked string
2020-05-09 23:51:44 +02:00
John Ralls
5da3bf7943 [QofLog] Replace hashtable with tree of vectors.
16x speedup.
2020-05-09 14:39:08 -07:00
John Ralls
3e442a0ef9 Make qof_log_set_file static.
Used only internally.
2020-05-09 14:39:08 -07:00
John Ralls
0403e4906c Move QofLogModule typedef to qoflog.h where it belongs. 2020-05-09 14:39:08 -07:00
Christopher Lam
f1ff789657 [balsheet-eg] don't use safe-cadr and safe-cdr
they are safety hacks which indicate inability to deal with lists. use
lists properly.
2020-05-09 22:33:24 +08:00
Christopher Lam
8ffe7771f1 [balsheet-eg] reindent process-acc-list-r 2020-05-09 22:33:24 +08:00
Christopher Lam
0c1b6c5a4f [eguile-utilities] deprecate single-use function
only used by balsheet-eg.scm
2020-05-09 22:33:24 +08:00
Christopher Lam
9667a47da0 [balsheet-eg] use "foreign" css class correctly
5093a8fb1 had mistakenly disabled "foreign" class and used html
formatting elements instead.

also remove dead code
2020-05-09 22:33:24 +08:00
Christopher Lam
010a0f1586 [eguile-gnc] don't catch errors in eguile-gnc
With commit 9832fa397 the default report runner will now catch errors
and show the backtrace in the report window. the eguile renderer
doesn't need to catch errors anymore.
2020-05-09 22:33:24 +08:00