[california] Move event editor into its own source unit



commit cb1a8bee3adbd8865206d045dc87ec0bbd65195d
Author: Jim Nelson <jim yorba org>
Date:   Fri Nov 21 13:17:20 2014 -0800

    Move event editor into its own source unit
    
    The event editor was growing into a big boy and deserves its own
    source unit for better organization.  The classes/filenames have
    better names now and the .ui files are renamed to match their classes.

 po/POTFILES.in                                     |   18 +++++----
 po/POTFILES.skip                                   |    7 +++-
 src/Makefile.am                                    |   23 +++++++-----
 src/california-resources.xml                       |   14 ++++----
 .../event-editor-attendees-card.vala}              |   12 +++---
 .../event-editor-date-time-card.vala}              |   14 ++++----
 .../event-editor-date-time-widget.vala}            |    4 +-
 src/event-editor/event-editor-deck.vala            |   33 ++++++++++++++++++
 .../event-editor-main-card.vala}                   |   36 +++++++++----------
 .../event-editor-recurring-card.vala}              |   12 +++---
 src/event-editor/event-editor.vala                 |   34 ++++++++++++++++++
 src/host/host-main-window.vala                     |   21 +-----------
 src/host/host.vala                                 |    8 ++++-
 ...es-editor.ui => event-editor-attendees-card.ui} |   14 ++++----
 ...-settings.ui => event-editor-date-time-card.ui} |    6 ++--
 ...-widget.ui => event-editor-date-time-widget.ui} |    2 +-
 ...e-update-event.ui => event-editor-main-card.ui} |    8 ++--
 ...recurring.ui => event-editor-recurring-card.ui} |   30 ++++++++--------
 18 files changed, 178 insertions(+), 118 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index d286503..6695674 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -15,9 +15,11 @@ src/calendar/calendar-exact-time-span.vala
 src/calendar/calendar.vala
 src/component/component.vala
 src/component/component-recurrence-rule.vala
-src/host/host-attendees-editor.vala
-src/host/host-create-update-event.vala
-src/host/host-create-update-recurring.vala
+src/event-editor/event-editor-attendees-card.vala
+src/event-editor/event-editor-date-time-card.vala
+src/event-editor/event-editor-date-time-widget.vala
+src/event-editor/event-editor-main-card.vala
+src/event-editor/event-editor-recurring-card.vala
 src/host/host-import-calendar.vala
 src/host/host-main-window.vala
 src/host/host-quick-create-event.vala
@@ -28,14 +30,14 @@ src/view/month/month-controller.vala
 src/view/week/week-controller.vala
 [type: gettext/glade]src/rc/activator-list.ui
 [type: gettext/glade]src/rc/app-menu.interface
-[type: gettext/glade]src/rc/attendees-editor.ui
 [type: gettext/glade]src/rc/calendar-import.ui
 [type: gettext/glade]src/rc/calendar-manager-list-item.ui
 [type: gettext/glade]src/rc/calendar-manager-list.ui
-[type: gettext/glade]src/rc/create-update-event.ui
-[type: gettext/glade]src/rc/create-update-recurring.ui
-[type: gettext/glade]src/rc/date-time-widget.ui
-[type: gettext/glade]src/rc/event-time-settings.ui
+[type: gettext/glade]src/rc/event-editor-attendees-card.ui
+[type: gettext/glade]src/rc/event-editor-date-time-card.ui
+[type: gettext/glade]src/rc/event-editor-date-time-widget.ui
+[type: gettext/glade]src/rc/event-editor-main-card.ui
+[type: gettext/glade]src/rc/event-editor-recurring-card.ui
 [type: gettext/glade]src/rc/generic-subscribe.ui
 [type: gettext/glade]src/rc/google-authenticating.ui
 [type: gettext/glade]src/rc/google-calendar-list.ui
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 4c5659f..05f7413 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -13,8 +13,11 @@ src/calendar/calendar-exact-time-span.c
 src/component/component.c
 src/component/component-event.c
 src/component/component-recurrence-rule.c
-src/host/host-attendees-editor.c
-src/host/host-create-update-event.c
+src/event-editor/event-editor-attendees-card.c
+src/event-editor/event-editor-date-time-card.c
+src/event-editor/event-editor-date-time-widget.c
+src/event-editor/event-editor-main-card.c
+src/event-editor/event-editor-recurring-card.c
 src/host/host-import-calendar.c
 src/host/host-main-window.c
 src/host/host-quick-create-event.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 2dd4438..c77e94d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -96,13 +96,16 @@ california_VALASOURCES = \
        component/component-uid.vala \
        component/component-vtype.vala \
        \
+       event-editor/event-editor.vala \
+       event-editor/event-editor-attendees-card.vala \
+       event-editor/event-editor-date-time-card.vala \
+       event-editor/event-editor-date-time-widget.vala \
+       event-editor/event-editor-deck.vala \
+       event-editor/event-editor-main-card.vala \
+       event-editor/event-editor-recurring-card.vala \
+       \
        host/host.vala \
-       host/host-attendees-editor.vala \
        host/host-calendar-list-item.vala \
-       host/host-create-update-event.vala \
-       host/host-create-update-recurring.vala \
-       host/host-date-time-widget.vala \
-       host/host-event-time-settings.vala \
        host/host-import-calendar.vala \
        host/host-main-window.vala \
        host/host-main-window-title.vala \
@@ -194,15 +197,15 @@ california_SOURCES = \
 california_RC = \
        rc/activator-list.ui \
        rc/app-menu.interface \
-       rc/attendees-editor.ui \
        rc/calendar-import.ui \
        rc/calendar-list-item.ui \
        rc/calendar-manager-list.ui \
        rc/calendar-manager-list-item.ui \
-       rc/create-update-event.ui \
-       rc/create-update-recurring.ui \
-       rc/date-time-widget.ui \
-       rc/event-time-settings.ui \
+       rc/event-editor-attendees-card.ui \
+       rc/event-editor-date-time-card.ui \
+       rc/event-editor-date-time-widget.ui \
+       rc/event-editor-main-card.ui \
+       rc/event-editor-recurring-card.ui \
        rc/generic-subscribe.ui \
        rc/google-authenticating.ui \
        rc/google-calendar-list.ui \
diff --git a/src/california-resources.xml b/src/california-resources.xml
index dd29fad..75d9909 100644
--- a/src/california-resources.xml
+++ b/src/california-resources.xml
@@ -7,9 +7,6 @@
         <file compressed="true">rc/app-menu.interface</file>
     </gresource>
     <gresource prefix="/org/yorba/california">
-        <file compressed="true">rc/attendees-editor.ui</file>
-    </gresource>
-    <gresource prefix="/org/yorba/california">
         <file compressed="true">rc/calendar-import.ui</file>
     </gresource>
     <gresource prefix="/org/yorba/california">
@@ -22,16 +19,19 @@
         <file compressed="false">rc/calendar-manager-list-item.ui</file>
     </gresource>
     <gresource prefix="/org/yorba/california">
-        <file compressed="false">rc/create-update-event.ui</file>
+        <file compressed="true">rc/event-editor-attendees-card.ui</file>
+    </gresource>
+    <gresource prefix="/org/yorba/california">
+        <file compressed="false">rc/event-editor-date-time-card.ui</file>
     </gresource>
     <gresource prefix="/org/yorba/california">
-        <file compressed="false">rc/create-update-recurring.ui</file>
+        <file compressed="false">rc/event-editor-date-time-widget.ui</file>
     </gresource>
     <gresource prefix="/org/yorba/california">
-        <file compressed="false">rc/date-time-widget.ui</file>
+        <file compressed="false">rc/event-editor-main-card.ui</file>
     </gresource>
     <gresource prefix="/org/yorba/california">
-        <file compressed="false">rc/event-time-settings.ui</file>
+        <file compressed="false">rc/event-editor-recurring-card.ui</file>
     </gresource>
     <gresource prefix="/org/yorba/california">
         <file compressed="true">rc/generic-subscribe.ui</file>
diff --git a/src/host/host-attendees-editor.vala b/src/event-editor/event-editor-attendees-card.vala
similarity index 96%
rename from src/host/host-attendees-editor.vala
rename to src/event-editor/event-editor-attendees-card.vala
index 0b8024a..fa3566c 100644
--- a/src/host/host-attendees-editor.vala
+++ b/src/event-editor/event-editor-attendees-card.vala
@@ -4,11 +4,11 @@
  * (version 2.1 or later).  See the COPYING file in this distribution.
  */
 
-namespace California.Host {
+namespace California.EventEditor {
 
-[GtkTemplate (ui = "/org/yorba/california/rc/attendees-editor.ui")]
-public class AttendeesEditor : Gtk.Box, Toolkit.Card {
-    private const string ID = "CaliforniaHostAttendeesEditor";
+[GtkTemplate (ui = "/org/yorba/california/rc/event-editor-attendees-card.ui")]
+public class AttendeesCard : Gtk.Box, Toolkit.Card {
+    private const string ID = "CaliforniaEventEditorAttendees";
     
     private class Message : Object {
         public Component.Event event;
@@ -86,7 +86,7 @@ public class AttendeesEditor : Gtk.Box, Toolkit.Card {
     private Toolkit.ListBoxModel<Component.Person> guest_model;
     private Toolkit.EntryClearTextConnector entry_clear_connector = new Toolkit.EntryClearTextConnector();
     
-    public AttendeesEditor() {
+    public AttendeesCard() {
         guest_model = new Toolkit.ListBoxModel<Component.Person>(guest_listbox, model_presentation);
         
         organizer_entry.bind_property("text", accept_button, "sensitive", BindingFlags.SYNC_CREATE,
@@ -227,7 +227,7 @@ public class AttendeesEditor : Gtk.Box, Toolkit.Card {
         event.clear_attendees();
         event.add_attendees(guest_model.all());
         
-        jump_to_card_by_id(CreateUpdateEvent.ID, event);
+        jump_to_card_by_id(MainCard.ID, event);
     }
     
     [GtkCallback]
diff --git a/src/host/host-event-time-settings.vala b/src/event-editor/event-editor-date-time-card.vala
similarity index 96%
rename from src/host/host-event-time-settings.vala
rename to src/event-editor/event-editor-date-time-card.vala
index 917623a..9558a5a 100644
--- a/src/host/host-event-time-settings.vala
+++ b/src/event-editor/event-editor-date-time-card.vala
@@ -4,11 +4,11 @@
  * (version 2.1 or later).  See the COPYING file in this distribution.
  */
 
-namespace California.Host {
+namespace California.EventEditor {
 
-[GtkTemplate (ui = "/org/yorba/california/rc/event-time-settings.ui")]
-public class EventTimeSettings : Gtk.Box, Toolkit.Card {
-    public const string ID = "CaliforniaHostEventTimeSettings";
+[GtkTemplate (ui = "/org/yorba/california/rc/event-editor-date-time-card.ui")]
+public class DateTimeCard : Gtk.Box, Toolkit.Card {
+    public const string ID = "CaliforniaEventEditorDateTime";
     
     public class Message : Object {
         public Calendar.DateSpan? date_span { get; private set; default = null; }
@@ -76,7 +76,7 @@ public class EventTimeSettings : Gtk.Box, Toolkit.Card {
     private DateTimeWidget to_widget = new DateTimeWidget();
     private Calendar.Duration duration = new Calendar.Duration();
     
-    public EventTimeSettings() {
+    public DateTimeCard() {
         // need to manually pack the date/time widgets
         from_box.pack_start(from_widget);
         to_box.pack_start(to_widget);
@@ -100,7 +100,7 @@ public class EventTimeSettings : Gtk.Box, Toolkit.Card {
         Calendar.System.instance.is_24hr_changed.connect(on_update_summary);
     }
     
-    ~EventTimeSettings() {
+    ~DateTimeCard() {
         Calendar.System.instance.is_24hr_changed.disconnect(on_update_summary);
     }
     
@@ -159,7 +159,7 @@ public class EventTimeSettings : Gtk.Box, Toolkit.Card {
         else
             message.reset_exact_time_span(get_exact_time_span());
         
-        jump_to_card_by_id(CreateUpdateEvent.ID, message);
+        jump_to_card_by_id(MainCard.ID, message);
     }
     
     private void freeze_widget_notifications() {
diff --git a/src/host/host-date-time-widget.vala b/src/event-editor/event-editor-date-time-widget.vala
similarity index 99%
rename from src/host/host-date-time-widget.vala
rename to src/event-editor/event-editor-date-time-widget.vala
index fdc49da..3e5a742 100644
--- a/src/host/host-date-time-widget.vala
+++ b/src/event-editor/event-editor-date-time-widget.vala
@@ -4,9 +4,9 @@
  * (version 2.1 or later).  See the COPYING file in this distribution.
  */
 
-namespace California.Host {
+namespace California.EventEditor {
 
-[GtkTemplate (ui = "/org/yorba/california/rc/date-time-widget.ui")]
+[GtkTemplate (ui = "/org/yorba/california/rc/event-editor-date-time-widget.ui")]
 public class DateTimeWidget : Gtk.Box {
     public const string PROP_ENABLE_TIME = "enable-time";
     public const string PROP_ENABLE_DATE = "enable-date";
diff --git a/src/event-editor/event-editor-deck.vala b/src/event-editor/event-editor-deck.vala
new file mode 100644
index 0000000..bda1143
--- /dev/null
+++ b/src/event-editor/event-editor-deck.vala
@@ -0,0 +1,33 @@
+/* Copyright 2014 Yorba Foundation
+ *
+ * This software is licensed under the GNU Lesser General Public License
+ * (version 2.1 or later).  See the COPYING file in this distribution.
+ */
+
+namespace California.EventEditor {
+
+public class Deck : Toolkit.Deck {
+    public new Component.Event event { get; private set; }
+    
+    /**
+     * Although this { link Toolkit.Deck} treats all { link Component.Event}s as being edited,
+     * is_update should be used to indicate to the user if a create or update is occurring.
+     */
+    public Deck(Component.Event event, bool is_update) {
+        this.event = event;
+        
+        MainCard main_card = new MainCard();
+        main_card.is_update = is_update;
+        
+        add_cards(
+            iterate<Toolkit.Card>(main_card, new RecurringCard(), new DateTimeCard(), new AttendeesCard())
+                .to_array_list()
+        );
+        
+        // "initialize" the Deck with the Event
+        go_home(event);
+    }
+}
+
+}
+
diff --git a/src/host/host-create-update-event.vala b/src/event-editor/event-editor-main-card.vala
similarity index 95%
rename from src/host/host-create-update-event.vala
rename to src/event-editor/event-editor-main-card.vala
index b8e5624..604681a 100644
--- a/src/host/host-create-update-event.vala
+++ b/src/event-editor/event-editor-main-card.vala
@@ -4,18 +4,16 @@
  * (version 2.1 or later).  See the COPYING file in this distribution.
  */
 
-namespace California.Host {
+namespace California.EventEditor {
 
 /**
- * A blank "form" of widgets for the user to enter or update event details.
- *
- * Message IN: If creating a new event, send Component.Event.blank() (pre-filled with any known
- * details).  If updating an existing event, send Component.Event.clone().
+ * A blank "form" of widgets for the user to enter or update event details that relies on other
+ * { link Toolkit.Card}s in the { link Toolkit.Deck} to perform more sophisticated editing.
  */
 
-[GtkTemplate (ui = "/org/yorba/california/rc/create-update-event.ui")]
-public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
-    public const string ID = "CreateUpdateEvent";
+[GtkTemplate (ui = "/org/yorba/california/rc/event-editor-main-card.ui")]
+public class MainCard : Gtk.Grid, Toolkit.Card {
+    public const string ID = "CaliforniaEventEditorMainCard";
     
     private const int START_HOUR = 0;
     private const int END_HOUR = 23;
@@ -65,7 +63,7 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
     public bool is_update { get; set; default = false; }
     
     private new Component.Event event = new Component.Event.blank();
-    private EventTimeSettings.Message? dt = null;
+    private DateTimeCard.Message? dt = null;
     private Toolkit.ComboBoxTextModel<Backing.CalendarSource> calendar_model;
     
     private Toolkit.RotatingButtonBox rotating_button_box = new Toolkit.RotatingButtonBox();
@@ -77,7 +75,7 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
     private Gtk.Button update_this_button = new Gtk.Button.with_mnemonic(_("Save _This Event"));
     private Gtk.Button cancel_recurring_button = new Gtk.Button.with_mnemonic(_("_Cancel"));
     
-    public CreateUpdateEvent() {
+    public MainCard() {
         // create button is active only if summary is filled out; all other fields (so far)
         // guarantee valid values at all times
         clear_text_connector.connect_to(summary_entry);
@@ -87,7 +85,7 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
         clear_text_connector.connect_to(location_entry);
         
         // use model to control calendars combo box
-        calendar_model = build_calendar_source_combo_model(calendar_combo);
+        calendar_model = Host.build_calendar_source_combo_model(calendar_combo);
         
         accept_button.can_default = true;
         accept_button.has_default = true;
@@ -125,7 +123,7 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
         Calendar.System.instance.is_24hr_changed.connect(on_update_time_summary);
     }
     
-    ~CreateUpdateEvent() {
+    ~MainCard() {
         Calendar.System.instance.is_24hr_changed.disconnect(on_update_time_summary);
     }
     
@@ -140,12 +138,12 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
         if (message == null)
             return;
         
-        if (message.type() == typeof(EventTimeSettings.Message)) {
-            dt = (EventTimeSettings.Message) message;
+        if (message.type() == typeof(DateTimeCard.Message)) {
+            dt = (DateTimeCard.Message) message;
         } else {
             event = (Component.Event) message;
             if (dt == null)
-                dt = new EventTimeSettings.Message.from_event(event);
+                dt = new DateTimeCard.Message.from_event(event);
         }
         
         update_controls();
@@ -260,24 +258,24 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
         update_component(event, true);
         
         // send off to recurring editor
-        jump_to_card_by_id(CreateUpdateRecurring.ID, event);
+        jump_to_card_by_id(RecurringCard.ID, event);
     }
     
     [GtkCallback]
     private void on_edit_time_button_clicked() {
         if (dt == null)
-            dt = new EventTimeSettings.Message.from_event(event);
+            dt = new DateTimeCard.Message.from_event(event);
         
         // save changes with what's in the component now
         update_component(event, true);
         
-        jump_to_card_by_id(EventTimeSettings.ID, dt);
+        jump_to_card_by_id(DateTimeCard.ID, dt);
     }
     
     [GtkCallback]
     private void on_attendees_button_clicked() {
         if (calendar_model.active != null)
-            AttendeesEditor.pass_message(this, event, calendar_model.active);
+            AttendeesCard.pass_message(this, event, calendar_model.active);
     }
     
     private void on_accept_button_clicked() {
diff --git a/src/host/host-create-update-recurring.vala b/src/event-editor/event-editor-recurring-card.vala
similarity index 98%
rename from src/host/host-create-update-recurring.vala
rename to src/event-editor/event-editor-recurring-card.vala
index 7fec886..16a29c5 100644
--- a/src/host/host-create-update-recurring.vala
+++ b/src/event-editor/event-editor-recurring-card.vala
@@ -4,11 +4,11 @@
  * (version 2.1 or later).  See the COPYING file in this distribution.
  */
 
-namespace California.Host {
+namespace California.EventEditor {
 
-[GtkTemplate (ui = "/org/yorba/california/rc/create-update-recurring.ui")]
-public class CreateUpdateRecurring : Gtk.Grid, Toolkit.Card {
-    public const string ID = "CreateUpdateRecurring";
+[GtkTemplate (ui = "/org/yorba/california/rc/event-editor-recurring-card.ui")]
+public class RecurringCard : Gtk.Grid, Toolkit.Card {
+    public const string ID = "CaliforniaEventEditorRecurringCard";
     
     private const string PROP_START_DATE = "start-date";
     private const string PROP_END_DATE = "end-date";
@@ -112,7 +112,7 @@ public class CreateUpdateRecurring : Gtk.Grid, Toolkit.Card {
         Calendar.DayOfWeek, Gtk.CheckButton>();
     private Toolkit.EntryFilterConnector numeric_filter = new Toolkit.EntryFilterConnector.only_numeric();
     
-    public CreateUpdateRecurring() {
+    public RecurringCard() {
         // "Repeating event" checkbox activates almost every other control in this dialog
         make_recurring_checkbutton.bind_property("active", child_grid, "sensitive",
             BindingFlags.SYNC_CREATE);
@@ -492,7 +492,7 @@ public class CreateUpdateRecurring : Gtk.Grid, Toolkit.Card {
     [GtkCallback]
     private void on_ok_button_clicked() {
         update_master();
-        jump_to_card_by_id(CreateUpdateEvent.ID, event);
+        jump_to_card_by_id(MainCard.ID, event);
     }
     
     private bool can_make_rrule() {
diff --git a/src/event-editor/event-editor.vala b/src/event-editor/event-editor.vala
new file mode 100644
index 0000000..f550e7e
--- /dev/null
+++ b/src/event-editor/event-editor.vala
@@ -0,0 +1,34 @@
+/* Copyright 2014 Yorba Foundation
+ *
+ * This software is licensed under the GNU Lesser General Public License
+ * (version 2.1 or later).  See the COPYING file in this distribution.
+ */
+
+namespace California.EventEditor {
+
+private int init_count = 0;
+
+public void init() throws Error {
+    if (!Unit.do_init(ref init_count))
+        return;
+    
+    Toolkit.init();
+    Calendar.init();
+    Backing.init();
+    Component.init();
+    Host.init();
+}
+
+public void terminate() {
+    if (!Unit.do_terminate(ref init_count))
+        return;
+    
+    Host.terminate();
+    Component.terminate();
+    Backing.terminate();
+    Calendar.terminate();
+    Toolkit.terminate();
+}
+
+}
+
diff --git a/src/host/host-main-window.vala b/src/host/host-main-window.vala
index 55ad35f..936f86f 100644
--- a/src/host/host-main-window.vala
+++ b/src/host/host-main-window.vala
@@ -509,26 +509,7 @@ public class MainWindow : Gtk.ApplicationWindow {
             return;
         }
         
-        CreateUpdateEvent create_update = new CreateUpdateEvent();
-        create_update.is_update = is_update;
-        
-        CreateUpdateRecurring create_update_recurring = new CreateUpdateRecurring();
-        
-        EventTimeSettings event_time_settings = new EventTimeSettings();
-        
-        AttendeesEditor attendees_editor = new AttendeesEditor();
-        
-        Toolkit.Deck deck = new Toolkit.Deck();
-        deck.add_cards(
-            iterate<Toolkit.Card>(create_update, create_update_recurring, event_time_settings,
-                attendees_editor)
-            .to_array_list()
-        );
-        
-        // "initialize" the Deck with the requested Event
-        deck.go_home(clone);
-        
-        show_deck_window(deck);
+        show_deck_window(new EventEditor.Deck(clone, is_update));
     }
 }
 
diff --git a/src/host/host.vala b/src/host/host.vala
index 0e5d330..e8f58a9 100644
--- a/src/host/host.vala
+++ b/src/host/host.vala
@@ -24,12 +24,14 @@ public void init() throws Error {
     Calendar.init();
     Toolkit.init();
     Component.init();
+    EventEditor.init();
 }
 
 public void terminate() {
     if (!Unit.do_terminate(ref init_count))
         return;
     
+    EventEditor.terminate();
     Component.terminate();
     View.terminate();
     Backing.terminate();
@@ -37,7 +39,11 @@ public void terminate() {
     Toolkit.terminate();
 }
 
-private Toolkit.ComboBoxTextModel<Backing.CalendarSource> build_calendar_source_combo_model(
+/**
+ * Returns a { link Toolkit.ComboBoxTextModel} holding all the available and visible
+ * { link Backing.CalendarSource}s.
+ */
+public Toolkit.ComboBoxTextModel<Backing.CalendarSource> build_calendar_source_combo_model(
     Gtk.ComboBoxText combo, bool include_invisible = false, bool include_read_only = false) {
     Toolkit.ComboBoxTextModel<Backing.CalendarSource> model = new 
Toolkit.ComboBoxTextModel<Backing.CalendarSource>(
         combo, (calendar) => {
diff --git a/src/rc/attendees-editor.ui b/src/rc/event-editor-attendees-card.ui
similarity index 94%
rename from src/rc/attendees-editor.ui
rename to src/rc/event-editor-attendees-card.ui
index 81277c9..7904a69 100644
--- a/src/rc/attendees-editor.ui
+++ b/src/rc/event-editor-attendees-card.ui
@@ -2,7 +2,7 @@
 <!-- Generated with glade 3.18.3 -->
 <interface>
   <requires lib="gtk+" version="3.12"/>
-  <template class="CaliforniaHostAttendeesEditor" parent="GtkBox">
+  <template class="CaliforniaEventEditorAttendeesCard" parent="GtkBox">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="orientation">vertical</property>
@@ -74,8 +74,8 @@
                 <property name="activates_default">True</property>
                 <property name="placeholder_text" translatable="yes">Email address</property>
                 <property name="input_purpose">email</property>
-                <signal name="focus-in-event" handler="on_add_guest_entry_focus_in_event" 
object="CaliforniaHostAttendeesEditor" swapped="no"/>
-                <signal name="focus-out-event" handler="on_add_guest_entry_focus_out_event" 
object="CaliforniaHostAttendeesEditor" swapped="no"/>
+                <signal name="focus-in-event" handler="on_add_guest_entry_focus_in_event" 
object="CaliforniaEventEditorAttendeesCard" swapped="no"/>
+                <signal name="focus-out-event" handler="on_add_guest_entry_focus_out_event" 
object="CaliforniaEventEditorAttendeesCard" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">True</property>
@@ -93,7 +93,7 @@
                 <property name="receives_default">True</property>
                 <property name="use_underline">True</property>
                 <property name="xalign">0.60000002384185791</property>
-                <signal name="clicked" handler="on_add_guest_button_clicked" 
object="CaliforniaHostAttendeesEditor" swapped="no"/>
+                <signal name="clicked" handler="on_add_guest_button_clicked" 
object="CaliforniaEventEditorAttendeesCard" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -116,7 +116,7 @@
             <property name="receives_default">True</property>
             <property name="halign">end</property>
             <property name="use_underline">True</property>
-            <signal name="clicked" handler="on_remove_guest_button_clicked" 
object="CaliforniaHostAttendeesEditor" swapped="no"/>
+            <signal name="clicked" handler="on_remove_guest_button_clicked" 
object="CaliforniaEventEditorAttendeesCard" swapped="no"/>
           </object>
           <packing>
             <property name="left_attach">1</property>
@@ -194,7 +194,7 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
-            <signal name="clicked" handler="on_cancel_button_clicked" object="CaliforniaHostAttendeesEditor" 
swapped="no"/>
+            <signal name="clicked" handler="on_cancel_button_clicked" 
object="CaliforniaEventEditorAttendeesCard" swapped="no"/>
           </object>
           <packing>
             <property name="expand">True</property>
@@ -210,7 +210,7 @@
             <property name="can_default">True</property>
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
-            <signal name="clicked" handler="on_accept_button_clicked" object="CaliforniaHostAttendeesEditor" 
swapped="no"/>
+            <signal name="clicked" handler="on_accept_button_clicked" 
object="CaliforniaEventEditorAttendeesCard" swapped="no"/>
             <style>
               <class name="suggested-action"/>
             </style>
diff --git a/src/rc/event-time-settings.ui b/src/rc/event-editor-date-time-card.ui
similarity index 96%
rename from src/rc/event-time-settings.ui
rename to src/rc/event-editor-date-time-card.ui
index 41a38cc..1707670 100644
--- a/src/rc/event-time-settings.ui
+++ b/src/rc/event-editor-date-time-card.ui
@@ -2,7 +2,7 @@
 <!-- Generated with glade 3.16.1 -->
 <interface>
   <requires lib="gtk+" version="3.10"/>
-  <template class="CaliforniaHostEventTimeSettings" parent="GtkBox">
+  <template class="CaliforniaEventEditorDateTimeCard" parent="GtkBox">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="orientation">vertical</property>
@@ -117,7 +117,7 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
-            <signal name="clicked" handler="on_cancel_button_clicked" 
object="CaliforniaHostEventTimeSettings" swapped="no"/>
+            <signal name="clicked" handler="on_cancel_button_clicked" 
object="CaliforniaEventEditorDateTimeCard" swapped="no"/>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -132,7 +132,7 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
-            <signal name="clicked" handler="on_ok_button_clicked" object="CaliforniaHostEventTimeSettings" 
swapped="no"/>
+            <signal name="clicked" handler="on_ok_button_clicked" object="CaliforniaEventEditorDateTimeCard" 
swapped="no"/>
             <style>
               <class name="suggested-action"/>
             </style>
diff --git a/src/rc/date-time-widget.ui b/src/rc/event-editor-date-time-widget.ui
similarity index 99%
rename from src/rc/date-time-widget.ui
rename to src/rc/event-editor-date-time-widget.ui
index 4fbf1d7..cdde9bd 100644
--- a/src/rc/date-time-widget.ui
+++ b/src/rc/event-editor-date-time-widget.ui
@@ -2,7 +2,7 @@
 <!-- Generated with glade 3.16.1 -->
 <interface>
   <requires lib="gtk+" version="3.10"/>
-  <template class="CaliforniaHostDateTimeWidget" parent="GtkBox">
+  <template class="CaliforniaEventEditorDateTimeWidget" parent="GtkBox">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="halign">center</property>
diff --git a/src/rc/create-update-event.ui b/src/rc/event-editor-main-card.ui
similarity index 98%
rename from src/rc/create-update-event.ui
rename to src/rc/event-editor-main-card.ui
index de2bd36..9b87fee 100644
--- a/src/rc/create-update-event.ui
+++ b/src/rc/event-editor-main-card.ui
@@ -2,7 +2,7 @@
 <!-- Generated with glade 3.18.3 -->
 <interface>
   <requires lib="gtk+" version="3.10"/>
-  <template class="CaliforniaHostCreateUpdateEvent" parent="GtkGrid">
+  <template class="CaliforniaEventEditorMainCard" parent="GtkGrid">
     <property name="name">grid</property>
     <property name="visible">True</property>
     <property name="can_focus">False</property>
@@ -80,7 +80,7 @@
             <property name="receives_default">True</property>
             <property name="tooltip_text" translatable="yes">Set the start and end time</property>
             <property name="relief">none</property>
-            <signal name="clicked" handler="on_edit_time_button_clicked" 
object="CaliforniaHostCreateUpdateEvent" swapped="no"/>
+            <signal name="clicked" handler="on_edit_time_button_clicked" 
object="CaliforniaEventEditorMainCard" swapped="no"/>
             <child>
               <object class="GtkImage" id="image1">
                 <property name="visible">True</property>
@@ -141,7 +141,7 @@
             <property name="receives_default">True</property>
             <property name="tooltip_text" translatable="yes">Add or remove recurrences of the 
event</property>
             <property name="relief">none</property>
-            <signal name="clicked" handler="on_recurring_button_clicked" 
object="CaliforniaHostCreateUpdateEvent" swapped="no"/>
+            <signal name="clicked" handler="on_recurring_button_clicked" 
object="CaliforniaEventEditorMainCard" swapped="no"/>
             <child>
               <object class="GtkImage" id="image2">
                 <property name="visible">True</property>
@@ -323,7 +323,7 @@
             <property name="receives_default">True</property>
             <property name="tooltip_text" translatable="yes">Add and remove invited guests</property>
             <property name="relief">none</property>
-            <signal name="clicked" handler="on_attendees_button_clicked" 
object="CaliforniaHostCreateUpdateEvent" swapped="no"/>
+            <signal name="clicked" handler="on_attendees_button_clicked" 
object="CaliforniaEventEditorMainCard" swapped="no"/>
             <child>
               <object class="GtkImage" id="image3">
                 <property name="visible">True</property>
diff --git a/src/rc/create-update-recurring.ui b/src/rc/event-editor-recurring-card.ui
similarity index 96%
rename from src/rc/create-update-recurring.ui
rename to src/rc/event-editor-recurring-card.ui
index ae1b67a..6b3042b 100644
--- a/src/rc/create-update-recurring.ui
+++ b/src/rc/event-editor-recurring-card.ui
@@ -2,7 +2,7 @@
 <!-- Generated with glade 3.16.1 -->
 <interface>
   <requires lib="gtk+" version="3.10"/>
-  <template class="CaliforniaHostCreateUpdateRecurring" parent="GtkGrid">
+  <template class="CaliforniaEventEditorRecurringCard" parent="GtkGrid">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <property name="hexpand">True</property>
@@ -19,7 +19,7 @@
         <property name="use_underline">True</property>
         <property name="xalign">0</property>
         <property name="draw_indicator">True</property>
-        <signal name="toggled" handler="on_update_explanation" object="CaliforniaHostCreateUpdateRecurring" 
swapped="no"/>
+        <signal name="toggled" handler="on_update_explanation" object="CaliforniaEventEditorRecurringCard" 
swapped="no"/>
       </object>
       <packing>
         <property name="left_attach">0</property>
@@ -137,8 +137,8 @@
               <item id="3" translatable="yes">Day of the month</item>
               <item id="4" translatable="yes">Yearly</item>
             </items>
-            <signal name="changed" handler="on_repeats_combobox_changed" 
object="CaliforniaHostCreateUpdateRecurring" swapped="no"/>
-            <signal name="changed" handler="on_update_explanation" 
object="CaliforniaHostCreateUpdateRecurring" swapped="no"/>
+            <signal name="changed" handler="on_repeats_combobox_changed" 
object="CaliforniaEventEditorRecurringCard" swapped="no"/>
+            <signal name="changed" handler="on_update_explanation" 
object="CaliforniaEventEditorRecurringCard" swapped="no"/>
           </object>
           <packing>
             <property name="left_attach">1</property>
@@ -287,7 +287,7 @@
                 <property name="xalign">0</property>
                 <property name="active">True</property>
                 <property name="draw_indicator">True</property>
-                <signal name="toggled" handler="on_update_explanation" 
object="CaliforniaHostCreateUpdateRecurring" swapped="no"/>
+                <signal name="toggled" handler="on_update_explanation" 
object="CaliforniaEventEditorRecurringCard" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -310,7 +310,7 @@
                     <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">never_radiobutton</property>
-                    <signal name="toggled" handler="on_update_explanation" 
object="CaliforniaHostCreateUpdateRecurring" swapped="no"/>
+                    <signal name="toggled" handler="on_update_explanation" 
object="CaliforniaEventEditorRecurringCard" swapped="no"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -324,7 +324,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
-                    <signal name="clicked" handler="on_date_button_clicked" 
object="CaliforniaHostCreateUpdateRecurring" swapped="no"/>
+                    <signal name="clicked" handler="on_date_button_clicked" 
object="CaliforniaEventEditorRecurringCard" swapped="no"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -355,7 +355,7 @@
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">never_radiobutton</property>
-                    <signal name="toggled" handler="on_update_explanation" 
object="CaliforniaHostCreateUpdateRecurring" swapped="no"/>
+                    <signal name="toggled" handler="on_update_explanation" 
object="CaliforniaEventEditorRecurringCard" swapped="no"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -371,8 +371,8 @@
                     <property name="activates_default">True</property>
                     <property name="width_chars">5</property>
                     <property name="input_purpose">number</property>
-                    <signal name="changed" handler="on_after_entry_changed" 
object="CaliforniaHostCreateUpdateRecurring" swapped="no"/>
-                    <signal name="changed" handler="on_update_explanation" 
object="CaliforniaHostCreateUpdateRecurring" swapped="no"/>
+                    <signal name="changed" handler="on_after_entry_changed" 
object="CaliforniaEventEditorRecurringCard" swapped="no"/>
+                    <signal name="changed" handler="on_update_explanation" 
object="CaliforniaEventEditorRecurringCard" swapped="no"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -414,7 +414,7 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="halign">start</property>
-            <signal name="clicked" handler="on_date_button_clicked" 
object="CaliforniaHostCreateUpdateRecurring" swapped="no"/>
+            <signal name="clicked" handler="on_date_button_clicked" 
object="CaliforniaEventEditorRecurringCard" swapped="no"/>
           </object>
           <packing>
             <property name="left_attach">1</property>
@@ -436,8 +436,8 @@
                 <property name="activates_default">True</property>
                 <property name="width_chars">5</property>
                 <property name="input_purpose">number</property>
-                <signal name="changed" handler="on_every_entry_changed" 
object="CaliforniaHostCreateUpdateRecurring" swapped="no"/>
-                <signal name="changed" handler="on_update_explanation" 
object="CaliforniaHostCreateUpdateRecurring" swapped="no"/>
+                <signal name="changed" handler="on_every_entry_changed" 
object="CaliforniaEventEditorRecurringCard" swapped="no"/>
+                <signal name="changed" handler="on_update_explanation" 
object="CaliforniaEventEditorRecurringCard" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
@@ -492,7 +492,7 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
-            <signal name="clicked" handler="on_cancel_button_clicked" 
object="CaliforniaHostCreateUpdateRecurring" swapped="no"/>
+            <signal name="clicked" handler="on_cancel_button_clicked" 
object="CaliforniaEventEditorRecurringCard" swapped="no"/>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -509,7 +509,7 @@
             <property name="has_default">True</property>
             <property name="receives_default">True</property>
             <property name="use_underline">True</property>
-            <signal name="clicked" handler="on_ok_button_clicked" 
object="CaliforniaHostCreateUpdateRecurring" swapped="no"/>
+            <signal name="clicked" handler="on_ok_button_clicked" 
object="CaliforniaEventEditorRecurringCard" swapped="no"/>
             <style>
               <class name="suggested-action"/>
             </style>



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