[gnome-calendar/date-selector] date-selector: add gcal_date_selector_use_24h_format function
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/date-selector] date-selector: add gcal_date_selector_use_24h_format function
- Date: Mon, 22 Dec 2014 15:11:10 +0000 (UTC)
commit 00214b50770b70c7da0b58ae705f22672fbf323e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Dec 22 13:10:59 2014 -0200
date-selector: add gcal_date_selector_use_24h_format function
Will be used later on in order to avoid retrieving this value multiple times with GSettings.
src/gcal-date-selector.c | 15 +++++++++++++++
src/gcal-date-selector.h | 3 +++
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-date-selector.c b/src/gcal-date-selector.c
index 31618db..581460e 100644
--- a/src/gcal-date-selector.c
+++ b/src/gcal-date-selector.c
@@ -447,6 +447,21 @@ gcal_date_selector_new (void)
}
void
+gcal_date_selector_use_24h_format (GcalDateSelector *selector,
+ gboolean use_24h_format)
+{
+ GcalDateSelectorPrivate *priv;
+
+ g_return_if_fail (GCAL_IS_DATE_SELECTOR (selector));
+ priv = gcal_date_selector_get_instance_private (selector);
+
+ priv->format_24h = use_24h_format;
+
+ /* update values */
+ gcal_date_selector_set_date (selector, priv->day, priv->month, priv->year);
+}
+
+void
gcal_date_selector_set_date (GcalDateSelector *selector,
gint day,
gint month,
diff --git a/src/gcal-date-selector.h b/src/gcal-date-selector.h
index 99762cd..a335215 100644
--- a/src/gcal-date-selector.h
+++ b/src/gcal-date-selector.h
@@ -54,6 +54,9 @@ GType gcal_date_selector_get_type (void);
GtkWidget* gcal_date_selector_new (void);
+void gcal_date_selector_use_24h_format (GcalDateSelector *selector,
+ gboolean use_24h_format);
+
void gcal_date_selector_set_date (GcalDateSelector *selector,
gint day,
gint month,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]