Commit Graph

19096 Commits

Author SHA1 Message Date
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
lmat
87e833c693 GUID/Flat bayes handling in 2.6
With 2.8 soon able to write flat guid bayes kvps, 2.6 will also need
to be able to read them. This change enables 2.6 to be able to write
all known types of import maps: not-flat guid and account name, and
flat guid import maps, but it is not able to convert between these
types. 2.8 is able to read earlier, not-flat bayes kvps,
and will convert them to a flat guid model.
2017-12-06 13:12:16 -08:00
John Ralls
66817bb997 Rework directory determination in CMake builds.
Sets paths for finding componenents depending on the state of ENABLE_BINRELOC,
GNC_UNINSTALLED, GNC_BUILDDIR and whether any install paths have been set
outside of CMAKE_INSTALL_PREFIX.

GNUInstallDirs changes the name of CMAKE_INSTALL_LIBDIR depending on the
operating system and distro. When CMAKE_INSTALL_PREFIX is /usr,
/usr/local, or any subdirectory of /opt it also changes
CMAKE_INSTALL_FULL_SYSCONFDIR to /etc. An earlier commit by Aaron Laws
mirrors the name of CMAKE_INSTALL_LIBDIR to the build library directory.

It's possible for builders to set any of the install directories
anywhere they please.

Setting any directory outside of CMAKE_INSTALL_PREFIX breaks Binreloc so
the toplevel CMakeLists.txt now detects that and disables Binreloc.

If Binreloc is enabled then all path queries use it to find paths. This
works in the build directory because the gnucash executable and all of
the test programs are in build_directory/bin and LIBDIR, DATADIR, and
SYSCONFDIR can be found in the same root path.

If Binreloc is disabled then in order to build or run programs from the
build directory one must set GNC_UNINSTALLED and set GNC_BUILDDIR to the
absolute path of the build directory. When those are set GNC_BUILDDIR
replaces CMAKE_INSTALL_PREFIX in all paths that are subdirectories of
CMAKE_INSTALL_PREFIX; paths that are not in CMAKE_INSTALL_PREFIX are
appended whole to GNC_BUILDDIR. This process is constent between CMake
and gnc_path_get_foo. GnuCash is unlikely to run from a DESTDIR without
Binreloc.
2017-12-05 17:25:52 -08:00
Robert Fewell
5b02021550 Make changes for Gtk3 compatibility 2017-12-04 14:25:02 +00:00
Robert Fewell
b94b2f8ac2 Pot file changes for new files and settings rename 2017-12-03 10:13:36 +00:00
Robert Fewell
c3b54ab054 Rename gnc-csv-trans-settings.* to gnc-csv-import-settings.*
Change the name of the import settings files as they do not just deal
with transactions and all associated required changes.
2017-12-03 10:13:36 +00:00
Robert Fewell
c1a9464511 Reorder the create price procedure. 2017-12-03 10:13:36 +00:00
Robert Fewell
6c11cfad85 Add the ability to test from_commodity and to_currency being the same.
To cover all combinations we need to test across the combo's and also
the table entries when appropriate columns are set. Also need to force
a reparse if any of the options change.
2017-12-03 10:13:36 +00:00
Robert Fewell
b1becf3dd4 Add a test for from_commodity not being the same as to_currency 2017-12-03 10:13:36 +00:00
Robert Fewell
339fbaa587 Various changes to comments in source files and displayed text. 2017-12-03 10:13:36 +00:00
Robert Fewell
9debe91e99 Change the way commodity and currency combo's are shown.
Use commodity print name to show in the combo's and use a hidden field
to sort the list grouping by namespace. Also alter the way these
settings are saved.
2017-12-03 10:13:36 +00:00
Robert Fewell
b8bbdb2ad5 Minor changes and tidy up 2017-12-03 10:13:36 +00:00
Robert Fewell
a996c02ef7 Change the settings file to save and load price settings.
Added a setting type to distinguish between TRANS and PRICE settings so
it can load a specific settings type and added the price save and load
options.
2017-12-03 10:13:36 +00:00
Robert Fewell
5578da1186 Fix some errors in conversion of some function names
Some function names did not get converted to a price equivalent and
reorder some statements.
2017-12-03 10:13:36 +00:00
Robert Fewell
4d75259cb4 Remove duplicated function 2017-12-03 10:13:36 +00:00
Robert Fewell
cd4b5a3100 Made changes to preset column types to align with other changes
These changes are to align with the changes to column types and also the
 basic setup of the new commodity from and currency to combo's. More
 changes will follow to make the saving and loading work properly.
2017-12-03 10:13:36 +00:00
Robert Fewell
bf0c3853ac Add option to specify Commodity from and Currency to for whole file
Added two combo's to allow user to specify a Commodity from and Currency
 to for the whole file. Also reduced the property types to four and
 aligned all the commodity and currency variables.
2017-12-03 10:13:36 +00:00
Robert Fewell
1435813f02 Some text changes 2017-12-03 10:13:36 +00:00
Robert Fewell
cf90b8cb47 Remove not required account update 2017-12-03 10:13:36 +00:00
Robert Fewell
393b8a126d Add CSV Price importer assistant files
These file are largely based on the csv transaction importer.
They are just the start for subsequent changes.
2017-12-03 10:13:36 +00:00
Robert Fewell
4fe77a577a Rename function gnc_csv_price_col_type_strs to gnc_price_col_type_strs 2017-12-03 10:13:36 +00:00
Robert Fewell
eb712dc7d8 Add price import files for the csv price importer
These files are largely based on the csv transaction importer and with
minimum of changes to settings files.
2017-12-03 10:13:36 +00:00
Robert Fewell
3410a03b22 Add property files for the csv price importer
These files are largely based on the csv transaction importer
2017-12-03 10:13:36 +00:00
Rob Gowin
9dcb2037ad Partial fix for Bug 787497 - Disabling options cripples dist package
WITH_OFX, WITH_SQL and WITH_AQBANKING handling is fixed. The
dist files for these features are always included in the dist
tarball.

I added code for WITH_GNUCASH=OFF to error out when trying to
create a dist tarball. Not fully tested because WITH_GNUCASH=OFF
itself does not build.

Still need to backport fixes from unstable for WITH_PYTHON=OFF.
2017-12-02 17:59:40 -06:00
John Ralls
84929c8e5b One more stray header in libexec. 2017-12-02 10:34:07 -08:00
John Ralls
ad11afefb4 LIBDIR is not lib--two more CMakeLists.txt. 2017-12-01 20:31:44 -08:00
John Ralls
e319a16747 Remove gnucash/test.
The only purpose of which was to test overrides/gnucash-env.
2017-12-01 20:10:55 -08:00
John Ralls
fcb4bdac9e Some fixes to complete removing gnucash/overrides. 2017-12-01 19:46:09 -08:00
Rob Gowin
e7b7974a3c Handle cases where LIBDIR is not "lib"
For example, Fedora installs to lib64, Debian to lib/<arch-tuple>
2017-12-01 19:44:35 -08:00
John Ralls
2be5642a7d Fix autotools build after removing gnucash/overrides. 2017-12-01 15:25:28 -08:00
Rob Gowin
778b86e29e Handle cases where LIBDIR is not "lib"
For example, Fedora installs to lib64, Debian to lib/<arch-tuple>
2017-12-01 17:00:39 -06:00
John Ralls
0a8e50069c Remove overrides directory as being obsolete.
Also don't install qof test headers to libexec.
2017-12-01 13:56:52 -08:00
John Ralls
9b0a8723a4 More GNUInstallDirs path fixes. 2017-12-01 13:56:52 -08:00
John Ralls
a120c48fb1 Fix the fixed path to compiled guile files. 2017-12-01 08:59:51 -08:00
John Ralls
062851a8fe Fix path to compiled guile files in environment.in.
Thanks to Rob Gowin for the catch.
2017-11-30 20:15:54 -08:00
John Ralls
4a84fca9b1 Add GLIB_CFLAGS and srcdir to SWIG includes. 2017-11-30 13:32:57 -08:00
John Ralls
5ca129d82d Remove unset variable SWIG_ARGS from Makefile.am 2017-11-30 13:31:23 -08: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
Christopher Lam
f3bc8eea8b Bugzilla 790526 Correct weeknum calculator
This change will fix 'num-of-weeks-since-1/jan/1970' which formerly used quotient to remove
the fractional part of the division. For negative values of num-of-weeks, the number is truncated
in the wrong direction (i.e. towards 0). This change uses floor instead to ensure the num-of-weeks
found is the nearest integer LESS than the fractional number.
2017-11-29 18:43:03 +08:00
John Ralls
41656c920e Fix python test failure on Travis.
It seems that there are two possible exceptions depending on OS.
2017-11-28 17:57:00 -08:00
John Ralls
c6ae007bda Merge branch 'PyGncNumeric' into unstable 2017-11-28 17:09:38 -08:00
Guy Taylor
744cdac5a4 Use builtin SWIG conversions for glib types
Where possible in the Python SWIG code use the builtin SWIG conversion
code over custom code. This ensures appropriate overflow/type checking.
With this I have enabled GncNumeric from longs and tested for correct
overflow handling.

Note: This could be extended to GUILE but I am not familiar enought to
safely enable this.
2017-11-28 17:08:43 -08:00
Guy Taylor
c9c5876431 Use glib.h over custom typedefs in Python SWIG
Use the native glib.h (mainly gint, gfloat ...) over custom typedefs in
SWIG type files. This is for Python only.
2017-11-28 16:27:50 -08:00
Guy Taylor
e011576e37 Add GncNumeric to native Python Fraction
Add helper method to return the native Python fraction type from GncNumeric.
2017-11-28 16:14:07 -08:00
Guy Taylor
1ef379a704 Fix Python GncNumeric for non (int, int) pairs
At current the Python GncNumeric has issues with type conversion eg.
 * GncNumeric(1.3) = 1.00
 * GncNumeric("1.3") is OK but any future methods error

This behaviour was relied on for the Account tests to pass as it used
GncNumeric(0.5) == GncNumeric(1.0) but this is not what many users would
expect.

This fix alows GncNumeric to be constructed from a (int, int)
numerator/denominator pair or int/float/str where double_to_gnc_numeric
and string_to_gnc_numeric from C is used.
2017-11-28 16:14:07 -08:00
John Ralls
5aa048e01d Fix null pointer dereference segfault.
Reported via PR 21y by github user ethaden.
This is a simpler fix than the one in the PR.
2017-11-28 15:39:41 -08:00
John Ralls
a5bf4e00a4 Merge Aaron Laws's 'unneeded-build-flag' into unstable 2017-11-28 15:16:36 -08:00
John Ralls
5204100d53 Use GNUInstallDirs in CMake Builds
Provides correct file layout when building distribution tarballs.
Fixes Bugs 790840 and 790841.
2017-11-28 14:25:35 -08:00
John Ralls
e92a1b3723 Fix python tests in tarball builds. 2017-11-28 14:25:24 -08:00
lmat
d599658603 Removing Arch Linux Autotools build
It has failed many times, but to my knowledge the failure has never been
legitimate.
2017-11-28 16:10:28 -05:00