Geert Janssens
1f0a69a804
Properly parse plus signs while importing numbers
...
Silly copy/paste error.
2023-03-15 08:58:07 +01:00
Geert Janssens
13ec4bb594
xaccParseAmount... - some code cleanups
...
- declare at first use
- compact tests
- reduce use of {}
2023-03-13 19:58:10 +01:00
Geert Janssens
8010d9646c
Restore proper indentation
...
It got mixed up while refactoring the various xaccParseAmountXYZ functions
2023-03-13 19:58:10 +01:00
Richard Cohen
329a2f7d42
Guard against some possible null pointer dereferences
...
Found by gcc 12 when compiling with "-O2 -Wnull-dereference"
2023-03-08 11:00:56 +00:00
Richard Cohen
7b47c07f8e
Don't use extern "C" around #includes
...
Some I missed the first time. Some are new.
2023-03-03 18:55:42 +00:00
Christopher Lam
89e2bef427
Merge branch 'maint'
2023-02-26 13:51:33 +08:00
Christopher Lam
abcce5000c
Bug 798754 - Build fails with gcc 13 and glib > 2.76, bis
2023-02-25 13:12:35 +08:00
Geert Janssens
26482f397b
Bug 797033 - The CSV Importer should not obey with the "automatic digital point" setting
...
Expose variations of xaccParseAmount and
xaccParseAmountExtended that will ignore the
automatic decimal point user preference.
This preference is really only useful for manual number
entering in the register.
The xaccParseAmountImport variant replaces xaccParseAmountPosSign
which was used exclusively by the csv importers.
Like xaccParseAmountPosSign, this replacement has the flag
to ignore or parse the positive number indicator.
2023-02-24 23:02:15 +01:00
Richard Cohen
bddb4468fa
Import GLIB2 as a target, and use it to simplify the CMakeLists
2023-02-21 12:59:42 +00:00
Geert Janssens
8a23304283
GncGSettings - use bool as return type for static function
2023-02-17 18:10:35 +01:00
Geert Janssens
64329414e9
GncGSettings - cosmetic: NULL->nullptr
2023-02-17 14:08:20 +01:00
Geert Janssens
32ae47980c
GncGSettings - some minor cleanups
...
- remove unused macros
- avoid manual counters
2023-02-17 14:02:34 +01:00
Geert Janssens
03aff5642a
GncGSettings - rework signal handler manipulation
...
Use ref-counting to manage GSettings object lifecycle
Use g_signal_handler_handlers_[un]block_matched to
block or unblock handlers rather than tracking them in
our own hash table.
2023-02-17 14:02:34 +01:00
Geert Janssens
4761aa414c
GncGSettings - reduce code duplication
...
Most getters and setters are identical with the exception of
the actual function to call into GSettings. Extract
boilerplate in two template functions and make all
getters/setters wrappers of these two functions.
2023-02-17 11:48:41 +01:00
Geert Janssens
edab41f23a
GncGSettings - basic c++ cleanups
...
- declare at first use
- gboolean->bool (TRUE/true, FALSE/false)
2023-02-17 11:48:41 +01:00
Robert Fewell
a1d17518a8
Add a function to dump the schema entries when in debug
...
mode.
2023-02-17 10:15:23 +00:00
Robert Fewell
2306ef8ca6
On a new install, the gnc_gsettings_version_upgrade
...
would not run
When doing a new install, set the GNC_PREF_VERSION to the current
version.
2023-02-17 10:14:42 +00:00
Robert Fewell
57f874bd3f
Change the behaviour of the gseettings migration
...
function
In the pref_transformations.xml file, when the release version is
greater than the current GnuCash version, do not process those changes.
2023-02-17 10:14:09 +00:00
Robert Fewell
ac0532bf5c
Change the alignment of a function in gnc_gsettings.cpp
2023-02-16 14:23:52 +00:00
Robert Fewell
308c609904
Fix comment typo in gnc-gsettings.cpp
2023-02-16 14:23:51 +00:00
Geert Janssens
286e1afa41
Bug 798749 - Fails to read gsettings on startup
...
Only cache GSettings objects we need to keep
track of callback functions.
This means a bit more overhead per GSettings
interaction, but as typical interactions are
only a few objects at once at best, this
overhead is unnoticeable.
2023-02-16 22:40:36 +01:00
Richard Cohen
9c6ad222a9
[-Wunused-function] - remove
2023-02-16 09:20:59 +00:00
Richard Cohen
8a20bcadb0
[-Wunused-variable] - remove unused translatable string
2023-02-16 09:20:59 +00:00
Richard Cohen
0dd406de10
[-Wunused-lambda-capture] (clang) - remove
2023-02-16 09:20:59 +00:00
Richard Cohen
78ec20515b
Remove some unused variables - and the initialization
...
- checked that any side effects were irrelevant
2023-02-06 14:20:28 +00:00
Richard Cohen
ea2d3be217
Remove some unused variables with obviously no side effects
2023-02-06 14:19:22 +00:00
Christopher Lam
85c2491664
Merge branch 'maint'
2023-02-05 12:09:38 +08:00
John Ralls
7bb14b9caa
Merge Richard Cohen's 'use-reference-for-loop' into master
2023-02-02 14:32:14 -08:00
Richard Cohen
d8f45f2443
Use const references for for-loops to avoid unnecessary copies
...
Found by clazy - clazy-range-loop-reference
2023-01-31 14:44:57 +00:00
John Ralls
ce3447e6ea
Bug 798740 - Build fails with gcc 13
...
Protect against passing an lseek failure rv to read().
2023-01-30 16:48:16 -08:00
Christopher Lam
119356752f
Merge branch 'maint'
2023-01-30 09:56:13 +08:00
luzpaz
67ab9e90d2
Fix some typos
2023-01-26 13:48:58 +01:00
John Ralls
f6919e60a7
Merge Richard Cohen's 'cleanup' into master.
2023-01-24 12:05:47 -08:00
John Ralls
046e4a156e
Silence Clang deprecation warnings about sprintf.
2023-01-23 12:54:25 -08:00
Richard Cohen
1cec0cb3f3
Use internal extern "C" { ... } for C++
...
- removes warnings compiling swig engine
...
[ 10%] Generating swig-engine.cpp
.../libgnucash/engine/engine-helpers.h:31: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gnc-date.h:83: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/qofquery.h:90: Warning 302: Identifier 'QofQuery' redefined (ignored),
.../libgnucash/engine/gnc-option.hpp:55: Warning 302: previous definition of 'QofQuery'.
.../libgnucash/engine/gnc-commodity.h:56: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncBusiness.h:40: Warning 313: Unrecognized extern type "C++".
.../libgnucash/engine/gncEntry.h:37: Warning 313: Unrecognized extern type "C++".
2023-01-23 18:40:01 +00:00
Richard Cohen
19bbde7000
Fix some typos
2023-01-23 15:01:46 +00:00
richardcohen
8044f79f75
Silence the boost (<1.76) warning message
...
from .../gnucash-4.8/libgnucash/app-utils/gnc-quotes.cpp:33:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message:
The practice of declaring the Bind placeholders (_1, _2, ...) in the
global namespace is deprecated.
Please use <boost/bind/bind.hpp> + using namespace boost::placeholders,
or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
The issue was fixed in boost 1.76, but, e.g ubuntu 22.04 has boost 1.74
2023-01-22 17:50:34 +00:00
John Ralls
fed4daf4e7
[c++ quotes] Make sure to include all of the required Boost libraries.
...
Also Boost-iostreams needs winsock but doesn't tell Cmake, so explicitly
add it to the link list.
2023-01-08 16:11:58 -08:00
John Ralls
31d79e3004
Merge Bob Fewell's 'bug798673' into master.
2022-12-30 16:00:12 -08:00
John Ralls
b8c0673526
Merge branch 'maint'
2022-12-19 12:11:32 -08:00
Robert Fewell
7536fcaf2f
Change the balance limit icon if both limits are zero
...
When higher and lower limits are zero, when used for a a suspense
account, change the icon to 'dialog-warning'. This type of use is to
indicate that a non zero balance exists.
2022-12-17 11:44:45 +00:00
Robert Fewell
a15c6f81b3
Allow the balances of sub accounts to be used in limits
2022-12-16 15:16:53 +00:00
Robert Fewell
60ab654d2b
Add account balance test functions to gnc-ui-balance
2022-12-16 15:16:16 +00:00
John Ralls
b4bab92da2
Bug 798664 - Result of 'gnucash --nofile' is marked dirty
...
Don't create a new book in the new-user dialog unless the user says to.
Don't automatically create a new book when retrieving default commodities
because the retrieve might be requested in a context like the Preferences
dialog when there is no book.
Some report tests relied on requesting the default commodity creating
the book, so in those tests ensure that the book is created first.
2022-12-12 11:30:59 -08:00
John Ralls
fae5de80d3
Undo unintended change in Bug 798679 commit.
2022-12-11 19:54:35 -08:00
John Ralls
fd2761bd68
Bug 798679 - Fullwidth characters cannot be pasted as-is in register fields
...
Control character check doesn't need normalization, the control character
codepoints aren't graphic and so can't be composed nor have compatible
equivalents.
2022-12-11 13:00:40 -08:00
Geert Janssens
98251d59a6
Bug 798672 - Preferences are not saved nor loaded, ERROR <GLib-GIO> g_settings_new_full: assertion 'schema != NULL' failed
...
Apparently it was a failure on our side to properly look up
requested gsettings schema.
2022-11-29 12:27:21 +01:00
Christopher Lam
fc94b41c81
Merge branch 'maint'
2022-10-29 21:53:57 +08:00
John Ralls
cf088f2a70
Merge John Ralls's 'Bug798614' into maint.
2022-10-28 15:27:28 -07:00
John Ralls
14a0ea4ed3
[price-quotes] Sort and format source list.
2022-10-17 11:13:55 -07:00