week-header: fix initial overflow check

This commit is contained in:
Georges Basile Stavracas Neto
2016-12-08 03:09:35 -02:00
parent 1c48d0a543
commit f50a258f05
2 changed files with 6 additions and 1 deletions
+6
View File
@@ -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)
{