luz paz
ba94730a23
Fix various typos
...
Found via `codespell`
4 years ago
John Ralls
688832b5f8
Bug 798585 - segfault running sample script
...
The root cause of which is that on recent releases of GLib (recent
meaning 2.66 in the current Debian stable!) g_type_instance_get_private
looks in the wrong place for the private data. When running the script
in question it returned NULL and since the code didn't check for a valid
pointer, it crashed.
So this change replaces all calls to g_type_instance_get_private with
the function [type_prefix]_get_instance_private() added in glib-2.36
except for two register2 files that have been removed from master; those
are ignored to avoid unnecessary merge conflicts.
4 years ago
Christopher Lam
f1adb5da34
Merge branch 'TXN_TYPE-is-dynamic' xaccTransGetTxnType into maint #1201
4 years ago
Christopher Lam
fd12d3900c
[Transaction.c] use heuristics to determine txn->txn_type
4 years ago
John Ralls
426b30c37e
Fix python tests dependencies
...
So that ninja check works from a clean build directory with Python enabled.
4 years ago
Christopher Lam
fae7ea02cd
[account.cpp] gnc_accounts_and_all_descendants converted from scm
...
much more efficient than guile algorithm, avoids numerous repeated
GList<->SCM conversions, and traversals of account descendants.
4 years ago
Christopher Lam
40d5db43e6
Bug 797163 - qof_book_get_option segfaults when retrieving a non-leaf frame
...
returns a KvpFrame into a nested list of pairs
returns a KvpValue GLIST into a list
4 years ago
Christopher Lam
11458bf8b3
[core-utils.i] Use g_dpgettext2 instead of g_dpgettext
...
avoids using \004 context and msg separator.
Discussed in dae2ea8356
4 years ago
John Ralls
7d94ade599
[python]Remove non-namespace "All non-currency" fom namespace test.
4 years ago
John Ralls
109efe62b8
Rework default non-currency commodity namespace.
...
Separate the "All noncurrency" convenience category in the commodity
selector and the default non-commodity namespace proposed by the QIF
importer because they have different functions.
Also remove the namespace guessing code from qif-dialog because with
only one default non-currency namespace there's nothing to guess.
4 years ago
Christoph Holtermann
6a015c8744
make GncNumeric.invert() return GncNumeric
4 years ago
Christoph Holtermann
567df27cc7
Implement some comparisons and arithmetics for GncNumeric
...
Derive some numeric comparisons and arithmetics from Fraction
class
https://github.com/python/cpython/blob/3.7/Lib/fractions.py
and general information from
https://docs.python.org/3/library/numbers.html#numbers.Integral
These methods are bound closer to the gnucash-C-api than those
from the fraction class.
This is not the full set of comparisons and arithmetics, needs
to be extended. It would be good to extend tests to cover this.
4 years ago
John Ralls
1373233cd0
Restore Scheme definitions of GNC-COMMODITY-NS-CURRENCY & -NONCURRENCY.
...
Overzealously removed in PR 1073.
4 years ago
John Ralls
cbfacdcd55
Merge Christoff Holtermann's 'python-qof-example' into maint.
4 years ago
John Ralls
d841b322d0
Merge Frank Ellenberger's 'Bug684507' into maint.
4 years ago
Christoph Holtermann
64920e7c70
Small fix in expected result
4 years ago
Christoph Holtermann
07cfe9e45c
Missed one redundancy
4 years ago
Christoph Holtermann
395c7a7052
Modify examples to respect previous patch
4 years ago
Christoph Holtermann
62f8acf6ae
Provide the complete set of QOF enums in gnucash
4 years ago
Christoph Holtermann
06e17dfd5c
Provide wrapper for qof numeric predicate
...
Python bindings already have some wrapping objects for
qof predicates. This adds the one missing for GncNumeric
comparisons.
Additionally fixes a wrong number for QOF_NUMERIC_MATCH_ANY
in example file.
4 years ago
Christoph Holtermann
f44d23035e
python qof examples
4 years ago
John Ralls
9ad24321b4
Remove investment-type namespaces.
...
Leave it to users to categorize their non-currency commodities. In the
QIF importer default non-classifiable commodities to
GNC_COMMODITY_NS_NONCURRENCY.
4 years ago
Frank H. Ellenberger
09296dfb96
Drop commodity-table.scm, no longer required after adjusting qif-dialog-utils
4 years ago
Frank H. Ellenberger
c7f842c081
Bug 684507 - commodity namespace should be localized
4 years ago
John Ralls
ff75ad7043
gnc:html-foo-include: Use gnc-resolve-file-path.
4 years ago
John Ralls
5c7967c4a5
Revert "Merge Stefan Bayer's 'SepaInternalTransfer' into maint."
...
This reverts commit 17a3f7fef2 , reversing
changes made to b8458d0732 .
4 years ago
John Ralls
17a3f7fef2
Merge Stefan Bayer's 'SepaInternalTransfer' into maint.
4 years ago
Christopher Lam
d861c65020
[test-engine-extras] don't create splits of opposing amt/value signs
...
Splits' value and amount should never be of opposite signs. Fix
test book which had created this incorrect value/amount
pair. Strengthen env-create-multisplit-transaction to disallow
test book errors.
4 years ago
Christopher Lam
984d816a58
Merge branch 'maint'
5 years ago
Christopher Lam
e94ee3bfad
Don't g_strdup char* from scm_to_locale|utf8_string
...
Both scm_to_locale_string and scm_to_utf8_string return newly
allocated char*. It is not necessary to return a strdup'd char* and
free the original.
5 years ago
Christopher Lam
171ce9413b
Don't g_strdup char* returned by scm_to_locale_string
...
Previous code was returning a duplicated string and released the
original one. It's no better than returning the original returned
char* instead.
5 years ago
Christopher Lam
19a91f041e
Revert "g_list_free swigged GList* arguments"
...
This reverts commit 16184daf95 . Was
causing an unexplained GNC_IS_ACCOUNT assertion failure in
account_foreach_descendant.
5 years ago
Christopher Lam
16184daf95
g_list_free swigged GList* arguments
...
used by xaccQueryAddAccountMatch and gnc_price_list_equal. SplitList
TransList LotList and CommodityList are not currently being passed as
arguments.
5 years ago
Christopher Lam
9eaa3eb23a
Merge branch 'maint'
5 years ago
Christopher Lam
23d964a6a4
g_list_free_full requires a GDestroyNotify
...
error in f4941a5b0
5 years ago
Christopher Lam
0bce6a1d56
[core-utils] introduce gnc:format
...
(gnc:format str [binding value]...)
str will contain ${binding} which will be replaced to value.
5 years ago
Christopher Lam
3ff5bd8246
[test-core-utils] uses srfi-64
5 years ago
Christopher Lam
f4941a5b01
use g_list_free_full
5 years ago
Christopher Lam
ad7bffaae1
Run test-core-utils and test-create-account properly
5 years ago
Christopher Lam
34a4b652c1
[test-core-utils.scm] fix - N_ is no longer a macro
5 years ago
John Ralls
824b515430
Fix qoflog's comments to reflect a preference for the macros over GLib functions.
5 years ago
John Ralls
74d0630867
Bug 798237 - Logging during XML file loading degrades performance...
...
significantly
Modify the DEBUG and PINFO macros to return unless qof_log_check is
true. Replace almost all direct calls to g_debug and g_message with
DEBUG and PINFO respectively.
Track the highest logging level sent to qof_log_set_level to provide a
short-circuit return in qof_log_check. Remove setting GNC_MOD_TESTS to
QOF_LOG_DEBUG so that the short-circuit threshold isn't defeated by
always being DEBUG.
Net result: 33% improvement in xml load times.
5 years ago
Christopher Lam
017ab06939
Merge branch 'maint'
5 years ago
Christopher Lam
d0f7daf4cf
Revert "[engine.i] QofQueryParamList * args must be freed"
...
This reverts commit 72a3ebbba3 . Freeing
does not apply to all qof_query_* calls.
5 years ago
Christopher Lam
72a3ebbba3
[engine.i] QofQueryParamList * args must be freed
5 years ago
John Ralls
b8552a8070
Fix python transaction test_date on Ubuntu-81.04.
...
Python3 there is too old for fromisoformat, use direct construction
instead.
5 years ago
John Ralls
fcab298245
Add test for Transaction GetDate() in python bindings.
...
Pursuant to Bug 798284.
5 years ago
Christopher Lam
140922a37e
QofQuery args must be destroyed after qof_query_merge
...
qof_query_merge returns a new QofQuery; the two merged QofQueries are
not explicitly destroyed.
5 years ago
Christopher Lam
c6d8333811
Merge branch 'maint'
5 years ago
Christopher Lam
37cb886de5
[engine.i] gnc_budget_get_account_period_note to be freed by the caller
...
amendment to last commit.
this pair of changes was necessary to allow the GValue to be unset.
5 years ago