[evolution] Bug 793477 - Hide Autoar options in "Save all" when not needed



commit 375a5f6de13a7cc63469699c130e83b1496f710d
Author: Milan Crha <mcrha redhat com>
Date:   Tue Feb 20 13:51:54 2018 +0100

    Bug 793477 - Hide Autoar options in "Save all" when not needed

 src/e-util/e-attachment-store.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/e-util/e-attachment-store.c b/src/e-util/e-attachment-store.c
index f96f8b1..226cbb5 100644
--- a/src/e-util/e-attachment-store.c
+++ b/src/e-util/e-attachment-store.c
@@ -903,6 +903,24 @@ e_attachment_store_run_save_dialog (EAttachmentStore *store,
 #endif
 
                g_clear_object (&file_info);
+#ifdef HAVE_AUTOAR
+       } else {
+               GList *iter;
+               gboolean any_supported = FALSE;
+
+               for (iter = attachment_list; iter && !any_supported; iter = iter->next) {
+                       EAttachment *attachment = iter->data;
+                       gchar *mime_type;
+
+                       mime_type = e_attachment_dup_mime_type (attachment);
+
+                       any_supported = autoar_check_mime_type_supported (mime_type);
+
+                       g_free (mime_type);
+               }
+
+               gtk_widget_set_visible (extra_box_widget, any_supported);
+#endif
        }
 
        e_util_load_file_chooser_folder (file_chooser);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]