From: Andre Noll Date: Mon, 1 Sep 2014 21:53:19 +0000 (+0200) Subject: gui: Remove unused widgets. X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=ed9be5dbf52b45497838034033e210ce984c17a6;p=gsu.git gui: Remove unused widgets. No application uses these public functions, so remove them for now. They can be re-added on demand but for now they are just dead code. --- diff --git a/gui b/gui index 72717a1..958c315 100644 --- a/gui +++ b/gui @@ -22,50 +22,6 @@ _get_geometry() result="$y $x" } -gsu_infobox() -{ - _get_geometry - dialog --infobox "$1" $result -} - -gsu_checklist_all_on() -{ - local header="$1" - local items="$2" - local i state opts num=0 - - _get_geometry - ops="$result 16" - for i in $items; do - let num++ - opts+=" $i $num on" - done - result=$(dialog --checklist "$header" $opts 3>&1 1>&2 2>&3 3>&-) - ret="$?" -} - -gsu_radiolist() -{ - local header="$1" - local selected_item="$2" - local items="$3" - local i state ops num=0 - - _get_geometry - ops="$result 16" - for i in $items; do - let num++ - if [[ "$i" == "$selected_item" ]]; then - state="on" - else - state="off" - fi - ops+=" $i $num $state" - done - result=$(dialog --radiolist "$header" $ops 3>&1 1>&2 2>&3 3>&-) - ret="$?" -} - gsu_inputbox() { local g text="$1" init="$2" @@ -98,36 +54,6 @@ gsu_msgbox() rm -f "$tmp" } -gsu_cmd_output_box() -{ - local tmp="$(mktemp)" - - if (($? != 0)); then - dialog --msgbox "mktemp error" 0 0 - return - fi - $@ > "$tmp" 2>&1 - echo "exit code: $?" >> "$tmp" - gsu_textbox "$tmp" - rm -f "$tmp" -} - -gsu_yesno() -{ - local text="$1" - - _get_geometry - dialog --yesno "$text" $result - ret=$? - if (($ret == 0)); then - result="yes" - elif (($ret == 1)); then - result="no" - else - result= - fi -} - gsu_menu() { local header="${1:-root}"