result="$y $x"
}
+# 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.
gsu_inputbox()
{
local g text="$1" init="$2"
ret=$GSU_SUCCESS
}
+# Show the given file in a text box
+#
+# Usage: gsu_textbox <path>
+#
+# The box has an OK button which closes the box when activated.
gsu_textbox()
{
local g file="$1"
ret=$GSU_SUCCESS
}
-# dialog segfaults if message is too long. Hence we always use a temporary file
+# Show a message in a text box
+#
+# Usage: gsu_msgbox <text>
+#
+# This is like gsu_textbox() but the text is passed as a string.
gsu_msgbox()
{
+ # 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