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:
committed by
Erick Pérez Castellanos
parent
448594325e
commit
fa7bc69192
@@ -703,6 +703,17 @@ gcal_edit_dialog_set_writable (GcalEditDialog *dialog,
|
|||||||
|
|
||||||
gtk_widget_set_sensitive (priv->all_day_check, writable);
|
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),
|
gtk_button_set_label (GTK_BUTTON (priv->done_button),
|
||||||
writable ? _("Save") : _("Done"));
|
writable ? _("Save") : _("Done"));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user