[gnome-calendar] month-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] month-view: impl GcalView::get_children_by_uuid
- Date: Tue, 20 Jan 2015 19:53:31 +0000 (UTC)
commit b03a906eee78f4fa3ca8e12f86e73b2e46eae779
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Tue Jan 20 14:48:27 2015 -0500
month-view: impl GcalView::get_children_by_uuid
src/gcal-month-view.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index 41a5cd9..8d0d327 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -169,6 +169,9 @@ static gchar* gcal_month_view_get_left_header (GcalView *vie
static gchar* gcal_month_view_get_right_header (GcalView *view);
+static GList* gcal_month_view_get_children_by_uuid (GcalView *view,
+ const gchar *uuid);
+
G_DEFINE_TYPE_WITH_CODE (GcalMonthView, gcal_month_view,GCAL_TYPE_SUBSCRIBER_VIEW,
G_ADD_PRIVATE (GcalMonthView)
G_IMPLEMENT_INTERFACE (GCAL_TYPE_VIEW, gcal_view_interface_init));
@@ -598,6 +601,7 @@ gcal_view_interface_init (GcalViewIface *iface)
iface->get_left_header = gcal_month_view_get_left_header;
iface->get_right_header = gcal_month_view_get_right_header;
+ iface->get_children_by_uuid = gcal_month_view_get_children_by_uuid;
}
static void
@@ -1671,6 +1675,20 @@ gcal_month_view_clear_marks (GcalView *view)
gtk_widget_queue_draw (GTK_WIDGET (view));
}
+static GList*
+gcal_month_view_get_children_by_uuid (GcalView *view,
+ const gchar *uuid)
+{
+ GcalSubscriberViewPrivate *ppriv = GCAL_SUBSCRIBER_VIEW (view)->priv;
+ GList *l;
+
+ l = g_hash_table_lookup (ppriv->children, uuid);
+ if (l != NULL)
+ return g_list_reverse (g_list_copy (l));
+
+ return NULL;
+}
+
static gchar*
gcal_month_view_get_left_header (GcalView *view)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]