aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/FileManager.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-06-02 17:42:30 +0200
committerdec05eba <dec05eba@protonmail.com>2021-06-02 17:43:47 +0200
commitcc3a65bde2e480b2b07b74eeef20d9081d7f730f (patch)
tree1bb5b85ab764592093e8042458ec9f4be0cf904a /src/plugins/FileManager.cpp
parent1b6812348e75de21c8f398a7dc944cc427064cc4 (diff)
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.
Diffstat (limited to 'src/plugins/FileManager.cpp')
-rw-r--r--src/plugins/FileManager.cpp12
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();