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.
This commit is contained in:
Erick Pérez Castellanos
2014-12-04 17:10:41 -05:00
parent 1cb862900e
commit e1737a0930
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -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;
}
}
+1
View File
@@ -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);