[gnome-calendar/search-improvements] subscriber-view: adopt ::event-activated signal
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/search-improvements] subscriber-view: adopt ::event-activated signal
- Date: Mon, 5 Jan 2015 22:32:17 +0000 (UTC)
commit b0be97a13b0d705e90c971b27fcba0f23b7eabce
Author: Erick PĂ©rez Castellanos <erick red gmail com>
Date: Tue Dec 30 10:10:32 2014 -0500
subscriber-view: adopt ::event-activated signal
src/gcal-subscriber-view.c | 13 +++++++++++++
src/gcal-subscriber-view.h | 3 +++
src/gcal-view.c | 10 ----------
src/gcal-view.h | 1 -
4 files changed, 16 insertions(+), 11 deletions(-)
---
diff --git a/src/gcal-subscriber-view.c b/src/gcal-subscriber-view.c
index 5419efd..cfb048d 100644
--- a/src/gcal-subscriber-view.c
+++ b/src/gcal-subscriber-view.c
@@ -24,6 +24,14 @@
#include "gcal-view.h"
#include "gcal-event-widget.h"
+enum
+{
+ EVENT_ACTIVATED,
+ NUM_SIGNALS
+};
+
+static guint signals[NUM_SIGNALS] = { 0, };
+
static void gcal_data_model_subscriber_interface_init (ECalDataModelSubscriberInterface
*iface);
static void gcal_subscriber_view_finalize (GObject
*object);
@@ -82,6 +90,11 @@ gcal_subscriber_view_class_init (GcalSubscriberViewClass *klass)
container_class->add = gcal_subscriber_view_add;
container_class->remove = gcal_subscriber_view_remove;
container_class->forall = gcal_subscriber_view_forall;
+
+ signals[EVENT_ACTIVATED] = g_signal_new ("event-activated", GCAL_TYPE_VIEW, G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GcalSubscriberViewClass, event_activated),
+ NULL, NULL, NULL,
+ G_TYPE_NONE, 1, GCAL_TYPE_EVENT_WIDGET);
}
static void
diff --git a/src/gcal-subscriber-view.h b/src/gcal-subscriber-view.h
index 83489e8..3675533 100644
--- a/src/gcal-subscriber-view.h
+++ b/src/gcal-subscriber-view.h
@@ -49,6 +49,9 @@ struct _GcalSubscriberViewClass
{
GtkContainerClass parent_class;
+ /*< signals >*/
+ void (*event_activated) (GcalSubscriberView *subscriber_view, GcalEventWidget *event_widget);
+
/*< public >*/
gboolean (*is_child_multicell) (GcalSubscriberView *subscriber, GcalEventWidget *child);
guint (*get_child_cell) (GcalSubscriberView *subscriber, GcalEventWidget *child);
diff --git a/src/gcal-view.c b/src/gcal-view.c
index aad172a..c9e7626 100644
--- a/src/gcal-view.c
+++ b/src/gcal-view.c
@@ -65,16 +65,6 @@ gcal_view_base_init (gpointer g_iface)
NULL, NULL, NULL,
G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
- 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 581140f..0922db8 100644
--- a/src/gcal-view.h
+++ b/src/gcal-view.h
@@ -47,7 +47,6 @@ struct _GcalViewIface
/* signals */
void (*create_event) (GcalView *view, icaltimetype *start_span,
icaltimetype *end_span, gdouble x, gdouble y);
void (*create_event_detailed) (GcalView *view, icaltimetype *start_span,
icaltimetype *end_span);
- void (*event_activated) (GcalView *view, GcalEventWidget *event_widget);
/* Time handling related API */
icaltimetype* (*get_initial_date) (GcalView *view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]