Commit Graph

20972 Commits

Author SHA1 Message Date
Robert Fewell
701974b2c0 Change the sensitivity of Add price button
Enable the Add price button based on the number of rows selected as it
does not make sense for it to be enabled with more than one row.
2019-04-26 12:09:05 +01:00
Robert Fewell
4368e18ac5 Bug 797165 - Crash on price deletion.
Caused by the introduction of caching used in gnc_pricedb_nth_price,
when prices were deleted, the cached list was never updated and so the
tree model could reference a deleted price and hence crash. This also
affected adding prices as the new prices would not show due to the
cache not being updated. To fix this a function was added to reset the
cache when prices are updated from the model.
2019-04-26 12:09:05 +01:00
Robert Fewell
9f0558ffb5 Add some missing log Macros for the price model
Add some missing LEAVE macro statements so the log entries do not get
longer and longer.
2019-04-26 12:09:05 +01:00
Robert Fewell
af96c746a1 Improve setting up the price tree views
Before setting up the price tree view filters, disconnect the model
from the tree view and then connect them after the re-filter.
2019-04-26 12:09:05 +01:00
Robert Fewell
ede281e2a8 Change the Prices dialogue to a GtkWindow.
This removes the need for setting the transient parent which allows the
dialogue to be placed behind the main application.
2019-04-26 12:09:05 +01:00
Robert Fewell
93c8535ea9 Improve setting up the commodity tree view filters
Before setting up the commodity tree view filters, disconnect the model
from the tree view and then connect them after the re-filter.
2019-04-26 12:09:05 +01:00
Robert Fewell
397c5d1358 Keep selection on commodity after updates and adding
After a commodity is updated or added, another row will be selected so
add function to select a given commodity and call this after the
changes so the selection can be maintained. For removal the selection
is cleared so it is consistent.
2019-04-26 12:09:05 +01:00
Robert Fewell
2262142b6a Change the Securities dialogue to use GtkWindow
Change the Securities dialogue from a GtkDialog to GtkWindow. This
removes the need for setting the transient parent which allows the
dialogue to be placed behind the main application.
2019-04-26 12:09:05 +01:00
Frank H. Ellenberger
82a2fca27a [I18N] Mask line endings of continuous text in income-gst-statement.scm
While the HTML renderer ignored them, translators got confused.
2019-04-26 02:30:48 +02:00
John Ralls
a20f3368ae Merge Christoph Holtermann's 'fix-deprecated-positional-arguments' into maint. 2019-04-25 13:38:02 -07:00
thetedmunds
483f9a4c83 Bug 797196 - Allow for per-payment rounding in amortization calculations
Provides functions gnc:amort_pmt, gnc:amort_ppmt, and gnc:amort_ipmt in
fin.scm.
2019-04-25 13:28:40 -07:00
John Ralls
5311e5a386 Revert "Merge T Edmunds's 'amortization-rounding' into maint."
This reverts commit aa53c23239, reversing
changes made to 3c946a8449, because
aa53c23 was based on master and so undid other changes made to maint
since the last merge-to-master.
2019-04-25 13:19:28 -07:00
c-holtermann
c48da07824 fix deprecated positional arguments with the GObject constructor (Bug 797205) 2019-04-25 17:35:47 +02:00
Christopher Lam
0cf49f1244 [test-libgnucash-scm-utilities] amend info to explain comment fix 2019-04-25 11:20:34 +08:00
Christopher Lam
7d15e6e4e7 [utilities] create general string-replace-substring
copied function created by Mark Weaver, core guile dev and augmented
to selectively replace substring indices

This is a much more efficient function than the previous
gnc:substring-replace which will constantly split lists using
substring, and create new strings using string-append.

It also does tail call optimization properly, unlike the previous
functions.

https://lists.gnu.org/archive/html/guile-devel/2013-09/msg00029.html -
original

"Here's an implementation that does this benchmark about 80 times
faster on my machine: (20 milliseconds vs 1.69 seconds)

--8<---------------cut here---------------start------------->8---
(define* (string-replace-substring s substr replacement
                                   #:optional
                                   (start 0)
                                   (end (string-length s)))
  (let ((substr-length (string-length substr)))
    (if (zero? substr-length)
        (error "string-replace-substring: empty substr")
        (let loop ((start start)
                   (pieces (list (substring s 0 start))))
          (let ((idx (string-contains s substr start end)))
            (if idx
                (loop (+ idx substr-length)
                      (cons* replacement
                             (substring s start idx)
                             pieces))
                (string-concatenate-reverse (cons (substring s start)
                                                  pieces))))))))
--8<---------------cut here---------------end--------------->8---

The reason this is so much faster is because it avoids needless
generation of intermediate strings."
2019-04-25 10:52:45 +08:00
John Ralls
a12bbaccd3 Create CMakeLists.txt in libgnucash/scm/test.
Amended by chris to add a working scm/test/CMakeLists.txt.
2019-04-25 10:51:20 +08:00
Christopher Lam
92a920c4e0 [test-libgnucash-scm-utilities] renamed from test-utilities.scm 2019-04-25 10:51:20 +08:00
Christopher Lam
84cc7b1bff [guile-json] fix CMakeLists.txt
one file was renamed during the guile-json update.
2019-04-25 10:51:20 +08:00
Frank H. Ellenberger
268dbbe3af Minor iprovement of 2 Strings in de.po 2019-04-25 00:58:29 +02:00
Frank H. Ellenberger
79a21b4201 Fix a typo in de.po
1c9ad3af35 (r33267294)
2019-04-23 21:30:31 +02:00
Christopher Lam
d9623b0ad1 [test-utilities] initial commit
Add tests for libgnucash/scm/utilities.scm functions

- tests for list<->vec
- tests for gnc:substring-replace
- tests for gnc:substring-replace-from-to

  The latter confirms that the comment before the function definition
  is *incorrect* - it describes that substring-replace-from-to will
  start from the 2nd substring for the first substitution, and
  performs 2 substitutions. However the comment illustrates only 1
  substitution. The test suite performs the test according to code
  behaviour, rather than the comment. This issue is moot in practice
  because the end-after is always called with negative in the code
  base.

  original comment:

;;  gnc:substring-replace-from-to
;;  same as gnc:substring-replace extended by:
;;  start: from which occurrence onwards the replacement shall start
;;  end-after: max. number times the replacement should executed
;;
;;  Example: (gnc:substring-replace-from-to "foobarfoobarfoobar" "bar" "xyz" 2 2)
;;           returns "foobarfooxyzfoobar".
2019-04-23 18:52:36 +08:00
Christopher Lam
4d8ef9b9e4 [report] inline args-to-defn 2019-04-23 18:45:07 +08:00
John Ralls
3815e17e9f Replace VERSION_GREATER_EQUAL with VERSION_GREATER OR VERSION_EQUAL.
The former wasn't introduced until Cmake 3.7.
2019-04-22 12:12:03 -07:00
John Ralls
79f4536a0f Fix typo 2019-04-22 11:28:08 -07:00
John Ralls
4f51f17223 Remove unset _GUILE_LD_LIBRARY_PATH from GncAddSchemeTargets. 2019-04-22 11:26:19 -07:00
John Ralls
b1fdf781ec Adjust GncAddSchemeTargets.cmake to build with Guile2.2 on MinGS64. 2019-04-22 11:26:19 -07:00
Robert Fewell
7e9463db1b Change a couple of accelerator keys in CSV Transaction export
There are a couple of items with the same mnemonic accelerator keys so
change them to non conflicting ones.
2019-04-22 12:09:55 +01:00
Robert Fewell
3985541f48 Add a select all Accounts button for CSV Transaction export. 2019-04-22 12:01:25 +01:00
Robert Fewell
91c992d947 Bug 797123 - Export transactions to CSV file.
When exporting transactions to CSV not all were showing up in the CSV
file. This was due to the start and end dates not being set to the
'start of day' and 'end of day' respectively. Also if you had specified
a range and subsequently used the 'Show All' button the dates used
would still be the ones used for the range.
2019-04-22 11:23:47 +01:00
Robert Fewell
d82939a9ff Change the New Account Hierarchy glade file
The 'Category Description' scroll window height was not able to be
changed to see all the text without scrolling. Add the 'Categories' and
the 'Category Description' scroll windows to a vertical paned widget.
2019-04-22 11:14:49 +01:00
John Ralls
fc0a729253 Merge Christoph Holtermann's 'PR-python-bindings-update-source-doc' into maint 2019-04-20 12:55:41 -07:00
John Ralls
2745b18d3b Merge Christoph Holtermann's 'PR-dont-close-gnucash-on-pycons-close' into maint. 2019-04-20 12:47:12 -07:00
John Ralls
aa53c23239 Merge T Edmunds's 'amortization-rounding' into maint. 2019-04-20 12:36:51 -07:00
John Ralls
3c946a8449 Merge T Edmunds's 'computeInterestIncrement' to maint. 2019-04-20 12:32:17 -07:00
Frank H. Ellenberger
ce4d3dee6d Review of de.po
Mostly fix of minor formal issues

5218 übersetzte Meldungen, 40 ungenaue Übersetzungen, 2 unübersetzte
Meldungen.
2019-04-20 20:40:40 +02:00
Joachim Wetzig
fe94541aad Update de.po
5216 übersetzte Meldungen, 42 ungenaue Übersetzungen, 2 unübersetzte
Meldungen
2019-04-20 17:52:59 +02:00
c-holtermann
ba8a9c8478 update python source doc 2019-04-20 15:12:20 +02:00
Joachim Wetzig
b250ad62c0 Update de.po
5216 übersetzte Meldungen, 42 ungenaue Übersetzungen, 2 unübersetzte
Meldungen
2019-04-20 01:16:22 +02:00
Robert Fewell
20e2b6b5de Bug 797175 - Opening a file from a gvfs mount point fails
When testing for a MS Windows path which has a ":", a gvfs path with the
format '/run/user/1000/gvfs/smb-share:server=192.168.1.11,share=public/
test-xml-file.gnucash' is recognised as a Windows path. To avoid this
expand the test to ":/" and also ":\"
2019-04-19 15:51:29 +01:00
c-holtermann
efbdab6f4d don't kill main process on closing of shell 2019-04-19 12:02:04 +02:00
c-holtermann
480aa4a575 connect console quit event handler to window destroy-event and delete-event 2019-04-19 12:01:37 +02:00
c-holtermann
239484854c add quit method to python console 2019-04-19 12:01:22 +02:00
c-holtermann
4868e046c3 add quit event handler to python console 2019-04-19 12:01:03 +02:00
c-holtermann
ecab7968e2 on quitting don't kill gtk main process 2019-04-19 11:59:59 +02:00
c-holtermann
e2fd241836 stop closing shell window from closing gnucash 2019-04-19 11:59:28 +02:00
thetedmunds
9afc856c20 Changed gnc:computeInterestIncrement to directly calculate the amount of interest accrued in the specified compounding period. Bug 797195. 2019-04-17 12:11:29 -07:00
thetedmunds
5f9020016a Amended commit to address pull-request comments. 2019-04-17 11:52:24 -07:00
Frank H. Ellenberger
e3e11afcb5 [L12N] Romanian is now maintained by Translation Project
https://lists.gnucash.org/pipermail/gnucash-devel/2019-April/043701.html
2019-04-16 20:06:02 +02:00
Frank H. Ellenberger
0ebb02e243 [I18N] Unify placeholder warning
https://lists.gnucash.org/pipermail/gnucash-devel/2019-March/043624.html
2019-04-16 19:48:41 +02:00
John Ralls
0251d044b5 Merge Christoph Holtermann's 'Pr pycons2to3' into maint. 2019-04-15 14:25:49 -07:00