[gnome-calendar] gcal-view: implementing GcalView:clear vfunc
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] gcal-view: implementing GcalView:clear vfunc
- Date: Thu, 4 Dec 2014 22:25:25 +0000 (UTC)
commit 37dc43c518b4dd0d2b3f4964b407945a93f201dd
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Thu Jun 20 11:33:38 2013 -0400
gcal-view: implementing GcalView:clear vfunc
src/gcal-month-view.c | 10 ++++++++++
src/gcal-year-view.c | 10 ++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index 834258e..9d952ed 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -128,6 +128,8 @@ static gboolean gcal_month_view_draw_event (GcalView *vie
static GtkWidget* gcal_month_view_get_by_uuid (GcalView *view,
const gchar *uuid);
+static void gcal_month_view_clear (GcalView *view);
+
/* Review API */
static void gcal_month_view_clear_selection (GcalView *view);
@@ -220,6 +222,7 @@ gcal_view_interface_init (GcalViewIface *iface)
iface->draw_event = gcal_month_view_draw_event;
iface->get_by_uuid = gcal_month_view_get_by_uuid;
+ iface->clear = gcal_month_view_clear;
}
static void
@@ -1280,6 +1283,13 @@ gcal_month_view_get_by_uuid (GcalView *view,
}
static void
+gcal_month_view_clear (GcalView *view)
+{
+ gtk_container_foreach (GTK_CONTAINER (view),
+ (GtkCallback) gtk_widget_destroy, NULL);
+}
+
+static void
gcal_month_view_clear_selection (GcalView *view)
{
GcalMonthViewPrivate *priv;
diff --git a/src/gcal-year-view.c b/src/gcal-year-view.c
index ffecda2..1abdbb3 100644
--- a/src/gcal-year-view.c
+++ b/src/gcal-year-view.c
@@ -126,6 +126,8 @@ static gboolean gcal_year_view_draw_event (GcalView
static GtkWidget* gcal_year_view_get_by_uuid (GcalView *view,
const gchar *uuid);
+static void gcal_year_view_clear (GcalView *view);
+
/* Review API */
static void gcal_year_view_clear_selection (GcalView *view);
@@ -216,6 +218,7 @@ gcal_view_interface_init (GcalViewIface *iface)
iface->draw_event = gcal_year_view_draw_event;
iface->get_by_uuid = gcal_year_view_get_by_uuid;
+ iface->clear = gcal_year_view_clear;
}
static void
@@ -1063,6 +1066,13 @@ gcal_year_view_get_by_uuid (GcalView *view,
}
static void
+gcal_year_view_clear (GcalView *view)
+{
+ gtk_container_foreach (GTK_CONTAINER (view),
+ (GtkCallback) gtk_widget_destroy, NULL);
+}
+
+static void
gcal_year_view_clear_selection (GcalView *view)
{
GcalYearViewPrivate *priv;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]