[california] Support event description: Bug #725914
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california] Support event description: Bug #725914
- Date: Fri, 30 May 2014 02:15:53 +0000 (UTC)
commit 09b9096fe5003954d7c59d289da9fd72682d83c8
Author: Jim Nelson <jim yorba org>
Date: Thu May 29 19:14:12 2014 -0700
Support event description: Bug #725914
Finishes the bits of the puzzle w/ event description (it was already
shown in event viewer, now user can edit it).
src/host/host-create-update-event.vala | 6 ++
src/rc/create-update-event.ui | 115 ++++++++++++++++++++-----------
2 files changed, 80 insertions(+), 41 deletions(-)
---
diff --git a/src/host/host-create-update-event.vala b/src/host/host-create-update-event.vala
index 88b3631..96d9674 100644
--- a/src/host/host-create-update-event.vala
+++ b/src/host/host-create-update-event.vala
@@ -47,6 +47,9 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
private Gtk.CheckButton all_day_toggle;
[GtkChild]
+ private Gtk.TextView description_textview;
+
+ [GtkChild]
private Gtk.ComboBoxText calendar_combo;
[GtkChild]
@@ -180,6 +183,8 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
is_update = false;
}
+ description_textview.buffer.text = event.description ?? "";
+
accept_button.label = is_update ? _("_Update") : _("C_reate");
original_calendar_source = event.calendar_source;
}
@@ -228,6 +233,7 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
event.calendar_source = calendar_model.active;
event.summary = summary_entry.text;
+ event.description = description_textview.buffer.text;
if (all_day_toggle.active) {
event.set_event_date_span(selected_date_span);
diff --git a/src/rc/create-update-event.ui b/src/rc/create-update-event.ui
index c1890ff..ccf3716 100644
--- a/src/rc/create-update-event.ui
+++ b/src/rc/create-update-event.ui
@@ -112,47 +112,29 @@
<property name="position">5</property>
</packing>
</child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="calendar_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">8</property>
<child>
- <object class="GtkLabel" id="calendar_label">
+ <object class="GtkCheckButton" id="all_day_toggle">
+ <property name="label" translatable="yes">_All-day</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Calendar:</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="halign">start</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="image_position">right</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="calendar_combo">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
<property name="pack_type">end</property>
- <property name="position">1</property>
+ <property name="position">6</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">1</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
@@ -209,31 +191,82 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">5</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="all_day_toggle">
- <property name="label" translatable="yes">_All-day event</property>
+ <object class="GtkBox" id="description_box">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="halign">start</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="image_position">right</property>
- <property name="draw_indicator">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">8</property>
+ <child>
+ <object class="GtkLabel" id="description_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Description</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
+ <property name="min_content_height">75</property>
+ <child>
+ <object class="GtkViewport" id="viewport1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkTextView" id="description_textview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="wrap_mode">word</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
+ <object class="GtkComboBoxText" id="calendar_combo">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
<placeholder/>
</child>
</template>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]