r17512 - gnucash/branches/2.2/src - [r17407, r17429] Bug #309863, #341362: Prevent rounding when entering prices in the Price Editor and Stock Split druid.
Andreas Köhler
andi5 at cvs.gnucash.org
Sun Sep 14 17:29:47 EDT 2008
Author: andi5
Date: 2008-09-14 17:29:47 -0400 (Sun, 14 Sep 2008)
New Revision: 17512
Trac: http://svn.gnucash.org/trac/changeset/17512
Modified:
gnucash/branches/2.2/src/app-utils/gnc-ui-util.c
gnucash/branches/2.2/src/gnome/dialog-price-editor.c
Log:
[r17407,r17429] Bug #309863, #341362: Prevent rounding when entering prices in the Price Editor and Stock Split druid.
Also avoid fractional display if it is unnecessary.
Committed by cedayiv.
Modified: gnucash/branches/2.2/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/branches/2.2/src/app-utils/gnc-ui-util.c 2008-09-14 21:29:38 UTC (rev 17511)
+++ gnucash/branches/2.2/src/app-utils/gnc-ui-util.c 2008-09-14 21:29:47 UTC (rev 17512)
@@ -1383,7 +1383,7 @@
/* at this point, buf contains the whole part of the number */
/* If it's not decimal, print the fraction as an expression */
- if (!is_decimal_fraction (val.denom, NULL))
+ if (!gnc_numeric_to_decimal(&val, NULL))
{
if (!gnc_numeric_zero_p (val))
{
Modified: gnucash/branches/2.2/src/gnome/dialog-price-editor.c
===================================================================
--- gnucash/branches/2.2/src/gnome/dialog-price-editor.c 2008-09-14 21:29:38 UTC (rev 17511)
+++ gnucash/branches/2.2/src/gnome/dialog-price-editor.c 2008-09-14 21:29:47 UTC (rev 17512)
@@ -368,7 +368,6 @@
gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (w), TRUE);
print_info = gnc_default_price_print_info ();
gnc_amount_edit_set_print_info (GNC_AMOUNT_EDIT (w), print_info);
- gnc_amount_edit_set_fraction (GNC_AMOUNT_EDIT (w), 1000000);
gtk_entry_set_activates_default(GTK_ENTRY(w), TRUE);
gtk_widget_show (w);
label = glade_xml_get_widget (xml, "price_label");
More information about the gnucash-changes
mailing list