I#1935 - Mail: Add option to print attachment content

Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1935
This commit is contained in:
Milan Crha 2022-06-17 12:34:37 +02:00
parent 833bf25e80
commit 6688230dd3
2 changed files with 13 additions and 0 deletions

View File

@ -876,6 +876,11 @@
<_summary>Whether to preserve expand state of the folders when calling Copy/Move to Folder.</_summary>
<_description>If enabled, the Copy/Move to Folder dialog will preserve the expand state of the folders in the dialog, otherwise all the folders will be expanded.</_description>
</key>
<key name="print-attachments" type="b">
<default>false</default>
<_summary>Whether to print attachments.</_summary>
<_description>If enabled, and possible, attachment content is printed with the message.</_description>
</key>
<key name="preview-text-size-limit" type="i">
<default>512</default>
<_summary>Size limit for text attachments to show</_summary>

View File

@ -132,9 +132,17 @@ emfe_attachment_format (EMailFormatterExtension *extension,
gchar *name;
EAttachment *attachment;
GFileInfo *file_info;
GSettings *settings;
const gchar *display_name;
gchar *description;
settings = e_util_ref_settings ("org.gnome.evolution.mail");
if (!g_settings_get_boolean (settings, "print-attachments")) {
g_clear_object (&settings);
return TRUE;
}
g_clear_object (&settings);
attachment = e_mail_part_attachment_ref_attachment (
E_MAIL_PART_ATTACHMENT (part));