diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-09-22 22:46:29 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-09-22 23:23:13 +0200 |
commit | a8e0846a7c111a8d5b5cf8592ecb9b9bbd15ce26 (patch) | |
tree | 0ada7bf9bcb31fffd698e261d8ecfc0c85f1d2de /plugins | |
parent | a29f310b8ad0b088860fe05a5499bccef963a503 (diff) |
Initial file manager implementation, with thumbnail caching
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Dmenu.hpp | 2 | ||||
-rw-r--r-- | plugins/FileManager.hpp | 22 |
2 files changed, 23 insertions, 1 deletions
diff --git a/plugins/Dmenu.hpp b/plugins/Dmenu.hpp index 84614cc..32fdad1 100644 --- a/plugins/Dmenu.hpp +++ b/plugins/Dmenu.hpp @@ -9,7 +9,7 @@ namespace QuickMedia { bool search_is_filter() override { return true; } bool search_suggestions_has_thumbnails() const override { return false; } bool search_results_has_thumbnails() const override { return false; } - int get_search_delay() const override { return 0; } + int get_search_delay() const override { return 50; } bool search_suggestion_is_search() const override { return true; } Page get_page_after_search() const override { return Page::EXIT; } PluginResult get_front_page(BodyItems &result_items) override; diff --git a/plugins/FileManager.hpp b/plugins/FileManager.hpp new file mode 100644 index 0000000..d5d7088 --- /dev/null +++ b/plugins/FileManager.hpp @@ -0,0 +1,22 @@ +#pragma once + +#include "Plugin.hpp" +#include <filesystem> + +namespace QuickMedia { + class FileManager : public Plugin { + public: + FileManager(); + PluginResult get_files_in_directory(BodyItems &result_items); + bool set_current_directory(const std::string &path); + bool set_child_directory(const std::string &filename); + const std::filesystem::path& get_current_dir() const; + + bool search_suggestions_has_thumbnails() const override { return true; } + bool search_results_has_thumbnails() const override { return true; } + int get_search_delay() const override { return 50; } + Page get_page_after_search() const override { return Page::FILE_MANAGER; } + private: + std::filesystem::path current_dir; + }; +}
\ No newline at end of file |