views/view: Store signal id
This will be used by next commits
This commit is contained in:
+36
-26
@@ -29,6 +29,16 @@
|
|||||||
|
|
||||||
G_DEFINE_INTERFACE (GcalView, gcal_view, GTK_TYPE_WIDGET)
|
G_DEFINE_INTERFACE (GcalView, gcal_view, GTK_TYPE_WIDGET)
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
CREATE_EVENT,
|
||||||
|
CREATE_EVENT_DETAILED,
|
||||||
|
EVENT_ACTIVATED,
|
||||||
|
N_SIGNALS,
|
||||||
|
};
|
||||||
|
|
||||||
|
static guint signals[N_SIGNALS] = { 0, };
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gcal_view_default_init (GcalViewInterface *iface)
|
gcal_view_default_init (GcalViewInterface *iface)
|
||||||
{
|
{
|
||||||
@@ -61,17 +71,17 @@ gcal_view_default_init (GcalViewInterface *iface)
|
|||||||
*
|
*
|
||||||
* Emitted when the view wants to create an event.
|
* Emitted when the view wants to create an event.
|
||||||
*/
|
*/
|
||||||
g_signal_new ("create-event",
|
signals[CREATE_EVENT] = g_signal_new ("create-event",
|
||||||
GCAL_TYPE_VIEW,
|
GCAL_TYPE_VIEW,
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (GcalViewInterface, create_event),
|
G_STRUCT_OFFSET (GcalViewInterface, create_event),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
4,
|
4,
|
||||||
G_TYPE_DATE_TIME,
|
G_TYPE_DATE_TIME,
|
||||||
G_TYPE_DATE_TIME,
|
G_TYPE_DATE_TIME,
|
||||||
G_TYPE_DOUBLE,
|
G_TYPE_DOUBLE,
|
||||||
G_TYPE_DOUBLE);
|
G_TYPE_DOUBLE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GcalView::create-event-detailed:
|
* GcalView::create-event-detailed:
|
||||||
@@ -79,27 +89,27 @@ gcal_view_default_init (GcalViewInterface *iface)
|
|||||||
* Emitted when the view wants to create an event and immediately
|
* Emitted when the view wants to create an event and immediately
|
||||||
* edit it.
|
* edit it.
|
||||||
*/
|
*/
|
||||||
g_signal_new ("create-event-detailed",
|
signals[CREATE_EVENT_DETAILED] = g_signal_new ("create-event-detailed",
|
||||||
GCAL_TYPE_VIEW,
|
GCAL_TYPE_VIEW,
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (GcalViewInterface, create_event_detailed),
|
G_STRUCT_OFFSET (GcalViewInterface, create_event_detailed),
|
||||||
NULL, NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
G_TYPE_NONE, 2,
|
G_TYPE_NONE, 2,
|
||||||
G_TYPE_DATE_TIME,
|
G_TYPE_DATE_TIME,
|
||||||
G_TYPE_DATE_TIME);
|
G_TYPE_DATE_TIME);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GcalView::event-activated:
|
* GcalView::event-activated:
|
||||||
*
|
*
|
||||||
* Emitted when an event widget inside the view is activated.
|
* Emitted when an event widget inside the view is activated.
|
||||||
*/
|
*/
|
||||||
g_signal_new ("event-activated",
|
signals[EVENT_ACTIVATED] = g_signal_new ("event-activated",
|
||||||
GCAL_TYPE_VIEW,
|
GCAL_TYPE_VIEW,
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0, NULL, NULL, NULL,
|
0, NULL, NULL, NULL,
|
||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
1,
|
1,
|
||||||
GCAL_TYPE_EVENT_WIDGET);
|
GCAL_TYPE_EVENT_WIDGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user