From cc3a65bde2e480b2b07b74eeef20d9081d7f730f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 2 Jun 2021 17:42:30 +0200 Subject: Add modern theme Join matrix room by their name instead of id if there is a name. This allows you to join rooms where the homeserver that created the room is no longer participating in the room. --- src/plugins/FileManager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/plugins/FileManager.cpp') 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 &result_tabs) { - (void)url; - + PluginResult FileManagerPage::submit(const std::string&, const std::string &url, std::vector &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(); -- cgit v1.2.3