Commit Graph

17912 Commits

Author SHA1 Message Date
Geert Janssens
93a03d19ee Use cairo to redraw the grid widget 2017-03-31 14:03:49 +02:00
Geert Janssens
4888d34554 Replace all other uses of GnomeCanvas with standard gtk widgets
Most are converted to GtkLayout/GtkiDrawingArea widgets as these
most closely approach the GnomeCanvas concept.

This currently builds and runs but has the following issues still:
- item edit isn't drawn properly (margin and offset issues)
- cursor is not handled properly yet

These will be handled in subsequent commits.
2017-03-31 14:03:49 +02:00
Geert Janssens
194634615f Convert gnc-header from GnomeCanvas to GtkLayout
Only reducing column size to less than window width needs extra
research. The auto-expansion of the description column is not
propagated to the header so header and body widths can go
temporarily out of sync as of this commit.
2017-03-31 14:03:49 +02:00
Geert Janssens
539ef52837 Whitespace cosmetics
Replace tabs with spaces
Align some related lines
Remove trailing whitespace
2017-03-23 23:16:10 +01:00
Robert Fewell
4f5658fc7a Bug388500 - Add option to remove deleted files from the history list
This patch simplifies the previous patch so it does not care where the
file is opened from. If it is in the history list and does not exist,
the dialog advises of this and asks if it should be removed from the
list other wise the dialog displays file not found.
2017-03-23 18:38:54 +01:00
John Ralls
66e81040cb Fix DST calculation error.
The symptom was that in 2017 the PDT->PST transition was set a week
late. The cause was that the timezone lookup function went the wrong
way, finding the *next* timezone rule instead of the desired one because
timezone rules are stored for the year that they start rather than when
they end. Fix reverses the search to find the correct timezone rule.

Commit includes new tests to detect the problem.
2017-03-17 15:22:34 -07:00
John Ralls
e66dd12aa9 Fix query period in test-account-get-trans-type-splits-interval.
The query runs from 00:00:00 on the start date to 23:59:59 on the end
date, effectively one day more than the number specified.
2017-03-17 15:22:34 -07:00
Geert Janssens
c4c45e9505 Add missing macros 2017-03-17 09:42:05 +01:00
Geert Janssens
790e358d06 Fix a couple of other deprecated symbols (gtk/gdk 2.x still) 2017-03-16 23:11:47 +01:00
Geert Janssens
dcef648044 Handle deprecation of g_settings_list_keys in gio 2.46 2017-03-16 23:10:26 +01:00
Geert Janssens
8acbc41c61 Raise minimum required version of glib-2.0 to 2.40
At the same time require --std=gnu11 instead of --sdt=gnu99.

This allows us to drop some conditionals is several places. I've
chosen 2.4 as that is the version available in travis, which appears to
be the oldest platform care about. Debian stable has 2.46 in backports,
our windows environment has 2.42
2017-03-16 22:51:52 +01:00
Geert Janssens
79df9b5c26 Merge branch 'maint' 2017-03-16 21:39:06 +01:00
Robert Fewell
43e4b7ff70 Bug 779411 - jqplot fixes for piechart and syntax error.
With the piechart in combination with other charts you have to set the
highlighter and cursor show tooltip to false which stops seen errors.

The syntax errors are caused by only removing the duplicated js files
and not the whole path so changed that to remove whole line.
2017-03-16 21:16:46 +01:00
Robert Fewell
a8ebc794ab Bug388500 - Add option to remove deleted files from the history list
If a file is opened from the history list and does not exist the dialog
advises of this and asks if it should be removed from the list. If a
file is opened from the command line and does not exist, the normal
dialog is used
2017-03-16 20:21:12 +01:00
Geert Janssens
954110c479 Fixup last commit
This fixup was accidentally merged in another private branch of mine
rather than in the previous commit...
2017-03-16 19:52:52 +01:00
Geert Janssens
86fbcb0892 Csv Import - drop another reference to the no longer used lib/stf 2017-03-15 19:23:22 +01:00
Geert Janssens
dd9b8adc2a Csv Import - Fix doxygen comment 2017-03-15 19:23:22 +01:00
John Ralls
2b4137c566 Fix up building on MinGW with autotools. 2017-03-14 21:27:12 -07:00
John Ralls
3cb044c8fc Adjust locale test so that it works on both Ubuntu and MacOS. 2017-03-14 21:26:20 -07:00
Christian Stimming
9144edb464 Online banking: Add output of bank messages that might occasionally be received. 2017-03-13 21:31:16 +01:00
John Ralls
f795d7ff59 Fix missing fi in configure.ac. 2017-03-13 12:16:25 -07:00
John Ralls
744fc29680 Require ICU.
Note that Boost::regex and Boost::locale must also be built with ICU
support.
2017-03-13 11:56:33 -07:00
John Ralls
a44c621f2b Change 'uint' to 'uint32_t'.
'uint' is a non-standard typedef not supported by MinGW.
2017-03-13 11:56:32 -07:00
Christoph Rohland
d9303023e0 Fix logic error for discounts
Got it all wrong before. Don’t use to complex expressions!
2017-03-11 15:58:21 +01:00
Christoph Rohland
8c8af54420 Fix taxinvoice for bill entries with taxes
taxinvoice was throwing an exception when there were taxes on bill entries.
It also did scan the invoice parts to determine if there were taxes and discounts.
2017-03-11 15:58:21 +01:00
Christoph Rohland
9d57447fe1 Let taxinvoice optionally show the net instead of the given price
This is needed if there is a mix of entries with tax included and
excluded
2017-03-11 15:58:21 +01:00
Geert Janssens
6bba55128f Merge branch 'maint' 2017-03-11 15:57:44 +01:00
Christoph Rohland
4949499bd4 Charge back net value of bill entries in invoices
When charging entries from bills we need to exclude taxes since the tax
rate of the invoice might be different than that of the bill.

This fixes Bug 776380 - Gross value of bills charged back instead of
net value (https://bugzilla.gnome.org/show_bug.cgi?id=776380)
2017-03-11 11:55:11 +01:00
John Ralls
80e64a1296 Fix failed unit test from previous commit. 2017-03-10 14:23:20 -08:00
John Ralls
3889606dd6 Bug 779217 - Transactions rounded to 5 decimal places when opening file.
xaccSplitSetValue and xaccSplitSetAmount round to the denominator found by
get_currency_denom and get_commodity_denom. The problem was that if the
commodity was unfindable because either the split’s parent or account hadn’t
been set (as is the case during loading, because the parent isn’t yet complete)
the returned denominator would be 100000, smaller than the max supported.
That would cause the value/amount to be prematurely rounded.
2017-03-10 13:21:02 -08:00
John Ralls
bc50f3da00 Bug 777949 - Accounts implicitly created in ledger attempt creation twice
Guard against recursively calling the account doesn’t exist query or creation
dialog if one is already in the account creation dialog.

The underlying problem is that creating the dialog forces a UI update that
in turn sets the cell value and checks for the existence of the account.
In basic view the cell being displayed (“transfer”) isn’t the one being
changed (“account”) so the account check isn’t invoked, but in
multi-split view the “account” cell *is* displayed so the check is invoked
again.
2017-03-10 10:54:22 -08:00
John Ralls
97598c4306 Bug 776564 - Creating a scheduled transaction from an existing...
transaction does not include the notes field.

In fact, notes support was entirely missing from scheduled transactions.
2017-03-09 11:38:42 -08:00
Geert Janssens
03ff5d3778 Allow only date entry for opening balances on new accounts
This anomaly was spotted by Christopher Lam
2017-03-04 12:25:56 +01:00
Geert Janssens
be260a4305 Merge branch 'maint' 2017-03-04 10:28:31 +01:00
hcrohland
de360cabb3 Revert the taxinvoice.scm changes
Since they touch strings and user behavior they cannot go into maint.
The pull request now only includes the backend change. By that you can
easily tweak the invoice reports to show the net price.
2017-03-04 10:15:00 +01:00
hcrohland
3445ef8845 Make the net price option better compatible with master
Create one gncEntryGetPrice function which can create given price or
net price for both invoices and bills based on option parameters.
The master version of taxinvoice.eguile.scm needs this for bills too.
2017-03-04 10:14:55 +01:00
hcrohland
78c5203d8c Enable taxinvoice to show net price
Add gncEntryGetNetPrice
Create an option in taxinvoice to either use gncEntryGetNetPrice or
gncEntryGetPrice

So far taxinvoice would show net or gross prices dependent on the internal flag tax_included.
This is inconsistent for the reader of the invoice since there is no notion of that flag.
This patch adds the option to always show net prices.
It does not change the default behaviour even if I would consider it broken.
2017-03-04 10:14:48 +01:00
Geert Janssens
3e9d0c1fda Make older compilers happy by using std::isnan instead of isnan
Both forms apparently work on more recent compilers
2017-03-01 12:34:53 +01:00
Geert Janssens
8e09bae7c7 Remove redundant gtk_widget_show_all call 2017-03-01 12:29:40 +01:00
Robert Fewell
0078de0be3 Bug 778042 These are the script changes for jqplot reports.
I have added the resize function to all jqplot reports and an on load
function to bar and line charts. This last change is required when a
table is added to the report and the vertical scroll bar appears and
covers part of the plot. This was observed in the Gnucash and also when
opening the generated file in the gnome browser.
2017-03-01 11:45:37 +01:00
Robert Fewell
22191afb1e Bug 778042 Change the way reports are loaded in conjunction with script changes.
With these changes the reports are not created until the page is shown,
realized. It still uses the idle add to create the page but is started
from the realized call back. Doing it this way has the added advantage
that if the app is closed on a non report page, the next start up is
quicker as the reports are not created.
2017-03-01 11:45:35 +01:00
Geert Janssens
7a394321e2 Csv Import - Use GncNumeric rather than GncRational
This simplifies several lines of code.
2017-02-21 16:57:07 +01:00
Geert Janssens
c2f21f0162 Fix typo in GcnRational's + operator 2017-02-21 16:56:14 +01:00
Geert Janssens
7c041eb283 Fix gnc-numeric locale test on travis
- Change locale from de_DE to fr_FR.utf8
- Expect correct thousands separator

This also partly undoes the previous commit (it removes the
test for gcc 5 or more)
2017-02-21 16:49:48 +01:00
John Ralls
75e6a41bd7 Prevent localizing the decimal point in gcc<5.
Apparently gcc V4.8 provides a defective implementation of
std::locale which first doesn't support std::numpunct and second
throws the wrong exception type.

Unfortunately boost::locale isn't a solution because it uses the
gcc facets.

So for now, we don't compile that bit if gcc is too old.
2017-02-20 16:51:06 -08:00
John Ralls
cbe52dad34 Merge fetaure-branch 'numeric', provides GncNumeric C++ API. 2017-02-20 16:05:30 -08:00
John Ralls
e322457e45 Fix Geert’s code review comments.
Except the big one about string IO not being flexible enough.
2017-02-20 15:50:32 -08:00
John Ralls
a193b9a2c1 Fix documentation errors. 2017-02-20 15:50:32 -08:00
John Ralls
0b09b58cf6 Relax comparison test for GncRational::round_to_numeric
To allow for a difference of 1 on very large numbers (>1e16). At the
same time made the test harder with a wider range, skipping cases where
the result overflows. Use GncRational::valid() instead of testing
components for both overflow and NaN.
2017-02-20 15:50:32 -08:00
John Ralls
d0726de391 Replace std::regex with boost::regex.
Gcc's std::regex compiler doesn't correctly recognize capture blocks.
2017-02-20 15:50:32 -08:00