[gnome-calendar] year-view: impl GcalView::get_children_by_uuid
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] year-view: impl GcalView::get_children_by_uuid
- Date: Tue, 20 Jan 2015 18:17:40 +0000 (UTC)
commit 18ee4de144f797dfb55b07de1c4e064dfa6f6b12
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Tue Jan 20 01:11:40 2015 -0500
year-view: impl GcalView::get_children_by_uuid
src/gcal-year-view.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-year-view.c b/src/gcal-year-view.c
index 59bc7bb..4dc9a7b 100644
--- a/src/gcal-year-view.c
+++ b/src/gcal-year-view.c
@@ -1049,6 +1049,25 @@ gcal_year_view_get_right_header (GcalView *view)
return g_strdup ("");
}
+static GList*
+gcal_year_view_get_children_by_uuid (GcalView *view,
+ const gchar *uuid)
+{
+ GcalYearViewPrivate *priv = GCAL_YEAR_VIEW (view)->priv;
+ GList *children, *l, *result = NULL;
+
+ children = gtk_container_get_children (GTK_CONTAINER (priv->events_sidebar));
+ for (l = children; l != NULL; l = g_list_next (l))
+ {
+ GcalEventWidget *child_widget = GCAL_EVENT_WIDGET (gtk_bin_get_child (GTK_BIN (l->data)));
+ if (g_strcmp0 (uuid, gcal_event_widget_peek_uuid (child_widget)) == 0)
+ result = g_list_append (result, child_widget);
+ }
+ g_list_free (children);
+
+ return result;
+}
+
static void
gcal_year_view_component_changed (ECalDataModelSubscriber *subscriber,
ECalClient *client,
@@ -1189,6 +1208,7 @@ gcal_view_interface_init (GcalViewIface *iface)
/* FIXME: implement what's needed */
iface->get_left_header = gcal_year_view_get_left_header;
iface->get_right_header = gcal_year_view_get_right_header;
+ iface->get_children_by_uuid = gcal_year_view_get_children_by_uuid;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]