[GRASS-SVN] r33943 - in grass/trunk: general/g.gui lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Oct 20 22:27:24 EDT 2008
Author: hamish
Date: 2008-10-20 22:27:23 -0400 (Mon, 20 Oct 2008)
New Revision: 33943
Modified:
grass/trunk/general/g.gui/g.gui.html
grass/trunk/general/g.gui/main.c
grass/trunk/lib/init/functions.sh
grass/trunk/lib/init/grass7.html
grass/trunk/lib/init/variables.html
Log:
remove references to old Tcl/Tk GUIs
Modified: grass/trunk/general/g.gui/g.gui.html
===================================================================
--- grass/trunk/general/g.gui/g.gui.html 2008-10-21 01:55:42 UTC (rev 33942)
+++ grass/trunk/general/g.gui/g.gui.html 2008-10-21 02:27:23 UTC (rev 33943)
@@ -5,17 +5,15 @@
from the command line prompt.
<p>
-Currently three different GUIs are supported:
+GRASS 7 has a new GUI based on wxWidgets, written in Python:
<ul>
-<li><b>tcltk</b> - Current Tcl/Tk based GUI aka the <em>gis.m</em>
- <a href="gis.m.html">GIS Manager</a></li>
-<li><b>oldtcltk</b> - Old Tcl/Tk based GUI aka the <em>d.m</em>
- <a href="d.m.html">Display Manager</a></li>
<li><b>wxpython</b> - New wxPython based GUI aka
<a href="wxGUI.html">wxGUI</a></li>
</ul>
+The old <em>gis.m</em> and <em>d.m</em> Tcl/Tk GUIs from GRASS 6 have been removed.
+<p>
If the <b>-u</b> update flag is given or the <em>g.gisenv</em>
<tt>GRASS_GUI</tt> variable is missing, then the <tt>GRASS_GUI</tt>
variable is permanently changed and the selected GUI will be used
@@ -24,8 +22,7 @@
<h2>NOTES</h2>
-Valid values for GRASS_GUI are <tt>text</tt>, <tt>tcltk</tt>,
-<tt>oldtcltk</tt>, and <tt>wxpython</tt>.
+Valid values for GRASS_GUI are <tt>text</tt> and <tt>wxpython</tt>.
<em>g.gisenv</em> variables are stored in the user's home directory
in a hidden file called "<TT>.grassrc7</TT>". They are not shell environment
@@ -37,9 +34,7 @@
<em>
<a href="wxGUI.html">wxPython based new generation GUI</a>,
-<a href="http://grass.gdf-hannover.de/wiki/WxPython-based_GUI_for_GRASS">wxGUI wiki-page</a><br>
-<a href="gis.m.html">Tcl/Tk based GIS Manager (gis.m)</a>,<br>
-<a href="d.m.html">Tcl/Tk based Display Manager (d.m)</a>,<br><br>
+<a href="http://grass.osgeo.org/wiki/WxPython-based_GUI_for_GRASS">wxGUI wiki-page</a><br>
<a href="g.gisenv.html">g.gisenv</a>, <a href="variables.html">GRASS variables list</a>
</em>
Modified: grass/trunk/general/g.gui/main.c
===================================================================
--- grass/trunk/general/g.gui/main.c 2008-10-21 01:55:42 UTC (rev 33942)
+++ grass/trunk/general/g.gui/main.c 2008-10-21 02:27:23 UTC (rev 33943)
@@ -42,10 +42,8 @@
type->type = TYPE_STRING;
type->label = _("GUI type");
type->description = _("Default value: GRASS_GUI if defined otherwise wxpython");
- type->descriptions = _("tcltk;Tcl/Tk based GUI - GIS Manager (gis.m);"
- "oldtcltk;Old Tcl/Tk based GUI - Display Manager (d.m);"
- "wxpython;wxPython based next generation GUI");
- type->options = "tcltk,oldtcltk,wxpython";
+ type->descriptions = _("wxpython;wxPython based GUI");
+ type->options = "wxpython";
rc_file = G_define_standard_option(G_OPT_F_INPUT);
rc_file->key = "workspace";
@@ -77,29 +75,7 @@
}
- if (strcmp(type->answer, "oldtcltk") == 0) {
- sprintf(progname, "%s/etc/dm/d.m.tcl", G_gisbase());
- if (rc_file->answer) {
- G_spawn(getenv("GRASS_WISH"), "d.m", progname, "-name", "d_m_tcl",
- rc_file->answer, NULL);
- }
- else {
- G_spawn(getenv("GRASS_WISH"), "d.m", progname, "-name", "d_m_tcl",
- NULL);
- }
- }
- else if (strcmp(type->answer, "tcltk") == 0) {
- sprintf(progname, "%s/etc/gm/gm.tcl", G_gisbase());
- if (rc_file->answer) {
- G_spawn(getenv("GRASS_WISH"), "gis.m", progname, "-name",
- "gm_tcl", rc_file->answer, NULL);
- }
- else {
- G_spawn(getenv("GRASS_WISH"), "gis.m", progname, "-name",
- "gm_tcl", NULL);
- }
- }
- else if (strcmp(type->answer, "wxpython") == 0) {
+ if (strcmp(type->answer, "wxpython") == 0) {
sprintf(progname, "%s/etc/wxpython/wxgui.py", G_gisbase());
if (rc_file->answer) {
G_spawn("python", "wxgui", progname, "--workspace",
Modified: grass/trunk/lib/init/functions.sh
===================================================================
--- grass/trunk/lib/init/functions.sh 2008-10-21 01:55:42 UTC (rev 33942)
+++ grass/trunk/lib/init/functions.sh 2008-10-21 02:27:23 UTC (rev 33943)
@@ -10,7 +10,7 @@
cat <<-EOF
Usage:
$CMD_NAME [-h | -help | --help] [-v | --version] [-c]
- [-text | -gui | -tcltk | -wxpython]
+ [-text | -gui | -wxpython]
[[[<GISDBASE>/]<LOCATION_NAME>/]<MAPSET>]
Flags:
@@ -21,8 +21,6 @@
and set as default
-gui use graphical user interface ($DEFAULT_GUI by default)
and set as default
- -tcltk use Tcl/Tk based graphical user interface
- and set as default
-wxpython use wxPython based graphical user interface
and set as default
@@ -34,7 +32,7 @@
GISDBASE/LOCATION_NAME/MAPSET fully qualified initial mapset directory
Environment variables relevant for startup:
- GRASS_GUI select GUI (text, gui, tcltk, wxpython)
+ GRASS_GUI select GUI (text, gui, wxpython)
GRASS_WISH set wish shell name to override 'wish'
GRASS_HTML_BROWSER set html web browser for help pages
GRASS_ADDON_PATH set additional path(s) to local GRASS modules
@@ -98,10 +96,10 @@
GRASS_GUI="$DEFAULT_GUI"
fi
- # d.m no longer exists
+ # gis.m, d.m no longer exist
case "$GRASS_GUI" in
- d.m | oldtcltk)
- GRASS_GUI=gis.m
+ d.m | oldtcltk | gis.m)
+ GRASS_GUI="$DEFAULT_GUI"
;;
esac
}
@@ -257,26 +255,16 @@
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" ] ; then
-
- # Check if wish is working properly
- echo 'exit 0' | "$GRASS_WISH" >/dev/null 2>&1
- fi
-
# ok
if [ "$?" = 0 ] ; then
- # Set the tcltkgrass base directory
- TCLTKGRASSBASE="$ETC"
# Set the wxpython base directory
WXPYTHONGRASSBASE="$ETC/wxpython"
else
- # Wish was not found - switch to text interface mode
+ # Python was not found - switch to text interface mode
cat <<-EOF
- WARNING: The wish command does not work as expected!
- Please check your GRASS_WISH environment variable.
+ WARNING: The python command does not work as expected!
+ Please check your GRASS_PYTHON environment variable.
Use the -help option for details.
Switching to text based interface mode.
@@ -420,7 +408,7 @@
;;
# Check for GUI
- tcltk | gis.m | wxpython)
+ wxpython)
gui_startup
;;
*)
@@ -436,18 +424,15 @@
gui_startup()
{
- if [ "$GRASS_GUI" = "tcltk" ] || [ "$GRASS_GUI" = "gis.m" ] ; then
+ if [ "$GRASS_GUI" = "wxpython" ] ; then
# eval `foo` will return subshell return code and not app foo return code!!!
- eval '"$GRASS_WISH" -file "$TCLTKGRASSBASE/gis_set.tcl"'
- thetest=$?
- else
eval '"$GRASS_PYTHON" "$WXPYTHONGRASSBASE/gis_set.py"'
thetest=$?
fi
case $thetest in
1)
- # The gis_set.tcl script printed an error message so wait
+ # The startup script printed an error message so wait
# for user to read it
cat <<-EOF
Error in GUI startup. If necessary, please
@@ -481,7 +466,7 @@
exit 0
;;
*)
- echo "ERROR: Invalid return code from gis_set.tcl."
+ echo "ERROR: Invalid return code from GUI startup script."
echo "Please advise GRASS developers of this error."
cleanup_tmpdir
exit 1
@@ -606,10 +591,7 @@
case "$GRASS_GUI" in
- # Check for tcltk interface
- tcltk | gis.m)
- "$GISBASE/scripts/gis.m"
- ;;
+ # Check for gui interface
wxpython)
"$GISBASE/etc/wxpython/scripts/wxgui"
;;
@@ -664,9 +646,6 @@
See the licence terms with: g.version -c
EOF
case "$GRASS_GUI" in
- tcltk | gis.m)
- echo "If required, restart the GUI with: g.gui tcltk"
- ;;
wxpython)
echo "If required, restart the GUI with: g.gui wxpython"
;;
@@ -769,7 +748,7 @@
if [ "$MINGW" ] ; then
# "$ETC/run" doesn't work at all???
"$SHELL"
- rm -rf "$LOCATION/.tmp"/* # remove gis.m session files from .tmp
+ rm -rf "$LOCATION/.tmp"/* # remove GUI session files from .tmp
else
"$ETC/run" "$SHELL"
EXIT_VAL=$?
Modified: grass/trunk/lib/init/grass7.html
===================================================================
--- grass/trunk/lib/init/grass7.html 2008-10-21 01:55:42 UTC (rev 33942)
+++ grass/trunk/lib/init/grass7.html 2008-10-21 02:27:23 UTC (rev 33943)
@@ -17,7 +17,7 @@
<H2>SYNOPSIS</H2>
<B>grass70</B> [<B>-</B>] [<B>-v</B>] [<B>-h | -help | --help</B>]
- [<B>-text | -gui | -tcltk | -wxpython]</B>]
+ [<B>-text | -gui | -wxpython]</B>]
[[[<B><GISDBASE>/</B>]<B><LOCATION_NAME>/</B>]
<B><MAPSET></B>]
@@ -43,7 +43,7 @@
settings for the user interface and mapset selected.
<P>
-If you specify a graphical user interface (Tcl/Tk or wxPython) the <EM>grass70</EM>
+If you specify a graphical user interface (wxPython) the <EM>grass70</EM>
program will try to verify that the system you specified exists and that you
can access it successfully. If any of these checks fail then <EM>grass70</EM>
will automatically switch back to the text user interface mode.
@@ -67,10 +67,7 @@
<DT><B>-text</B>
<DD> Indicates that the text based user interface should be used
-<DT><B>-gui</B> (or <B>-tcltk</B>)
-<DD> Indicates that the old Tcl/Tk based graphical user interface should be used
-
-<DT><B>-wxpython</B>
+<DT><B>-gui</B> (or <B>-wxpython</B>)
<DD> Indicates that the new Python based graphical user interface should be used
<DT><B>-v</B> <B>--version</B>
@@ -126,9 +123,7 @@
variable called GRASS_GUI which indicates the type of user interface for
GRASS to use. If this variable is not set when <EM>grass70</EM> is run, then
it will be created and then saved in the <tt>$HOME/.grassrc7</tt> file for
-the next time GRASS is run. In addition to "text", "tcltk" or "wxpython",
-the GRASS_GUI variable can be set to the name of the Tcl/Tk GUI to use, for
-example "gis.m" or "d.m".
+the next time GRASS is run. It can be set to "text" or "wxpython".
<P>
There is an order of precedence in the way <EM>grass70</EM> determines the user
@@ -140,15 +135,15 @@
<DD>• Command line argument<BR>
• Environment variable GRASS_GUI<BR>
• Value set in <tt>$HOME/.grassrc7</tt><BR>
- • Default value - currently gis.m
+ • Default value - wxpython
</DL>
<H3>Tcl/Tk and Python Environment Variables</H3>
<P>
-If you choose to use the Tcl/Tk graphical user interface, then the following
-environment variables can be used to override your system default
-<tt>tclsh</tt> and <tt>wish</tt> commands.
+If you choose to use the wxPython interface or Tcl/Tk modules, then
+the following environment variables can be used to override your
+system default <tt>tclsh</tt>, <tt>wish</tt>, and <tt>python</tt> commands.
<DL>
<DT><B>GRASS_TCLSH</B>
@@ -162,20 +157,14 @@
</DL>
-<H4>Example Use of GRASS Tcl/Tk Environment Variables</H4>
+<H4>Example Use of GRASS Python Environment Variable</H4>
<P>
-Suppose your system has Tcl/Tk 8.3 installed and you install a personal
-version of the Tcl/Tk 8.5 binaries under <tt>$HOME/bin</tt>. You can use
-the above variables to have GRASS use the Tcl/Tk 8.5 binaries instead.
+Suppose your system has Python 2.4 installed and you install a personal
+version of the Python 2.5 binaries under <tt>$HOME/bin</tt>. You can use
+the above variables to have GRASS use the Python 2.5 binaries instead.
-<P>
-<pre>
- GRASS_TCLSH = $HOME/bin/tclsh8.5
- GRASS_WISH = $HOME/bin/wish8.5
-</pre>
-
<H4>Example Use of the GRASS Python Environment Variable</H4>
<P>
<pre>
@@ -372,24 +361,18 @@
<H2>CAVEAT</H2>
-If you start GRASS using the Tcl/Tk interface you must have a <tt>wish</tt>
+If you start GRASS using the wxPython interface you must have a <tt>python</tt>
command in your $PATH variable. That is, the command must be named
-<tt>wish</tt> and not something like <tt>wish8.3</tt>. By default, some Tcl/Tk
-installations do not create a <tt>wish</tt> command. In these cases the system
-administrator must create an appropriate link to the actual <tt>wish</tt>
+<tt>python</tt> and not something like <tt>python2.5</tt>. Rarely some Python
+installations do not create a <tt>python</tt> command. In these cases the system
+administrator must create an appropriate link to the actual <tt>python</tt>
program.
<P>
-For example, suppose Tcl/Tk 8.3 programs are installed in /usr/local/bin. Then
-the system administrator should go to the /usr/local/bin directory and run the
-commands "<tt>ln -s wish8.3 wish</tt>" and "<tt>ln -s tclsh8.3 tclsh</tt>" to
-properly install Tcl/Tk for use with GRASS.
-
-<P>
-Furthermore, if you have more than one version of Tcl/Tk installed, make sure
+Furthermore, if you have more than one version of Python installed, make sure
that the version you want to use with GRASS is the first version found in
your <tt>$PATH</tt> variable. GRASS searches your <tt>$PATH</tt> variable
-until it finds the first version of <tt>wish</tt>.
+until it finds the first version of <tt>python</tt>.
<H2>FILES</H2>
Modified: grass/trunk/lib/init/variables.html
===================================================================
--- grass/trunk/lib/init/variables.html 2008-10-21 01:55:42 UTC (rev 33942)
+++ grass/trunk/lib/init/variables.html 2008-10-21 02:27:23 UTC (rev 33943)
@@ -140,9 +140,7 @@
<dt>GRASS_GUI</dt>
<dd>either <tt>text</tt> or <tt>gui</tt> to define non-/graphical startup.
<br><br>
- Can also specify the name of the GUI to use, e.g. <tt>tcltk</tt>
- (<em><a href="gis.m.html">gis.m</a></em>), <tt>oldtcltk</tt>
- (<em><a href="d.m.html">d.m</a></em>) or <tt>wxpython</tt>
+ Can also specify the name of the GUI to use, e.g. <tt>wxpython</tt>
(<em><a href="wxGUI.html">wxGUI</a></em>). Also exists as a GRASS
gisenv variable (see below). If this shell variable exists at GRASS
startup, it will determine the GUI used. If it is not defined startup
@@ -158,7 +156,7 @@
defines the height of GRASS monitor, see also GRASS_WIDTH.</dd>
<dt>GRASS_HTML_BROWSER</dt>
- <dd>[init.sh, d.m, gis.m]<br>
+ <dd>[init.sh, wxgui]<br>
defines name of HTML browser. For most platforms this should be
an executable in your PATH, or the full path to an executable.<br><br>
Mac OS X runs applications differently from the CLI.
@@ -245,7 +243,7 @@
defines the width of GRASS monitor, see also GRASS_HEIGHT.</dd>
<dt>GRASS_WISH</dt>
- <dd>[d.m, nviz]<br>
+ <dd>[nviz, Tcl/Tk programs]<br>
set wish shell name to override 'wish'.</dd>
<dt>GRASS_NO_GLX_PBUFFERS</dt>
@@ -451,7 +449,7 @@
it causes programs to use the specified named region (created with
e.g. <tt>g.region save=...</tt>) to be used as the current region, instead of
the region from the WIND file.<br><br>
- This allows programs such as gis.m to run external commands on an
+ This allows programs such as the GUI to run external commands on an
alternate region without having to modify the WIND file then change it
back afterwards.</dd>
</dl>
@@ -472,10 +470,6 @@
g.gisenv set=DEBUG=0
</pre></div>
- <dt>DM_FORM_MODE</dt>
- <dd>[d.m]<br>
- sets default form mode (<tt>txt</tt> or <tt>gui</tt>)</dd>
-
<dt>GISDBASE</dt>
<dd>initial database</dd>
@@ -490,9 +484,7 @@
<dt>GRASS_GUI</dt>
<dd>either <tt>text</tt> or <tt>gui</tt> to define non-/graphical startup.
<br><br> Can also specify the name of the GUI to use,
- e.g. <tt>tcltk</tt>
- (<em><a href="gis.m.html">gis.m</a></em>), <tt>oldtcltk</tt>
- (<em><a href="d.m.html">d.m</a></em>) or <tt>wxpython</tt>
+ e.g. <tt>wxpython</tt>
(<em><a href="wxGUI.html">wxGUI</a></em>). Also exists as a shell
environment variable. If this shell variable exists at GRASS
startup, it will determine the GUI used. If it is not defined
More information about the grass-commit
mailing list