[gnome-calendar] month-view: implement ECalDataModel::components_removed vfunc



commit d37347418b5c5c6cddae1b5d1123103c1d8670a3
Author: Erick Pérez Castellanos <erick red gmail com>
Date:   Thu Oct 16 16:52:12 2014 -0400

    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 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index 97311a6..7b48ade 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]