[california] Update explanation when editing RRULE
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california] Update explanation when editing RRULE
- Date: Wed, 24 Sep 2014 21:19:00 +0000 (UTC)
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]