Commit Graph

20414 Commits

Author SHA1 Message Date
Robert Fewell
03da6116bf Bug 796886 - OFX Import does not show source account in the transaction matching window
If there is more than one account source in the import it makes it
difficult to allocate the transactions so add a toggle button to show
or hide the source account column with the default being that of the
calling function.
2018-12-02 14:16:24 +00:00
Robert Fewell
51ab6e7804 Bug796960 - Incorrect amount sort order in Generic import matcher window
The amount column was being sorted by string as opposed to amount value.
Added a DOUBLE value to the model store to hold a converted gnc_numeric
amount value and use that for sorting the tree view amount column. Also
made the amount column right justified so numbers align.
2018-12-02 14:15:07 +00:00
Robert Fewell
34e84fda85 Add ability to double click on file name for csv-trans-import 2018-12-02 11:25:37 +00:00
Robert Fewell
48b0739942 Add ability to double click on file name for csv-price-import 2018-12-02 11:25:37 +00:00
Robert Fewell
3321462123 Add ability to double click on file name for csv-account-import 2018-12-02 11:25:37 +00:00
Robert Fewell
31fcb76414 Add ability to double click on file name for csv-export 2018-12-02 11:25:27 +00:00
Robert Fewell
8c904edc25 Use existing page references instead of getting them in csv-export 2018-12-01 12:25:11 +00:00
Robert Fewell
0c58f78bdf Remove window reference and use assistant instead for csv-export 2018-12-01 12:23:18 +00:00
Robert Fewell
d9d24a9055 Missed adding new parent window parameter
Added a GtkWindow parameter to csv_import_read_file to pass to the
error dialogue but missed actually adding it.
2018-12-01 10:58:15 +00:00
Robert Fewell
a671e34134 Add some space to a previous alignment change
Add some space to the fixed width labels in the price and transaction
importer glade files.
2018-12-01 10:53:43 +00:00
Robert Fewell
3abd04321d okbutton may be used uninitialised in gnc-file.c 2018-12-01 10:46:19 +00:00
John Ralls
519880545b Fix missing screen for GLib < 3.22. 2018-11-30 17:10:10 +09:00
John Ralls
5dcb44d991 Fix regex in CMakeLists.txt.
Apparently CMake doesn't handle backslashes well and \.
doesn't work in spite of its being an example in the documentation.
2018-11-30 16:40:35 +09:00
John Ralls
e434835f68 Remove special Apple compile flags, no longer required. 2018-11-30 16:23:30 +09:00
John Ralls
3f09e5c6f1 Only disable register warnings for SWIG 2.
SWIG 3 has removed the register storage class markers.
2018-11-30 16:11:42 +09:00
John Ralls
e81bcf6e33 Fix the remaining static analysis warnings.
Except two incorrect leak warnings and one about mktemp
 being insecure in the XML backend. See the respective
comments about those.
2018-11-30 15:08:41 +09:00
John Ralls
bf55c30aeb Fix most of the unused assignment errors from static analysis.
There are a very few left that need deeper study, but this gets
rid of most of the noise. For the most part it's just getting rid of
extra variables or removing an assignment that is always
replaced later but before any reads of the variable. A few are
discarded result variables.
2018-11-30 15:08:41 +09:00
John Ralls
a93448414f Fix another uninitialized variable in register.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
f52609961e Fix uninitialized variables (and one leak) in gnome.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
185787d7be Initialize some gnc_numerics that could be returned uninitialized.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
8ed9a9c43a Initialize some variables that could be otherwise used uninitialized.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
7e10b05c49 Avoid over-ranging string storage.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
7283c86f6f Fix various static analysis logic errors in gnome-utils. 2018-11-30 15:08:41 +09:00
John Ralls
876bfd19ad Protect against nullptr dereference, remove unused GError.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
24ce92056d Protect from potential nullptr dereferences.
pmtsched is created in only one banch of the opening switch.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
8f22c4bed4 Localize variables, ensure that val_imbalance is set, test txn_curr != commodity once.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
4ffeb3efac Ensure that a dereferenced variable isn't NULL.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
43a30e1c97 Silence clang static analyzer complaint about potential div by 0.
It can't, because if b is 0 the function would have
returned already; since b.m_hi is 0 b.m_lo can't be. The assert
reassures clang that this is the case.
2018-11-30 15:08:41 +09:00
John Ralls
3d1362757b Prevent potential undefined behavior by shifting by a wrapped uint.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
606d9cfee6 Prevent potential nullptr dereference.
Found by clang static analyzer.
2018-11-30 15:08:41 +09:00
John Ralls
faba7975ac Fix a bunch of memory allocation errors found by clang static analysis. 2018-11-30 15:08:41 +09:00
Geert Janssens
de6c173ef4 Merge branch 'Bug796896' of https://github.com/Bob-IT/gnucash into maint 2018-11-28 14:21:16 +01:00
John Ralls
61cd7999f3 Fix half-up, half-down, and banker's rounding for negative numbers.
We need to compare the magnitudes of the remainder and the denominator
in order to round negative numbers correctly. Note that while gnc_numeric
is constrained to a positive denominator the C++ rounding functions cannot
assume that constraint in all cases.

Combined with the previous commit, this fixes
Bug 796949 - Incorrect conversion of 0,01 USD to EUR
2018-11-27 22:17:22 +09:00
John Ralls
536606a89c Fix extract_common_prices logic.
So that the returned price tuple has the two commodities of interest
converted to a common currency. Before the first pair that that shared
any random currency would be returned, perhaps creating an absurd result.
2018-11-27 22:17:22 +09:00
Robert Fewell
458dac89fe Bug 779565 - Treeview header combos do not work at first load
When the csv preview page is first loaded the header combo will not
work till refreshed which can be done by selecting another separator.

By adding a g_idle_add to the preview_page_prepare to rebuild the table
the combos become active.
2018-11-26 17:26:58 +00:00
Robert Fewell
79373d5b5e Fix an alignment issue and remove redundant ctreeview 2018-11-26 17:26:58 +00:00
Robert Fewell
78c8e8f3af Make similar changes to transaction import CSV assistant 2018-11-26 17:26:58 +00:00
Robert Fewell
8ed40078b0 Make similar changes to price import CSV assistant 2018-11-26 17:26:52 +00:00
Robert Fewell
2b9b3d4a5e Fix a missing transient warning for error dialogue 2018-11-26 17:26:51 +00:00
Robert Fewell
5201fe5f34 Disable forward button if there are no entries in store 2018-11-26 17:26:51 +00:00
Robert Fewell
4abbd86d0d Remove window reference and use assistant instead 2018-11-26 17:26:51 +00:00
Robert Fewell
92b587fa56 Make similar changes to account import CSV assistant
Remove the OK button from the file page.
2018-11-26 17:26:44 +00:00
Robert Fewell
1b2feacd4b Bug 796896 - Button to complete an export not intuitively placed or discoverable
The assistant file page is made up of an embedded GtkFileChooser widget
and associated OK button which seems out of place. Remove the OK button
and use the selection-changed signal to control the 'Forward' button.
2018-11-26 17:26:37 +00:00
Geert Janssens
e57d4278e8 Bug 760825 - On duplicating a bill, the entry dates should be set to the bill date, not to the current date - followup
Use neutral time on entry post dates instead of canonical time
2018-11-20 21:13:39 +01:00
Geert Janssens
13f6c4d6d7 Introduce and use gnc_time64_get_day_neutral
This function complements gnc_time64_get_day_begin/end. There was
time64CanonicalDayTime but this returned noon of the given day, where we
want 10:59am in most cases. I haven't changed time64CanonicalDayTime
directly as that may break assumptions in other parts of the code.
Instead I have created a new function that can be gradually introduced.
2018-11-20 21:12:32 +01:00
Geert Janssens
11af81b51b Bug 789674 - Close Book tool regression 2018-11-20 18:55:09 +01:00
Geert Janssens
370562970e Fix travis failure due to changed option name 2018-11-18 17:28:30 +01:00
Geert Janssens
cd04e805e3 Bug 796919 - Leading '+' character not accepted in amount when value surrounded by quotes
Use a variant of xaccParseAmount that allows to ignore the locale's positive_sign character
or the + sign if locale doesn't define a positive_sign character.

In a future redesign it would probably be better to replace use
of xaccParseAmount with some variant of the gnc-expression-parser
but that would require more that a few tweaks to get right.
2018-11-18 17:23:14 +01:00
Geert Janssens
f13d21b973 Bug 498072 - GnuCash show taxes on invoice when individual taxes is not checked
Use more descriptive option name and tool tip as proposed in the bug.
2018-11-18 15:38:59 +01:00
Geert Janssens
ae862e6aa5 Bug 760825 - On duplicating a bill, the entry dates should be set to the bill date, not to the current date 2018-11-18 15:04:04 +01:00