[gnome-calendar] edit-dialog: notify property before manually check sensitivity



commit 2280a74856963730746005fa730237e66b5ea506
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Jan 4 02:16:08 2016 -0200

    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 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gcal-edit-dialog.c b/src/gcal-edit-dialog.c
index 54f47a6..6a9a880 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");
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]