# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([libgtkform], [0.3.1], [azagli@libero.it])
+AC_INIT([libgtkform], [0.4.0], [azagli@libero.it])
AC_CONFIG_SRCDIR([libgtkform/form.c])
AC_CONFIG_HEADER([config.h])
GtkFormFieldDateTimePrivate *priv;
gchar *field_name;
GValue *gval;
- struct tm *datetime;
+ GDateTime *datetime;
gchar *value;
g_return_val_if_fail (IS_GTK_FORM_FIELD_DATETIME (field), FALSE);
}
else
{
- datetime = (struct tm *)g_value_get_pointer (gval);
+ datetime = (GDateTime *)g_value_get_pointer (gval);
- value = gtk_form_field_datetime_get_str_from_tm (datetime, priv->display_format);
+ value = g_date_time_format (datetime, priv->display_format);
- ret = gtk_form_field_datetime_set_value_stringify (field, value);
+ ret = gtk_form_field_datetime_set_value_stringify (field, value != NULL ? value : "");
- priv->original_value = g_memdup (datetime, sizeof (struct tm));
+ priv->original_value = g_date_time_ref (datetime);
- g_free (datetime);
+ g_date_time_unref (datetime);
g_free (value);
}
}