From e1737a09307d2eb3e266e7cd0c6d9d0b9cc49520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Thu, 16 Oct 2014 01:29:34 -0400 Subject: [PATCH] view: added :event-activated signal Since the events widget are handled entirely inside GcalView implementations (aka the views), we need a way to hook event-widget activation with GcalWindow which is handling the dialogs (as expected). This signal serve as a bridge between those two objects. --- src/gcal-view.c | 10 ++++++++++ src/gcal-view.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/gcal-view.c b/src/gcal-view.c index 321c297a..7cc58409 100644 --- a/src/gcal-view.c +++ b/src/gcal-view.c @@ -52,6 +52,16 @@ gcal_view_base_init (gpointer g_iface) G_TYPE_DOUBLE, G_TYPE_DOUBLE); + g_signal_new ("event-activated", + GCAL_TYPE_VIEW, + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GcalViewIface, + event_activated), + NULL, NULL, NULL, + G_TYPE_NONE, + 1, + GCAL_TYPE_EVENT_WIDGET); + initialized = TRUE; } } diff --git a/src/gcal-view.h b/src/gcal-view.h index aeb4b69a..56bb6b0a 100644 --- a/src/gcal-view.h +++ b/src/gcal-view.h @@ -46,6 +46,7 @@ struct _GcalViewIface /* signals */ void (*create_event) (GcalView *view, icaltimetype *start_span, icaltimetype *end_span, gdouble x, gdouble y); + void (*event_activated) (GcalView *view, GcalEventWidget *event_widget); /* FIXME remove me in favor of the one below */ void (*clear_selection) (GcalView *view);