[gnome-calendar/search-improvements] search-view: emit GcalView::'event-activated' signal when needed
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/search-improvements] search-view: emit GcalView::'event-activated' signal when needed
- Date: Sat, 3 Jan 2015 21:41:53 +0000 (UTC)
commit 3d6cf1138e965586d3bf9a5eafb4f30c45a829b1
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Jan 3 19:41:40 2015 -0200
search-view: emit GcalView::'event-activated' signal when needed
src/gcal-search-view.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-search-view.c b/src/gcal-search-view.c
index 70be691..177a878 100644
--- a/src/gcal-search-view.c
+++ b/src/gcal-search-view.c
@@ -42,6 +42,9 @@ enum
PROP_MANAGER /* manager inherited property */
};
+static void open_event (GcalEventWidget *event_widget,
+ gpointer user_data);
+
static void gcal_data_model_subscriber_interface_init (ECalDataModelSubscriberInterface *iface);
static void gcal_view_interface_init (GcalViewIface *iface);
@@ -85,6 +88,14 @@ G_DEFINE_TYPE_WITH_CODE (GcalSearchView,
gcal_data_model_subscriber_interface_init)
G_IMPLEMENT_INTERFACE (GCAL_TYPE_VIEW, gcal_view_interface_init));
+
+static void
+open_event (GcalEventWidget *event_widget,
+ gpointer user_data)
+{
+ g_signal_emit_by_name (GCAL_VIEW (user_data), "event-activated", event_widget);
+}
+
static void
gcal_search_view_class_init (GcalSearchViewClass *klass)
{
@@ -252,6 +263,7 @@ gcal_search_view_component_added (ECalDataModelSubscriber *subscriber,
event = gcal_event_widget_new_from_data (data);
gcal_event_widget_set_read_only (GCAL_EVENT_WIDGET (event), e_client_is_readonly (E_CLIENT (client)));
+ g_signal_connect (event, "activate", G_CALLBACK (open_event), subscriber);
g_free (data);
gtk_widget_set_margin_start (event, 96);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]