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:
@@ -52,6 +52,16 @@ gcal_view_base_init (gpointer g_iface)
|
|||||||
G_TYPE_DOUBLE,
|
G_TYPE_DOUBLE,
|
||||||
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;
|
initialized = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ struct _GcalViewIface
|
|||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*create_event) (GcalView *view, icaltimetype *start_span, icaltimetype *end_span, gdouble x, gdouble y);
|
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 */
|
/* FIXME remove me in favor of the one below */
|
||||||
void (*clear_selection) (GcalView *view);
|
void (*clear_selection) (GcalView *view);
|
||||||
|
|||||||
Reference in New Issue
Block a user