refactor: unify desktop apps and Settings under item catalog
This commit is contained in:
1 parent
84ea28a978
commit
75ae7ede56
38 files changed
+322
-797
No files matched your search
@@ -242,20 +242,12 @@ void filemanager_open_entry(FileManagerState* fm, int idx) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (filemanager_is_virtual_view(fm) && fm->entry_types[idx] == FM_ENTRY_VIRTUAL_APP) {
|
||||
if (filemanager_is_virtual_view(fm) && fm->entry_types[idx] == FM_ENTRY_VIRTUAL_ITEM) {
|
||||
DesktopState* ds = fm->desktop;
|
||||
const FileManagerVirtualEntry& entry = fm->virtual_entries[idx];
|
||||
if (ds && entry.kind == FM_VIRTUAL_ENTRY_EXTERNAL_APP
|
||||
&& entry.external_app_index >= 0
|
||||
&& entry.external_app_index < ds->external_app_count) {
|
||||
const ExternalApp& app = ds->external_apps[entry.external_app_index];
|
||||
if (app.launch_with_home) {
|
||||
montauk::spawn(app.binary_path, ds->home_dir);
|
||||
} else {
|
||||
montauk::spawn(app.binary_path);
|
||||
}
|
||||
} else if (ds && entry.kind == FM_VIRTUAL_ENTRY_SYSTEM_CONFIGURATION_APPLET) {
|
||||
desktop_launch_system_configuration_applet(ds, &entry.applet);
|
||||
if (ds && entry.desktop_item_index >= 0
|
||||
&& entry.desktop_item_index < ds->desktop_item_count) {
|
||||
desktop_launch_item(ds, &ds->desktop_items[entry.desktop_item_index]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user