diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-12-07 23:11:00 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-12-08 03:01:05 +0800 |
commit | 7885426c2bfc410838e9c49bfd350b04e0535435 (patch) | |
tree | de1e21b46f4cd0edda4ccf0341ec64e8117297a3 /modules | |
parent | 00b211b0f515d6b6d9147c1ca568d0c4b42af699 (diff) | |
download | gsoc2013-evolution-7885426c2bfc410838e9c49bfd350b04e0535435.tar gsoc2013-evolution-7885426c2bfc410838e9c49bfd350b04e0535435.tar.gz gsoc2013-evolution-7885426c2bfc410838e9c49bfd350b04e0535435.tar.bz2 gsoc2013-evolution-7885426c2bfc410838e9c49bfd350b04e0535435.tar.lz gsoc2013-evolution-7885426c2bfc410838e9c49bfd350b04e0535435.tar.xz gsoc2013-evolution-7885426c2bfc410838e9c49bfd350b04e0535435.tar.zst gsoc2013-evolution-7885426c2bfc410838e9c49bfd350b04e0535435.zip |
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.
Diffstat (limited to 'modules')
4 files changed, 4 insertions, 28 deletions
diff --git a/modules/audio-inline/e-mail-formatter-audio-inline.c b/modules/audio-inline/e-mail-formatter-audio-inline.c index f93bf67f4f..ed5630796e 100644 --- a/modules/audio-inline/e-mail-formatter-audio-inline.c +++ b/modules/audio-inline/e-mail-formatter-audio-inline.c @@ -312,12 +312,6 @@ emfe_audio_inline_get_widget (EMailFormatterExtension *extension, } static const gchar * -emfe_audio_inline_get_display_name (EMailFormatterExtension *extension) -{ - return _("Audio Player"); -} - -static const gchar * emfe_audio_inline_get_description (EMailFormatterExtension *extension) { return _("Play the attachment in embedded audio player"); @@ -326,10 +320,10 @@ emfe_audio_inline_get_description (EMailFormatterExtension *extension) static void e_mail_formatter_audio_inline_class_init (EMailFormatterExtensionClass *class) { + class->display_name = _("Audio Player"); class->mime_types = formatter_mime_types; class->format = emfe_audio_inline_format; class->get_widget = emfe_audio_inline_get_widget; - class->get_display_name = emfe_audio_inline_get_display_name; class->get_description = emfe_audio_inline_get_description; } diff --git a/modules/itip-formatter/e-mail-formatter-itip.c b/modules/itip-formatter/e-mail-formatter-itip.c index 41bf368227..03101fb746 100644 --- a/modules/itip-formatter/e-mail-formatter-itip.c +++ b/modules/itip-formatter/e-mail-formatter-itip.c @@ -137,12 +137,6 @@ emfe_itip_format (EMailFormatterExtension *extension, } static const gchar * -emfe_itip_get_display_name (EMailFormatterExtension *extension) -{ - return _("ITIP"); -} - -static const gchar * emfe_itip_get_description (EMailFormatterExtension *extension) { return _("Display part as an invitation"); @@ -151,9 +145,9 @@ emfe_itip_get_description (EMailFormatterExtension *extension) static void e_mail_formatter_itip_class_init (EMailFormatterExtensionClass *class) { + class->display_name = _("ITIP"); class->mime_types = formatter_mime_types; class->format = emfe_itip_format; - class->get_display_name = emfe_itip_get_display_name; class->get_description = emfe_itip_get_description; } 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 @@ -357,12 +357,6 @@ emfe_text_highlight_format (EMailFormatterExtension *extension, } static const gchar * -emfe_text_highlight_get_display_name (EMailFormatterExtension *extension) -{ - return _("Text Highlight"); -} - -static const gchar * emfe_text_highlight_get_description (EMailFormatterExtension *extension) { return _("Syntax highlighting of mail parts"); @@ -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; } diff --git a/modules/vcard-inline/e-mail-formatter-vcard-inline.c b/modules/vcard-inline/e-mail-formatter-vcard-inline.c index b3e2b830f6..a5240dbc9c 100644 --- a/modules/vcard-inline/e-mail-formatter-vcard-inline.c +++ b/modules/vcard-inline/e-mail-formatter-vcard-inline.c @@ -195,12 +195,6 @@ emfe_vcard_inline_format (EMailFormatterExtension *extension, } static const gchar * -emfe_vcard_inline_get_display_name (EMailFormatterExtension *extension) -{ - return _("Addressbook Contact"); -} - -static const gchar * emfe_vcard_inline_get_description (EMailFormatterExtension *extension) { return _("Display the part as an addressbook contact"); @@ -209,9 +203,9 @@ emfe_vcard_inline_get_description (EMailFormatterExtension *extension) static void e_mail_formatter_vcard_inline_class_init (EMailFormatterExtensionClass *class) { + class->display_name = _("Addressbook Contact"); class->mime_types = formatter_mime_types; class->format = emfe_vcard_inline_format; - class->get_display_name = emfe_vcard_inline_get_display_name; class->get_description = emfe_vcard_inline_get_description; } |