views: use new comparison function
This commit is contained in:
@@ -801,16 +801,15 @@ gcal_week_view_add (GtkContainer *container,
|
|||||||
|
|
||||||
for (l = priv->days[day - 1]; l != NULL; l = l->next)
|
for (l = priv->days[day - 1]; l != NULL; l = l->next)
|
||||||
{
|
{
|
||||||
GcalWeekViewChild *child;
|
GtkWidget *event;
|
||||||
|
|
||||||
child = (GcalWeekViewChild*) l->data;
|
event = GTK_WIDGET (((GcalWeekViewChild*) l->data)->widget);
|
||||||
|
if (gcal_event_widget_equal (GCAL_EVENT_WIDGET (widget),
|
||||||
if (g_strcmp0 (
|
GCAL_EVENT_WIDGET (event)))
|
||||||
gcal_event_widget_peek_uuid (GCAL_EVENT_WIDGET (widget)),
|
|
||||||
gcal_event_widget_peek_uuid (GCAL_EVENT_WIDGET (child->widget))) == 0)
|
|
||||||
{
|
{
|
||||||
//TODO: remove once the main-dev phase its over
|
//TODO: remove once the main-dev phase its over
|
||||||
g_warning ("Trying to add an event with the same uuid to the view");
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -622,16 +622,15 @@ gcal_year_view_add (GtkContainer *container,
|
|||||||
|
|
||||||
for (l = priv->months[date->month - 1]; l != NULL; l = l->next)
|
for (l = priv->months[date->month - 1]; l != NULL; l = l->next)
|
||||||
{
|
{
|
||||||
GcalViewChild *child;
|
GtkWidget *event;
|
||||||
|
|
||||||
child = (GcalViewChild*) l->data;
|
event = GTK_WIDGET (((GcalViewChild*) l->data)->widget);
|
||||||
if (g_strcmp0 (
|
if (gcal_event_widget_equal (GCAL_EVENT_WIDGET (widget),
|
||||||
gcal_event_widget_peek_uuid (GCAL_EVENT_WIDGET (widget)),
|
GCAL_EVENT_WIDGET (event)))
|
||||||
gcal_event_widget_peek_uuid (GCAL_EVENT_WIDGET (child->widget)))
|
|
||||||
== 0)
|
|
||||||
{
|
{
|
||||||
//TODO: remove once the main-dev phase its over
|
//TODO: remove once the main-dev phase its over
|
||||||
g_warning ("Trying to add an event with the same uuid to the view");
|
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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user