From 2195db452a921ac33c2fb77d34567cfddbf41325 Mon Sep 17 00:00:00 2001 From: stornic56 <71296607+stornic56@users.noreply.github.com> Date: Fri, 16 Oct 2026 10:49:28 -0500 Subject: [PATCH] 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) --- modules/desktops/desktop_gnome.sh | 30 +++++++++++++++++------------- modules/desktops/desktop_kde.sh | 30 +++++++++++++++++------------- modules/desktops/desktop_lxde.sh | 28 +++++++++++++++++----------- 3 files changed, 51 insertions(+), 37 deletions(-) diff --git a/modules/desktops/desktop_gnome.sh b/modules/desktops/desktop_gnome.sh index af17b34..c7a2f59 100644 --- a/modules/desktops/desktop_gnome.sh +++ b/modules/desktops/desktop_gnome.sh @@ -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() { diff --git a/modules/desktops/desktop_kde.sh b/modules/desktops/desktop_kde.sh index 1976cc1..49807a7 100644 --- a/modules/desktops/desktop_kde.sh +++ b/modules/desktops/desktop_kde.sh @@ -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() { diff --git a/modules/desktops/desktop_lxde.sh b/modules/desktops/desktop_lxde.sh index b57dff8..75c3b33 100644 --- a/modules/desktops/desktop_lxde.sh +++ b/modules/desktops/desktop_lxde.sh @@ -5,17 +5,23 @@ # License GPL v3 lxde_menu() { - local choice - choice=$(_radiolist "LXDE" \ - "Select an option:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \ - "1" "LXDE (Full Desktop)" OFF \ - "2" "LXDE Core (Minimal Install)" OFF) - [ -z "$choice" ] && return 0 - clear - case "$(echo "$choice" | tr -d '"')" in - 1) _install_lxde_full ;; - 2) _install_lxde_core ;; - esac + 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 + choice=$(_menu "LXDE" \ + "Select an option:" $TUI_ALTO $TUI_ANCHO $TUI_ALTO_LISTA \ + "${lx_items[@]}") + [ -z "$choice" ] && break + clear + case "$choice" in + 1) _install_lxde_full ;; + 2) _install_lxde_core ;; + 3) break ;; + esac + done } _install_lxde_full() {