X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-datetime-formatter.c;h=7aa9b24f96b2626cc473986a8166e6f4430d3dac;hp=d20bf24526ad8162875deebb7bc86fff2fbead17;hb=54f4d0a7ed835ba70ffeae20c5ced91ca3295b35;hpb=31b95205080bfe7087d7bd41e7fcede2df71baba diff --git a/src/modest-datetime-formatter.c b/src/modest-datetime-formatter.c index d20bf24..7aa9b24 100644 --- a/src/modest-datetime-formatter.c +++ b/src/modest-datetime-formatter.c @@ -31,10 +31,10 @@ #include #ifdef MODEST_TOOLKIT_HILDON2 #include -#include -#include #include #endif +#include +#include "modest-text-utils.h" typedef enum { DATETIME_FORMAT_12H, @@ -116,7 +116,7 @@ modest_datetime_formatter_class_init (ModestDatetimeFormatterClass *klass) G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (ModestDatetimeFormatterClass, format_changed), NULL, NULL, - gtk_marshal_VOID__VOID, + g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } @@ -264,7 +264,7 @@ modest_datetime_formatter_format_time (ModestDatetimeFormatter *self, switch (priv->current_format) { case DATETIME_FORMAT_12H: - format_string = is_pm?_HL("wdgt_12h_time_pm"):_HL("wdgt_12h_time_am"); + format_string = is_pm?_HL("wdgt_va_12h_time_pm"):_HL("wdgt_va_12h_time_am"); break; case DATETIME_FORMAT_24H: format_string = _HL("wdgt_va_24h_time"); @@ -279,6 +279,22 @@ modest_datetime_formatter_format_time (ModestDatetimeFormatter *self, } const gchar * +modest_datetime_formatter_display_long_datetime (ModestDatetimeFormatter *self, + time_t date) +{ + +#define DATE_BUF_DOUBLE_SIZE 128 + + static gchar date_buf[DATE_BUF_DOUBLE_SIZE]; + + snprintf (date_buf, DATE_BUF_DOUBLE_SIZE, + "%s %s", modest_datetime_formatter_format_date (self, date), + modest_datetime_formatter_format_time (self, date)); + + return date_buf; +} + +const gchar * modest_datetime_formatter_display_datetime (ModestDatetimeFormatter *self, time_t date) {