Commit Graph

27 Commits

Author SHA1 Message Date
Geert Janssens
7765e13704 Bindings - move log wrappers into the swig interface files
They are only used for guile (and possibly python, so there's
no need to carry them around in core-utils.
2022-10-02 11:50:26 -07:00
Geert Janssens
e5c6f6026b Remove support code that was only used by price-quotes.scm 2022-10-02 11:50:26 -07:00
John Ralls
4ae17d12c7 [options] Move options from app-utils to engine.
Options is required for book options that are stored as part of the data
 file and so belongs in engine.
2022-08-25 22:09:56 -07:00
John Ralls
cf5da9fffd Resolve merge conflicts. 2021-11-12 19:56:29 -08:00
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.
2021-10-16 22:50:09 +08:00
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.
2021-10-16 22:49:05 +08:00
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.
2021-10-16 12:57:03 +08:00
Christopher Lam
d0f7daf4cf Revert "[engine.i] QofQueryParamList * args must be freed"
This reverts commit 72a3ebbba3. Freeing
does not apply to all qof_query_* calls.
2021-09-11 15:45:32 +08:00
Christopher Lam
72a3ebbba3 [engine.i] QofQueryParamList * args must be freed 2021-09-11 14:59:18 +08:00
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.
2021-08-25 09:17:25 +08:00
Christopher Lam
929cb3d0c1 [engine.i] free swigged GList* arg 2021-08-24 00:13:45 +08:00
Christopher Lam
9bc44c62e6 [engine.i] free GSList* key_path arg to qof_book_get_option
Addendum to 6c8af6aab need to specify exact typemap target.
2021-08-20 17:01:42 +08:00
Christopher Lam
6c8af6aab1 [engine.i] free GSList* arg to qof_book_get_option 2021-08-20 09:03:37 +08:00
Christopher Lam
de1ad9367a g_free gnc_ctime which returns a new gchar* 2021-08-05 21:42:31 +08:00
Christopher Lam
e0d953bfc8 [swig] %newobject to g_free gchar* functions 2021-08-03 12:14:12 +08:00
Christopher Lam
9767c86337 [engine.i] some GLists must be freed 2021-07-29 23:56:10 +08:00
John Ralls
81c5ac6689 Remove the incomplete book-currency code.
Not everything from the 6 Book-Currency commits is removed: Switching
the Num and split-action fields and restricting edits of transactions
older than n days were included and those changes are left in place.

Some other partly-implemented features were also part of these commits
and were removed: Options for setting a default capital gains account
and currency, completion of the LIFO cap-gains policy, and creation of
a list of cap-gains policies.

If any of these are to be revived they should each be done in a separate
feature branch and submitted via Github pull request for a code review
before merging; a design discussion on gnucash-devel before restarting
work is also advisable.
2021-07-10 17:29:11 -07:00
Dong Lin
75209c024f Update price database for imported transactions
When a transaction is added from the ledger, price database is updated properly.
But if the transaction is imported, there is no price db update.

This change adds the proper pricedb update in the import path (qfx/ofx/qif).
Tested with make check
2021-03-09 10:39:56 -08:00
Christopher Lam
0d10d1e234 [engine.i] swigify CLEARED-ALL
to be used by trep-engine.scm
2020-09-15 18:30:24 +08:00
John Ralls
8ff5af4c19 Decouple QofBook creation from QofSession.
So that we don't create two books when loading a session.
Step 1 to not having a dirty book when we think we should have no
book at all.
2020-05-08 15:59:41 -07:00
Geert Janssens
45cfb8937a Merge branch 'maint'
Resolves most merge conflicts. The only bit I was unable
to merge from maint into master is the use of match-lambda
in category-barchart.scm. This will have to be redone manually.
2020-01-14 19:56:35 +01:00
Geert Janssens
6a3505d01f app-utils - move price-quotes support functions directly into bindings
- wrappers for glib functions go into glib-guile
- engine convenience functions go into gnc-engine-guile
2019-12-06 19:59:12 +01:00
Geert Janssens
2e1b9f937b engine - drop guile wrappers for obsolete functions
These were marked deprecated early in the 3.x release cycle.
2019-12-06 19:59:11 +01:00
Geert Janssens
c46c9682eb engine/test - move guile related tests to bindings 2019-12-06 19:59:11 +01:00
Geert Janssens
02511401b7 bindings/guile cosmetic - rename source files for consistency 2019-12-06 19:59:11 +01:00
Geert Janssens
3d4cc63d73 bindings - ensure engine is initialized before any scm code interfaces with it
This is done by invoking gnc_engine_init in the swig initialization routine
2019-12-06 19:59:11 +01:00
Geert Janssens
1c7f835f47 engine - move guile code to bindings/guile
This commit tries to do the minimum necessary to move the guile bits from engine
to bindings/guile. As engine is a very central piece in the software, this unfortunately
still touches many other source files:

- A few helper objects have been squashed together:
  * engine-helpers-guile.[ch] (of which the c part is extracted from engine-helpers.c)
  * gncBusGuile.[ch]
  * gnc-hooks-scm.[ch]
- The initialization function of gncmod-engine no longer initializes the scm bits.
  Any scm code that wants to interact with the engine code now has to load
  the (gnucash engine) scm module, or sometimes (gnucash business-core).
  The bulk of changes in this commit actually is updating all the scm consumers to do so.
- scm-scm target has been removed. Instead (gnucash utilities) is part
  of scm-engine. A few dependency graphs have been updated for this.

More refinements will be in followup commits.
2019-12-06 19:59:11 +01:00