Commit Graph

19088 Commits

Author SHA1 Message Date
John Ralls
6db0820771 Fix offset handling in GncDateTime struct tm ctor, gnc_mktime, & gnc_timegm.
Tests now pass in all TZa from Honolulu to New Zealand.
2017-12-12 21:02:11 -08: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
Robert Fewell
ba5ca5bd55 Remove surplus statement 2017-12-11 09:53:20 +00:00
John Ralls
9dc66c0b7d Fix the Mac install_name_dir to point at CMAKE_INSTALL_FULL_LIBDIR.
Instead of CMAKE_INSTALL_LIBDIR; it needs to be an absolute path.
2017-12-10 13:01:32 -08:00
John Ralls
c0659c8e2b Bug 791422 - gnucash 2.7 no longer opens sqlite3...
as it doesn't load proper backend.
The cause was that the libdbi-driver path in CMakeLists.txt was wrong
and GNC_DBD_DIR was being set unconditionally in etc/gnucash/environment
with an invalid path.
2017-12-10 12:51:24 -08:00
Robert Fewell
0534ba4f8b Update file with changes for transient dialog changes 2017-12-10 11:59:40 +00:00
Robert Fewell
8ee6783b4b Replace magic numbers used in std::get... with values from enum 2017-12-10 11:58:09 +00:00
Robert Fewell
43f1b2fde0 Merge branch 'prices-in' of /mygit/gnucash into prices-in 2017-12-10 10:24:07 +00:00
Robert Fewell
288563c25e Add a test for empty values
Some csv values are allowed to be empty based on options selected so
add a test for this otherwise all values are required.
2017-12-10 10:23:47 +00:00
Robert Fewell
16714a8c5b Replace date parse function with one from gnc_datetime 2017-12-10 10:23:47 +00:00
Robert Fewell
ee2f301789 Make changes for Gtk3 compatibility 2017-12-10 10:23:47 +00:00
Robert Fewell
1aa3601e01 Pot file changes for new files and settings rename 2017-12-10 10:23:47 +00:00
Robert Fewell
71bf7d01fd 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-10 10:23:47 +00:00
Robert Fewell
644a0aa06f Reorder the create price procedure. 2017-12-10 10:23:46 +00:00
Robert Fewell
62bbe4f951 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-10 10:23:46 +00:00
Robert Fewell
aff1c0c5a6 Add a test for from_commodity not being the same as to_currency 2017-12-10 10:23:46 +00:00
Robert Fewell
61f860bcfc Various changes to comments in source files and displayed text. 2017-12-10 10:23:46 +00:00
Robert Fewell
1bb2d1dc38 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-10 10:23:46 +00:00
Robert Fewell
caba8c4330 Minor changes and tidy up 2017-12-10 10:23:46 +00:00
Robert Fewell
3a3c2cba9c 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-10 10:23:46 +00:00
Robert Fewell
3c18b80634 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-10 10:23:46 +00:00
Robert Fewell
16845c3a20 Remove duplicated function 2017-12-10 10:23:46 +00:00
Robert Fewell
1e31db74d1 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-10 10:23:46 +00:00
Robert Fewell
8f3e175fb2 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-10 10:23:46 +00:00
Robert Fewell
3279973329 Some text changes 2017-12-10 10:23:46 +00:00
Robert Fewell
f2c78102e0 Remove not required account update 2017-12-10 10:23:46 +00:00
Robert Fewell
3cfa9d05ba 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-10 10:23:46 +00:00
Robert Fewell
404bc1e329 Rename function gnc_csv_price_col_type_strs to gnc_price_col_type_strs 2017-12-10 10:23:46 +00:00
Robert Fewell
bec1fbd1a0 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-10 10:23:46 +00:00
Robert Fewell
17d8d424a0 Add property files for the csv price importer
These files are largely based on the csv transaction importer
2017-12-10 10:23:46 +00:00
John Ralls
ec9f60d3fd Test more thoroughly gnc-timezone's parsing of the zoneinfo database.
Then fix the resulting problems.
2017-12-09 15:37:16 -08: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
Robert Fewell
66da4ae374 Add a test for empty values
Some csv values are allowed to be empty based on options selected so
add a test for this otherwise all values are required.
2017-12-08 10:24:59 +00:00
Robert Fewell
db079b5540 Replace date parse function with one from gnc_datetime 2017-12-07 11:17:14 +00: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
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