r23236 - gnucash/trunk/src - Gnc-Prefs: migrate 24hour_clock preference and fix the code
Geert Janssens
gjanssens at code.gnucash.org
Mon Oct 7 10:12:01 EDT 2013
Author: gjanssens
Date: 2013-10-07 10:12:01 -0400 (Mon, 07 Oct 2013)
New Revision: 23236
Trac: http://svn.gnucash.org/trac/changeset/23236
Modified:
gnucash/trunk/src/gnome-utils/dialog-options.c
gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade
gnucash/trunk/src/gnome/gschemas/org.gnucash.gschema.xml.in
Log:
Gnc-Prefs: migrate 24hour_clock preference and fix the code
so it actually works. (It's not actively used though in GnuCash)
Modified: gnucash/trunk/src/gnome/gschemas/org.gnucash.gschema.xml.in
===================================================================
--- gnucash/trunk/src/gnome/gschemas/org.gnucash.gschema.xml.in 2013-10-07 14:11:42 UTC (rev 23235)
+++ gnucash/trunk/src/gnome/gschemas/org.gnucash.gschema.xml.in 2013-10-07 14:12:01 UTC (rev 23236)
@@ -99,7 +99,7 @@
<summary>Default currency for new accounts</summary>
<description>This setting specifies the default currency used for new accounts if the currency_choice setting is set to "other". This field must contain the three letter ISO 4217 code for a currency (e.g. USD, GBP, RUB).</description>
</key>
- <key name="24hour_clock" type="b">
+ <key name="clock-24h" type="b">
<default>false</default>
<summary>Use 24 hour time format</summary>
<description>If active, use a 24 hour time format. Otherwise use a 12 hour time format.</description>
Modified: gnucash/trunk/src/gnome-utils/dialog-options.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-options.c 2013-10-07 14:11:42 UTC (rev 23235)
+++ gnucash/trunk/src/gnome-utils/dialog-options.c 2013-10-07 14:12:01 UTC (rev 23236)
@@ -45,7 +45,7 @@
#include "gnc-currency-edit.h"
#include "gnc-date-edit.h"
#include "gnc-engine.h"
-#include "gnc-gconf-utils.h"
+#include "gnc-prefs.h"
#include "gnc-gui-query.h"
#include "gnc-session.h"
#include "gnc-ui.h"
@@ -56,6 +56,8 @@
#include "gnc-date-format.h"
#include "misc-gnome-utils.h"
+#define GNC_PREF_CLOCK_24H "clock-24h"
+
#define FUNC_NAME G_STRFUNC
/* TODO: clean up "register-stocks" junk
*/
@@ -461,7 +463,7 @@
type = gnc_option_date_option_get_subtype(option);
show_time = gnc_option_show_time(option);
- use24 = gnc_gconf_get_bool(GCONF_GENERAL, "24hour_time", FALSE);
+ use24 = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_CLOCK_24H);
if (g_strcmp0(type, "relative") != 0)
{
Modified: gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade
===================================================================
--- gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade 2013-10-07 14:11:42 UTC (rev 23235)
+++ gnucash/trunk/src/gnome-utils/gtkbuilder/dialog-preferences.glade 2013-10-07 14:12:01 UTC (rev 23236)
@@ -1286,7 +1286,7 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="gconf/general/24hour_clock">
+ <object class="GtkCheckButton" id="pref/general/clock-24h">
<property name="label" translatable="yes">U_se 24-hour clock</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
More information about the gnucash-changes
mailing list