From d37347418b5c5c6cddae1b5d1123103c1d8670a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Thu, 16 Oct 2014 16:52:12 -0400 Subject: [PATCH] month-view: implement ECalDataModel::components_removed vfunc Previous fixes on GcalEventWidget allow to use the recurid in order to differentiate instances of the same event. --- src/gcal-month-view.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c index 97311a68..7b48ade7 100644 --- a/src/gcal-month-view.c +++ b/src/gcal-month-view.c @@ -1431,6 +1431,25 @@ gcal_month_view_subscriber_component_removed (ECalDataModelSubscriber *subscribe const gchar *uid, const gchar *rid) { + GtkWidget *widget; + const gchar *sid; + gchar *uuid; + + sid = e_source_get_uid (e_client_get_source (E_CLIENT (client))); + + if (rid != NULL) + uuid = g_strdup_printf ("%s:%s:%s", sid, uid, rid); + else + uuid = g_strdup_printf ("%s:%s", sid, uid); + + widget = gcal_view_get_by_uuid (GCAL_VIEW (subscriber), uuid); + if (widget != NULL) + gtk_widget_destroy (widget); + else + g_warning ("%s: Widget with uuid: %s not found", + G_STRFUNC, uuid); + + g_free (uuid); } static void