+_set_dialog_ret()
+{
+ local ec="$1"
+
+ case "$ec" in
+ 0) ret=$GSU_SUCCESS;;
+ 1) ret=1;; # cancelled
+ *)
+ result="dialog exit code $ec"
+ ret=-$E_GSU_DIALOG
+ esac
+}
+
+# Open a dialog box which asks the user to input a text
+#
+# Usage: gsu_input_box <text> <init>
+#
+# <text> is displayed above of the input field, which is is preset to <init>.
+# The entered text is returned in $result. On success (user pressed OK)
+# the function returns zero. If the user selected Cancel, the return value is
+# one. On dialog errors, a negative error code is returned.