Dash:
[t2.git] / package / base / stone / stone_gui_x11.sh
bloba6998ee14713d251a6ac864d9780289c28f7b360
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../stone/stone_gui_x11.sh
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
7 #
8 # More information can be found in the files COPYING and README.
9 #
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; version 2 of the License. A copy of the
13 # GNU General Public License can be found in the file COPYING.
14 # --- T2-COPYRIGHT-NOTE-END ---
16 if ! Xdialog --infobox 'Test' 0 0 1 ; then
17 echo
18 echo "Fatal ERROR: Can't display Xdialog windows!"
19 echo
20 echo "Maybe the \$DISPLAY variable is not set or you don't have"
21 echo "permissions to connect to the X-Server."
22 exit 1
25 . ${SETUPD}/gui_dialog.sh
27 gui_dialog() {
28 Xdialog --stdout --title 'STONE - Setup Tool ONE - T2 System Configuration' "$@"
31 gui_edit() {
32 # find editor
33 for x in $EDITOR vi nvi emacs xemacs pico ; do
34 if which $x > /dev/null
35 then xx=$x ; break ; fi
36 done
37 if [ "$xx" ] ; then
38 xterm -T "STONE - $1" -n "STONE" -e bash -c "$xx $2"
39 else
40 gui_message "Cannot find any editor. Make sure \$EDITOR is set."
44 gui_cmd() {
45 title="$1" ; shift
46 xterm -T "STONE - $title" -n "STONE" -e bash -c "$@
47 read -p 'Press ENTER to continue'"