feat: system settings stored as applets in virtual folder
This commit is contained in:
@@ -22,7 +22,7 @@ static constexpr int MENU_DIV_H = 10;
|
||||
struct MenuRow {
|
||||
bool is_category;
|
||||
char label[48];
|
||||
int app_id; // embedded dispatch ID, or -1 for categories/dividers
|
||||
DesktopBuiltinId app_id; // desktop builtin ID, or DESKTOP_BUILTIN_NONE for categories/dividers
|
||||
bool external; // true = spawn binary_path
|
||||
char binary_path[128]; // full VFS path for external apps
|
||||
bool launch_with_home; // true = pass home_dir as first argument
|
||||
@@ -74,7 +74,7 @@ inline int menu_add_category(const char* label) {
|
||||
MenuRow& r = menu_rows[menu_row_count++];
|
||||
r.is_category = true;
|
||||
montauk::strncpy(r.label, label, sizeof(r.label));
|
||||
r.app_id = -1;
|
||||
r.app_id = DESKTOP_BUILTIN_NONE;
|
||||
r.external = false;
|
||||
r.binary_path[0] = '\0';
|
||||
r.launch_with_home = false;
|
||||
@@ -82,7 +82,7 @@ inline int menu_add_category(const char* label) {
|
||||
return menu_row_count - 1;
|
||||
}
|
||||
|
||||
inline int menu_add_embedded(const char* label, int app_id, SvgIcon* icon) {
|
||||
inline int menu_add_embedded(const char* label, DesktopBuiltinId app_id, SvgIcon* icon) {
|
||||
if (menu_row_count >= MAX_MENU_ROWS) return -1;
|
||||
MenuRow& r = menu_rows[menu_row_count++];
|
||||
r.is_category = false;
|
||||
@@ -100,7 +100,7 @@ inline int menu_add_external(const char* label, const char* binary, SvgIcon* ico
|
||||
MenuRow& r = menu_rows[menu_row_count++];
|
||||
r.is_category = false;
|
||||
montauk::strncpy(r.label, label, sizeof(r.label));
|
||||
r.app_id = -1;
|
||||
r.app_id = DESKTOP_BUILTIN_NONE;
|
||||
r.external = true;
|
||||
montauk::strncpy(r.binary_path, binary, sizeof(r.binary_path));
|
||||
r.launch_with_home = launch_with_home;
|
||||
|
||||
Reference in New Issue
Block a user