aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@src.gnome.org>2007-09-27 15:55:33 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-09-27 15:55:33 +0800
commit2805d6a9fc030eefb5bfc6db91b7552b73090e65 (patch)
treee77dd05052e8670497c5b7bd5248e57e022cacb9 /calendar
parent10c781d6838d73998c417e2090bf413e09b12807 (diff)
downloadgsoc2013-evolution-2805d6a9fc030eefb5bfc6db91b7552b73090e65.tar.gz
gsoc2013-evolution-2805d6a9fc030eefb5bfc6db91b7552b73090e65.tar.zst
gsoc2013-evolution-2805d6a9fc030eefb5bfc6db91b7552b73090e65.zip
2007-09-27 mcrha Fix for bug #300693
svn path=/trunk/; revision=34312
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog10
-rw-r--r--calendar/gui/e-calendar-table.c80
-rw-r--r--calendar/gui/e-calendar-table.etspec1
-rw-r--r--calendar/gui/e-memo-table.c57
-rw-r--r--calendar/gui/e-memo-table.etspec1
5 files changed, 10 insertions, 139 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index c08e197dd2..1281e68b0a 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,15 @@
2007-09-27 Milan Crha <mcrha@redhat.com>
+ ** Fix for bug #300693
+
+ * gui/e-calendar-table.c: (task_compare_cb), (e_calendar_table_init):
+ * gui/e-calendar-table.etspec:
+ * gui/e-memo-table.c: (task_compare_cb):
+ * gui/e-memo-table.etspec:
+ Removed obsolete code and references to "task-sort" virtual column.
+
+2007-09-27 Milan Crha <mcrha@redhat.com>
+
** Fixes part of bug #228832
* gui/gnome-cal.h: (gnome_calendar_new_task):
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index f4311c3885..633f7e2290 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -152,80 +152,6 @@ e_calendar_table_class_init (ECalendarTableClass *class)
clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
}
-/* Compares two priority values, which may not exist */
-static int
-compare_priorities (int *a, int *b)
-{
- if (a && b) {
- if (*a < *b)
- return -1;
- else if (*a > *b)
- return 1;
- else
- return 0;
- } else if (a)
- return -1;
- else if (b)
- return 1;
- else
- return 0;
-}
-
-/* Comparison function for the task-sort column. Sorts by due date and then by
- * priority.
- *
- * FIXME: Does this ever get called?? It doesn't seem to.
- * I specified that the table should be sorted by this column, but it still
- * never calls this function.
- * Also, this assumes it is passed pointers to ECalComponents, but I think it
- * may just be passed pointers to the 2 cell values.
- */
-static gint
-task_compare_cb (gconstpointer a, gconstpointer b)
-{
- ECalComponent *ca, *cb;
- ECalComponentDateTime due_a, due_b;
- int *prio_a, *prio_b;
- int retval;
-
- ca = E_CAL_COMPONENT (a);
- cb = E_CAL_COMPONENT (b);
-
- e_cal_component_get_due (ca, &due_a);
- e_cal_component_get_due (cb, &due_b);
- e_cal_component_get_priority (ca, &prio_a);
- e_cal_component_get_priority (cb, &prio_b);
-
- if (due_a.value && due_b.value) {
- int v;
-
- /* FIXME: TIMEZONES. But currently we have no way to get the
- ECal, so we can't get the timezone. */
- v = icaltime_compare (*due_a.value, *due_b.value);
-
- if (v == 0)
- retval = compare_priorities (prio_a, prio_b);
- else
- retval = v;
- } else if (due_a.value)
- retval = -1;
- else if (due_b.value)
- retval = 1;
- else
- retval = compare_priorities (prio_a, prio_b);
-
- e_cal_component_free_datetime (&due_a);
- e_cal_component_free_datetime (&due_b);
-
- if (prio_a)
- e_cal_component_free_priority (prio_a);
-
- if (prio_b)
- e_cal_component_free_priority (prio_b);
-
- return retval;
-}
-
static gint
date_compare_cb (gconstpointer a, gconstpointer b)
{
@@ -478,12 +404,6 @@ e_calendar_table_init (ECalendarTable *cal_table)
e_table_extras_add_cell (extras, "calstatus", popup_cell);
- /* Task sorting field */
- /* FIXME: This column should not be displayed, but ETableExtras requires
- * its shit to be visible columns listed in the XML spec.
- */
- e_table_extras_add_compare (extras, "task-sort", task_compare_cb);
-
e_table_extras_add_compare (extras, "date-compare",
date_compare_cb);
e_table_extras_add_compare (extras, "percent-compare",
diff --git a/calendar/gui/e-calendar-table.etspec b/calendar/gui/e-calendar-table.etspec
index 9ae3f0dc84..4abc284676 100644
--- a/calendar/gui/e-calendar-table.etspec
+++ b/calendar/gui/e-calendar-table.etspec
@@ -8,7 +8,6 @@
<ETableColumn model_col= "15" _title="% Complete" expansion="1.0" minimum_width="10" resizable="true" cell="percent" compare="percent-compare" priority="-3"/>
<ETableColumn model_col= "16" _title="Priority" expansion="1.0" minimum_width="10" resizable="true" cell="priority" compare="priority-compare" priority="-3"/>
<ETableColumn model_col="17" _title="Status" expansion="1.0" minimum_width="10" resizable="true" cell="calstatus" compare="collate" priority="-1"/>
- <ETableColumn model_col="19" _title="Task sort" cell="task-sort" compare="task-sort" priority="-4"/>
<ETableColumn model_col="0" _title="Categories" cell="calstring" compare="stringcase" expansion="1.0" minimum_width="10" resizable="true" priority="-2"/>
<ETableState>
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index eb7ce3c879..144e774591 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -177,63 +177,6 @@ date_compare_cb (gconstpointer a, gconstpointer b)
return icaltime_compare (dv1->tt, tt);
}
-/* Comparison function for the task-sort column. Sorts by due date and then by
- * priority.
- *
- * FIXME: Does this ever get called?? It doesn't seem to.
- * I specified that the table should be sorted by this column, but it still
- * never calls this function.
- * Also, this assumes it is passed pointers to ECalComponents, but I think it
- * may just be passed pointers to the 2 cell values.
- */
-#if 0
-static gint
-task_compare_cb (gconstpointer a, gconstpointer b)
-{
- ECalComponent *ca, *cb;
- ECalComponentDateTime due_a, due_b;
- int *prio_a, *prio_b;
- int retval;
-
- ca = E_CAL_COMPONENT (a);
- cb = E_CAL_COMPONENT (b);
-
- e_cal_component_get_due (ca, &due_a);
- e_cal_component_get_due (cb, &due_b);
- e_cal_component_get_priority (ca, &prio_a);
- e_cal_component_get_priority (cb, &prio_b);
-
- if (due_a.value && due_b.value) {
- int v;
-
- /* FIXME: TIMEZONES. But currently we have no way to get the
- ECal, so we can't get the timezone. */
- v = icaltime_compare (*due_a.value, *due_b.value);
-
- if (v == 0)
- retval = compare_priorities (prio_a, prio_b);
- else
- retval = v;
- } else if (due_a.value)
- retval = -1;
- else if (due_b.value)
- retval = 1;
- else
- retval = compare_priorities (prio_a, prio_b);
-
- e_cal_component_free_datetime (&due_a);
- e_cal_component_free_datetime (&due_b);
-
- if (prio_a)
- e_cal_component_free_priority (prio_a);
-
- if (prio_b)
- e_cal_component_free_priority (prio_b);
-
- return retval;
-}
-#endif
-
static void
row_appended_cb (ECalModel *model, EMemoTable *memo_table)
{
diff --git a/calendar/gui/e-memo-table.etspec b/calendar/gui/e-memo-table.etspec
index 95faa93429..a16793ecf1 100644
--- a/calendar/gui/e-memo-table.etspec
+++ b/calendar/gui/e-memo-table.etspec
@@ -3,7 +3,6 @@
<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="0" _title="Categories" cell="calstring" compare="collate" expansion="1.0" minimum_width="10" resizable="true" priority="-2"/>
<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="19" _title="Memo sort" cell="task-sort" compare="memo-sort" priority="-4"/>
<ETableState>
<column source="1"/>