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