[Gnucash-changes] r14369 - gnucash/trunk - Restore the auto decimal places settings from gconf at startup. Fixes

David Hampton hampton at cvs.gnucash.org
Wed Jun 14 23:54:54 EDT 2006


Author: hampton
Date: 2006-06-14 23:54:53 -0400 (Wed, 14 Jun 2006)
New Revision: 14369
Trac: http://svn.gnucash.org/trac/changeset/14369

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/app-utils/gnc-ui-util.c
Log:
Restore the auto decimal places settings from gconf at startup.  Fixes
#344938.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-06-14 23:45:30 UTC (rev 14368)
+++ gnucash/trunk/ChangeLog	2006-06-15 03:54:53 UTC (rev 14369)
@@ -1,5 +1,8 @@
 2006-06-14  David Hampton  <hampton at employees.org>
 
+	* src/app-utils/gnc-ui-util.c: Restore the auto decimal places
+	settings from gconf at startup.  Fixes #344938.
+
 	* src/business/business-gnome/glade/invoice.glade: The Chargeback
 	and Extra Payments sections of the bill should not expand to fill
 	extra space.

Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c	2006-06-14 23:45:30 UTC (rev 14368)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c	2006-06-15 03:54:53 UTC (rev 14369)
@@ -2092,10 +2092,21 @@
   auto_decimal_places = gconf_value_get_float(value);
 }
 
+static void
+gnc_auto_decimal_init (void)
+{
+  auto_decimal_enabled =
+    gnc_gconf_get_bool(GCONF_GENERAL, "auto_decimal_point", NULL);
+  auto_decimal_places =
+    gnc_gconf_get_float(GCONF_GENERAL, "auto_decimal_places", NULL);
+}
+
 void
 gnc_ui_util_init (void)
 {
   gnc_configure_account_separator ();
+  gnc_auto_decimal_init();
+
   gnc_gconf_general_register_cb(KEY_ACCOUNT_SEPARATOR,
 				(GncGconfGeneralCb)gnc_configure_account_separator,
 				NULL);



More information about the gnucash-changes mailing list