X-Git-Url: http://git.tuebingen.mpg.de/?p=gsu.git;a=blobdiff_plain;f=gui;h=2e8b40feb35b10aaba383375aedabea844443d89;hp=fa3ae4826a9e96062e5455c3969c6a9290ea4a26;hb=a83461ac7e653a1caece11dba3f16c6db6fe8509;hpb=77fd8c08604bb7a1c641c4f36bdf4f839d114656 diff --git a/gui b/gui index fa3ae48..2e8b40f 100644 --- a/gui +++ b/gui @@ -80,15 +80,13 @@ gsu_textbox() # This is like gsu_textbox() but the text is passed as a string. gsu_msgbox() { + local tmp + # Some versions of dialog segfault if the text is too long. Hence we # always use a temporary file. - local tmp="$(mktemp gsu_msgbox.XXXXXXXXXX)" - - if (($? != 0)); then - ret=-$E_GSU_MKTEMP - result='temp file for textbox' - return - fi + gsu_make_tempfile 'gsu_msgbox.XXXXXXXXXX' + (($ret < 0)) && return + tmp="$result" trap "rm -f $tmp" EXIT echo "$1" > "$tmp" gsu_textbox "$tmp" @@ -99,7 +97,7 @@ _gsu_menu() { local header="${1:-root}" local items="$2" - local i state opts num=0 + local i opts num=0 _get_geometry opts="$result 16"