Geert Janssens
3a99ca6791
Gtk code cleanups: Convert dense-cal from gdk_gc_* to cairo
2015-09-22 10:57:31 +02:00
Geert Janssens
5ffe52a03e
Gtk code cleanups: Use accessor functions on GtkWidget instead of deprecated direct access
2015-09-22 10:57:30 +02:00
Geert Janssens
ce3e36a7a5
Gtk code cleanups: drop use of deprecated GTK_CALENDAR_WEEK_START_ON_MONDAY
...
It has been deprecated as of gtk 2.4 and ignored ever since.
2015-09-22 10:57:28 +02:00
Geert Janssens
abd1684cc4
Gtk code cleanups: replace deprecated gdk_drawable_get_display with gdk_window_get_display
2015-09-22 10:57:27 +02:00
Geert Janssens
fe2149825f
Gtk code cleanups: drop custom arg type registration
...
Appears not to be used anywhere.
2015-09-22 10:57:27 +02:00
Geert Janssens
9ade051090
Gtk code cleanups: GTK_WIDGET_SET_FLAGS is deprecated
2015-09-22 10:57:26 +02:00
Geert Janssens
861bfa9ff5
Gtk code cleanups: use G_TYPE_CHECK_* instead of obsolete GTK_CHECK_*
2015-09-22 10:57:26 +02:00
Geert Janssens
4a07162ca1
Gtk code cleanups: use gdk_window_get_width/height functions
2015-09-22 10:57:25 +02:00
Geert Janssens
6846ee842c
Gtk code cleanups: consistently use new style key codes
2015-09-22 10:57:24 +02:00
Geert Janssens
b182f2f2e4
Gtk code cleanups: Avoid GtkObject where possible
2015-09-22 10:57:23 +02:00
Geert Janssens
8825d3feb7
Gtk code cleanups: Fix obsolete use of GtkType type.
2015-09-22 10:57:21 +02:00
Geert Janssens
8d1b452201
Drop function gnc_assistant_set_colors
...
It's not making any visual difference in current Gtk implementations.
2015-09-22 10:57:20 +02:00
John Ralls
986bb368cd
Merge branch 'maint'
2015-09-19 16:58:13 -07:00
John Ralls
b432356585
Update the translations from the Translation project.
2015-09-19 16:53:44 -07:00
John Ralls
04a6f4cfc5
Rearrange the LINGUAS as suggested by Frank Ellenberger in the wiki.
...
And remove the binary message catalog accidentally added in the last commit.
2015-09-19 16:19:00 -07:00
John Ralls
3c3f034393
Update all message catalogs with the 2.6.7 gnucash.pot and fix all warnings.
2015-09-19 15:34:25 -07:00
John Ralls
766cf48f45
Fix rename failure for gnc_xfer_dialog_set_exchange_rate.
2015-09-17 16:03:39 -07:00
John Ralls
6e6eba35c2
Correct the Stock, Bond, Market Index, and Mutual Fund account types in all locales.
2015-09-17 13:07:48 -07:00
John Ralls
0b7e4773f7
Fix warning about always-true condition.
2015-09-17 13:02:27 -07:00
John Ralls
42859b91bb
Set -std=gnu99, matching master.
...
Fixes broken build on win32
2015-09-16 17:59:50 -07:00
John Ralls
bc9285bbfb
Merge branch 'single-price' into maint
2015-09-15 12:06:46 -07:00
John Ralls
05bb4bd955
Prevent F::Q from updating PRICE_SOURCE_EDIT_DLG prices.
2015-09-15 12:06:29 -07:00
John Ralls
74d11b2736
Remove unnecessary and harmful price rounding.
2015-09-15 12:06:29 -07:00
John Ralls
cfa5aa1cb2
Remove the preference for storing prices relative to the base currency.
...
It interferes with the preference for storing the price in the direction
in which the price is >1 for preserving sigfigs.
2015-09-15 12:06:29 -07:00
John Ralls
4259255af1
Export the price-source enums to Guile and use them in price-quotes.scm.
2015-09-15 12:06:29 -07:00
John Ralls
6b6920fd04
Remove static function swap_amount(), not used.
2015-09-15 12:06:29 -07:00
John Ralls
585cc4883f
Implement user-entered-price preference.
...
Add user:price as a source and prefer values with lower PriceSource enum
values over higher ones: In other words a price with a lower PriceSource
value (e.g. user:price-editor) will overwrite one with a higher value (e.g.
user:split-register) and not the other way around.
2015-09-15 12:06:29 -07:00
John Ralls
d9a0f311a4
Fold separate call of gnc_pricedb_lookup_latest() into lookup_price.
...
Requires a 3-state enum instead of a boolean for the second arg to lookup_price.
2015-09-15 12:06:29 -07:00
John Ralls
7db7e0cf7a
Recognize and handle reversed price quotes from gnc-fq-helper.
...
Gnc-fq-helper will flip currency price quotes if the one requested is < 1
or not available, which might mean that it's not representable in 4 digits
to the right of the decimal.
2015-09-15 12:06:29 -07:00
John Ralls
7d8b51e8db
Use an enum for internal representation of Price Sources.
...
Strings are still used for storage and display.
Purpose is to make multiple comparisons and conditional setting more
convenient.
2015-09-15 12:06:29 -07:00
John Ralls
d52a0b602c
Fix whitespace error.
2015-09-15 12:06:28 -07:00
John Ralls
d4968d3bb4
Extract function lookup_price in dialog_transfer.c
2015-09-15 12:06:28 -07:00
John Ralls
157c7e30a5
Invert the F::Q price if there's already one in the other direction.
...
We don't want to create prices in both directions on the same day.
2015-09-15 12:06:28 -07:00
John Ralls
890cfe2186
Handle currencies with one-directional quotes and quotes < 1 in F::Q.
...
Some currencies quotes are one-directional, so check both directions if
necessary. Quotes with values < 1 often have too few significant digits,
so in that case use the other direction if available.
2015-09-15 12:06:28 -07:00
John Ralls
96471379f0
Adjust split_register to match transfer dialog checking inverted prices.
2015-09-15 12:06:28 -07:00
John Ralls
d7fb92d03f
Fix missing initialization of price_value.
2015-09-15 12:06:28 -07:00
John Ralls
93bb5c0fdd
Change CURRENCY_DENOM to 10000, matching what F::Q returns.
2015-09-15 12:06:28 -07:00
John Ralls
ffe96b3044
Extract function round_price(), consistently apply it.
2015-09-15 12:06:28 -07:00
John Ralls
bfbb508799
Fix swap_amount so that it swaps the account pointers.
2015-09-15 12:06:28 -07:00
John Ralls
86320a4d11
Fix gnc_numeric_invert to correctly handle negative values.
2015-09-15 12:06:28 -07:00
John Ralls
c068397633
Flip return values of check_edit() and check_accounts().
...
It's easier to understand if they return FALSE on fail.
2015-09-15 12:06:28 -07:00
John Ralls
e12c89b5ca
Move gnc_numeric_invert to be not-inline.
...
The inline version crashed.
2015-09-15 12:06:27 -07:00
John Ralls
6b5207785a
Create a rounding policy for prices in the pricedb.
...
Currency-currency prices will be priced in the smaller currency so that
the price > 1 and will be rounded to 3 digits after the decimal.
Commodity-currency prices will be priced in the currency and rounded to
the currency's scu * 10000.
This affects only prices stored in the pricedb. Prices in splits will
continue to be computed from value/amount.
2015-09-15 12:06:27 -07:00
John Ralls
c7c97be684
Rename _gnc_xfer_dialog_set_exchange_rate and use it consistently.
...
_gnc_xfer_dialog_set_price_edit says what we're actually setting.
2015-09-15 12:06:27 -07:00
John Ralls
73233a5e2e
Provide gnc_numeric_invert() convenience function.
...
Clearer and faster than dividing into 1/1.
2015-09-15 12:06:27 -07:00
John Ralls
3a51c0d5c1
Use price_value when referring to a gnc_numeric.
...
Price and prc are for gnc_price*.
For clarity.
2015-09-15 12:06:27 -07:00
John Ralls
06f70bad61
Price-quotes: Modify quotes on same day instead of creating new ones.
...
We can use only one per day so no point in keeping a bunch of them.
Finance::Quote prices always overwrite user prices.
2015-09-15 12:06:27 -07:00
John Ralls
ea48ed882b
Edit split-based prices instead of adding.
...
For split-register and xfer-dialog generated prices if there's an existing
non-FQ price for the day, change it. If there's an F::Q quote for the day,
do nothing. Only add a price if there isn't one for the from/to
combination.
2015-09-15 12:06:27 -07:00
John Ralls
0b03328143
Check for an existing price before adding one in split_reg.
...
To make the behavior the same as in xfer_dialog.
2015-09-15 12:06:27 -07:00
John Ralls
c6a67f4eac
In the transfer dialog use the price_edit value for the saved price.
...
Instead of computing it separately and differently from to_amt and from_amt.
2015-09-15 12:06:27 -07:00