From 5de911278716f3538a2734a56b172691dba07192 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Mon, 7 Oct 2013 14:12:01 +0000 Subject: [PATCH] Gnc-Prefs: migrate 24hour_clock preference and fix the code so it actually works. (It's not actively used though in GnuCash) git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23236 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome-utils/dialog-options.c | 6 ++++-- src/gnome-utils/gtkbuilder/dialog-preferences.glade | 2 +- src/gnome/gschemas/org.gnucash.gschema.xml.in | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gnome-utils/dialog-options.c b/src/gnome-utils/dialog-options.c index e3d31d1355..07313542c6 100644 --- a/src/gnome-utils/dialog-options.c +++ b/src/gnome-utils/dialog-options.c @@ -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 @@ gnc_option_create_date_widget (GNCOption *option) 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) { diff --git a/src/gnome-utils/gtkbuilder/dialog-preferences.glade b/src/gnome-utils/gtkbuilder/dialog-preferences.glade index d7159a6428..fb04398c2d 100644 --- a/src/gnome-utils/gtkbuilder/dialog-preferences.glade +++ b/src/gnome-utils/gtkbuilder/dialog-preferences.glade @@ -1286,7 +1286,7 @@ - + U_se 24-hour clock True True diff --git a/src/gnome/gschemas/org.gnucash.gschema.xml.in b/src/gnome/gschemas/org.gnucash.gschema.xml.in index 64c3ca853b..66e8414bf9 100644 --- a/src/gnome/gschemas/org.gnucash.gschema.xml.in +++ b/src/gnome/gschemas/org.gnucash.gschema.xml.in @@ -99,7 +99,7 @@ Default currency for new accounts 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). - + false Use 24 hour time format If active, use a 24 hour time format. Otherwise use a 12 hour time format.