[gnome-calendar] month-view: implement ECalDataModel::components_modified vfunc
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] month-view: implement ECalDataModel::components_modified vfunc
- Date: Thu, 4 Dec 2014 22:38:08 +0000 (UTC)
commit 9b281eff6988e49c43ba98417c1f1c3f0585bcaf
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Mon Oct 20 11:33:28 2014 -0400
month-view: implement ECalDataModel::components_modified vfunc
src/gcal-month-view.c | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index a995c27..46f04a9 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -1063,7 +1063,7 @@ gcal_month_view_add (GtkContainer *container,
//TODO: remove once the main-dev phase its over
g_warning ("Trying to add an event with the same uuid to the view");
g_free (date);
- g_object_unref (widget); /* FIXME: check if this destroy it */
+ gtk_widget_destroy (widget);
return;
}
}
@@ -1425,6 +1425,32 @@ gcal_month_view_subscriber_component_modified (ECalDataModelSubscriber *subscrib
ECalClient *client,
ECalComponent *comp)
{
+ GtkWidget *event;
+ GtkWidget *widget;
+ GcalEventData *data;
+
+ data = g_new0 (GcalEventData, 1);
+ data->source = e_client_get_source (E_CLIENT (client));
+ data->event_component = e_cal_component_clone (comp);
+
+ event = gcal_event_widget_new_from_data (data);
+ g_free (data);
+
+ widget =
+ gcal_view_get_by_uuid (GCAL_VIEW (subscriber),
+ gcal_event_widget_peek_uuid (GCAL_EVENT_WIDGET (event)));
+ if (widget != NULL)
+ {
+ gtk_widget_destroy (widget);
+
+ gtk_widget_show (event);
+ gtk_container_add (GTK_CONTAINER (subscriber), event);
+ }
+
+ g_signal_connect (event,
+ "activate",
+ G_CALLBACK (event_opened),
+ subscriber);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]