[evolution/wip/webkit2] Bug 272854 - Ability to sort tasks by task list membership
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Bug 272854 - Ability to sort tasks by task list membership
- Date: Wed, 2 Mar 2016 15:17:56 +0000 (UTC)
commit 7d6cdf64f64ce588d18da4f3ccd8760663f3bfbf
Author: Milan Crha <mcrha redhat com>
Date: Mon Nov 2 18:54:29 2015 +0100
Bug 272854 - Ability to sort tasks by task list membership
calendar/gui/Makefile.am | 4 ++--
calendar/gui/e-cal-list-view.etspec | 5 +++--
calendar/gui/e-cal-model.c | 17 +++++++++++++++++
calendar/gui/e-cal-model.h | 1 +
calendar/gui/e-memo-table.etspec | 1 +
calendar/gui/e-task-table.c | 2 +-
...e-calendar-table.etspec => e-task-table.etspec} | 13 +++++++------
modules/calendar/e-cal-shell-view-private.h | 2 --
modules/calendar/e-memo-shell-view-private.h | 3 ---
modules/calendar/e-task-shell-view-private.h | 3 ---
po/POTFILES.in | 2 +-
11 files changed, 33 insertions(+), 20 deletions(-)
---
diff --git a/calendar/gui/Makefile.am b/calendar/gui/Makefile.am
index 07cd5f2..5f525c8 100644
--- a/calendar/gui/Makefile.am
+++ b/calendar/gui/Makefile.am
@@ -85,10 +85,10 @@ libevolution_calendar_la_CPPFLAGS = \
$(NULL)
etspec_DATA = \
- e-calendar-table.etspec \
e-meeting-time-sel.etspec \
e-cal-list-view.etspec \
- e-memo-table.etspec
+ e-memo-table.etspec \
+ e-task-table.etspec
libevolution_calendar_la_SOURCES = \
calendar-config.c \
diff --git a/calendar/gui/e-cal-list-view.etspec b/calendar/gui/e-cal-list-view.etspec
index ba0130f..0a6d100 100644
--- a/calendar/gui/e-cal-list-view.etspec
+++ b/calendar/gui/e-cal-list-view.etspec
@@ -1,12 +1,13 @@
<ETableSpecification draw-grid="true" alternating-row-colors="true">
<ETableColumn model_col="5" _title="Start Date" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
- <ETableColumn model_col="12" _title="End Date" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
+ <ETableColumn model_col="13" _title="End Date" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
<ETableColumn model_col="8" _title="Summary" expansion="3.0" minimum_width="10" resizable="true"
cell="calstring" compare="collate" priority="10"/>
<ETableColumn model_col="4" _title="Description" expansion="3.0" minimum_width="10" resizable="true"
cell="calstring" compare="collate" priority="10"/>
- <ETableColumn model_col="13" _title="Location" expansion="3.0" minimum_width="10" resizable="true"
cell="calstring" compare="collate" priority="10"/>
+ <ETableColumn model_col="14" _title="Location" expansion="3.0" minimum_width="10" resizable="true"
cell="calstring" compare="collate" priority="10"/>
<ETableColumn model_col="0" _title="Categories" cell="calstring" compare="collate" expansion="1.0"
minimum_width="10" resizable="true" priority="-2"/>
<ETableColumn model_col="10" _title="Created" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
<ETableColumn model_col="11" _title="Last modified" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
+ <ETableColumn model_col="12" _title="Source" expansion="1.0" minimum_width="10" resizable="true"
cell="string" compare="collate" priority="-2"/>
<ETableState>
<column source="2"/>
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 8347526..081e900 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -453,6 +453,16 @@ get_uid (ECalModelComponent *comp_data)
return (gchar *) icalcomponent_get_uid (comp_data->icalcomp);
}
+static gchar *
+get_source_description (ESourceRegistry *registry,
+ ECalModelComponent *comp_data)
+{
+ if (!registry || !comp_data || !comp_data->client)
+ return NULL;
+
+ return e_util_get_source_full_name (registry, e_client_get_source (E_CLIENT (comp_data->client)));
+}
+
static void
set_categories (ECalModelComponent *comp_data,
const gchar *value)
@@ -1618,6 +1628,8 @@ cal_model_value_at (ETableModel *etm,
return get_summary (comp_data);
case E_CAL_MODEL_FIELD_UID :
return get_uid (comp_data);
+ case E_CAL_MODEL_FIELD_SOURCE:
+ return get_source_description (registry, comp_data);
}
return (gpointer) "";
@@ -1709,6 +1721,7 @@ cal_model_duplicate_value (ETableModel *etm,
case E_CAL_MODEL_FIELD_CATEGORIES :
case E_CAL_MODEL_FIELD_DESCRIPTION :
case E_CAL_MODEL_FIELD_SUMMARY :
+ case E_CAL_MODEL_FIELD_SOURCE:
return g_strdup (value);
case E_CAL_MODEL_FIELD_CLASSIFICATION :
case E_CAL_MODEL_FIELD_HAS_ALARMS :
@@ -1737,6 +1750,7 @@ cal_model_free_value (ETableModel *etm,
case E_CAL_MODEL_FIELD_CATEGORIES :
case E_CAL_MODEL_FIELD_DESCRIPTION :
case E_CAL_MODEL_FIELD_SUMMARY :
+ case E_CAL_MODEL_FIELD_SOURCE:
if (value)
g_free (value);
break;
@@ -1775,6 +1789,7 @@ cal_model_initialize_value (ETableModel *etm,
return g_strdup (priv->default_category ? priv->default_category:"");
case E_CAL_MODEL_FIELD_DESCRIPTION :
case E_CAL_MODEL_FIELD_SUMMARY :
+ case E_CAL_MODEL_FIELD_SOURCE:
return g_strdup ("");
case E_CAL_MODEL_FIELD_CLASSIFICATION :
case E_CAL_MODEL_FIELD_DTSTART :
@@ -1818,6 +1833,7 @@ cal_model_value_is_empty (ETableModel *etm,
case E_CAL_MODEL_FIELD_CLASSIFICATION :
case E_CAL_MODEL_FIELD_DESCRIPTION :
case E_CAL_MODEL_FIELD_SUMMARY :
+ case E_CAL_MODEL_FIELD_SOURCE:
return string_is_empty (value);
case E_CAL_MODEL_FIELD_DTSTART :
case E_CAL_MODEL_FIELD_CREATED :
@@ -1845,6 +1861,7 @@ cal_model_value_to_string (ETableModel *etm,
case E_CAL_MODEL_FIELD_CLASSIFICATION :
case E_CAL_MODEL_FIELD_DESCRIPTION :
case E_CAL_MODEL_FIELD_SUMMARY :
+ case E_CAL_MODEL_FIELD_SOURCE:
return g_strdup (value);
case E_CAL_MODEL_FIELD_DTSTART :
case E_CAL_MODEL_FIELD_CREATED :
diff --git a/calendar/gui/e-cal-model.h b/calendar/gui/e-cal-model.h
index c4a5230..9e0d51a 100644
--- a/calendar/gui/e-cal-model.h
+++ b/calendar/gui/e-cal-model.h
@@ -88,6 +88,7 @@ typedef enum {
E_CAL_MODEL_FIELD_UID,
E_CAL_MODEL_FIELD_CREATED,
E_CAL_MODEL_FIELD_LASTMODIFIED,
+ E_CAL_MODEL_FIELD_SOURCE, /* not a real field */
E_CAL_MODEL_FIELD_LAST
} ECalModelField;
diff --git a/calendar/gui/e-memo-table.etspec b/calendar/gui/e-memo-table.etspec
index aad61a0..267311a 100644
--- a/calendar/gui/e-memo-table.etspec
+++ b/calendar/gui/e-memo-table.etspec
@@ -5,6 +5,7 @@
<ETableColumn model_col="5" _title="Start Date" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
<ETableColumn model_col="10" _title="Created" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
<ETableColumn model_col="11" _title="Last modified" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
+ <ETableColumn model_col="12" _title="Source" expansion="1.0" minimum_width="10" resizable="true"
cell="string" compare="collate" priority="-2"/>
<ETableState>
<column source="1"/>
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index 24bfe35..e6e06aa 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -646,7 +646,7 @@ task_table_constructed (GObject *object)
/* Create the table */
etspecfile = g_build_filename (
- EVOLUTION_ETSPECDIR, "e-calendar-table.etspec", NULL);
+ EVOLUTION_ETSPECDIR, "e-task-table.etspec", NULL);
specification = e_table_specification_new (etspecfile, &local_error);
/* Failure here is fatal. */
diff --git a/calendar/gui/e-calendar-table.etspec b/calendar/gui/e-task-table.etspec
similarity index 77%
rename from calendar/gui/e-calendar-table.etspec
rename to calendar/gui/e-task-table.etspec
index d63e092..d20c822 100644
--- a/calendar/gui/e-calendar-table.etspec
+++ b/calendar/gui/e-task-table.etspec
@@ -2,15 +2,16 @@
<ETableColumn model_col= "5" _title="Start date" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
<ETableColumn model_col="7" pixbuf="icon" _title="Type" expansion="1.0" minimum_width="16"
resizable="false" cell="icon" compare="integer" priority="-4"/>
<ETableColumn model_col= "8" _title="Summary" expansion="3.0" minimum_width="10" resizable="true"
cell="calstring" compare="stringcase" priority="10"/>
- <ETableColumn model_col= "12" _title="Completion date" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
- <ETableColumn model_col="13" pixbuf="complete" _title="Complete" expansion="1.0" minimum_width="16"
resizable="false" cell="checkbox" compare="integer" priority="-4"/>
- <ETableColumn model_col= "14" _title="Due date" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
- <ETableColumn model_col= "17" _title="% Complete" expansion="1.0" minimum_width="10" resizable="true"
cell="percent" compare="percent-compare" priority="-3"/>
- <ETableColumn model_col= "18" _title="Priority" expansion="1.0" minimum_width="10" resizable="true"
cell="priority" compare="priority-compare" priority="-3"/>
- <ETableColumn model_col="19" _title="Status" expansion="1.0" minimum_width="10" resizable="true"
cell="calstatus" compare="status-compare" priority="-1"/>
+ <ETableColumn model_col= "13" _title="Completion date" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
+ <ETableColumn model_col="14" pixbuf="complete" _title="Complete" expansion="1.0" minimum_width="16"
resizable="false" cell="checkbox" compare="integer" priority="-4"/>
+ <ETableColumn model_col= "15" _title="Due date" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
+ <ETableColumn model_col= "18" _title="% Complete" expansion="1.0" minimum_width="10" resizable="true"
cell="percent" compare="percent-compare" priority="-3"/>
+ <ETableColumn model_col= "19" _title="Priority" expansion="1.0" minimum_width="10" resizable="true"
cell="priority" compare="priority-compare" priority="-3"/>
+ <ETableColumn model_col="20" _title="Status" expansion="1.0" minimum_width="10" resizable="true"
cell="calstatus" compare="status-compare" priority="-1"/>
<ETableColumn model_col="0" _title="Categories" cell="calstring" compare="stringcase" expansion="1.0"
minimum_width="10" resizable="true" priority="-2"/>
<ETableColumn model_col="10" _title="Created" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
<ETableColumn model_col="11" _title="Last modified" expansion="2.0" minimum_width="10" resizable="true"
cell="dateedit" compare="date-compare" priority="-2"/>
+ <ETableColumn model_col="12" _title="Source" expansion="1.0" minimum_width="10" resizable="true"
cell="string" compare="collate" priority="-2"/>
<ETableState>
<column source="1"/>
diff --git a/modules/calendar/e-cal-shell-view-private.h b/modules/calendar/e-cal-shell-view-private.h
index 435a97f..29cf5a1 100644
--- a/modules/calendar/e-cal-shell-view-private.h
+++ b/modules/calendar/e-cal-shell-view-private.h
@@ -55,8 +55,6 @@
#define ACTION_GROUP(name) \
(E_SHELL_WINDOW_ACTION_GROUP_##name (shell_window))
-/* ETable Specifications */
-#define ETSPEC_FILENAME "e-calendar-table.etspec"
#define CHECK_NB 5
G_BEGIN_DECLS
diff --git a/modules/calendar/e-memo-shell-view-private.h b/modules/calendar/e-memo-shell-view-private.h
index 544631b..81a42e7 100644
--- a/modules/calendar/e-memo-shell-view-private.h
+++ b/modules/calendar/e-memo-shell-view-private.h
@@ -48,9 +48,6 @@
#define ACTION_GROUP(name) \
(E_SHELL_WINDOW_ACTION_GROUP_##name (shell_window))
-/* ETable Specifications */
-#define ETSPEC_FILENAME "e-memo-table.etspec"
-
G_BEGIN_DECLS
/* Filter items are displayed in ascending order.
diff --git a/modules/calendar/e-task-shell-view-private.h b/modules/calendar/e-task-shell-view-private.h
index 145a92a..109b3ac 100644
--- a/modules/calendar/e-task-shell-view-private.h
+++ b/modules/calendar/e-task-shell-view-private.h
@@ -51,9 +51,6 @@
#define ACTION_GROUP(name) \
(E_SHELL_WINDOW_ACTION_GROUP_##name (shell_window))
-/* ETable Specifications */
-#define ETSPEC_FILENAME "e-calendar-table.etspec"
-
G_BEGIN_DECLS
/* Filter items are displayed in ascending order.
diff --git a/po/POTFILES.in b/po/POTFILES.in
index a71fe21..70364dc 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -53,7 +53,6 @@ calendar/gui/ea-week-view-main-item.c
calendar/gui/e-cal-component-preview.c
calendar/gui/e-cal-data-model.c
calendar/gui/e-cal-dialogs.c
-calendar/gui/e-calendar-table.etspec
calendar/gui/e-calendar-view.c
calendar/gui/e-cal-list-view.c
calendar/gui/e-cal-list-view.etspec
@@ -83,6 +82,7 @@ calendar/gui/e-meeting-time-sel-item.c
calendar/gui/e-memo-table.c
calendar/gui/e-memo-table.etspec
calendar/gui/e-task-table.c
+calendar/gui/e-task-table.etspec
calendar/gui/e-timezone-entry.c
calendar/gui/e-week-view.c
calendar/gui/e-week-view-main-item.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]