Commit Graph

928 Commits

Author SHA1 Message Date
Robert Fewell
d4e90132d9 Fix a missing mode == in 'Replace the three bool parameters
to qof_session_begin to an enum'.
2020-06-05 11:10:16 +01:00
John Ralls
b8d514e157 Don't try to unlock the GncDbiSqlConnection when it was connected read-only.
If it's locked it's not *our* lock.
2020-06-04 14:07:28 -07:00
John Ralls
6a1cb5eecd Replace the three bool parameters to qof_session_begin to an enum.
For clarity. In so doing found the backend behavior a bit inconsistent
so it's modified to do what the enum values indicate.

In the course of changing the various calls I found some implementation
errors in the back end and corrected them.
2020-06-04 14:07:28 -07:00
John Ralls
c73a1bd475 Extract function template drop_database. 2020-06-04 14:07:28 -07:00
John Ralls
a320035f42 QofSession, QofBackend: Change book_id to uri.
It's more descriptive and less likely to be confused with the book:id value
in XML files that is the book's GUID.
Also changed the QofSessionImpl::begin new_uri parameter from std::string to
const char*. There's no point in allocating a string just to call
new_uri.c_str() all over the place.
2020-06-04 14:07:28 -07:00
John Ralls
65e2639de4 Delete QOF_STDOUT.
Apparently a hack for the long-gone QSF backend.
2020-06-04 14:07:28 -07:00
Geert Janssens
a124e647db Add files omitted in previous commit 2020-05-29 17:35:04 +02:00
Geert Janssens
5fc2b9519c Add mock sources and import-export test to dist 2020-05-29 17:20:53 +02:00
Robert Fewell
2f9be87549 Replace tabs with spaces in gncInvoice.c/h
Replace tabs with spaces, trim ending spaces and add spaces to function
calls where appropriate.
2020-05-28 17:25:41 +01:00
Robert Fewell
69aeacb621 Add KVP Association property to GncInvoice 2020-05-28 17:25:41 +01:00
Robert Fewell
785a6a8fa6 Add a new cell type for Transaction associations that
supports the use of glyphs
2020-05-28 17:25:40 +01:00
John Ralls
fde6be6e01 Fix binreloc compile error with gcc. 2020-05-25 08:01:47 -07:00
Mike Alexander
b1ffe2246a CLean up the binreloc code a bit. It is won't work pervectly, but it's better.
Make it do something plausible in a non0QUartz Mac build and make it handle
running GnuCash from a symlink.
2020-05-25 03:30:59 -04:00
John Ralls
f2a13ecac7 Merge Christian Gruber's 'test_import_backend' into master. 2020-05-21 12:39:57 -07:00
John Ralls
a81f155408 Fix abort in qof_log_check.
Apparently g_logv doesn't like recursive calls from its log handler.
2020-05-15 12:52:18 -07:00
Christopher Lam
09a8bee5c0 Merge branch 'speedup-aging' #638 2020-05-14 20:30:08 +08:00
Christopher Lam
f8bad131a5 Merge branch 'maint-797743' #720 price renderers 2020-05-13 13:20:09 +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
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
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
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
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
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
John Ralls
4e6c497cd1 Don't ask to save a non-existant book.
To accomplish that we separate creating a book and creating a session;
gnc_get_session no longer automatically creates a book if one isn't
connected.

We also add an initially_insensitive GtkAction array to
gnc-plugin-basic-commands with a call to make its contents insensitive
at plugin load so that the save button on the toolbar isn't lighted when
there's nothing to save.
2020-05-08 15:59:41 -07: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
Mike Alexander
478112d8c0 Define log_module in gnc-sx-instance-model.c. 2020-05-08 16:43:45 -04:00
Christopher Lam
a9a60c1831 [Account.cpp] more xaccAccountTypeGetFundamental types 2020-05-04 23:35:06 +08:00
Christopher Lam
14ea5d9751 Merge branch 'maint' 2020-05-04 23:31:21 +08:00
John Ralls
6a3fabc30d Fix test failure for timezones west of the prime meridian.
The previous fix didn't calculate the comparison time correctly and
ended up in the wrong day because the GMT time is before the local time.

In the course of checking the corner-case timezones (Midway and
Kiritimati) I found an error in the GncDateTime calculation of the
neutral time, so fixed that too.
2020-05-02 15:35:13 -07:00
John Ralls
b4177bc60a Fix transaction post_date being set to midnight local.
Reported for Invoices on gnucash-user. Checked all other uses of
xaccTransSetPostDateSecs(), fixed the ones that weren't passing an
already normalized time64. For Invoices change the post_date to also be
normalized so that it stays the same as the transaction post_date. That
also protects it from the displayed date changing depending on timezone.

The python binding invoice post_time test had to be changed to match.
2020-04-30 12:09:22 -07:00
Christopher Lam
a3dae3bd4d [gnc-lot.c] speed up gncInvoiceGetInvoiceFromLot by caching invoice 2020-04-30 23:56:26 +08:00
John Ralls
fbf7171ab6 Fix libgnc-app-utils.dylib install_name_dir.
The install location changed as part of expunging libgnc-module.
2020-04-28 10:30:22 -07:00
John Ralls
9822f2f486 Merge Jean Laroche's 'add_reconcile_after_ofx_import_master' into master.
https://github.com/Gnucash/gnucash/pull/700
2020-04-25 16:44:50 -07:00
John Ralls
de9ee8dede Merge branch 'maint' 2020-04-25 15:45:59 -07:00
jean
e0e7cf7dfb Fix 3 problems with the scheduled transactions calculations
This fixes 3 bugs:
- Set a monthly recurrence on the 10th with a start date on the 20th of this month.
The editor correctly shows the next occurrence to be on the 10th of the following month.
The schedule transaction summary dialog incorrectly shows the next occurrence to be on the 10th of this month
(before the start date!)
- Set a monthly recurrence on the 19th, with a start date on the 20th of this month. The editor's
calendar marks incorrectly show the next occurrence to be on the 19th of this month (before the start date).
- Set a monthly recurrence on the 18th, with a start date on the 20th and an end date on the 17 of the following
month. The calendar should show no mark, but fails to erase the marks that were present.
2020-04-25 14:39:41 -07:00
John Ralls
758bd7b656 Merge branch 'maint' 2020-04-24 13:52:21 -07:00
Geert Janssens
f7f4f42145 Drop several test-link type tests
They were intended to test whether a gnc-module could be loaded
correctly. However several were not even properly implemented
and for the others the gnc-modules have been converted to
ordinary libraries. Testing whether a library can be linked to
is not a useful test. Link issues are triggered at build time
already.
2020-04-24 22:34:57 +02:00
Geert Janssens
bbeb9a2b62 Drop all gnc-module dependencies and includes from compilation units that no longer use it
This also drops the python wrapper for gnc-module. As for the guile wrappers,
python should use other means of loading our shared libraries.

This commit required a few tweaks to the dependency chain as some units
inherited dependency information from gnc-module's public dependency
interface.
2020-04-24 22:16:24 +02:00
Geert Janssens
abf29aa196 Drop the gnc-module wrapper around the test-engine library
It's not adding anything
2020-04-24 21:29:20 +02:00
jean
2d0d7c40f8 Make the reconcile window close when the session closes, use full version of free 2020-04-22 21:15:36 -07:00
Christopher Lam
8023065030 [fin.scm] return #f instead of -1 if n is out of range 2020-04-21 11:39:40 +08:00
Christopher Lam
96a6e1b0d5 Merge branch 'patch-1' of git://github.com/thetedmunds/gnucash into maint 2020-04-21 11:39:28 +08:00
Geert Janssens
261bff1250 Drop unused module file in xml backend 2020-04-19 21:23:22 +02:00
Christopher Lam
6de712b501 [gnc-exp-parser] don't crash when gnc:fn returns non-number
if gnc:fn returns anything other than a number, abort rather than
crash
2020-04-15 04:54:05 +08:00
thetedmunds
d6c5b115d8
Adding lines missing from fix for Bug 797196
Adding definition of gnc:amort_balance() that got lost in the original pull-request for Bug 797196.
2020-04-14 07:45:54 -07:00