Gnc-Prefs: migrate date_format preference

This includes converting the radio button group in preferences
into a combobox

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23245 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2013-10-07 14:15:55 +00:00
parent a91c0a9c3a
commit 57e0143551
6 changed files with 138 additions and 266 deletions

View File

@ -1391,6 +1391,9 @@ gnc_preferences_dialog_create(void)
GHashTable *prefs_table; GHashTable *prefs_table;
GDate* gdate; GDate* gdate;
gchar buf[128]; gchar buf[128];
GtkListStore *store;
GtkTreePath *path;
GtkTreeIter iter;
gnc_commodity *locale_currency; gnc_commodity *locale_currency;
const gchar *currency_name; const gchar *currency_name;
@ -1406,6 +1409,7 @@ gnc_preferences_dialog_create(void)
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "new_search_limit_adj"); gnc_builder_add_from_file (builder, "dialog-preferences.glade", "new_search_limit_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "retain_days_adj"); gnc_builder_add_from_file (builder, "dialog-preferences.glade", "retain_days_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "tab_width_adj"); gnc_builder_add_from_file (builder, "dialog-preferences.glade", "tab_width_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "date_formats");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "GnuCash Preferences"); gnc_builder_add_from_file (builder, "dialog-preferences.glade", "GnuCash Preferences");
dialog = GTK_WIDGET(gtk_builder_get_object (builder, "GnuCash Preferences")); dialog = GTK_WIDGET(gtk_builder_get_object (builder, "GnuCash Preferences"));
@ -1477,10 +1481,12 @@ gnc_preferences_dialog_create(void)
DEBUG("Done with interesting widgets."); DEBUG("Done with interesting widgets.");
/* Other stuff */ /* Other stuff */
gdate = g_date_new_dmy(31, G_DATE_JULY, 2005); gdate = g_date_new_dmy(31, G_DATE_JULY, 2013);
g_date_strftime(buf, sizeof(buf), "%x", gdate); g_date_strftime(buf, sizeof(buf), "%x", gdate);
label = GTK_WIDGET(gtk_builder_get_object (builder, "locale_date_sample")); store = GTK_LIST_STORE(gtk_builder_get_object (builder, "date_formats"));
gtk_label_set_text(GTK_LABEL(label), buf); path = gtk_tree_path_new_from_indices (QOF_DATE_FORMAT_LOCALE, -1);
if (gtk_tree_model_get_iter (GTK_TREE_MODEL (store), &iter, path))
gtk_list_store_set (store, &iter, 1, buf, -1);
g_date_free(gdate); g_date_free(gdate);
locale_currency = gnc_locale_default_currency (); locale_currency = gnc_locale_default_currency ();

View File

@ -127,31 +127,20 @@ gnc_commodity_help_cb (void)
static void static void
gnc_configure_date_format (void) gnc_configure_date_format (void)
{ {
char *format_code = gnc_gconf_get_string(GCONF_GENERAL, QofDateFormat df = gnc_prefs_get_int(GCONF_GENERAL,
KEY_DATE_FORMAT, NULL); GNC_PREF_DATE_FORMAT);
QofDateFormat df; /* Only a subset of the qof date formats is currently
* supported for date entry.
if (format_code == NULL) */
format_code = g_strdup("locale"); if ((df > QOF_DATE_FORMAT_LOCALE)
if (*format_code == '\0') || (df > QOF_DATE_FORMAT_LOCALE))
{ {
g_free(format_code); PERR("Incorrect date format");
format_code = g_strdup("locale");
}
if (gnc_date_string_to_dateformat(format_code, &df))
{
PERR("Incorrect date format code");
if (format_code != NULL)
free(format_code);
return; return;
} }
qof_date_format_set(df); qof_date_format_set(df);
if (format_code != NULL)
free(format_code);
} }
/* gnc_configure_date_completion /* gnc_configure_date_completion
@ -643,8 +632,10 @@ gnc_gui_init(void)
gnc_configure_date_format(); gnc_configure_date_format();
gnc_configure_date_completion(); gnc_configure_date_completion();
gnc_gconf_general_register_cb( gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,
KEY_DATE_FORMAT, (GncGconfGeneralCb)gnc_configure_date_format, NULL); GNC_PREF_DATE_FORMAT,
gnc_configure_date_format,
NULL);
gnc_gconf_general_register_cb( gnc_gconf_general_register_cb(
KEY_DATE_COMPLETION, (GncGconfGeneralCb)gnc_configure_date_completion, NULL); KEY_DATE_COMPLETION, (GncGconfGeneralCb)gnc_configure_date_completion, NULL);
gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL, gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL,

View File

@ -35,8 +35,8 @@
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include "gnc-date.h" #include "gnc-date.h"
#include "gnc-gconf-utils.h"
#include "gnc-period-select.h" #include "gnc-period-select.h"
#include "gnc-prefs.h"
#include <gnc-gdate-utils.h> #include <gnc-gdate-utils.h>
enum enum
@ -150,7 +150,7 @@ gnc_period_sample_update_date_label (GncPeriodSelect *period)
return; return;
which = gtk_combo_box_get_active (GTK_COMBO_BOX (priv->selector)); which = gtk_combo_box_get_active (GTK_COMBO_BOX (priv->selector));
if (which == -1) if (which == -1)
date = g_date_new_dmy (1, 1, 1970); date = g_date_new_dmy (31, 7, 2013);
else if (priv->start) else if (priv->start)
date = gnc_accounting_period_start_gdate (which, priv->fy_end, date = gnc_accounting_period_start_gdate (which, priv->fy_end,
@ -186,17 +186,19 @@ gnc_period_sample_combobox_changed (GtkComboBox *box, GncPeriodSelect *period)
/** Handle an application wide change in the date format. This /** Handle an application wide change in the date format. This
* function will be called when the GConf key for the date format is * function will be called when the preference for the date format is
* updated. It doesn't really care what the new format is, because * updated. It doesn't really care what the new format is, because
* the date string is generated elsewhere. It just needs to know to * the date string is generated elsewhere. It just needs to know to
* update the date label so that it matches the newly selected format. * update the date label so that it matches the newly selected format.
* *
* @param unused The new value for the Gnucash date format. * @param prefs Unused.
*
* @param pref Unused.
* *
* @param period The GncPeriodSelect that needs to be updated. * @param period The GncPeriodSelect that needs to be updated.
*/ */
static void static void
gnc_period_sample_new_date_format (GConfEntry *unused, gnc_period_sample_new_date_format (gpointer prefs, gchar *pref,
GncPeriodSelect *period) GncPeriodSelect *period)
{ {
gnc_period_sample_update_date_label(period); gnc_period_sample_update_date_label(period);
@ -639,8 +641,8 @@ gnc_period_select_finalize (GObject *object)
priv = GNC_PERIOD_SELECT_GET_PRIVATE(period); priv = GNC_PERIOD_SELECT_GET_PRIVATE(period);
/* Stop tracking changes to date formatting */ /* Stop tracking changes to date formatting */
gnc_gconf_general_remove_cb(KEY_DATE_FORMAT, gnc_prefs_remove_cb_by_func (GNC_PREFS_GROUP_GENERAL, GNC_PREF_DATE_FORMAT,
(GncGconfGeneralCb)gnc_period_sample_new_date_format, period); gnc_period_sample_new_date_format, period);
/* The selector and date_label were added to the hbox. They will be /* The selector and date_label were added to the hbox. They will be
* freed automatically. */ * freed automatically. */
@ -697,8 +699,8 @@ gnc_period_select_new (gboolean starting_labels)
} }
/* Track changes to date formatting */ /* Track changes to date formatting */
gnc_gconf_general_register_cb(KEY_DATE_FORMAT, gnc_prefs_register_cb (GNC_PREFS_GROUP_GENERAL, GNC_PREF_DATE_FORMAT,
(GncGconfGeneralCb)gnc_period_sample_new_date_format, period); gnc_period_sample_new_date_format, period);
return GTK_WIDGET (period); return GTK_WIDGET (period);
} }

View File

@ -21,6 +21,36 @@
<property name="step_increment">1</property> <property name="step_increment">1</property>
<property name="page_increment">4</property> <property name="page_increment">4</property>
</object> </object>
<object class="GtkListStore" id="date_formats">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name example -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">US</col>
<col id="1" translatable="yes">07/31/2013</col>
</row>
<row>
<col id="0" translatable="yes">UK</col>
<col id="1" translatable="yes">31/07/2013</col>
</row>
<row>
<col id="0" translatable="yes">Europe</col>
<col id="1" translatable="yes">31.07.2013</col>
</row>
<row>
<col id="0" translatable="yes">ISO</col>
<col id="1" translatable="yes">2013-07-31</col>
</row>
<row>
<col id="0" translatable="yes">Locale</col>
<col id="1" translatable="yes">(dummy)</col>
</row>
</data>
</object>
<object class="GtkDialog" id="GnuCash Preferences"> <object class="GtkDialog" id="GnuCash Preferences">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="title" translatable="yes">GnuCash Preferences</property> <property name="title" translatable="yes">GnuCash Preferences</property>
@ -942,7 +972,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="n_rows">17</property> <property name="n_rows">14</property>
<property name="n_columns">4</property> <property name="n_columns">4</property>
<child> <child>
<placeholder/> <placeholder/>
@ -1025,15 +1055,6 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child> <child>
<object class="GtkLabel" id="label104"> <object class="GtkLabel" id="label104">
<property name="can_focus">False</property> <property name="can_focus">False</property>
@ -1043,8 +1064,8 @@
</object> </object>
<packing> <packing>
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">10</property> <property name="top_attach">6</property>
<property name="bottom_attach">11</property> <property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"/> <property name="y_options"/>
</packing> </packing>
@ -1056,196 +1077,12 @@
<property name="xalign">0</property> <property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="top_attach">9</property>
<property name="bottom_attach">10</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label102">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">2005-07-31</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label101">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">31.07.2005</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label100">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">31/07/2005</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkLabel" id="label99">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">07/31/2005</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">5</property> <property name="top_attach">5</property>
<property name="bottom_attach">6</property> <property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"/> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child>
<object class="GtkLabel" id="locale_date_sample">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="gconf/general/date_format/iso">
<property name="label" translatable="yes">_ISO:</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="has_tooltip">True</property>
<property name="tooltip_markup">Use the date format specified by the ISO-8601 standard.</property>
<property name="tooltip_text" translatable="yes">Use the date format specified by the ISO-8601 standard.</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="top_attach">8</property>
<property name="bottom_attach">9</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="gconf/general/date_format/ce">
<property name="label" translatable="yes">_Europe:</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="has_tooltip">True</property>
<property name="tooltip_markup">Use the date format common in continental Europe.</property>
<property name="tooltip_text" translatable="yes">Use the date format common in continental Europe.</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">gconf/general/date_format/iso</property>
</object>
<packing>
<property name="top_attach">7</property>
<property name="bottom_attach">8</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="gconf/general/date_format/uk">
<property name="label" translatable="yes">U_K:</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="has_tooltip">True</property>
<property name="tooltip_markup">Use the date format common in the United Kingdom.</property>
<property name="tooltip_text" translatable="yes">Use the date format common in the United Kingdom.</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">gconf/general/date_format/iso</property>
</object>
<packing>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="gconf/general/date_format/us">
<property name="label" translatable="yes">_US:</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="has_tooltip">True</property>
<property name="tooltip_markup">Use the date format common in the United States.</property>
<property name="tooltip_text" translatable="yes">Use the date format common in the United States.</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">gconf/general/date_format/iso</property>
</object>
<packing>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="gconf/general/date_format/locale">
<property name="label" translatable="yes">Loc_ale:</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="has_tooltip">True</property>
<property name="tooltip_markup">Use the date format specified by the system locale.</property>
<property name="tooltip_text" translatable="yes">Use the date format specified by the system locale.</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
<property name="group">gconf/general/date_format/iso</property>
</object>
<packing>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
<property name="x_padding">12</property>
</packing>
</child>
<child> <child>
<object class="GtkLabel" id="label97"> <object class="GtkLabel" id="label97">
<property name="visible">True</property> <property name="visible">True</property>
@ -1318,8 +1155,8 @@
<property name="use_markup">True</property> <property name="use_markup">True</property>
</object> </object>
<packing> <packing>
<property name="top_attach">12</property> <property name="top_attach">8</property>
<property name="bottom_attach">13</property> <property name="bottom_attach">9</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"/> <property name="y_options"/>
</packing> </packing>
@ -1334,8 +1171,8 @@
</object> </object>
<packing> <packing>
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">13</property> <property name="top_attach">9</property>
<property name="bottom_attach">14</property> <property name="bottom_attach">10</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"/> <property name="y_options"/>
</packing> </packing>
@ -1358,8 +1195,8 @@
</object> </object>
<packing> <packing>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">14</property> <property name="top_attach">10</property>
<property name="bottom_attach">15</property> <property name="bottom_attach">11</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"/> <property name="y_options"/>
<property name="x_padding">12</property> <property name="x_padding">12</property>
@ -1381,8 +1218,8 @@ many months before the current month:</property>
</object> </object>
<packing> <packing>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">15</property> <property name="top_attach">11</property>
<property name="bottom_attach">16</property> <property name="bottom_attach">12</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"/> <property name="y_options"/>
<property name="x_padding">12</property> <property name="x_padding">12</property>
@ -1408,12 +1245,40 @@ many months before the current month:</property>
<property name="climb_rate">1</property> <property name="climb_rate">1</property>
</object> </object>
<packing> <packing>
<property name="top_attach">16</property> <property name="top_attach">12</property>
<property name="bottom_attach">17</property> <property name="bottom_attach">13</property>
<property name="x_options"/> <property name="x_options"/>
<property name="y_options"/> <property name="y_options"/>
</packing> </packing>
</child> </child>
<child>
<object class="GtkComboBox" id="pref/general/date_format">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="has_tooltip">True</property>
<property name="tooltip_markup">Use the date format specified by the system locale.</property>
<property name="tooltip_text" translatable="yes">Use the date format specified by the system locale.</property>
<property name="model">date_formats</property>
<property name="active">3</property>
<child>
<object class="GtkCellRendererText" id="format_renderer"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
<child>
<object class="GtkCellRendererText" id="example_renderer"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
<packing>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="position">2</property> <property name="position">2</property>
@ -2097,7 +1962,7 @@ many months before the current month:</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="n_rows">10</property> <property name="n_rows">5</property>
<property name="n_columns">4</property> <property name="n_columns">4</property>
<property name="column_spacing">12</property> <property name="column_spacing">12</property>
<child> <child>
@ -2235,27 +2100,6 @@ many months before the current month:</property>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child> <child>
<object class="GtkLabel" id="label115"> <object class="GtkLabel" id="label115">
<property name="visible">True</property> <property name="visible">True</property>
@ -2265,7 +2109,6 @@ many months before the current month:</property>
<property name="use_markup">True</property> <property name="use_markup">True</property>
</object> </object>
<packing> <packing>
<property name="right_attach">4</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"/> <property name="y_options"/>
</packing> </packing>
@ -2365,6 +2208,36 @@ many months before the current month:</property>
<property name="y_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property>
</packing> </packing>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
<packing> <packing>
<property name="position">4</property> <property name="position">4</property>

View File

@ -104,8 +104,8 @@
<summary>Use 24 hour time format</summary> <summary>Use 24 hour time format</summary>
<description>If active, use a 24 hour time format. Otherwise use a 12 hour time format.</description> <description>If active, use a 24 hour time format. Otherwise use a 12 hour time format.</description>
</key> </key>
<key name="date_format" type="s"> <key name="date_format" type="i">
<default>'locale'</default> <default>4</default>
<summary>Date format choice</summary> <summary>Date format choice</summary>
<description>This setting chooses the way dates are displayed in GnuCash. Possible values for this setting are "locale" to use the system locale setting, "ce" for Continental Europe style dates, "iso" for ISO 8601 standard dates , "uk" for United Kingdom style dates, and "us" for United States style dates.</description> <description>This setting chooses the way dates are displayed in GnuCash. Possible values for this setting are "locale" to use the system locale setting, "ce" for Continental Europe style dates, "iso" for ISO 8601 standard dates , "uk" for United Kingdom style dates, and "us" for United States style dates.</description>
</key> </key>

View File

@ -120,13 +120,13 @@ typedef enum
QOF_DATE_FORMAT_UK, /**< Britain: dd/mm/yyyy */ QOF_DATE_FORMAT_UK, /**< Britain: dd/mm/yyyy */
QOF_DATE_FORMAT_CE, /**< Continental Europe: dd.mm.yyyy */ QOF_DATE_FORMAT_CE, /**< Continental Europe: dd.mm.yyyy */
QOF_DATE_FORMAT_ISO, /**< ISO: yyyy-mm-dd */ QOF_DATE_FORMAT_ISO, /**< ISO: yyyy-mm-dd */
QOF_DATE_FORMAT_UTC, /**< UTC: 2004-12-12T23:39:11Z */
QOF_DATE_FORMAT_LOCALE, /**< Take from locale information */ QOF_DATE_FORMAT_LOCALE, /**< Take from locale information */
QOF_DATE_FORMAT_UTC, /**< UTC: 2004-12-12T23:39:11Z */
QOF_DATE_FORMAT_CUSTOM /**< Used by the check printing code */ QOF_DATE_FORMAT_CUSTOM /**< Used by the check printing code */
} QofDateFormat; } QofDateFormat;
#define DATE_FORMAT_FIRST QOF_DATE_FORMAT_US #define DATE_FORMAT_FIRST QOF_DATE_FORMAT_US
#define DATE_FORMAT_LAST QOF_DATE_FORMAT_LOCALE #define DATE_FORMAT_LAST QOF_DATE_FORMAT_UTC
/** Enum for date completion modes (for dates entered without year) */ /** Enum for date completion modes (for dates entered without year) */
typedef enum typedef enum