[GRASS-SVN] r30077 - grass/trunk/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Feb 11 06:21:23 EST 2008
Author: martinl
Date: 2008-02-11 06:21:23 -0500 (Mon, 11 Feb 2008)
New Revision: 30077
Modified:
grass/trunk/lib/init/init.sh
Log:
Switch 'wx' renamed to 'wxpython', 'oldtcltk' used for d.m.
Modified: grass/trunk/lib/init/init.sh
===================================================================
--- grass/trunk/lib/init/init.sh 2008-02-11 10:51:52 UTC (rev 30076)
+++ grass/trunk/lib/init/init.sh 2008-02-11 11:21:23 UTC (rev 30077)
@@ -72,18 +72,20 @@
# Check if the user asked for help
help|-h|-help|--help)
echo "Usage:"
- echo " $CMD_NAME [-h | -help | --help] [-text | -gui | -tcltk | -wx] [[[<GISDBASE>/]<LOCATION_NAME>/]<MAPSET>]"
+ echo " $CMD_NAME [-h | -help | --help] [-text | -gui | -tcltk | -wxpython] [[[<GISDBASE>/]<LOCATION_NAME>/]<MAPSET>]"
echo
echo "Flags:"
echo " -h or -help or --help print this help message"
echo " -text use text based interface"
echo " and set as default"
- echo " -gui (or -tcltk) use Tcl/Tk based graphical user interface"
+ echo " -gui use graphical user interface (tcltk by default)"
echo " and set as default"
- echo " -oldgui use the old Tcl/Tk GUI interface "
+ echo " -tcltk use Tcl/Tk based graphical user interface"
echo " and set as default"
- echo " -wx use wxPython based graphical user interface"
+ echo " -oldtcltk use old Tcl/Tk based graphical user interface"
echo " and set as default"
+ echo " -wxpython use wxPython based graphical user interface"
+ echo " and set as default"
echo
echo "Parameters:"
echo " GISDBASE initial database (path to GIS data)"
@@ -93,7 +95,7 @@
echo " GISDBASE/LOCATION_NAME/MAPSET fully qualified initial mapset directory"
echo
echo "Environment variables relevant for startup:"
- echo " GRASS_GUI select GUI (text, gis.m, d.m, wx)"
+ echo " GRASS_GUI select GUI (text, gui, tcltk, oldtcltk, wxpython)"
echo " GRASS_TCLSH set tclsh shell name to override 'tclsh'"
echo " GRASS_WISH set wish shell name to override 'wish'"
echo " GRASS_HTML_BROWSER set html web browser for help pages"
@@ -116,17 +118,21 @@
shift
;;
- # Check if the -oldgui flag was given
- -oldgui)
- GRASS_GUI="d.m"
+ # Check if the -oldtcltk flag was given
+ -oldtcltk)
+ GRASS_GUI="oldtcltk"
shift
;;
- # Check if the -wx flag was given
- -wx)
- GRASS_GUI="wx"
+ # Check if the -wxpython flag was given
+ -wxpython)
+ GRASS_GUI="wxpython"
shift
;;
+ *)
+ GRASS_GUI="text"
+ shift
+ ;;
esac
done
@@ -385,12 +391,13 @@
if [ "$DISPLAY" -o "$MINGW" ] ; then
# Check if python is working properly
- if [ "$GRASS_GUI" = "wx" ]; then
+ if [ "$GRASS_GUI" = "wxpython" ]; then
echo 'variable=True' | "$GRASS_PYTHON" >/dev/null 2>&1
fi
# Check if we need to find wish
if [ "$GRASS_GUI" = "tcltk" ] || \
[ "$GRASS_GUI" = "gis.m" ] || \
+ [ "$GRASS_GUI" = "oldtcltk" ] || \
[ "$GRASS_GUI" = "d.m" ] ; then
# Check if wish is working properly
@@ -402,7 +409,7 @@
# Set the tcltkgrass base directory
TCLTKGRASSBASE="$ETC"
# Set the wxpython base directory
- WXPYTHONGRASSBASE="$ETC/wx"
+ WXPYTHONGRASSBASE="$ETC/wxpython"
else
# Wish was not found - switch to text interface mode
@@ -560,18 +567,17 @@
;;
# Check for tcltk interface
- tcltk | gis.m | d.m | wx)
+ tcltk | gis.m | oldtcltk | d.m | wxpython)
if [ "$GRASS_GUI" = "tcltk" ] || \
[ "$GRASS_GUI" = "gis.m" ] || \
+ [ "$GRASS_GUI" = "oldtcltk" ] || \
[ "$GRASS_GUI" = "d.m" ] ; then
# eval `foo` will return subshell return code and not app foo return code!!!
eval '"$GRASS_WISH" -file "$TCLTKGRASSBASE/gis_set.tcl"'
thetest=$?
else
- #"$GRASS_PYTHON" "$WXPYTHONGRASSBASE/gis_set.py"
- #exit
eval '"$GRASS_PYTHON" "$WXPYTHONGRASSBASE/gis_set.py"'
thetest=$?
fi
@@ -763,15 +769,14 @@
"$GISBASE/scripts/gis.m"
fi
;;
- d.m)
+ oldtcltk | d.m)
if [ "$osxaqua" ] ; then
"$GISBASE/scripts/d.m" | sh &
else
"$GISBASE/scripts/d.m"
fi
;;
-
- wx)
+ wxpython)
"$GISBASE/scripts/wxgrass" &
;;
@@ -815,9 +820,12 @@
tcltk | gis.m)
echo "If required, restart the graphical user interface with: gis.m"
;;
- wx)
- echo "If required, restart the graphical user interface with: wxgrass &"
+ oldtcltk | d.m)
+ echo "If required, restart the graphical user interface with: d.m"
;;
+ wxpython)
+ echo "If required, restart the graphical user interface with: wxgrass"
+ ;;
*)
echo "Start the graphical user interface with: gis.m"
;;
More information about the grass-commit
mailing list