[gnome-calendar/search-improvements] search-view: remove GcalView interface, add GcalSearchView::'search-activated' signal
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/search-improvements] search-view: remove GcalView interface, add GcalSearchView::'search-activated' signal
- Date: Mon, 5 Jan 2015 22:33:08 +0000 (UTC)
commit 2531b2a8a61e8fbf7acc03ee4aa10007e1037940
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Jan 5 20:30:57 2015 -0200
search-view: remove GcalView interface, add GcalSearchView::'search-activated' signal
src/gcal-search-view.c | 34 ++++++++++++++++------------------
src/gcal-search-view.h | 4 ++++
2 files changed, 20 insertions(+), 18 deletions(-)
---
diff --git a/src/gcal-search-view.c b/src/gcal-search-view.c
index 484241e..2821aff 100644
--- a/src/gcal-search-view.c
+++ b/src/gcal-search-view.c
@@ -53,6 +53,14 @@ enum
PROP_MANAGER /* manager inherited property */
};
+enum
+{
+ EVENT_ACTIVATED,
+ NUM_SIGNALS
+};
+
+static guint signals[NUM_SIGNALS] = { 0, };
+
#define NO_RESULT_TIMEOUT 250 /* ms */
static GtkWidget* get_event_from_grid (GtkWidget *grid);
@@ -71,8 +79,6 @@ static gboolean show_no_results_page (GcalSearchView
static void gcal_data_model_subscriber_interface_init (ECalDataModelSubscriberInterface *iface);
-static void gcal_view_interface_init (GcalViewIface *iface);
-
static void gcal_search_view_constructed (GObject *object);
static void gcal_search_view_set_property (GObject *object,
@@ -109,8 +115,7 @@ G_DEFINE_TYPE_WITH_CODE (GcalSearchView,
GTK_TYPE_SCROLLED_WINDOW,
G_ADD_PRIVATE (GcalSearchView)
G_IMPLEMENT_INTERFACE (E_TYPE_CAL_DATA_MODEL_SUBSCRIBER,
- gcal_data_model_subscriber_interface_init)
- G_IMPLEMENT_INTERFACE (GCAL_TYPE_VIEW, gcal_view_interface_init));
+ gcal_data_model_subscriber_interface_init));
static GtkWidget*
@@ -251,6 +256,13 @@ gcal_search_view_class_init (GcalSearchViewClass *klass)
object_class->get_property = gcal_search_view_get_property;
object_class->finalize = gcal_search_view_finalize;
+ /* signals */
+ signals[EVENT_ACTIVATED] = g_signal_new ("event-activated", GCAL_TYPE_SEARCH_VIEW, G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GcalSearchViewClass, event_activated),
+ NULL, NULL, NULL,
+ G_TYPE_NONE, 1, GCAL_TYPE_EVENT_WIDGET);
+
+ /* properties */
g_object_class_install_property (
object_class,
PROP_DATE,
@@ -277,20 +289,6 @@ gcal_search_view_class_init (GcalSearchViewClass *klass)
}
static void
-gcal_view_interface_init (GcalViewIface *iface)
-{
- iface->get_initial_date = NULL;
- iface->get_final_date = NULL;
-
- iface->clear_marks = NULL;
-
- iface->get_left_header = NULL;
- iface->get_right_header = NULL;
-
- iface->get_by_uuid = NULL;
-}
-
-static void
gcal_search_view_init (GcalSearchView *self)
{
GcalSearchViewPrivate *priv;
diff --git a/src/gcal-search-view.h b/src/gcal-search-view.h
index 3c2a62c..96c0a96 100644
--- a/src/gcal-search-view.h
+++ b/src/gcal-search-view.h
@@ -20,6 +20,7 @@
#ifndef __GCAL_SEARCH_VIEW_H__
#define __GCAL_SEARCH_VIEW_H__
+#include "gcal-event-widget.h"
#include "gcal-manager.h"
#include <gtk/gtk.h>
@@ -44,6 +45,9 @@ struct _GcalSearchView
struct _GcalSearchViewClass
{
GtkScrolledWindowClass parent_class;
+
+ /* signals */
+ void (*event_activated) (GcalSearchView *view, GcalEventWidget *event_widget);
};
GType gcal_search_view_get_type (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]