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
+14 -7
View File
@@ -172,15 +172,12 @@ enum DesktopBuiltinId : int {
DESKTOP_BUILTIN_SYSTEM_CONFIGURATION = 20,
};
inline constexpr const char* FILEMANAGER_PATH_SYSTEM_CONFIGURATION =
"virtual://system-configuration";
struct DesktopBuiltinEntry {
DesktopBuiltinId id;
const char* label;
int launcher_category;
bool launcher_footer;
bool system_tools_applet;
const char* system_configuration_id;
const char* icon_path;
};
@@ -190,17 +187,26 @@ SvgIcon* desktop_builtin_menu_icon(DesktopState* ds, DesktopBuiltinId id);
void desktop_launch_builtin(DesktopState* ds, DesktopBuiltinId id);
void desktop_lock_screen(DesktopState* ds);
struct DesktopSharedAppletEntry {
enum DesktopAppletKind : int {
DESKTOP_APPLET_NONE = 0,
DESKTOP_APPLET_BUILTIN,
DESKTOP_APPLET_SHARED_LIBRARY,
};
struct DesktopAppletEntry {
DesktopAppletKind kind;
char id[48];
char label[64];
char icon_path[128];
DesktopBuiltinId builtin_id;
char library_path[128];
};
int desktop_list_system_configuration_applets(DesktopState* ds,
DesktopSharedAppletEntry* out,
DesktopAppletEntry* out,
int max_entries);
bool desktop_launch_shared_applet(DesktopState* ds, const char* lib_path);
bool desktop_launch_system_configuration_applet(DesktopState* ds,
const DesktopAppletEntry* applet);
// ============================================================================
// Forward declarations for desktop launch entry points
@@ -209,6 +215,7 @@ bool desktop_launch_shared_applet(DesktopState* ds, const char* lib_path);
void open_terminal(DesktopState* ds);
void open_filemanager(DesktopState* ds);
void open_filemanager_path(DesktopState* ds, const char* path);
void open_system_configuration(DesktopState* ds);
void ensure_filemanager_icons_loaded(DesktopState* ds);
void open_calculator(DesktopState* ds);
void open_texteditor(DesktopState* ds);