diff options
-rw-r--r-- | em-format/e-mail-part.h | 2 | ||||
-rw-r--r-- | modules/prefer-plain/e-mail-display-popup-prefer-plain.c | 3 | ||||
-rw-r--r-- | modules/prefer-plain/e-mail-parser-prefer-plain.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/em-format/e-mail-part.h b/em-format/e-mail-part.h index 769d5bbc4c..c67cb8326f 100644 --- a/em-format/e-mail-part.h +++ b/em-format/e-mail-part.h @@ -103,6 +103,8 @@ gboolean e_mail_part_id_has_prefix (EMailPart *part, const gchar *prefix); gboolean e_mail_part_id_has_suffix (EMailPart *part, const gchar *suffix); +gboolean e_mail_part_id_has_substr (EMailPart *part, + const gchar *substr); void e_mail_part_update_validity (EMailPart *part, CamelCipherValidity *validity, guint32 validity_type); 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 3935263700..91df97cdb5 100644 --- a/modules/prefer-plain/e-mail-display-popup-prefer-plain.c +++ b/modules/prefer-plain/e-mail-display-popup-prefer-plain.c @@ -315,7 +315,8 @@ mail_display_popup_prefer_plain_update_actions (EMailDisplayPopupExtension *exte EMailPart *p = link->data; if (e_mail_part_id_has_prefix (p, prefix) && - (strstr (p->id, "text_html") || strstr (p->id, "plain_text"))) { + (e_mail_part_id_has_substr (p, "text_html") || + e_mail_part_id_has_substr (p, "plain_text"))) { const gchar *p_id; p_id = e_mail_part_get_id (p); diff --git a/modules/prefer-plain/e-mail-parser-prefer-plain.c b/modules/prefer-plain/e-mail-parser-prefer-plain.c index 8282b024ad..c09c70d7f8 100644 --- a/modules/prefer-plain/e-mail-parser-prefer-plain.c +++ b/modules/prefer-plain/e-mail-parser-prefer-plain.c @@ -275,7 +275,7 @@ empe_prefer_plain_parse (EMailParserExtension *extension, for (link = head; link != NULL; link = g_list_next (link)) { EMailPart *mail_part = link->data; - if (strstr (mail_part->id, ".text_html") != NULL) { + if (e_mail_part_id_has_substr (mail_part, ".text_html")) { has_html = TRUE; break; } |