[gnome-calendar/wip/pandusonu/week-view: 4/21] week-header: fix initial overflow check
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/wip/pandusonu/week-view: 4/21] week-header: fix initial overflow check
- Date: Thu, 8 Dec 2016 20:55:04 +0000 (UTC)
commit f50a258f05cb718d9345e7a28c25195d7ec8186c
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Dec 8 00:34:30 2016 -0200
week-header: fix initial overflow check
data/ui/week-header.ui | 1 -
src/views/gcal-week-header.c | 6 ++++++
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/data/ui/week-header.ui b/data/ui/week-header.ui
index 07193e0..5c4c374 100644
--- a/data/ui/week-header.ui
+++ b/data/ui/week-header.ui
@@ -58,7 +58,6 @@
<property name="hexpand">False</property>
<child>
<object class="GtkButton" id="expand_button">
- <property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="halign">center</property>
diff --git a/src/views/gcal-week-header.c b/src/views/gcal-week-header.c
index 72307c5..2a1fb4e 100644
--- a/src/views/gcal-week-header.c
+++ b/src/views/gcal-week-header.c
@@ -252,6 +252,8 @@ update_overflow (GcalWeekHeader *self)
{
gint i;
+ gtk_widget_hide (self->expand_button);
+
for (i = 0; i < 7; i++)
{
GtkWidget *label;
@@ -268,6 +270,10 @@ update_overflow (GcalWeekHeader *self)
text = g_strdup_printf (g_dngettext (GETTEXT_PACKAGE, "Other event", "Other %d events", n_events -
2), n_events - 2);
+ /* Show the button if not visible yet */
+ if (!gtk_widget_get_visible (self->expand_button))
+ gtk_widget_show (self->expand_button);
+
/* TODO: use a button and show an overflow popover */
if (!label)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]