edit-dialog: notify property before manually check sensitivity

When we check start & end time selector's sensitivity before
notifying the property change, the check is overriden by the
binding.

Fix that by performing the checks after the notification of the
property change.
This commit is contained in:
Georges Basile Stavracas Neto
2016-01-04 02:18:19 -02:00
parent b8393209b0
commit 2280a74856
+2 -2
View File
@@ -672,6 +672,8 @@ gcal_edit_dialog_set_writable (GcalEditDialog *dialog,
gtk_button_set_label (GTK_BUTTON (dialog->done_button), writable ? _("Save") : _("Done"));
g_object_notify (G_OBJECT (dialog), "writable");
if (!writable || (writable && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->all_day_check))))
{
gtk_widget_set_sensitive (dialog->start_time_selector, FALSE);
@@ -682,8 +684,6 @@ gcal_edit_dialog_set_writable (GcalEditDialog *dialog,
gtk_widget_set_sensitive (dialog->start_time_selector, TRUE);
gtk_widget_set_sensitive (dialog->end_time_selector, TRUE);
}
g_object_notify (G_OBJECT (dialog), "writable");
}
}