From: Andre Noll Date: Fri, 16 May 2014 13:35:32 +0000 (+0200) Subject: gsu: User banner text also for gsu gui. X-Git-Url: http://git.tuebingen.mpg.de/?p=gsu.git;a=commitdiff_plain;h=8371d55b8db239718f3697bbfa2c561e1307d5df;ds=sidebyside gsu: User banner text also for gsu gui. 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. --- diff --git a/misc/gsu/common b/misc/gsu/common index 9b8127d..bd8276b 100644 --- a/misc/gsu/common +++ b/misc/gsu/common @@ -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 } diff --git a/misc/gsu/gui b/misc/gsu/gui index 12c8b8b..2e6a7b7 100644 --- a/misc/gsu/gui +++ b/misc/gsu/gui @@ -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" } diff --git a/misc/gsu/subcommand b/misc/gsu/subcommand index a13d3b2..ddb351a 100644 --- a/misc/gsu/subcommand +++ b/misc/gsu/subcommand @@ -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 -- ###" }