]> git.tue.mpg.de Git - gsu.git/commitdiff
gsu: User banner text also for gsu gui.
authorAndre Noll <maan@systemlinux.org>
Fri, 16 May 2014 13:35:32 +0000 (15:35 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 29 Aug 2014 19:39:58 +0000 (21:39 +0200)
Currently the $gsu_banner_txt variable is used only for subcommand
utilities but not for dialog-based tools. There is no real reason for
this restriction, so this commit starts to use the variable also for
the various GUIs.

misc/gsu/common
misc/gsu/gui
misc/gsu/subcommand

index 9b8127d2ee2c2dc37d81381753d781baf399582b..bd8276b2a96954eef6ef05dfe4cbad5ccf2c1a62 100644 (file)
@@ -84,5 +84,6 @@ _gsu_setup()
        _gsu_self="$(basename $0)"
        gsu_name="${gsu_name:=$_gsu_self}"
        gsu_config_var_prefix="${gsu_config_var_prefix:=$gsu_name}"
+       gsu_banner_txt="${gsu_banner_txt:-set \$gsu_banner_txt to customize this message}"
        _gsu_init_errors
 }
index 12c8b8b7685f346e7bccb0ff4aecd5788350f01b..2e6a7b758cfea04a25e9e0840ab44a144e79e06b 100644 (file)
@@ -139,7 +139,7 @@ gsu_menu()
                let num++
                opts+=" $i $num"
        done
-       result="$(dialog --menu "$header" $opts 3>&1 1>&2 2>&3 3>&-)"
+       result="$(dialog --menu "$gsu_banner_txt ($header)" $opts 3>&1 1>&2 2>&3 3>&-)"
        ret="$?"
 }
 
@@ -208,5 +208,5 @@ gsu_gui()
        fi
        _get_root_nodes "$tree"
        subtree="$result"
-       _browse "$gsu_name main menu" "$tree" "$subtree"
+       _browse "main menu" "$tree" "$subtree"
 }
index a13d3b27dd6c32748ff134bd7fffa96defc63937..ddb351a01e9a0b1fe11a0c280bf004f004121fd1 100644 (file)
@@ -186,7 +186,6 @@ _com_man()
 
 _gsu_banner_msg()
 {
-       gsu_banner_txt="${gsu_banner_txt:-set \$gsu_banner_txt to customize this message}"
        gsu_short_msg "### $_gsu_self -- ###"
 }