[gnome-calendar] search-view: cache locale data
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] search-view: cache locale data
- Date: Fri, 9 Jan 2015 14:28:19 +0000 (UTC)
commit 35db162529ab1420f2b2d52c133f045272d26f49
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Jan 3 21:30:24 2015 -0200
search-view: cache locale data
Time mask will need format_24h info
src/gcal-search-view.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-search-view.c b/src/gcal-search-view.c
index f9e775a..3750060 100644
--- a/src/gcal-search-view.c
+++ b/src/gcal-search-view.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]