Commit Graph

18797 Commits

Author SHA1 Message Date
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
John Ralls
831640b546 Remove common/test-core/unittest_support.py from git.
It's a SWIG-generated file accidentally added during directory
rearrangement.
2017-11-28 09:53:06 -08:00
John Ralls
0afef080a7 Release 2.7.2 2017-11-25 16:35:44 -08:00
John Ralls
13657ee1bb Merge branch 'maint' into unstable 2017-11-25 15:35:24 -08:00
John Ralls
50874d89da Correct GUILE_LOAD_COMPILE_PATH to include Guile's own modules as well as ours. 2017-11-25 14:55:03 -08:00
John Ralls
d8c2f52447 Correct quoting for SQL backends.
Only string values should be quoted in queries; in particular NULL
isn't a string value and must not be quoted.
Note that this is a less than perfect solution because it doesn't use
the Database's quoting function and so doesn't escape quotes, linefeeds,
or carriage returns inside the string. That's because the SQL generating
logic is independent of the connection class and can't easily get to it.
2017-11-25 14:46:31 -08: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
Jose Marino
1e81d3ace2 report: fix default colors incorrectly set to transparent
The default color of a color option is set during a call to "gnc:make-color-option"
as a list of rgba values. In all color option instances in the scheme code this
default color is incorrectly set to transparent.
For example, white color was being set with:
  (list #xff #xff #xff 0)
The last value in the list is the value of the alpha channel, with 0 meaning
transparent. When the color button is displayed in the gui it shows a checkerboard
pattern instead of the intended color.

This commit changes all default colors of color options to have alpha=#xff, i.e.,
fully opaque.
2017-11-24 17:08:05 +01:00
John Ralls
9c4635e393 Bug 784623 - GNUCash does not work with sql backend.
Wherin the problem is that MySQL's TIMESTAMP has a date range of
1970-01-01 00:00:01 to 2038-01-19 03:14:07 and is unable to handle
time_t of 0. MySQL's TIMESTAMP also assumes that input is in the server's
timezone and adjusts it to UTC. GnuCash has already done that conversion.
2017-11-23 11:41:09 -08:00
Rob Gowin
0d8112bfef Bug 790620 - Failed to create file “/usr/share/glib-2.0/schemas/gschemas.compiled.XY789Y”
Changed install rule for gschema.compiled to use a target.
2017-11-23 10:50:43 -05:00
Robert Fewell
22e7e1b440 Fix some corrupted glade files 2017-11-23 13:57:10 +00:00
Robert Fewell
761d40918d Change assistant-ab-initial.glade to gtk3.10 version 2017-11-23 13:56:36 +00:00
Robert Fewell
baf7575f1d Replace deprecated GTK_STOCK_ macro identifiers 2017-11-23 13:55:58 +00:00
Robert Fewell
a5d15de426 Change a couple of deprecated functions in gnc-html-webkit1.c 2017-11-23 13:55:19 +00:00
Robert Fewell
99f2283d83 Control the toggle button width
There did not seem to be an easier way to control the toggle button
width so created a custom one based on the GtkToggleButton. This
allowed the use of the class function get_preferred_width which is set
at two thirds the height.
2017-11-23 13:54:40 +00:00
Robert Fewell
c5f483d115 Move the double line to be inside the cursor cell 2017-11-23 13:54:03 +00:00
Robert Fewell
78ec2e339e If a font size is specified for the sheet, popup size may be wrong
When you specify a font size for the sheet, the popup will inherit this
but when first popped it will use the minimum height value and so may
be different resulting in not being in the right position. So check on
allocation and if different remove and pop again.
2017-11-23 13:53:25 +00:00
Robert Fewell
67e4b35294 Use previously created functions
Use the previously created functions to reduce code and for conformity.
As part of this some variables were renamed to be common.
2017-11-23 13:52:43 +00:00
Robert Fewell
8a6ce10aa8 Provide two functions for common code
These two sections of code appear in three separate files in slightly
different versions so define them hear for conformity
2017-11-23 13:52:02 +00:00
Robert Fewell
1b52053d2e This function doesn't do much and is only used for new account registers
This function is used to get the width of the toggle button and add it
to the sample text length to set the default column width. As the it is
square, just use the row height instead and the user will no doubt set
there own widths any way.
2017-11-23 13:51:25 +00:00
Robert Fewell
ed4bad34a7 Adjust the sheet to get its spacings from the item_edit CSS 2017-11-23 13:50:42 +00:00
Robert Fewell
2a476cb68a Get the item_edit cell padding from CSS instead of defines
This commit sets up getting the vertical and horizontal item_edit cell
margins, borders and padding from CSS. This increases the option to
specify individual values for top, right, bottom and left instead of
just specifying just two values.
2017-11-23 13:50:01 +00:00
Robert Fewell
bbafb8184e Replace the cell foreground and background colour handlers
By using CSS classes, there is no need to have separate handlers for
the foreground and background colours so replace them with one being of
a similar format to that of cell_border_handlers. This also involves
changing the map of RegisterColors to CSS style classes to reflect the
changes and reduce the get colour type to one call per class
2017-11-23 13:49:00 +00:00
Robert Fewell
9cd2c6d17f Test the widget state to get the correct background colour.
When the cell borders are not displayed, the border colour is set to
the background colour so test for the widget being in an insensitive
state to get the correct background colour.
2017-11-23 11:05:20 +00:00
John Ralls
937f8c5083 Set GncSqlObjectBackend::m_version to the appropriate TABLE_VERSION.
For each subclass, getting rid of GNC_SQL_OBJECT_BACKEND_VERSION which
was a bit misguided.

Also remove the bogus test the skipped loading a table if its version
didn't match GNC_SQL_OBJECT_BACKEND_VERSION which was even more misguided.
2017-11-21 18:15:37 -08:00
John Ralls
1674eb0bd4 Fix python build and test errors on Mac. 2017-11-21 13:30:17 -08: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
John Ralls
d44f6bc9d5 Fix missing/misspelled files for distribution.
Mostly errors from 6c01e54.
2017-11-19 17:32:12 -08:00
John Ralls
961cb5a829 Bug 790550 - FTBFS: missing __init__.py 2017-11-19 17:32:12 -08:00
John Ralls
d648b29d0d Fix distribution paths for resource files.
glib-compile-resources lists the resource files as absolute paths,
but SET_LOCAL_DIST expects relative paths; the result was that the
tarball code was looking for ${CMAKE_SOURCE_DIR}/${CMAKE_CURRENT_SOURCE_DIR}/foo.
This change strips off ${CMAKE_CURRENT_SOURCE_DIR} from the filenames
before passing them to SET_LOCAL_DIST.
2017-11-19 17:32:12 -08:00
John Ralls
9444c1e300 Fix bad string construction in adjust_sql_options. 2017-11-19 17:32:12 -08:00
John Ralls
af1bc45021 A better way to handle MySQL's 0000-00-00 invalid date indicator. 2017-11-19 11:41:08 -08:00
John Ralls
23f25d74d9 Don't try to unref a NULL GDateTime*. 2017-11-19 11:41:08 -08: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
fell
ff76db28f5 Add po/glossary/gnc-glossary.pot to .gitignore 2017-11-15 03:33:57 +01:00
fell
742064ee87 Fix a few encodings and Content-* tags in glossary 2017-11-15 00:36:41 +01:00
John Ralls
61316648b8 Bug 789608 - Compilation problems when linking libraries.
Fix using a preproc macro in a different file from where it was declared
and more-strict template resolution of error_handler<> by gcc-7.x.
2017-11-09 13:47:08 -08:00