[gnome-calendar/time-selector] time-select: hide period selector when not 12h format
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/time-selector] time-select: hide period selector when not 12h format
- Date: Wed, 17 Dec 2014 16:04:02 +0000 (UTC)
commit fcfee50c57ac4dd928bcc5dbff952586951987fe
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Dec 17 14:03:48 2014 -0200
time-select: hide period selector when not 12h format
data/ui/time-selector.ui | 8 ++++++--
src/gcal-time-selector.c | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/time-selector.ui b/data/ui/time-selector.ui
index 1e2ab42..c3b82ae 100644
--- a/data/ui/time-selector.ui
+++ b/data/ui/time-selector.ui
@@ -55,10 +55,14 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="period_combo">
- <property name="visible">True</property>
+ <object class="GtkComboBoxText" id="period_combo">
+ <property name="visible">False</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
+ <items>
+ <item translatable="yes">AM</item>
+ <item translatable="yes">PM</item>
+ </items>
</object>
<packing>
<property name="left_attach">3</property>
diff --git a/src/gcal-time-selector.c b/src/gcal-time-selector.c
index d1070c9..e5e3afd 100644
--- a/src/gcal-time-selector.c
+++ b/src/gcal-time-selector.c
@@ -146,6 +146,7 @@ gcal_time_selector_constructed (GObject *object)
g_object_ref (priv->minute_spin);
priv->period_combo = (GtkWidget*) gtk_builder_get_object (builder, "period_combo");
+ gtk_widget_set_visible (priv->period_combo, !priv->format_24h);
g_object_ref (priv->period_combo);
g_object_unref (builder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]