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

This commit is contained in:
2026-04-30 16:51:08 +02:00
parent b4be0fcc0f
commit f66c9bf1f7
15 changed files with 231 additions and 206 deletions
@@ -188,8 +188,9 @@ void filemanager_open_entry(FileManagerState* fm, int idx) {
return;
}
if (filemanager_is_computer_view(fm) && fm->entry_types[idx] == FM_ENTRY_SYSTEM_TOOLS_ROOT) {
filemanager_read_virtual_view(fm, FM_VIRTUAL_VIEW_SYSTEM_TOOLS);
if (filemanager_is_computer_view(fm)
&& fm->entry_types[idx] == FM_ENTRY_SYSTEM_CONFIGURATION_ROOT) {
filemanager_read_virtual_view(fm, FM_VIRTUAL_VIEW_SYSTEM_CONFIGURATION);
filemanager_push_history(fm);
return;
}
@@ -197,11 +198,6 @@ void filemanager_open_entry(FileManagerState* fm, int idx) {
if (filemanager_is_virtual_view(fm) && fm->entry_types[idx] == FM_ENTRY_VIRTUAL_APP) {
DesktopState* ds = fm->desktop;
const FileManagerVirtualEntry& entry = fm->virtual_entries[idx];
if (ds && entry.kind == FM_VIRTUAL_ENTRY_BUILTIN
&& entry.builtin_id != DESKTOP_BUILTIN_NONE) {
desktop_launch_builtin(ds, entry.builtin_id);
return;
}
if (ds && entry.kind == FM_VIRTUAL_ENTRY_EXTERNAL_APP
&& entry.external_app_index >= 0
&& entry.external_app_index < ds->external_app_count) {
@@ -211,9 +207,8 @@ void filemanager_open_entry(FileManagerState* fm, int idx) {
} else {
montauk::spawn(app.binary_path);
}
} else if (ds && entry.kind == FM_VIRTUAL_ENTRY_SHARED_APPLET
&& entry.shared_applet_path[0] != '\0') {
desktop_launch_shared_applet(ds, entry.shared_applet_path);
} else if (ds && entry.kind == FM_VIRTUAL_ENTRY_SYSTEM_CONFIGURATION_APPLET) {
desktop_launch_system_configuration_applet(ds, &entry.applet);
}
return;
}