week-header: fix initial overflow check
This commit is contained in:
@@ -58,7 +58,6 @@
|
|||||||
<property name="hexpand">False</property>
|
<property name="hexpand">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="expand_button">
|
<object class="GtkButton" id="expand_button">
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="halign">center</property>
|
<property name="halign">center</property>
|
||||||
|
|||||||
@@ -252,6 +252,8 @@ update_overflow (GcalWeekHeader *self)
|
|||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
|
gtk_widget_hide (self->expand_button);
|
||||||
|
|
||||||
for (i = 0; i < 7; i++)
|
for (i = 0; i < 7; i++)
|
||||||
{
|
{
|
||||||
GtkWidget *label;
|
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);
|
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 */
|
/* TODO: use a button and show an overflow popover */
|
||||||
if (!label)
|
if (!label)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user