edit-dialog: properly set time selector's sensivity

Instead of simply not settings them at all, it is now set according to the writable and all day values.
This commit is contained in:
Georges Basile Stavracas Neto
2014-12-18 09:55:11 -05:00
committed by Erick Pérez Castellanos
parent 448594325e
commit fa7bc69192
+11
View File
@@ -703,6 +703,17 @@ gcal_edit_dialog_set_writable (GcalEditDialog *dialog,
gtk_widget_set_sensitive (priv->all_day_check, writable);
if (!writable || (writable && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->all_day_check))))
{
gtk_widget_set_sensitive (priv->start_time_selector, FALSE);
gtk_widget_set_sensitive (priv->end_time_selector, FALSE);
}
else
{
gtk_widget_set_sensitive (priv->start_time_selector, TRUE);
gtk_widget_set_sensitive (priv->end_time_selector, TRUE);
}
gtk_button_set_label (GTK_BUTTON (priv->done_button),
writable ? _("Save") : _("Done"));