mu: don't verify signatures when it's not needed

We were verifying signatures when this was not needed; it seems that
gpgme is a bit slow (?), and on some people's machine the extra
verification made opening messages slow (with the non-gnus view esp.)
This commit is contained in:
Dirk-Jan C. Binnema 2020-05-05 21:25:36 +03:00
parent f3b70bf049
commit f44f81b751
2 changed files with 12 additions and 0 deletions

View File

@ -59,6 +59,10 @@ get_mime_object_at_index (MuMsg *msg, MuMsgOptions opts, unsigned index)
ddata.mime_obj = NULL;
ddata.index = index;
/* wipe out some irrelevant options */
opts &= ~MU_MSG_OPTION_VERIFY;
opts &= ~MU_MSG_OPTION_EXTRACT_IMAGES;
mu_msg_part_foreach (msg, opts,
(MuMsgPartForeachFunc)do_it_with_index,
&ddata);

View File

@ -473,6 +473,10 @@ get_body (MuMsg *self, MuMsgOptions opts, gboolean want_html)
bdata.want_html = want_html;
bdata.gstr = g_string_sized_new (4096);
/* wipe out some irrelevant options */
opts &= ~MU_MSG_OPTION_VERIFY;
opts &= ~MU_MSG_OPTION_EXTRACT_IMAGES;
mu_msg_part_foreach (self, opts,
(MuMsgPartForeachFunc)accumulate_body,
&bdata);
@ -522,6 +526,10 @@ get_content_type_parameters (MuMsg *self, MuMsgOptions opts, gboolean want_html)
cdata.want_html = want_html;
cdata.ctype = NULL;
/* wipe out some irrelevant options */
opts &= ~MU_MSG_OPTION_VERIFY;
opts &= ~MU_MSG_OPTION_EXTRACT_IMAGES;
mu_msg_part_foreach (self, opts,
(MuMsgPartForeachFunc)find_content_type,
&cdata);