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. --- e-util/gal-view-instance.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'e-util/gal-view-instance.c') diff --git a/e-util/gal-view-instance.c b/e-util/gal-view-instance.c index 32f8a5fd26..3eac358515 100644 --- a/e-util/gal-view-instance.c +++ b/e-util/gal-view-instance.c @@ -139,12 +139,16 @@ static void connect_view (GalViewInstance *instance, GalView *view) { + GalViewClass *view_class; + if (instance->current_view) disconnect_view (instance); instance->current_view = g_object_ref (view); + view_class = GAL_VIEW_GET_CLASS (view); + instance->current_title = g_strdup (gal_view_get_title (view)); - instance->current_type = g_strdup (gal_view_get_type_code (view)); + instance->current_type = g_strdup (view_class->type_code); instance->view_changed_id = g_signal_connect ( instance->current_view, "changed", G_CALLBACK (view_changed), instance); -- cgit v1.2.3