edit-dialog: show/hide Repeat widgets correctly

Currently, the repeat widgets - repeat_duration stack
and combobox are visible even when 'No Repeat' is
selected in repeat combobox.

This patch ensures that the repeat widgets are hidden
when 'No Repeat' is selected. When not selected,
repeat_duration_combo becomes visible which itself takes
care of the visibilty of the stack.

https://bugzilla.gnome.org/show_bug.cgi?id=782755
This commit is contained in:
Yash Singh
2017-07-24 11:44:37 -03:00
committed by Georges Basile Stavracas Neto
parent 6db25eacd6
commit 22fca75548
+11
View File
@@ -518,6 +518,7 @@ repeat_type_changed (GtkComboBox *combobox,
if (has_recurrence)
{
gtk_combo_box_set_active (GTK_COMBO_BOX (self->repeat_duration_combo), GCAL_RECURRENCE_FOREVER);
gtk_widget_show (self->repeat_duration_combo);
gtk_widget_hide (self->repeat_duration_stack);
}
}
@@ -1290,6 +1291,16 @@ gcal_edit_dialog_set_event (GcalEditDialog *dialog,
gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->repeat_duration_combo), limit_type);
gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->repeat_combo), frequency);
if (frequency == GCAL_RECURRENCE_NO_REPEAT)
{
gtk_widget_hide (dialog->repeat_duration_combo);
gtk_widget_hide (dialog->repeat_duration_stack);
}
else
{
gtk_widget_show (dialog->repeat_duration_combo);
}
switch (limit_type)
{
case GCAL_RECURRENCE_COUNT: