[california] Update explanation when editing RRULE



commit 35177167b1f1a80e8577517734c685db5644ee67
Author: Jim Nelson <jim yorba org>
Date:   Wed Sep 24 14:18:33 2014 -0700

    Update explanation when editing RRULE

 src/host/host-create-update-event.vala |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/host/host-create-update-event.vala b/src/host/host-create-update-event.vala
index c43363c..831b34d 100644
--- a/src/host/host-create-update-event.vala
+++ b/src/host/host-create-update-event.vala
@@ -158,11 +158,13 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
         location_entry.text = event.location ?? "";
         description_textview.buffer.text = event.description ?? "";
         
+        Component.Event master = event.is_master_instance ? event : (Component.Event) event.master;
+        
         // if RecurrenceRule.explain() returns null, means it cannot express the RRULE, which
         // should be made clear here
         string? explanation = null;
-        if (event.rrule != null) {
-            explanation = event.rrule.explain(event.get_event_date_span(Calendar.Timezone.local).start_date);
+        if (master.rrule != null) {
+            explanation = 
master.rrule.explain(master.get_event_date_span(Calendar.Timezone.local).start_date);
             if (explanation == null)
                 explanation = _("It's complicated…");
         }


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