From 2280a74856963730746005fa730237e66b5ea506 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Mon, 4 Jan 2016 02:16:08 -0200 Subject: [PATCH] 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. --- src/gcal-edit-dialog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c index 54f47a66..6a9a880d 100644 --- a/src/gcal-edit-dialog.c +++ b/src/gcal-edit-dialog.c @@ -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"); } }