diff options
Diffstat (limited to 'my-evolution')
-rw-r--r-- | my-evolution/ChangeLog | 5 | ||||
-rw-r--r-- | my-evolution/e-summary-calendar.c | 12 | ||||
-rw-r--r-- | my-evolution/e-summary.c | 1 |
3 files changed, 14 insertions, 4 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index 4757c35759..b01c8b3297 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,8 @@ +2001-09-17 Iain Holmes <iain@ximian.com> + + * e-summary-calendar.c (uids_to_array): Correctly use qsort. + (e_summary_calendar_event_sort_func): Dereference the e1 and e2. + 2001-09-17 Federico Mena Quintero <federico@ximian.com> * e-summary.c (e_summary_init): There is no need to initialize the diff --git a/my-evolution/e-summary-calendar.c b/my-evolution/e-summary-calendar.c index 789cff124a..85c14546b0 100644 --- a/my-evolution/e-summary-calendar.c +++ b/my-evolution/e-summary-calendar.c @@ -51,10 +51,14 @@ e_summary_calendar_event_sort_func (const void *e1, { ESummaryCalEvent *event1, *event2; - event1 = (ESummaryCalEvent *) e1; - event2 = (ESummaryCalEvent *) e2; + event1 = *(ESummaryCalEvent **) e1; + event2 = *(ESummaryCalEvent **) e2; - return icaltime_compare (*event1->dt.value, *event2->dt.value); + if (event1->dt.value == NULL || event2->dt.value == NULL) { + return 0; + } + + return icaltime_compare (*(event1->dt.value), *(event2->dt.value)); } static GPtrArray * @@ -95,7 +99,7 @@ uids_to_array (ESummary *summary, g_ptr_array_add (array, event); } - qsort (array->pdata, array->len, sizeof (ESummaryCalEvent), e_summary_calendar_event_sort_func); + qsort (array->pdata, array->len, sizeof (ESummaryCalEvent *), e_summary_calendar_event_sort_func); return array; } diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c index 9ef4ff6f0a..582926bf10 100644 --- a/my-evolution/e-summary.c +++ b/my-evolution/e-summary.c @@ -38,6 +38,7 @@ #include <libgnomeprint/gnome-print-master-preview.h> #include <gui/alarm-notify/alarm.h> +#include <cal-util/timeutil.h> #include "e-summary.h" #include "e-summary-preferences.h" |