This ensures both inline images are saved using the specified content filename, if any, and that an extension is attempted to be guessed when no filename is specified. Fixes Bug 713999, Bug 712923, Bug 778026. * src/client/application/geary-controller.vala: Major rework of how attachments are saved. Rework how save dialogs are constructed, combining common code paths into one constrcutor method. Split up code for saving one attachment vs many into two different methods. Ensure all code baths ultimately use the same method to do the actual saving. Lookup a attachment when saving an inline image and use that by default. Get filenames from new Attachment::get_useful_filename method that guesses if needed. * src/client/conversation-viewer/conversation-message.vala (ConversationMessage::save_image): Fix name of first param to reflect what it actually is. * src/engine/api/geary-attachment.vala (Attachment): Add ::get_safe_filename method that checks the type of both the attachment's content and its file name, if any. Will construct an appropriate file name if non is given. Add unit tests. * src/engine/api/geary-email.vala (Email): Add new ::get_attachment_by_content_id to lookup attachments by MIME content-id. Rename old ::get_attachment method to disambiguate. |
||
|---|---|---|
| .. | ||
| client | ||
| engine | ||
| js | ||
| CMakeLists.txt | ||
| main.vala | ||
| testcase.vala | ||