[gnome-calendar] month-view: change widget comparison for inclusion
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] month-view: change widget comparison for inclusion
- Date: Thu, 4 Dec 2014 22:36:52 +0000 (UTC)
commit ab2050b6950b19a8775c8d96a6dfe3f2cd5a32e4
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Thu Oct 16 15:15:47 2014 -0400
month-view: change widget comparison for inclusion
Using new function ensure checking recurid besides everything else
src/gcal-month-view.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index 39fc056..91686aa 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -1054,16 +1054,15 @@ gcal_month_view_add (GtkContainer *container,
for (l = priv->days[date->day - 1]; l != NULL; l = l->next)
{
- GcalViewChild *child;
+ GtkWidget *event;
- child = (GcalViewChild*) l->data;
- if (g_strcmp0 (
- gcal_event_widget_peek_uuid (GCAL_EVENT_WIDGET (widget)),
- gcal_event_widget_peek_uuid (GCAL_EVENT_WIDGET (child->widget)))
- == 0)
+ event = GTK_WIDGET (((GcalViewChild*) l->data)->widget);
+ if (gcal_event_widget_equal (GCAL_EVENT_WIDGET (widget),
+ GCAL_EVENT_WIDGET (event)))
{
//TODO: remove once the main-dev phase its over
g_warning ("Trying to add an event with the same uuid to the view");
+ g_object_unref (widget); /* FIXME: check if this destroy it */
return;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]