UI: convert LXDE/GNOME/KDE submenus to _menu style (XFCE parity)

Replace _radiolist with the _menu pattern used by xfce_menu:
while-true loop, fixed numbered items array, Back option that
breaks the loop, and direct case dispatch to the unchanged
installers. Navigation is now consistent across all four desktop
submenus (select an option, return to the parent menu, re-enter
without re-triggering a one-shot selection).

- bash -n OK, shellcheck 0 warnings, BATS 36/0
- _radiolist helper kept in utils.sh for compatibility (no callers)
This commit is contained in:
stornic56
2026-10-16 10:49:28 -05:00
parent 07f09d87eb
commit 2195db452a
3 changed files with 51 additions and 37 deletions
+17 -13
View File
@@ -6,19 +6,23 @@
# License GPL v3
kde_menu() {
local choice
choice=$(_radiolist "KDE Plasma" \
"Select an option:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"1" "KDE Plasma (Full Desktop)" OFF \
"2" "KDE Plasma Desktop (Minimal)" OFF \
"3" "Back" OFF)
[ -z "$choice" ] && return 0
clear
case "$(echo "$choice" | tr -d '"')" in
1) _install_kde_full ;;
2) _install_kde_minimal ;;
3) return 0 ;;
esac
while true; do
local -a kd_items=()
kd_items+=("1" "KDE Plasma (Full Desktop)")
kd_items+=("2" "KDE Plasma Desktop (Minimal)")
kd_items+=("3" "Back")
local choice
choice=$(_menu "KDE Plasma" \
"Select an option:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"${kd_items[@]}")
[ -z "$choice" ] && break
clear
case "$choice" in
1) _install_kde_full ;;
2) _install_kde_minimal ;;
3) break ;;
esac
done
}
_install_kde_full() {