search-view: cache locale data

Time mask will need format_24h info
This commit is contained in:
Georges Basile Stavracas Neto
2015-01-09 08:36:14 -05:00
committed by Erick Pérez Castellanos
parent 5a32c3794c
commit 35db162529
+13
View File
@@ -24,12 +24,19 @@
#include "gcal-utils.h"
#include "gcal-view.h"
#include <locale.h>
#include <langinfo.h>
#include <glib/gi18n.h>
typedef struct
{
GtkWidget *listbox;
/* misc */
gchar *time_mask;
gchar *date_mask;
/* property */
icaltimetype *date;
GcalManager *manager; /* weak reference */
@@ -174,6 +181,12 @@ gcal_view_interface_init (GcalViewIface *iface)
static void
gcal_search_view_init (GcalSearchView *self)
{
GcalSearchViewPrivate *priv;
priv = gcal_search_view_get_instance_private (self);
priv->date_mask = nl_langinfo (D_FMT);
priv->time_mask = "%H:%M";
}
static void