From 6db972ab0fd2f223aea07c6a413d39a01c41152b Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 2 Jul 2013 12:09:28 -0400 Subject: GalView-related cleanups. --- calendar/gui/calendar-view.c | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/calendar-view.c b/calendar/gui/calendar-view.c index 8ef24ef9f9..08bac07590 100644 --- a/calendar/gui/calendar-view.c +++ b/calendar/gui/calendar-view.c @@ -42,8 +42,6 @@ struct _CalendarViewPrivate { static void calendar_view_finalize (GObject *object); -static void calendar_view_load (GalView *view, const gchar *filename); -static void calendar_view_save (GalView *view, const gchar *filename); static const gchar *calendar_view_get_title (GalView *view); static void calendar_view_set_title (GalView *view, const gchar *title); static const gchar *calendar_view_get_type_code (GalView *view); @@ -63,8 +61,6 @@ calendar_view_class_init (CalendarViewClass *class) gal_view_class = (GalViewClass *) class; object_class = (GObjectClass *) class; - gal_view_class->load = calendar_view_load; - gal_view_class->save = calendar_view_save; gal_view_class->get_title = calendar_view_get_title; gal_view_class->set_title = calendar_view_set_title; gal_view_class->get_type_code = calendar_view_get_type_code; @@ -94,22 +90,6 @@ calendar_view_finalize (GObject *object) G_OBJECT_CLASS (calendar_view_parent_class)->finalize (object); } -/* load method of the calendar view */ -static void -calendar_view_load (GalView *view, - const gchar *filename) -{ - /* nothing */ -} - -/* save method of the calendar view */ -static void -calendar_view_save (GalView *view, - const gchar *filename) -{ - /* nothing */ -} - /* get_title method of the calendar view */ static const gchar * calendar_view_get_title (GalView *view) @@ -173,20 +153,16 @@ static GalView * calendar_view_clone (GalView *view) { CalendarView *cal_view; - CalendarViewPrivate *priv; - CalendarView *new_view; - CalendarViewPrivate *new_priv; - - cal_view = CALENDAR_VIEW (view); - priv = cal_view->priv; + GalView *clone; - new_view = g_object_new (TYPE_CALENDAR_VIEW, NULL); - new_priv = new_view->priv; + /* Chain up to parent's clone() method. */ + clone = GAL_VIEW_CLASS (calendar_view_parent_class)->clone (view); - new_priv->view_type = priv->view_type; - new_priv->title = g_strdup (priv->title); + cal_view = CALENDAR_VIEW (view); + CALENDAR_VIEW (clone)->priv->view_type = cal_view->priv->view_type; + CALENDAR_VIEW (clone)->priv->title = g_strdup (cal_view->priv->title); - return GAL_VIEW (new_view); + return clone; } /** -- cgit v1.2.3