Commit Graph

21363 Commits

Author SHA1 Message Date
Christopher Lam
375013f9ea [commodity-utils] simplify gnc:make-exchange-function
Remove assigning exchangelist to exchange-alist.

Removes need to test foreign-amount against 0 - multiplication will
result in 0 anyway. The only functional change is the condition
whereby foreign's commodity is not present in exchangelist; previously
it would return (gnc:make-gnc-monetary domestic 0); now it returns #f.

This function *is* allowed to return #f for invalid or missing prices;
see the (and foreign ...) conditional.
2019-05-04 06:19:59 +08:00
Christopher Lam
e111c5bb07 [commodity-utils] use scheme division instead of gnc-numeric
with small change to test due to increased precision
2019-05-04 06:19:59 +08:00
Christopher Lam
f2aacf94cc [commodity-utils] remove price-is-not-zero? and work-done
because now we're not adding invalid prices to pricelist, and avoids
set! calls

also fix typo in deprecation message
2019-05-04 06:19:59 +08:00
Christopher Lam
fbcf488237 [commodity-utils] refactor resolve-unknown-comm 2019-05-04 06:19:59 +08:00
Christopher Lam
ce675eaac6 [commodity-utils] refactor get-exchange-cost-totals 2019-05-04 06:19:59 +08:00
Christopher Lam
b2dc906bcd [commodity-utils] refactor get-exchange-totals 2019-05-04 06:19:59 +08:00
Christopher Lam
9ef2a2f3dd [commodity-utils] refactor inst price calculator 2019-05-04 06:19:59 +08:00
Christopher Lam
91f3e9fefe [commodity-utils] refactor totalavg price calculator
use exact rationals, therefore test suite amended
2019-05-04 06:19:59 +08:00
Frank H. Ellenberger
76936bc646 [I18N] Improve doc-page of CSV transaction importer
Text based on
https://lists.gnucash.org/pipermail/gnucash-devel/2019-May/043795.html
2019-05-03 23:08:43 +02:00
John Ralls
8fb2111636 Merge Christoph Holtermann's 'pycons-more-verbose' into maint. 2019-05-03 13:26:42 -07:00
c-holtermann
24ac69d8a9 make python shell startup more understandable 2019-05-03 18:13:52 +02:00
Frank H. Ellenberger
53e4e8a976 Use standard buttons in "Tip of the Day" 2019-05-03 13:15:32 +02:00
Frank H. Ellenberger
275463d3b8 N[I18N] "Next" is the new "Forward"
From GTK2 to 3 the button label changed. So several texts referenced a
no longer existing button.

For changed strings also unify quotation to \"
2019-05-03 13:15:15 +02:00
Robert Fewell
8d71fcaf2f Bug 797223 - Preference missing tooltip
The Preferences 'Register/Tab order includes Transfer on Memorised
Transaction' was not displaying its tooltip even though it was in the
glade file. Recreated the Register notebook page and the business page
as it also had a missing tooltip.
2019-05-03 11:42:47 +01:00
Robert Fewell
38dfc6ecd2 Use the commodity on selected parent rows in price tree view
If the parent row for prices in a price tree view is used for a new
price the security value can be wrong so get the commodity of this row
and use it for a temporary price which is cloned for editing.
2019-05-03 11:37:42 +01:00
Robert Fewell
c782e7a4da Bug 797051 - Follow up - Change defaults for new price
Set the default date of a new price to today and the value to 0
2019-05-03 11:31:26 +01:00
John Ralls
7c9f01ff3b GetUserDefaultLocaleName returns a Windows-style locale too. 2019-05-02 11:27:23 -07:00
Christopher Lam
653d8cb5c3 [general-ledger] remove dependency on transaction.scm 2019-05-01 19:06:53 +08:00
Christopher Lam
ff3a34711a [income-gst-statement] remove dependency on transaction.scm 2019-05-01 19:06:50 +08:00
Christopher Lam
b87d693a77 [trep-engine] modularise trep-engine 2019-05-01 18:58:39 +08:00
Christopher Lam
14b3255933 [reconcile-report] pull reconcile-report into separate file 2019-05-01 18:58:39 +08:00
Mike Evans
29416292a9 Remove FIX ME
Since it works fine and I can't remember why I put it in.
2019-05-01 11:46:42 +01:00
Mike Evans
c28196fb06 Fix indents, 2019-05-01 11:45:43 +01:00
Mike Evans
126dc3a790 Bug-797168 Proposed fix. 2019-05-01 11:45:43 +01:00
John Ralls
bfbb89f6e2 Rewire and corrected Doxygen comment for gnc_get_locale() c++ function.
There's no point in going through the cache dance on MinGW, that will
just throw.
2019-04-30 15:00:06 -07:00
John Ralls
529a6cb067 Call setlocale(LC_ALL, "") exactly once.
And in Windows only with the value from the environment if there is one.
Calling it with "" in Windows ignores the environment and sets it to the
system settings.
2019-04-30 14:56:43 -07:00
John Ralls
d30cf25c45 Call setlocale() with the right form of locale code on Windows.
Perversely Windows uses the form xx-YY for its own localization
functions but xx_YY for the posix ones including setlocale().
2019-04-30 14:53:46 -07:00
John Ralls
114efe5936 Transcode non-constant strings before passing them to scm_eval_string.
Instead of using scm_c_eval_string, which transcodes with
scm_from_locale_string. That doesn't work on Windows.
2019-04-29 15:00:54 -07:00
Frank H. Ellenberger
1c1fa36023 de.po: update PO-Revision-Date
Follow up of commit 6b10c2f
2019-04-29 23:16:03 +02:00
pianoslum
6b10c2f284 Fix small typo in German translation 2019-04-29 21:36:25 +02:00
John Ralls
a711497130 Fix Travis failure.
Maybe. Can't reproduce it so trying something that looks reasonable.
2019-04-28 21:53:56 -07:00
John Ralls
e42c811341 Make TreeView toggle-buttons not activatable if no toggle callback.
So that it's clear in the UI that clicking on the box won't do anything.
The case that triggered this is the Get-online-quotes item in the
Securities Editor tree view.
2019-04-28 17:09:02 -07:00
John Ralls
3feb864691 Add an optionally-compiled diagnostic console on Windows. 2019-04-28 16:59:51 -07:00
John Ralls
6c7ccbd9e7 Bug 797134 - Decimal separator: Windows configured as dot,...
Gnucash shows comma.

This was introduced by 8f88b7f2b. It turns out that Windows
implementation of setlocale works only if the POSIX locale environment
variables (i.e. LC_FOO or LANG) are set, otherwise it returns NULL. We
were unknowingly relying on Guile to retrieve the Windows environment
for us and that would do the wrong thing if the user had set the locale
in the environment file, so 8f88b7f2b restored it... unfortunately to
the C locale.

This commit changes the set_win32_thread_locale function to work in
both directions, setting both locales from the environment variables
if any are set and calling setlocale with the result of
GetUserDefaultLocaleName if not.
2019-04-28 16:34:58 -07:00
John Ralls
94bb28d9ab Bug 797127 - Company name and address in reports not display properly
Ensure that all includes of swig-runtime.h are *followed* by
including guile-mappings.h so that the defines masking
scm_to_utf8_string and scm_from_utf8_string are undone.
2019-04-27 13:39:27 -07:00
Christopher Lam
4d529c02cd [libgnucash-scm-utilities] remove unneeded section in CMakeLists 2019-04-27 17:04:02 +08:00
Christopher Lam
b5fe4e3c64 [guile-json] add files to fix distcheck 2019-04-27 17:03:41 +08:00
Geert Janssens
9885ac4687 .gitignore housekeeping
Remove lots of ignores that were only relevant for our former autotools/intltool based build system.
Note if people still have very old working directories, some of these files may suddenly appear
as untracked files after pulling in this commit. A good time to clean them up...
2019-04-26 19:27:49 +02:00
Frank H. Ellenberger
b4ae45d556 Drop po/ChangeLog
It is no longer required by make dist.
Probably it was a requirement of IntlTool.
2019-04-26 18:13:27 +02:00
Robert Fewell
d1ee651bbc Modify the qof log format based on max logger name from log.conf
When you have multiple loggers enabled, the log file indentations are
partly based on logger name length and so you can have false
indentations which can cause confusion. This change gets the maximum
name logger length and uses this for all with a minimum default length
of 12 characters.
2019-04-26 12:09:05 +01:00
Robert Fewell
b87ba7ae91 Bug 797051 - Overwrite prices without warning
Currently if you add a price and a price already exists for that
commodity/currency/day combination it will silently replace that price.
The same is also true for editing a prices if you decide to change the
date. To overcome this add a gnc-warning which allows the response to
be saved temporary or permanently.
2019-04-26 12:09:05 +01:00
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