From 7f7739db6d9b4b386d9b3f21112669c4eaddba0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Thu, 18 Dec 2014 01:11:17 -0500 Subject: [PATCH] month-view: add helper for hidden event-widgets When an event is deleted we hide it while the notification with the Undo option is shown and after a while the event is actually destroyed. This helper is meant for keeping a set of the event-widgets hidden in that situation --- src/gcal-month-view.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c index 316fbdd5..c9929557 100644 --- a/src/gcal-month-view.c +++ b/src/gcal-month-view.c @@ -52,6 +52,11 @@ typedef struct */ GHashTable *overflown_days; + /** + * Set containing the master widgets hidden for delete; + */ + GHashTable *hidden_for_delete; + GdkWindow *event_window; /** @@ -356,6 +361,7 @@ gcal_month_view_init (GcalMonthView *self) priv->single_day_children = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) g_list_free); priv->multiday_children = NULL; priv->overflown_days = g_hash_table_new (g_direct_hash, g_direct_equal); + priv->hidden_for_delete = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); gtk_style_context_add_class ( gtk_widget_get_style_context (GTK_WIDGET (self)), @@ -461,6 +467,7 @@ gcal_month_view_finalize (GObject *object) g_hash_table_destroy (priv->children); g_hash_table_destroy (priv->single_day_children); g_hash_table_destroy (priv->overflown_days); + g_hash_table_destroy (priv->hidden_for_delete); if (priv->multiday_children != NULL) g_list_free (priv->multiday_children);