fix: desktop/Files labelling improvements, rename Sys. Config to Settings

This commit is contained in:
2026-05-14 15:40:15 +02:00
parent 1561ee1160
commit 44f6e6f212
6 changed files with 13 additions and 13 deletions
@@ -147,7 +147,7 @@ inline bool filemanager_is_computer_view(const FileManagerState* fm) {
inline const char* filemanager_virtual_view_label(FileManagerVirtualViewKind view) {
switch (view) {
case FM_VIRTUAL_VIEW_APPS: return "Apps";
case FM_VIRTUAL_VIEW_SYSTEM_CONFIGURATION: return "System Configuration";
case FM_VIRTUAL_VIEW_SYSTEM_CONFIGURATION: return "Settings";
default: return "Computer";
}
}
@@ -128,9 +128,8 @@ void filemanager_read_drives(FileManagerState* fm) {
}
}
// System configuration entry
filemanager_add_root_entry(fm, "System Configuration",
FM_ENTRY_SYSTEM_CONFIGURATION_ROOT, -1);
// Settings entry
filemanager_add_root_entry(fm, "Settings", FM_ENTRY_SYSTEM_CONFIGURATION_ROOT, -1);
// Drive entries
int drives[FM_MAX_DRIVES];
@@ -156,9 +155,10 @@ void filemanager_read_drives(FileManagerState* fm) {
str_append(label, probe, 64);
char volume_label[64];
if (montauk::drivelabel(d, volume_label, 64) > 0 && volume_label[0] != '\0') {
str_append(label, " [", 64);
str_append(label, volume_label, 64);
str_append(label, "]", 64);
montauk::strncpy(label, volume_label, 64);
str_append(label, " (", 64);
str_append(label, probe, 64);
str_append(label, ")", 64);
}
filemanager_add_root_entry(fm, label, FM_ENTRY_DRIVE, d);
if (fm->entry_count >= 64) break;
@@ -137,10 +137,10 @@ static const char* props_type_label(const FileManagerState* fm, int idx) {
case FM_ENTRY_HOME: return "Home Folder";
case FM_ENTRY_APPS_ROOT: return "Apps Folder";
case FM_ENTRY_SPECIAL_DIR: return "Folder";
case FM_ENTRY_SYSTEM_CONFIGURATION_ROOT: return "System Configuration";
case FM_ENTRY_SYSTEM_CONFIGURATION_ROOT: return "Settings";
case FM_ENTRY_VIRTUAL_APP:
if (fm->virtual_view == FM_VIRTUAL_VIEW_SYSTEM_CONFIGURATION)
return "System Configuration Applet";
return "Settings Applet";
return "Application";
case FM_ENTRY_FILE:
default:
@@ -199,7 +199,7 @@ static void props_build_path(const FileManagerState* fm, int idx, char* out, int
entry.external_app_index < ds->external_app_count) {
props_copy(out, out_len, ds->external_apps[entry.external_app_index].binary_path);
} else if (entry.kind == FM_VIRTUAL_ENTRY_SYSTEM_CONFIGURATION_APPLET) {
props_copy(out, out_len, "System Configuration applet");
props_copy(out, out_len, "Settings applet");
}
}
}
@@ -543,7 +543,7 @@ void filemanager_on_draw(Window* win, Framebuffer& fb) {
: "App";
}
else if (fm->entry_types[i] == FM_ENTRY_APPS_ROOT) type_str = "Apps";
else if (fm->entry_types[i] == FM_ENTRY_SYSTEM_CONFIGURATION_ROOT) type_str = "System";
else if (fm->entry_types[i] == FM_ENTRY_SYSTEM_CONFIGURATION_ROOT) type_str = "Settings";
else if (fm->entry_types[i] == FM_ENTRY_HOME) type_str = "Home";
else if (fm->entry_types[i] == FM_ENTRY_DRIVE) type_str = "Drive";
else if (fm->entry_types[i] == FM_ENTRY_DIR) type_str = "Dir";
+1 -1
View File
@@ -290,7 +290,7 @@ void gui::desktop_compose(DesktopState* ds) {
CtxItem ctx_items[CTX_ITEM_COUNT] = {
{ "Terminal", &ds->icon_terminal },
{ "Files", &ds->icon_filemanager },
{ "System Configuration", &ds->icon_system_configuration_menu },
{ "Settings", &ds->icon_system_configuration_menu },
{ "Sleep", &ds->icon_sleep },
{ "Reboot", &ds->icon_reboot },
{ "Shutdown", &ds->icon_shutdown },
+1 -1
View File
@@ -11,7 +11,7 @@ static const DesktopBuiltinEntry builtin_entries[] = {
{ DESKTOP_BUILTIN_FILES, "Files", 0, false, nullptr, "0:/icons/system-file-manager.svg" },
{ DESKTOP_BUILTIN_DESKTOP_SETTINGS, "Desktop Settings", -1, false, "desktop-settings",
"0:/icons/preferences-desktop-apps.svg" },
{ DESKTOP_BUILTIN_SYSTEM_CONFIGURATION, "System Configuration", -1, true, nullptr,
{ DESKTOP_BUILTIN_SYSTEM_CONFIGURATION, "Settings", -1, true, nullptr,
"0:/icons/preferences-system.svg" },
{ DESKTOP_BUILTIN_USER_MANAGEMENT, "User Management", -1, false, "user-management",
"0:/icons/user-home.svg" },