From 1026360c595818eabe75813bcd02258c4d0dddc7 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 24 May 2021 07:53:33 +0200 Subject: Save the last accessed file manager directory and use that the next time. Add ctrl+s for 4chan without viewing the image/video in fullscreen mode --- plugins/FileManager.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins') diff --git a/plugins/FileManager.hpp b/plugins/FileManager.hpp index e452c40..4e36b3c 100644 --- a/plugins/FileManager.hpp +++ b/plugins/FileManager.hpp @@ -27,6 +27,9 @@ namespace QuickMedia { bool set_current_directory(const std::string &path); const std::filesystem::path& get_current_directory() const { return current_dir; } PluginResult get_files_in_directory(BodyItems &result_items); + + // |fallback| is used if no directory has been accessed + static std::filesystem::path& get_last_accessed_directory(std::filesystem::path &fallback); private: std::filesystem::path current_dir; FileManagerMimeType mime_type; -- cgit v1.2.3