[gnome-calendar] date-selector: show Day, Month and Year labels according to it's position
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] date-selector: show Day, Month and Year labels according to it's position
- Date: Tue, 23 Dec 2014 17:06:47 +0000 (UTC)
commit bfc6e37595c88f67817f998c1bb6ea471a615d82
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun Dec 21 15:15:37 2014 -0200
date-selector: show Day, Month and Year labels according to it's position
data/ui/date-selector.ui | 6 ++++--
src/gcal-date-selector.c | 16 ++++++++++++++++
2 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/date-selector.ui b/data/ui/date-selector.ui
index fa84cce..e5a990b 100644
--- a/data/ui/date-selector.ui
+++ b/data/ui/date-selector.ui
@@ -18,7 +18,8 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">3</property>
</packing>
</child>
<child>
@@ -82,7 +83,8 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">3</property>
</packing>
</child>
</object>
diff --git a/src/gcal-date-selector.c b/src/gcal-date-selector.c
index 37ffb4f..5174fae 100644
--- a/src/gcal-date-selector.c
+++ b/src/gcal-date-selector.c
@@ -337,6 +337,7 @@ gcal_date_selector_constructed (GObject *object)
{
GcalDateSelectorPrivate *priv;
GtkWidget *grid;
+ GtkWidget *label;
GtkBuilder *builder;
GSettings *settings;
@@ -390,6 +391,11 @@ gcal_date_selector_constructed (GObject *object)
g_object_ref (priv->entries[DAY]);
g_free (entry_name);
+ label = gtk_label_new (_("Day"));
+ gtk_widget_show (label);
+ gtk_style_context_add_class (gtk_widget_get_style_context (label), "dim-label");
+ gtk_grid_attach (GTK_GRID (grid), label, priv->day_pos, 0, 1, 1);
+
/* month entry */
entry_name = g_strdup_printf ("entry%d", priv->month_pos);
@@ -398,6 +404,11 @@ gcal_date_selector_constructed (GObject *object)
g_object_ref (priv->entries[MONTH]);
g_free (entry_name);
+ label = gtk_label_new (_("Month"));
+ gtk_widget_show (label);
+ gtk_style_context_add_class (gtk_widget_get_style_context (label), "dim-label");
+ gtk_grid_attach (GTK_GRID (grid), label, priv->month_pos, 0, 1, 1);
+
/* year entry */
entry_name = g_strdup_printf ("entry%d", priv->year_pos);
@@ -409,6 +420,11 @@ gcal_date_selector_constructed (GObject *object)
g_free (entry_name);
+ label = gtk_label_new (_("Year"));
+ gtk_widget_show (label);
+ gtk_style_context_add_class (gtk_widget_get_style_context (label), "dim-label");
+ gtk_grid_attach (GTK_GRID (grid), label, priv->year_pos, 0, 1, 1);
+
/* signals and properties */
gtk_container_add (GTK_CONTAINER (priv->popover), grid);
g_object_bind_property (priv->popover, "visible", object, "active", G_BINDING_BIDIRECTIONAL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]