views/view: Store signal id
This will be used by next commits
This commit is contained in:
@@ -29,6 +29,16 @@
|
||||
|
||||
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
|
||||
gcal_view_default_init (GcalViewInterface *iface)
|
||||
{
|
||||
@@ -61,7 +71,7 @@ gcal_view_default_init (GcalViewInterface *iface)
|
||||
*
|
||||
* 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,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GcalViewInterface, create_event),
|
||||
@@ -79,7 +89,7 @@ gcal_view_default_init (GcalViewInterface *iface)
|
||||
* Emitted when the view wants to create an event and immediately
|
||||
* edit it.
|
||||
*/
|
||||
g_signal_new ("create-event-detailed",
|
||||
signals[CREATE_EVENT_DETAILED] = g_signal_new ("create-event-detailed",
|
||||
GCAL_TYPE_VIEW,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GcalViewInterface, create_event_detailed),
|
||||
@@ -93,7 +103,7 @@ gcal_view_default_init (GcalViewInterface *iface)
|
||||
*
|
||||
* 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,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL, NULL,
|
||||
|
||||
Reference in New Issue
Block a user