OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.4 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../stone/stone_gui_x11.sh
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. # Copyright (C) 1998 - 2003 Clifford Wolf
  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. # --- SDE-COPYRIGHT-NOTE-END ---
  15. if ! Xdialog --infobox 'Test' 0 0 1 ; then
  16. echo
  17. echo "Fatal ERROR: Can't display Xdialog windows!"
  18. echo
  19. echo "Maybe the \$DISPLAY variable is not set or you don't have"
  20. echo "permissions to connect to the X-Server."
  21. exit 1
  22. fi
  23. . ${SETUPD}/gui_dialog.sh
  24. gui_dialog() {
  25. Xdialog --stdout --title 'STONE - Setup Tool ONE - T2 System Configuration' "$@"
  26. }
  27. gui_edit() {
  28. # find editor
  29. for x in $EDITOR vi nvi emacs xemacs pico ; do
  30. if which $x > /dev/null
  31. then xx=$x ; break ; fi
  32. done
  33. if [ "$xx" ] ; then
  34. xterm -T "STONE - $1" -n "STONE" -e bash -c "$xx $2"
  35. else
  36. gui_message "Cannot find any editor. Make sure \$EDITOR is set."
  37. fi
  38. }
  39. gui_cmd() {
  40. title="$1" ; shift
  41. xterm -T "STONE - $title" -n "STONE" -e bash -c "$@
  42. read -p 'Press ENTER to continue'"
  43. }