aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-display.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/e-mail-display.c')
-rw-r--r--mail/e-mail-display.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index 55f31c7156..78a63248bc 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -290,10 +290,18 @@ mail_display_link_clicked (GtkHTML *html,
else
flags &= ~EM_FORMAT_HTML_HEADER_BCC;
} else if (strcmp (uri, "##HEADERS##") == 0) {
- if (em_format_html_get_headers_state (priv->formatter) == EM_FORMAT_HTML_HEADERS_STATE_COLLAPSED)
- em_format_html_set_headers_state (priv->formatter, EM_FORMAT_HTML_HEADERS_STATE_EXPANDED);
+ EMFormatHTMLHeadersState state;
+
+ state = em_format_html_get_headers_state (
+ priv->formatter);
+
+ if (state == EM_FORMAT_HTML_HEADERS_STATE_COLLAPSED)
+ state = EM_FORMAT_HTML_HEADERS_STATE_EXPANDED;
else
- em_format_html_set_headers_state (priv->formatter, EM_FORMAT_HTML_HEADERS_STATE_COLLAPSED);
+ state = EM_FORMAT_HTML_HEADERS_STATE_COLLAPSED;
+
+ em_format_html_set_headers_state (
+ priv->formatter, state);
}
priv->formatter->header_wrap_flags = flags;