diff options
Diffstat (limited to 'src/plugins/FileManager.cpp')
-rw-r--r-- | src/plugins/FileManager.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/FileManager.cpp b/src/plugins/FileManager.cpp index 42c2f9e..04e284a 100644 --- a/src/plugins/FileManager.cpp +++ b/src/plugins/FileManager.cpp @@ -34,14 +34,12 @@ namespace QuickMedia { return last_write_time; } - PluginResult FileManagerPage::submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) { - (void)url; - + PluginResult FileManagerPage::submit(const std::string&, const std::string &url, std::vector<Tab> &result_tabs) { std::filesystem::path new_path; - if(title == "..") + if(url == "..") new_path = current_dir.parent_path(); else - new_path = current_dir / title; + new_path = current_dir / url; if(std::filesystem::is_regular_file(new_path)) { program->select_file(new_path); @@ -89,7 +87,8 @@ namespace QuickMedia { }); if(current_dir != "/") { - auto parent_item = BodyItem::create(".."); + auto parent_item = BodyItem::create("Go to parent directory"); + parent_item->url = ".."; result_items.push_back(std::move(parent_item)); } @@ -114,6 +113,7 @@ namespace QuickMedia { continue; auto body_item = BodyItem::create(p.path().filename().string()); + body_item->url = body_item->get_title(); if(file_mime_type == FILE_MANAGER_MIME_TYPE_IMAGE || file_mime_type == FILE_MANAGER_MIME_TYPE_VIDEO) { body_item->thumbnail_is_local = true; body_item->thumbnail_url = p.path().string(); |