From 7885426c2bfc410838e9c49bfd350b04e0535435 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 7 Dec 2012 10:11:00 -0500 Subject: EMailFormatterExtension: Convert get_display_name() to a string field. Of the formatter extensions that provide a display name, they all use a static string. So we don't need an instance of the extension to obtain its display name. Just make it a string field in the class structure. --- modules/text-highlight/e-mail-formatter-text-highlight.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'modules/text-highlight') diff --git a/modules/text-highlight/e-mail-formatter-text-highlight.c b/modules/text-highlight/e-mail-formatter-text-highlight.c index f927eaf3a9..8d44135cbc 100644 --- a/modules/text-highlight/e-mail-formatter-text-highlight.c +++ b/modules/text-highlight/e-mail-formatter-text-highlight.c @@ -356,12 +356,6 @@ emfe_text_highlight_format (EMailFormatterExtension *extension, return TRUE; } -static const gchar * -emfe_text_highlight_get_display_name (EMailFormatterExtension *extension) -{ - return _("Text Highlight"); -} - static const gchar * emfe_text_highlight_get_description (EMailFormatterExtension *extension) { @@ -371,9 +365,9 @@ emfe_text_highlight_get_description (EMailFormatterExtension *extension) static void e_mail_formatter_text_highlight_class_init (EMailFormatterExtensionClass *class) { + class->display_name = _("Text Highlight"); class->mime_types = get_mime_types (); class->format = emfe_text_highlight_format; - class->get_display_name = emfe_text_highlight_get_display_name; class->get_description = emfe_text_highlight_get_description; } -- cgit v1.2.3