[gnome-calendar/search-improvements] search-view: cache locale data
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/search-improvements] search-view: cache locale data
- Date: Sat, 3 Jan 2015 23:30:35 +0000 (UTC)
commit 2f5ce016dfbba094ea6fe74b3bcf4945ef1c5b49
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]