diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-06-11 21:52:59 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-06-11 21:52:59 +0200 |
commit | cdddd4250c0fd6cb6b8e0fe7f8810a83df7d48c4 (patch) | |
tree | a9d3460d20895028f77fb4dba79550cd1e073ca6 | |
parent | fd402fc4ea57eababbe5e568835e7b5e070bd0c0 (diff) |
Change file manager view to grid, change file and folder icons
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | images/audio.png | bin | 0 -> 1643 bytes | |||
-rw-r--r-- | images/file.png | bin | 1074 -> 1185 bytes | |||
-rw-r--r-- | images/folder.png | bin | 826 -> 1021 bytes | |||
-rw-r--r-- | plugins/FileManager.hpp | 5 | ||||
-rw-r--r-- | src/QuickMedia.cpp | 8 | ||||
-rw-r--r-- | src/plugins/FileManager.cpp | 16 | ||||
-rw-r--r-- | src/plugins/Matrix.cpp | 2 |
9 files changed, 23 insertions, 12 deletions
@@ -250,7 +250,7 @@ Cache is stored under `$XDG_CACHE_HOME/quickmedia` or `~/.cache/quickmedia`. ## Tabs [tabbed](https://tools.suckless.org/tabbed/) can be used to put quickmedia windows into tabs. After installing `tabbed`, run `tabbed -c -k quickmedia launcher -e`. ## License -QuickMedia is free software licensed under GPL 3.0, see LICENSE for more details. The emojis are from the twemoji project, licensed under Creative Commons Public License 4.0 (see https://raw.githubusercontent.com/twitter/twemoji/v14.0.2/LICENSE-GRAPHICS). +QuickMedia is free software licensed under GPL 3.0, see LICENSE for more details. The emojis are from the twemoji project, licensed under Creative Commons Public License 4.0 (see https://raw.githubusercontent.com/twitter/twemoji/v14.0.2/LICENSE-GRAPHICS). The file and directory images are from https://github.com/L4ki/Breeze-Chameleon-Icons and are licensed under GPL 3.0. # Screenshots ## Youtube search ![](https://dec05eba.com/images/youtube.webp) @@ -266,3 +266,5 @@ Support youtube multiple audio tracks. Add support for irc, xmpp. Rename local-anime/local-manga to more generic media forms (local-media/local-shows, etc?). Add ability to create room, commands for changing nickname, roomnickname, avatar, kick, ban, etc. +Replace pepper emoji with gimp pepper. +Consider adding typing notification to matrix.
\ No newline at end of file diff --git a/images/audio.png b/images/audio.png Binary files differnew file mode 100644 index 0000000..de46e3b --- /dev/null +++ b/images/audio.png diff --git a/images/file.png b/images/file.png Binary files differindex 22806e9..dbadc46 100644 --- a/images/file.png +++ b/images/file.png diff --git a/images/folder.png b/images/folder.png Binary files differindex 06f2b63..8f889fe 100644 --- a/images/folder.png +++ b/images/folder.png diff --git a/plugins/FileManager.hpp b/plugins/FileManager.hpp index e31eb41..bb3b847 100644 --- a/plugins/FileManager.hpp +++ b/plugins/FileManager.hpp @@ -9,10 +9,11 @@ namespace QuickMedia { enum FileManagerMimeType { FILE_MANAGER_MIME_TYPE_IMAGE = (1 << 0), FILE_MANAGER_MIME_TYPE_VIDEO = (1 << 1), - FILE_MANAGER_MIME_TYPE_OTHER = (1 << 2) + FILE_MANAGER_MIME_TYPE_AUDIO = (1 << 2), + FILE_MANAGER_MIME_TYPE_OTHER = (1 << 3) }; - static const FileManagerMimeType FILE_MANAGER_MIME_TYPE_ALL = (FileManagerMimeType)(FILE_MANAGER_MIME_TYPE_IMAGE|FILE_MANAGER_MIME_TYPE_VIDEO|FILE_MANAGER_MIME_TYPE_OTHER); + static const FileManagerMimeType FILE_MANAGER_MIME_TYPE_ALL = (FileManagerMimeType)(FILE_MANAGER_MIME_TYPE_IMAGE|FILE_MANAGER_MIME_TYPE_VIDEO|FILE_MANAGER_MIME_TYPE_AUDIO|FILE_MANAGER_MIME_TYPE_OTHER); // Return the tags to go to after selecting a file, or return an empty array to exit the program using FileSelectionHandler = std::function<std::vector<Tab>(FileManagerPage*, const std::filesystem::path&)>; diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 1df8e6e..13450e3 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -1317,7 +1317,7 @@ namespace QuickMedia { auto file_manager_page = std::make_unique<FileManagerPage>(this, fm_mime_type, file_selection_handler); if(!file_manager_page->set_current_directory(file_manager_start_dir)) fprintf(stderr, "Warning: Invalid directory provided with --dir\n"); - auto file_manager_body = create_body(); + auto file_manager_body = create_body(false, true); BodyItems body_items; file_manager_page->get_files_in_directory(body_items); file_manager_body->set_items(std::move(body_items)); @@ -4833,7 +4833,7 @@ namespace QuickMedia { std::filesystem::path &fm_dir = file_manager_start_dir; auto file_manager_page = std::make_unique<FileManagerPage>(this, (FileManagerMimeType)(FILE_MANAGER_MIME_TYPE_IMAGE|FILE_MANAGER_MIME_TYPE_VIDEO)); file_manager_page->set_current_directory(fm_dir.string()); - auto file_manager_body = create_body(); + auto file_manager_body = create_body(false, true); BodyItems body_items; file_manager_page->get_files_in_directory(body_items); file_manager_body->set_items(std::move(body_items)); @@ -7401,7 +7401,7 @@ namespace QuickMedia { std::filesystem::path &fm_dir = file_manager_start_dir; auto file_manager_page = std::make_unique<FileManagerPage>(this); file_manager_page->set_current_directory(fm_dir.string()); - auto file_manager_body = create_body(); + auto file_manager_body = create_body(false, true); BodyItems body_items; file_manager_page->get_files_in_directory(body_items); file_manager_body->set_items(std::move(body_items)); @@ -8239,7 +8239,7 @@ namespace QuickMedia { auto file_manager_page = std::make_unique<FileManagerPage>(this); file_manager_page->set_current_directory(file_manager_start_dir); - auto file_manager_body = create_body(); + auto file_manager_body = create_body(false, true); BodyItems body_items; file_manager_page->get_files_in_directory(body_items); file_manager_body->set_items(std::move(body_items)); diff --git a/src/plugins/FileManager.cpp b/src/plugins/FileManager.cpp index 45c61bf..6f16b0a 100644 --- a/src/plugins/FileManager.cpp +++ b/src/plugins/FileManager.cpp @@ -54,7 +54,7 @@ namespace QuickMedia { return result; set_last_accessed_dir(current_dir); - auto body = create_body(); + auto body = create_body(false, true); body->set_items(std::move(result_items)); result_tabs.push_back(Tab{std::move(body), nullptr, nullptr}); return PluginResult::OK; @@ -86,6 +86,9 @@ namespace QuickMedia { if(current_dir != "/") { auto parent_item = BodyItem::create("Go to parent directory"); parent_item->url = ".."; + parent_item->thumbnail_is_local = true; + parent_item->thumbnail_url = get_resource_loader_root_path() + std::string("images/folder.png"); + parent_item->thumbnail_size = mgl::vec2i(64, 64); result_items.push_back(std::move(parent_item)); } @@ -104,6 +107,8 @@ namespace QuickMedia { file_mime_type = FILE_MANAGER_MIME_TYPE_IMAGE; else if(is_video_ext(ext)) file_mime_type = FILE_MANAGER_MIME_TYPE_VIDEO; + else if(is_music_ext(ext)) + file_mime_type = FILE_MANAGER_MIME_TYPE_AUDIO; } if(is_regular_file && !(mime_type & file_mime_type)) @@ -116,12 +121,15 @@ namespace QuickMedia { body_item->thumbnail_url = p.first.path().string(); } else { body_item->thumbnail_is_local = true; - if(is_regular_file) { + if(file_mime_type == FILE_MANAGER_MIME_TYPE_AUDIO) { + body_item->thumbnail_url = get_resource_loader_root_path() + std::string("images/audio.png"); + body_item->thumbnail_size = mgl::vec2i(64, 64); + } else if(is_regular_file) { body_item->thumbnail_url = get_resource_loader_root_path() + std::string("images/file.png"); - body_item->thumbnail_size = mgl::vec2i(18, 24); + body_item->thumbnail_size = mgl::vec2i(64, 64); } else { body_item->thumbnail_url = get_resource_loader_root_path() + std::string("images/folder.png"); - body_item->thumbnail_size = mgl::vec2i(24, 22); + body_item->thumbnail_size = mgl::vec2i(64, 64); } } diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index c59a819..127a664 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -1295,7 +1295,7 @@ namespace QuickMedia { return std::vector<Tab>{}; }; - auto file_manager_body = create_body(); + auto file_manager_body = create_body(false, true); auto file_manager_page = std::make_unique<FileManagerPage>(program, FILE_MANAGER_MIME_TYPE_IMAGE, std::move(submit_handler)); file_manager_page->set_current_directory(get_home_dir().data); BodyItems body_items; |