month-view: fix insert ordered widgets
The head of the list might changed when ordering the list at insertion, then, some events was getting lost
This commit is contained in:
@@ -1638,8 +1638,11 @@ gcal_month_view_add (GtkContainer *container,
|
||||
l = g_hash_table_lookup (priv->single_day_children, GINT_TO_POINTER (date->day));
|
||||
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);
|
||||
if (g_list_length (l) != 1)
|
||||
{
|
||||
g_hash_table_steal (priv->single_day_children, GINT_TO_POINTER (date->day));
|
||||
}
|
||||
g_hash_table_insert (priv->single_day_children, GINT_TO_POINTER (date->day), l);
|
||||
|
||||
g_free (date);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user