[california/wip/731543-attendees] Remove/hide Attendees entry from event editor
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california/wip/731543-attendees] Remove/hide Attendees entry from event editor
- Date: Thu, 6 Nov 2014 00:35:54 +0000 (UTC)
commit e82244c3b9035aa65f8f6fb46c6e9c105e04da24
Author: Jim Nelson <jim yorba org>
Date: Wed Nov 5 16:26:57 2014 -0800
Remove/hide Attendees entry from event editor
Will add back when ready to allow adding/editing attendees
src/component/component-instance.vala | 14 ------------
src/host/host-create-update-event.vala | 17 ---------------
src/rc/create-update-event.ui | 35 ++-----------------------------
3 files changed, 3 insertions(+), 63 deletions(-)
---
diff --git a/src/component/component-instance.vala b/src/component/component-instance.vala
index 2bd0f30..97f6933 100644
--- a/src/component/component-instance.vala
+++ b/src/component/component-instance.vala
@@ -562,20 +562,6 @@ public abstract class Instance : BaseObject, Gee.Hashable<Instance> {
}
/**
- * Returns a single comma-delimited string for all attendees.
- *
- * Returns null if no attendees are associated with this { link Instance}.
- */
- public string? attendees_to_string() {
- return traverse<Person>(attendees).to_string(stringify_attendee);
- }
-
- private static string? stringify_attendee(Person attendee, bool is_first, bool is_last) {
- // A common separator for email addresses followed by an email address itself.
- return is_first ? attendee.mailbox : _(", %s").printf(attendee.mailbox);
- }
-
- /**
* Returns an appropriate { link Component} instance for the iCalendar component.
*
* VCALENDARs should use { link Component.iCalendar}.
diff --git a/src/host/host-create-update-event.vala b/src/host/host-create-update-event.vala
index 1e678f8..f6dd38b 100644
--- a/src/host/host-create-update-event.vala
+++ b/src/host/host-create-update-event.vala
@@ -39,9 +39,6 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
private Gtk.Label time_summary_label;
[GtkChild]
- private Gtk.Entry attendees_entry;
-
- [GtkChild]
private Gtk.Entry location_entry;
[GtkChild]
@@ -79,7 +76,6 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
transform_summary_to_accept);
clear_text_connector.connect_to(location_entry);
- clear_text_connector.connect_to(attendees_entry);
// use model to control calendars combo box
calendar_model = build_calendar_source_combo_model(calendar_combo);
@@ -94,9 +90,6 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
update_this_button.clicked.connect(on_update_this_button_clicked);
cancel_recurring_button.clicked.connect(on_cancel_recurring_button_clicked);
- attendees_entry.bind_property("text", accept_button, "sensitive",
- BindingFlags.SYNC_CREATE, transform_attendees_to_accept);
-
rotating_button_box.pack_end(FAMILY_NORMAL, cancel_button);
rotating_button_box.pack_end(FAMILY_NORMAL, accept_button);
@@ -127,15 +120,6 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
return true;
}
- private bool transform_attendees_to_accept(Binding binding, Value source_value, ref Value target_value) {
- target_value = from_array<string>(attendees_entry.text.split_set(" \t,;"))
- .transform(str => str.strip())
- .filter(str => !String.is_empty(str))
- .all(str => URI.is_valid_mailbox(str));
-
- return true;
- }
-
public void jumped_to(Toolkit.Card? from, Toolkit.Card.Jump reason, Value? message) {
// if no message, leave everything as it is
if (message == null)
@@ -170,7 +154,6 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
location_entry.text = event.location ?? "";
description_textview.buffer.text = event.description ?? "";
- attendees_entry.text = event.attendees_to_string() ?? "";
Component.Event master = event.is_master_instance ? event : (Component.Event) event.master;
diff --git a/src/rc/create-update-event.ui b/src/rc/create-update-event.ui
index 26f672c..895cf49 100644
--- a/src/rc/create-update-event.ui
+++ b/src/rc/create-update-event.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
+<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.10"/>
<template class="CaliforniaHostCreateUpdateEvent" parent="GtkGrid">
@@ -23,8 +23,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -40,8 +38,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -57,8 +53,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -105,8 +99,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -122,8 +114,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -170,8 +160,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -189,7 +177,6 @@
<property name="left_attach">0</property>
<property name="top_attach">7</property>
<property name="width">2</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -205,8 +192,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">6</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -218,8 +203,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">6</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -239,8 +222,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -268,8 +249,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -287,8 +266,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -300,14 +277,12 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="attendees_label">
- <property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">_Guests</property>
<property name="use_underline">True</property>
@@ -319,14 +294,12 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="attendees_entry">
- <property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="no_show_all">True</property>
<property name="tooltip_text" translatable="yes">For example:
alice example com, bob example com</property>
<property name="activates_default">True</property>
@@ -336,8 +309,6 @@ alice example com, bob example com</property>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]