Application.AttachmentManager: Default save chooser to XDG_DOWNLOADS

We know that location is writable under Flatpak at the moment, so
default to it.
This commit is contained in:
Michael Gratton 2021-02-03 08:46:03 +11:00
parent f0d169e0d4
commit 2b5ef5ea52

View file

@ -271,6 +271,10 @@ public class Application.AttachmentManager : GLib.Object {
Stock._SAVE,
Stock._CANCEL
);
var download_dir = GLib.Environment.get_user_special_dir(DOWNLOAD);
if (!Geary.String.is_empty_or_whitespace(download_dir)) {
dialog.set_current_folder(download_dir);
}
dialog.set_local_only(false);
return dialog;
}