diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-08-12 05:53:59 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-08-12 05:53:59 +0800 |
commit | 6f451f9f65c4d80d157f0898dcaffd7d561876a4 (patch) | |
tree | 77e87cfc75ee2639ed7d4ccf0567ffa210c46211 | |
parent | 91b7fd65d3033e12ab38d567d84e526676fa7a24 (diff) | |
download | gsoc2013-evolution-6f451f9f65c4d80d157f0898dcaffd7d561876a4.tar.gz gsoc2013-evolution-6f451f9f65c4d80d157f0898dcaffd7d561876a4.tar.zst gsoc2013-evolution-6f451f9f65c4d80d157f0898dcaffd7d561876a4.zip |
prefer-plain: Cleanups.
-rw-r--r-- | modules/prefer-plain/e-mail-display-popup-prefer-plain.c | 29 | ||||
-rw-r--r-- | modules/prefer-plain/e-mail-parser-prefer-plain.c | 15 |
2 files changed, 28 insertions, 16 deletions
diff --git a/modules/prefer-plain/e-mail-display-popup-prefer-plain.c b/modules/prefer-plain/e-mail-display-popup-prefer-plain.c index 55ee45527b..e84fbfafe1 100644 --- a/modules/prefer-plain/e-mail-display-popup-prefer-plain.c +++ b/modules/prefer-plain/e-mail-display-popup-prefer-plain.c @@ -30,7 +30,10 @@ #define d(x) -typedef struct _EMailDisplayPopupPreferPlain { +typedef struct _EMailDisplayPopupPreferPlain EMailDisplayPopupPreferPlain; +typedef struct _EMailDisplayPopupPreferPlainClass EMailDisplayPopupPreferPlainClass; + +struct _EMailDisplayPopupPreferPlain { EExtension parent; WebKitDOMDocument *document; @@ -39,15 +42,17 @@ typedef struct _EMailDisplayPopupPreferPlain { GtkActionGroup *action_group; -} EMailDisplayPopupPreferPlain; +}; -typedef struct _EMailDisplayPopupPreferPlainClass { +struct _EMailDisplayPopupPreferPlainClass { EExtensionClass parent_class; -} EMailDisplayPopupPreferPlainClass; +}; +#define E_TYPE_MAIL_DISPLAY_POPUP_PREFER_PLAIN \ + (e_mail_display_popup_prefer_plain_get_type ()) #define E_MAIL_DISPLAY_POPUP_PREFER_PLAIN(obj) \ (G_TYPE_CHECK_INSTANCE_CAST \ - ((obj), e_mail_display_popup_prefer_plain_get_type(), EMailDisplayPopupPreferPlain)) + ((obj), E_TYPE_MAIL_DISPLAY_POPUP_PREFER_PLAIN, EMailDisplayPopupPreferPlain)) GType e_mail_display_popup_prefer_plain_get_type (void); static void e_mail_display_popup_extension_interface_init (EMailDisplayPopupExtensionInterface *iface); @@ -360,20 +365,22 @@ e_mail_display_popup_prefer_plain_finalize (GObject *object) g_free (extension->text_html_id); g_free (extension->text_plain_id); g_object_unref (extension->action_group); + + /* Chain up to parent's finalize() method. */ + G_OBJECT_CLASS (e_mail_display_popup_prefer_plain_parent_class)-> + finalize (object); } static void -e_mail_display_popup_prefer_plain_class_init (EMailDisplayPopupPreferPlainClass *klass) +e_mail_display_popup_prefer_plain_class_init (EMailDisplayPopupPreferPlainClass *class) { EExtensionClass *extension_class; GObjectClass *object_class; - e_mail_display_popup_prefer_plain_parent_class = g_type_class_peek_parent (klass); - - extension_class = E_EXTENSION_CLASS (klass); + extension_class = E_EXTENSION_CLASS (class); extension_class->extensible_type = E_TYPE_MAIL_DISPLAY; - object_class = G_OBJECT_CLASS (klass); + object_class = G_OBJECT_CLASS (class); object_class->finalize = e_mail_display_popup_prefer_plain_finalize; } @@ -384,7 +391,7 @@ e_mail_display_popup_extension_interface_init (EMailDisplayPopupExtensionInterfa } void -e_mail_display_popup_prefer_plain_class_finalize (EMailDisplayPopupPreferPlainClass *klass) +e_mail_display_popup_prefer_plain_class_finalize (EMailDisplayPopupPreferPlainClass *class) { } diff --git a/modules/prefer-plain/e-mail-parser-prefer-plain.c b/modules/prefer-plain/e-mail-parser-prefer-plain.c index 4acf9078f9..01c3365939 100644 --- a/modules/prefer-plain/e-mail-parser-prefer-plain.c +++ b/modules/prefer-plain/e-mail-parser-prefer-plain.c @@ -32,17 +32,20 @@ #define d(x) -typedef struct _EMailParserPreferPlain { +typedef struct _EMailParserPreferPlain EMailParserPreferPlain; +typedef struct _EMailParserPreferPlainClass EMailParserPreferPlainClass; + +struct _EMailParserPreferPlain { EExtension parent; GSettings *settings; gint mode; gboolean show_suppressed; -} EMailParserPreferPlain; +}; -typedef struct _EMailParserPreferPlainClass { +struct _EMailParserPreferPlainClass { EExtensionClass parent_class; -} EMailParserPreferPlainClass; +}; GType e_mail_parser_prefer_plain_get_type (void); static void e_mail_parser_mail_extension_interface_init (EMailExtensionInterface *iface); @@ -416,7 +419,9 @@ e_mail_parser_prefer_plain_finalize (GObject *object) g_clear_object (&parser->settings); - G_OBJECT_CLASS (e_mail_parser_prefer_plain_parent_class)->finalize (object); + /* Chain up to parent's finalize() method. */ + G_OBJECT_CLASS (e_mail_parser_prefer_plain_parent_class)-> + finalize (object); } static void |