year-view: move comparing function from gcal-event-widget.c

The compare_for_single_day() method is reproducing the
same functionality from gcal_event_compare(), and the only
consumer is the Year View. So, for now, simplify the
comparing function and put it in year view file.

Also, this commit vastly improves and documents the year
view's algorithm to add events to the sidebar list.
This commit is contained in:
Georges Basile Stavracas Neto
2016-02-14 12:17:37 -02:00
parent 070bc681fc
commit 8511285525
3 changed files with 51 additions and 76 deletions
-3
View File
@@ -70,9 +70,6 @@ gint gcal_event_widget_compare_by_length (GcalEventWidget *
gint gcal_event_widget_compare_by_start_date (GcalEventWidget *widget1,
GcalEventWidget *widget2);
gint gcal_event_widget_compare_for_single_day (GcalEventWidget *widget1,
GcalEventWidget *widget2);
G_END_DECLS
#endif /* __GCAL_EVENT_WIDGET_H__ */