Commit Graph
100 Commits
Author SHA1 Message Date
Geert Janssens 2f96b19c77 Merge branch 'fix_bayes' of https://github.com/limitedAtonement/gnucash into unstable 2017-12-23 15:10:48 +01:00
Geert Janssens ddfd38d8c3 Remove cmake hoop to change file permissions
As we are using cmake's own configure_file command, it will just copy
the permissions of the input file, which is what we want here.
2017-12-23 14:07:25 +01:00
Geert Janssens f11eab36d9 Replace GNC_CONFIGURE(2) with configure_file 2017-12-23 14:07:25 +01:00
Geert Janssens 318f7ebc4f Force build order on report system support files
Guile 2.2 is more picky about this than guile 2.0 was.
2017-12-20 14:55:40 +01:00
Geert Janssens 723b51a06d Add unit test for rewritten scheme error handlers 2017-12-20 14:55:40 +01:00
Geert Janssens 3d910ad2b1 Drop guile 1.8 support
And with it all quirks we still had in the code to support that version.
2017-12-20 14:55:40 +01:00
Geert Janssens a784dd5784 Add support for guile 2.2 2017-12-20 14:55:40 +01:00
Geert Janssens de4d1e9859 Add infrastructure to handle preference schema migrations and use it to replace one preference
The preference schema migration collects all schema mutations that can occur
when upgrading to a newer gnucash version. The old gconf to gsettings conversion is
integrated in this system as well. Newer schema mutations will happen based on version
number upgrades though.

The preference that got replaced is "use-theme-colors". Based on discussion in bug 746163
(https://bugzilla.gnome.org/show_bug.cgi?id=746163) and gnucash-docs PR#105
(https://github.com/Gnucash/gnucash-docs/pull/105) this has been replaced with
"use-gnucash-color-theme" with inverted meaning. The old option is kept around for one or
two major release cycles to allow seamless conversion.
2017-12-11 21:56:23 +01:00
Geert Janssens 98d41bc374 Fix transient parent warnings for tip-of-the-day and file dialogs 2017-12-08 23:29:21 +01:00
Geert Janssens ac89797e78 Fix transient parent warnings in search callbacks 2017-12-08 15:49:31 +01:00
Geert Janssens a092aecd56 Add transient parent for search dialog 2017-12-06 22:36:15 +01:00
Geert Janssens 0c254c36a0 Fix missing transient parent warnings for several business dialogs 2017-12-06 22:36:15 +01:00
Geert Janssens 8986795251 Fix transient parent for SX since last run... at startup 2017-12-06 22:36:15 +01:00
Geert Janssens 995c3cf4c3 Set transient parents for all query views and dialogs 2017-12-06 22:36:15 +01:00
Geert Janssens d8cc165e28 Alter function signature of gnc_(verify|yes_no|info|warning|error)_dialog
The new signature makes it more clear what the purpose and required type of the parent widget should be.
While at it, the info,warning and error dialog code got slightly refactored for better code reuse.
Finally a few more parent widgets were passed in places where a parent was readily available.
2017-12-06 22:36:15 +01:00
Geert Janssens 68103dd02d Improve window management
This first commit will replace gnc_ui_get_toplevel with two functions
- gnc_ui_get_gtk_window (widget): tries to find the immediate GtkWindow the given widget belongs to
- gnc_ui_get_main_window: looks for the main window that's the final transient parent widget
  can be traced back to. In the absence of widget, this will behave as gnc_ui_get_toplevel did
  and return the first active or mapped window.
2017-12-06 22:36:15 +01:00
Geert Janssens 12bad5cec8 Ensure the main window is mapped before any reminder dialogs are shown at startup 2017-12-06 22:36:15 +01:00
Geert Janssens 47d622de61 Handle the splash/lock file warning more the gtk way
If the splash screen is still availabe when the dialog should be displayed,
make the splash' window the transient parent for this dialog.

In the other case we try to use the front-most main window. While this
works well when calling file->open from the menu, there may not be a
visible main window yet during startup. Since the user can close
the splash before the dialog is due, we may end up with no usable candidate
as parent window.
In that case the dialog will emit a missing transient parent message on stdout.
There's no easy fix for this as users don't want to see an incomplete
main window (see old bug 350993).
2017-12-06 22:36:15 +01:00
Geert Janssens 649a6a263e Fix installation destinations for overrides and quotes scripts
Mentioned by Robert Gowin and Christopher Lam
2017-11-30 17:37:32 +01:00
Geert Janssens 037c93faea Merge branch 'gtk3-update8' of https://github.com/Bob-IT/gnucash into unstable 2017-11-24 17:24:52 +01:00
Geert Janssens 2cbfc5bbac Revert "Merge branch 'gtk3-update8' of https://github.com/Bob-IT/gnucash into unstable"
This reverts commit cdb764fec5, reversing
changes made to 169677a8d7.
2017-11-21 22:11:38 +01:00
Geert Janssens cdb764fec5 Merge branch 'gtk3-update8' of https://github.com/Bob-IT/gnucash into unstable
More register layout tweaks
2017-11-21 18:30:09 +01:00
Geert Janssens 169677a8d7 Merge branch 'gtk3-update9' of https://github.com/Bob-IT/gnucash into unstable
This branch has several improvements in the dense calendar code. The most
important of these is to fix a crash on Windows.
2017-11-21 17:04:27 +01:00
Geert Janssens 060e16b671 Fix a few travis failures (potentially uninitialized use) 2017-11-18 20:41:10 +01:00
Geert Janssens 75fb4e7a0c Bug 736765 - Assign as payment... should re-populate the payment represented by the selected transaction if any
The main topic of this bug was already fixed in earlier commits. This commit
handles the minor improvements also mentioned here:
- don't show the menu option for invoice/bill transactions as that doesn't make sense
- don't show the pre-payment line if the selected transaction was one, in this case only set the amount
- allow users to edit lot link transactions via this mechanism as well (which essentially are payments without an explicit payment split)
2017-11-18 18:53:55 +01:00
Geert Janssens 949f2db473 Bug 778692 - Assign as payment should work for employee expense vouchers
The way this is implemented is as follows
- if gnucash can deduce a partner from the transaction that partner will be proposed
  this works for all transactions that are part of a business transaction already
  and will correctly detect pre-existing customer, vendor and employee payments
- if no partner can be deduced gnucash will assume the transaction to be a vendor
  or customer payment based on the sign
- in all cases the user can change the partner type in the payment window that's presented
  to any of customer, vendor or employee to correct gnucash' suggestion.
2017-11-18 17:43:33 +01:00
Geert Janssens cd9c3807c0 Assign as payment - when random transaction is selected, reset transaction description to owner
This will make the assigned payment more in line with traditionally created business payments
2017-11-18 17:43:33 +01:00
Geert Janssens ce900d1df3 Assign as payment - refactor a few code blocks into separate functions
And some tweaks to the message strings displayed in case of uncertainty
2017-11-18 17:43:33 +01:00
Geert Janssens d66469fef8 Assign as payment - Differentiate between new and existing payments for 'Assign as payment'
When the selected transaction is already involved in a business payment,
propose to Edit the payment instead of Assigning it as a payment.
This is more informative and will help prevent users from accidentally replacing existing payments.
2017-11-18 17:43:30 +01:00
Geert Janssens 18dcbeef8a Assign as payment - offer possible payment splits to user in case there are multiple valid candidates for assignment 2017-11-18 17:43:26 +01:00
Geert Janssens aeb80a230e Bug 734865 - Assign as Payment... can silently 'unpay' a payed invoice
With this commit the 'assign as payment' logic now works as follows:
- if the selected transaction is already linked to an existing payment, the payment dialog
  will present this payment again (same partner, post-to account, same selected document(s),
  same amount, memo, and transfer account).
- if the selected transaction is not linked to an existing business transaction the logic
  will make a best guess as to whether the payment should be for a customer or vendor.
- in both situations if the existing transaction has multiple splits that can be considered
  as transfer (or 'payment') splits the payment  dialog can't work with it (it can only deal
  with one transfer split). In this case the user will be informed that only one valid
  transfer split will be retained and the others ignored.
- the other thing the payment dialog can't handle are APAR type splits that are not associated
  to a lot at all. In case of transactions not part of a business transaction they will be
  silently ignored on the assumptions these were manually entered transactions with the intention
  to be linked to business transactions. On the other hand if such a split is part of a transaction
  that is also linked to a business payment already, a warning will be issued these splits will
  be removed from the new payment.
2017-11-18 17:43:26 +01:00
Geert Janssens 0dfb921e86 Add functions to retrieve a copy of splits of a certain type from business transactions 2017-11-18 16:55:18 +01:00
Geert Janssens de4414b2a1 Inform the user when assign as payment can't be used 2017-11-18 16:55:18 +01:00
Geert Janssens 954ce1ab11 Mark unused function parameters as such in dialog-payment.c 2017-11-18 16:55:18 +01:00
Geert Janssens f05761e636 Merge branch 'gtk3-update7' of https://github.com/Bob-IT/gnucash into unstable 2017-10-31 09:53:33 +01:00
Geert Janssens 1a8cf021d2 Add GNUCASH_BUILD_ID cmake/configure variable which allows packagers to define their own
For example distros may want to set the version of their package source (rpm, dpkg,...) rather than
our git id.
2017-10-26 22:48:50 +02:00
Geert Janssens 67ae241075 Use alternative revision retrieval if git describe is failing
This happens primarily on Travis. It looks like the shallow clone it makes is missing
tags. So if git describe fails, fall back to only the short commit hash (as we used to do
previously everywhere).
2017-10-26 22:48:50 +02:00
Geert Janssens 998f1185c1 Improve about dialog layout and contents
The main changes are
- group version and build information together
- increase size of application icon and name
- A more complete copyright notice (including 'Copyright' and 'GnuCash')

The default gtk provided about dialog widget won't allow for much more customization than that...

Note the build info has been condensed and is now based on 'git describe' which
returns a very concise, yet complete description of a commit starting from
the last tag that precedes it. This info will also be used anywhere else the build info
was displayed from now on, simplifying translations as well.
2017-10-26 22:48:50 +02:00
Geert Janssens df8ceadb63 Fix building from dist tarball with python bindings enabled 2017-10-26 14:05:17 +02:00
Geert Janssens 7cb59aafe8 Fix disabling src docs build on Windows
As it was written it also prevented building source docs on other platforms, causing
cmake warnings and a failed dist build.
2017-10-26 14:05:17 +02:00
Geert Janssens 1238b9d8cd Prevent gcc from searching config.h in the current directory
This will avoid a ninja-build from picking up a config.h generated by the autotools build
(in the root build directory). Picking up the wrong config.h may lead to all kinds of
subtle issues if the autotools run was done with different options than the cmake run.
2017-10-26 14:05:17 +02:00
Geert Janssens 67d011b86f Add gnucash.1 man page as proper dependency for dist
This file is now generated using CONFIGURE_FILE, so cmake will pick it
up as a generated file and do proper dependency resolution based on it.
2017-10-26 14:05:17 +02:00
Geert Janssens 444eb1c28e Improve gnc_numeric_boxed_copy_func based on discussion in PR#145
In essence
- guard against nullptr dereferencing
- free returned values
2017-10-23 23:05:49 +02:00
Geert Janssens b83be1b8c6 Remove configure option --enable-locale-specific-tax and make gnucash always behave as if it was set 2017-10-20 20:50:33 +02:00
Geert Janssens 9472e9347f Replace ambiguous 'scm' with 'vcs' in macro name
Pointed out by Frank.
2017-10-05 22:47:11 +02:00
Geert Janssens 29b862adc2 Use different format specifier to make older git versions happy 2017-10-05 17:02:32 +02:00
Geert Janssens 545b24fe97 Merge branch maint into unstable
Resolved conflicts:
2017-10-05 16:29:36 +02:00
Geert Janssens e56cb37813 Additional changes to use commit date rather than build date
This effectively replaces the use of GNUCASH_BUILD_DATE with GNUCASH_SCM_REV_DATE.
The latter is extracted from the current commit if building from some kind of vcs
(currently only works correctly for svn and git). The info extracted while building
from vcs is then also added to the dist tarball so it's available when building
from tarball as well (via the file libgnucash/core-utils/gnc-vcs-info.h).

The same date is also used to set the date in gnucash' man page document.
A practical detail: I have changed the substitution variables in the man page template
from @- -@ to ${} so we could leverage CONFIGURE_FILE in cmake. The necessary
related adjustments have also been made to Makefile.am's substitution rules.
2017-10-05 15:51:55 +02:00
Geert Janssens 7650d76582 Fix gnucash.pot generation from cmake build.
intltool-update should be run from the build directory, not the source directory.
If run from the source directory it will omit glade messages that have a context attribute
so all msgids with a msgctxt comment would be missing.
2017-10-03 22:56:35 +02:00
Geert Janssens 42ac55e03a Stop testing GObject's handling of invalid parameters 2017-10-03 22:56:35 +02:00
Geert Janssens b3b4b20e4b Merge branch 'maint' into unstable
Resolved conflicts:
	CMakeLists.txt
	NEWS
	configure.ac
2017-09-27 17:35:13 +02:00
Geert Janssens d5b0dddb74 Use the same bugzilla url in AC_INIT as on maint 2017-09-27 17:34:12 +02:00
Geert Janssens 5ac849623a Add Catalan README file to autotools based build 2017-09-27 17:09:23 +02:00
Geert Janssens d266ee346c Fix build failures if userdata_home exists but gnc_userdata_home doesn't
userdata_home is a different directory on each platform we support (default /home/janssege/.local/share on linux for example)
and gnc_userdata_home is normally userdata_home/GnuCash.
These directories may not always exist (yet) in all circumstances, so properly handle
all of these possible situations.
2017-09-26 12:37:33 +02:00
Geert Janssens 4d59be7f46 Ignore softlink for new report 2017-09-21 18:42:23 +02:00
Geert Janssens 398b75e1a4 Revert "Ignore softlink for new report"
This commit was made against the wrong branch...
This reverts commit ec99d74b46.
2017-09-21 18:39:56 +02:00
Geert Janssens ec99d74b46 Ignore softlink for new report 2017-09-21 18:39:08 +02:00
Geert Janssens 7448d8b532 Merge 'maint' into unstable
Resolved conflicts:
	configure.ac
2017-09-21 14:26:20 +02:00
Geert Janssens 0b85bbc1bf Add income-gst-statement.scm to POTFILES.in 2017-09-21 14:24:02 +02:00
Geert Janssens c6f5118b9d Fixup for Catalan account charts 2017-09-21 12:22:04 +02:00
Geert Janssens df7646263b Add boilerplate to get Catalan account charts installed and added to the distribution 2017-09-21 11:18:35 +02:00
Geert Janssens 1a84b4a000 Properly ignore internal report options that are not on invisible option pages when opening the report options dialog 2017-09-20 20:00:03 +02:00
Geert Janssens 42aa734475 Travis fixes
- Remove trailing semicolons. They're not needed in shell scripts
- Don't create default XDG_DATA_HOME (<HOME>/.local/share) the code
  should work equally well if that directory doesn't exist and so
  not creating it tests another part of the code
2017-09-16 22:29:29 +02:00
Geert Janssens a8cccc00f3 Minor tweaks to the userdata_dir logic
- have gnc_validate_directory throw as well in case of a missing directory
  that it shouldn't create. This allows to remove 3 other throws
- slightly adjust the error message in case of missing directory
- never migrate when the final directory is a temporary (sub)directory
2017-09-16 22:29:29 +02:00
Geert Janssens 2ac118f80c Improve a few comments. 2017-09-16 19:33:56 +02:00
Geert Janssens 61a90d99fb Disable creating a user_data_dir in the test environment
The code should be able to cope with this
2017-09-16 19:18:01 +02:00
Geert Janssens 3a1f7d7339 Also undo the changes to POTFILES.in 2017-09-16 19:15:49 +02:00
Geert Janssens f3c0ec6068 Revert "Merge branch 'new-gst-report' of https://github.com/christopherlam/gnucash"
This reverts commit 48483b1e3d, reversing
changes made to 53fbc6f62f.

This merge was unintentionally pushed to master. This branch still
needed improvements.
2017-09-16 17:43:18 +02:00
Geert Janssens 8b1ebc5168 Update python bindings to use PyGI and Gtk3
While it doesn't fully fix the python bindings, gnucash
now at least doesn't segfault on start up if built with
python bindings enabled. There are still issues to fix though.
2017-09-16 17:38:47 +02:00
Geert Janssens 48483b1e3d Merge branch 'new-gst-report' of https://github.com/christopherlam/gnucash 2017-09-16 10:24:00 +02:00
Geert Janssens 75b5a41eee Merge branch 'maint' 2017-09-15 21:51:50 +02:00
Geert Janssens 3bc0241e74 Bug 647805 - Interdependent report options fail to change state after using apply for a limited number of times
On the C side an SCM guile_options object is wrapped in a GNCOptionDB. This is
however a multi-to-one relationship. That is there can be several GNCOptionDBs
wrapping the same SCM guile_options object. This happens for example when
a report is open together with its Options dialog. Both manager their own
GNCOptionDB object while both wrap the same SCM guile_options.

The problem in this bug was caused by a callback function picking the wrong
GNCOptionDB based on the given SCM guile_options object. Which GNCOptionDB
got picked was completely dependent on how g_hash_table_foreach would cycle
through the stored dbs. It appears this is dependent on the in-memory order
of the hash table's values.

By being more selective of which GNCOptionDB we're looking for, this
could be circumvented. The GNCOptionDB we want is the one related to the open
report options dialog. This GNCOptionDB is different from the one managed by
the report tab in that it has callbacks set. So from now on we search for
a GNCOptionDB that wraps the give SCM guile_options and has one particular
callback set.
2017-09-15 20:54:42 +02:00
Geert Janssens 46545d3e45 Apply python binding changes to correct file 2017-09-13 15:01:48 +02:00
Geert Janssens 37ecf56fbb Merge branch 'maint'
Resolved conflicts:
	bindings/python/tests/CMakeLists.txt
2017-09-12 13:48:01 +02:00
Geert Janssens 556f7037ad Merge branch 'maint' 2017-09-10 19:16:38 +02:00
Geert Janssens 82bd4f69aa Merge branch 'fix_cmake_ofx_dep' of https://github.com/bhardwajs/gnucash 2017-09-10 18:56:44 +02:00
Geert Janssens f0f53d99b7 Merge branch 'trav' of https://github.com/limitedAtonement/gnucash 2017-09-10 18:32:58 +02:00
Geert Janssens f0fe1e9949 Re-enable python-bindings test this time with a fully corrected python path
The fix was suggested by Rob Gowin.
In addition, disable some debug output in the python tests suite.
2017-09-10 11:57:28 +02:00
Geert Janssens a1bc2d0202 Temporarily disable python-bindings as it's currently failing
I have adjusted the PYTHON_PATH already based on the new directory layout,
but that's not sufficient.
2017-09-09 14:23:47 +02:00
Geert Janssens 22b11427cb Merge branch 'maint' 2017-09-09 14:09:13 +02:00
Geert Janssens ef594e87e0 Merge branch 'maint.translation.de.02' of https://github.com/quazgar/gnucash into maint 2017-09-08 17:37:09 +02:00
Geert Janssens 32a8b853f1 Ajust the GUILE_COMPILE_PATH such that it also works on Windows 2017-09-06 16:31:54 +02:00
Geert Janssens 118af3e9e9 Fix gtest-gnc-timezone test on Windows 2017-09-05 14:14:01 +02:00
Geert Janssens 333edb1900 Fix gnc-rational test on Windows 2017-09-05 13:54:50 +02:00
Geert Janssens 449d3ca32d Windows: check permissions actually used on the platform
The code assumed these would be the same as on all other platforms which turns out not to be the case
2017-09-05 00:07:17 +02:00
Geert Janssens d96bb3ebd5 Amend previous commit
The utf8 conversion is only used in the Windows specific section so there's no
need to define an overloaded function on std::string in this case.
Also CMakeLists.txt doesn't require the MingW specific library name setting
for boost::filesystem. Just removing the hardcoded one allows the build to
pick the right name up from the Boost_LIBRARIES variable.
2017-09-04 23:03:08 +02:00
Geert Janssens d6677ff39f Convert boost::filesystem path strings to utf8.
Fixes windows build.
2017-09-04 13:37:46 -07:00
Geert Janssens 75cc34a2db Merge branch 'maint'
Resolved conflicts:
	gnucash/import-export/CMakeLists.txt
2017-09-03 12:06:52 +02:00
Geert Janssens 98e8e4c767 Only build aqbanking when requested 2017-09-03 12:05:00 +02:00
Geert Janssens c0f3147a3e Merge branch 'maint'
Resolved conflicts:
	.travis.yml
2017-09-02 16:18:23 +02:00
Geert Janssens 28668ec594 Fix deliberate test failure on previous commit 2017-09-02 16:03:46 +02:00
Geert Janssens 1e7c721e8d Have Travis print out build logs in case of test failures
To get the after_failure line work, I had to move the inline
build script to a separate script (util/travis-script.sh)

The second script (util/travis-after-failure.sh) will output
LastTest.log for cmake based builds and all files named
test*.log for an autotools based build.

Note: this commit also comes with a delibarate test failure
to illustrate the Travis behaviour. It will be removed in the
next commit.
2017-09-02 16:02:08 +02:00
Geert Janssens 098c1950f3 Merge branch 'maint'
Resolved conflicts:
	.travis.yml
	gnucash/report/standard-reports/transaction.scm
2017-09-02 11:25:54 +02:00
Geert Janssens 0e0e4d294e Set up a build matrix on Travis CI
This will run the different builds in parallel (depending on
resource availability on Travis).

The advantages are
- faster test results
- easier to spot which build type has failed
- shorter test log per build type to parse
2017-09-02 11:06:42 +02:00
Geert Janssens 1b3a0e56ff Use boost::filesystem's built-in conversion between character encodings.
This should fix the wide character mixup on Windows
2017-08-31 12:20:08 -07:00
Geert Janssens e732ff9432 Fix FIND_PROGRAM invocation for guile 2017-08-31 16:15:19 +02:00
Geert Janssens 64309e4e88 Set the same minimum required gtk version for cmake and autotools
3.10 is what Ubuntu 14.04 (Trusty) ships with and that's the
most recent on Travis. So we can't require a more recent version
for now.
2017-08-31 15:41:32 +02:00
Geert Janssens 74b6ef8ab3 Merge branch 'kvpvaltostring' of https://github.com/limitedAtonement/gnucash 2017-08-31 10:10:45 +02:00
Geert Janssens 7ee322942e Detail what is meant with a dark theme 2017-08-31 10:03:55 +02:00
Geert Janssens 135055764b Merge branch 'gtk3-update5' of https://github.com/Bob-IT/gnucash 2017-08-31 09:56:22 +02:00