From 57a3b819e1b849db7b2e76bcbad84bd551cdd55e Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 2 Jul 2013 15:43:03 -0400 Subject: GalViewClass: Replace get_type_code() with "type_code" string. All GalView subclasses return a static string in their get_type_code() methods, so replace the method with a static string pointer directly in the class structure, and remove the "type-code" GalView property. --- calendar/gui/calendar-view.c | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'calendar') diff --git a/calendar/gui/calendar-view.c b/calendar/gui/calendar-view.c index f373469541..88cdd3cb82 100644 --- a/calendar/gui/calendar-view.c +++ b/calendar/gui/calendar-view.c @@ -38,16 +38,10 @@ G_DEFINE_TYPE ( gal_view_calendar_month, GAL_TYPE_VIEW) -static const gchar * -gal_view_calendar_day_get_type_code (GalView *view) -{ - return "day_view"; -} - static void gal_view_calendar_day_class_init (GalViewClass *class) { - class->get_type_code = gal_view_calendar_day_get_type_code; + class->type_code = "day_view"; } static void @@ -55,16 +49,10 @@ gal_view_calendar_day_init (GalView *view) { } -static const gchar * -gal_view_calendar_work_week_get_type_code (GalView *view) -{ - return "work_week_view"; -} - static void gal_view_calendar_work_week_class_init (GalViewClass *class) { - class->get_type_code = gal_view_calendar_work_week_get_type_code; + class->type_code = "work_week_view"; } static void @@ -72,16 +60,10 @@ gal_view_calendar_work_week_init (GalView *view) { } -static const gchar * -gal_view_calendar_week_get_type_code (GalView *view) -{ - return "week_view"; -} - static void gal_view_calendar_week_class_init (GalViewClass *class) { - class->get_type_code = gal_view_calendar_week_get_type_code; + class->type_code = "week_view"; } static void @@ -89,16 +71,10 @@ gal_view_calendar_week_init (GalView *view) { } -static const gchar * -gal_view_calendar_month_get_type_code (GalView *view) -{ - return "month_view"; -} - static void gal_view_calendar_month_class_init (GalViewClass *class) { - class->get_type_code = gal_view_calendar_month_get_type_code; + class->type_code = "month_view"; } static void -- cgit v1.2.3