]> git.tuebingen.mpg.de Git - gsu.git/commitdiff
gui: Don't show items in menus.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 5 Jul 2022 22:13:21 +0000 (00:13 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 14 Feb 2023 13:28:03 +0000 (14:28 +0100)
The numbers at the right of each item are of little value. This patch
gets rid of them, which also simplifies the code a bit.

gui

diff --git a/gui b/gui
index e9eb1a86e8fe1ec66c80ee8fb394fec7425cc3d4..72ddb28b2dd2b21655d834c0b3c193ad096d9d13 100644 (file)
--- a/gui
+++ b/gui
@@ -97,15 +97,13 @@ _gsu_menu()
 {
        local header="${1:-root}"
        local items="$2"
-       local i opts num=0
+       local geom
 
        _get_geometry
-       opts="$result 16"
-       for i in $items; do
-               let num++
-               opts+=" $i $num"
-       done
-       result="$(dialog --menu "$gsu_banner_txt ($header)" $opts 3>&1 1>&2 2>&3 3>&-)"
+       geom=$result
+       result="$(dialog --no-lines --no-items --menu \
+               "$gsu_banner_txt ($header)"  \
+               $geom 16 $items 3>&1 1>&2 2>&3 3>&-)"
        _set_dialog_ret $?
 }