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
@@ -5,19 +5,23 @@
# License GPL v3
gnome_menu() {
local choice
choice=$(_radiolist "GNOME" \
"Select an option:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"1" "GNOME (Full Desktop)" OFF \
"2" "GNOME Core (Minimal Install)" OFF \
"3" "Back" OFF)
[ -z "$choice" ] && return 0
clear
case "$(echo "$choice" | tr -d '"')" in
1) _install_gnome_full ;;
2) _install_gnome_core ;;
3) return 0 ;;
esac
while true; do
local -a gn_items=()
gn_items+=("1" "GNOME (Full Desktop)")
gn_items+=("2" "GNOME Core (Minimal Install)")
gn_items+=("3" "Back")
local choice
choice=$(_menu "GNOME" \
"Select an option:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \
"${gn_items[@]}")
[ -z "$choice" ] && break
clear
case "$choice" in
1) _install_gnome_full ;;
2) _install_gnome_core ;;
3) break ;;
esac
done
}
_install_gnome_full() {