feat: architectural improvements for Apps and System Configuration virtual folders in Files

This commit is contained in:
daniel committed 2026-04-30 16:51:08 +02:00
1 parent 3636546a6e
commit 14971e6f02
15 files changed
+231 -206

No files matched your search

+14 -5
View File
@@ -8,11 +8,13 @@
namespace filemanager {
static constexpr const char* FM_PATH_SYSTEM_CONFIGURATION = "virtual://system-configuration";
static bool filemanager_open_virtual_path(FileManagerState* fm, const char* path) {
if (!fm || !path) return false;
if (montauk::streq(path, FILEMANAGER_PATH_SYSTEM_CONFIGURATION)) {
filemanager_read_virtual_view(fm, FM_VIRTUAL_VIEW_SYSTEM_TOOLS);
if (montauk::streq(path, FM_PATH_SYSTEM_CONFIGURATION)) {
filemanager_read_virtual_view(fm, FM_VIRTUAL_VIEW_SYSTEM_CONFIGURATION);
return true;
}
@@ -74,9 +76,12 @@ void ensure_filemanager_icons_loaded(DesktopState* ds) {
ds->icon_home_folder_lg = svg_load("0:/icons/folder-blue-home.svg", 48, 48, defColor);
ds->icon_apps = svg_load("0:/icons/folder-blue-development.svg", 16, 16, defColor);
ds->icon_apps_lg = svg_load("0:/icons/folder-blue-development.svg", 48, 48, defColor);
ds->icon_system_tools_menu = svg_load("0:/icons/preferences-system.svg", 20, 20, defColor);
ds->icon_system_tools = svg_load("0:/icons/preferences-system.svg", 16, 16, defColor);
ds->icon_system_tools_lg = svg_load("0:/icons/preferences-system.svg", 48, 48, defColor);
ds->icon_system_configuration_menu =
svg_load("0:/icons/preferences-system.svg", 20, 20, defColor);
ds->icon_system_configuration =
svg_load("0:/icons/preferences-system.svg", 16, 16, defColor);
ds->icon_system_configuration_lg =
svg_load("0:/icons/preferences-system.svg", 48, 48, defColor);
for (int sf = 0; sf < filemanager::SF_COUNT; sf++) {
char icon_path[128];
@@ -99,3 +104,7 @@ void open_filemanager(DesktopState* ds) {
void open_filemanager_path(DesktopState* ds, const char* path) {
filemanager::open_filemanager_internal(ds, path);
}
void open_system_configuration(DesktopState* ds) {
filemanager::open_filemanager_internal(ds, filemanager::FM_PATH_SYSTEM_CONFIGURATION);
}