[california] Ensure time adjustment widgets remain insensitive



commit c1caaaa37759782fc8048e8215af9f534216f513
Author: Jim Nelson <jim yorba org>
Date:   Thu Aug 7 13:36:25 2014 -0700

    Ensure time adjustment widgets remain insensitive
    
    If the calendar date was adjusted while all-day is selected, the
    time adjustment widgets would become sensitive.  This prevents that.

 src/host/host-date-time-widget.vala |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/host/host-date-time-widget.vala b/src/host/host-date-time-widget.vala
index 5556b13..081d161 100644
--- a/src/host/host-date-time-widget.vala
+++ b/src/host/host-date-time-widget.vala
@@ -131,6 +131,12 @@ public class DateTimeWidget : Gtk.Box {
     // Determine if the up/down adjustments should be sensitive (if they're next value is valid)
     private bool transform_adjustment_widget_to_sensitive(Binding binding, Value source_value,
         ref Value target_value) {
+        if (!enable_time) {
+            target_value = false;
+            
+            return true;
+        }
+        
         int amount;
         Calendar.TimeUnit time_unit;
         if (!adjust_time_controls((Gtk.Widget) binding.target, out amount, out time_unit))


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