diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-07-03 03:43:03 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-07-06 04:40:49 +0800 |
commit | 57a3b819e1b849db7b2e76bcbad84bd551cdd55e (patch) | |
tree | 4084fff5f45bde552a798f49f4d234f5a0b7dd49 /e-util/gal-view-instance.c | |
parent | 3f5f362e0df717f2aaca8d21c3b3e180904a6897 (diff) | |
download | gsoc2013-evolution-57a3b819e1b849db7b2e76bcbad84bd551cdd55e.tar gsoc2013-evolution-57a3b819e1b849db7b2e76bcbad84bd551cdd55e.tar.gz gsoc2013-evolution-57a3b819e1b849db7b2e76bcbad84bd551cdd55e.tar.bz2 gsoc2013-evolution-57a3b819e1b849db7b2e76bcbad84bd551cdd55e.tar.lz gsoc2013-evolution-57a3b819e1b849db7b2e76bcbad84bd551cdd55e.tar.xz gsoc2013-evolution-57a3b819e1b849db7b2e76bcbad84bd551cdd55e.tar.zst gsoc2013-evolution-57a3b819e1b849db7b2e76bcbad84bd551cdd55e.zip |
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.
Diffstat (limited to 'e-util/gal-view-instance.c')
-rw-r--r-- | e-util/gal-view-instance.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |