month-view: sort single-day event widgets by start date

This guarantee that events widgets appear sorted by its start date on
the overflow popover
This commit is contained in:
Erick Pérez Castellanos
2014-12-20 09:10:00 -05:00
parent 420e66bdb1
commit 4bef6148f9
+1 -2
View File
@@ -1636,8 +1636,7 @@ gcal_month_view_add (GtkContainer *container,
date = gcal_event_widget_get_date (GCAL_EVENT_WIDGET (widget));
l = g_hash_table_lookup (priv->single_day_children, GINT_TO_POINTER (date->day));
/* FIXME add sorted */
l = g_list_append (l, widget);
l = g_list_insert_sorted (l, widget, (GCompareFunc) gcal_event_widget_compare_by_start_date);
if (g_list_length (l) == 1)
g_hash_table_insert (priv->single_day_children, GINT_TO_POINTER (date->day), l);