From 41dfcdb070f5c052908ca15bb304c91ae637795c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 20 Jan 2010 15:48:31 +0100 Subject: Bug #606301 - Slow sort by subject --- calendar/gui/e-memo-table.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'calendar/gui/e-memo-table.c') diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c index 11c74820a6..459fff3e15 100644 --- a/calendar/gui/e-memo-table.c +++ b/calendar/gui/e-memo-table.c @@ -164,35 +164,6 @@ memo_table_get_current_time (ECellDateEdit *ecde, return tmp_tm; } -static gint -memo_table_date_compare_cb (gconstpointer a, - gconstpointer b) -{ - ECellDateEditValue *dv1 = (ECellDateEditValue *) a; - ECellDateEditValue *dv2 = (ECellDateEditValue *) b; - struct icaltimetype tt; - - /* First check if either is NULL. NULL dates sort last. */ - if (!dv1 || !dv2) { - if (dv1 == dv2) - return 0; - else if (dv1) - return -1; - else - return 1; - } - - /* Copy the 2nd value and convert it to the same timezone as the - first. */ - tt = dv2->tt; - - icaltimezone_convert_time (&tt, dv2->zone, dv1->zone); - - /* Now we can compare them. */ - - return icaltime_compare (dv1->tt, tt); -} - static void memo_table_model_cal_view_progress_cb (EMemoTable *memo_table, const gchar *message, @@ -420,7 +391,7 @@ memo_table_constructed (GObject *object) /* Sorting */ e_table_extras_add_compare ( - extras, "date-compare", memo_table_date_compare_cb); + extras, "date-compare", e_cell_date_edit_compare_cb); /* Create pixmaps */ -- cgit v1.2.3