[GRASS-SVN] r30966 - grass/trunk/gui/tcltk/gis.m

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Apr 13 06:28:09 EDT 2008


Author: hamish
Date: 2008-04-13 06:28:08 -0400 (Sun, 13 Apr 2008)
New Revision: 30966

Modified:
   grass/trunk/gui/tcltk/gis.m/runandoutput.tcl
Log:
fail nicely on WinGrass (trac bug #117)

Modified: grass/trunk/gui/tcltk/gis.m/runandoutput.tcl
===================================================================
--- grass/trunk/gui/tcltk/gis.m/runandoutput.tcl	2008-04-13 07:01:50 UTC (rev 30965)
+++ grass/trunk/gui/tcltk/gis.m/runandoutput.tcl	2008-04-13 10:28:08 UTC (rev 30966)
@@ -254,12 +254,19 @@
 		}
 
 	}
+
 	if {[catch {close $input} error]} {
 		tk_messageBox -type ok -icon error -title [G_msg "Error"] \
 			-message [G_msg "d.mon error: problem launching xmon, $error"]
 		return
 	}
 
+	if { ![info exists xmonlist] } {
+		tk_messageBox -type ok -icon error -title [G_msg "Error"] \
+			-message [G_msg "This module requires X11 support, but no xmons were found"]
+		return
+	}
+
 	set xmon  [lindex $xmonlist 0]
 	spawn d.mon start=$xmon
 }



More information about the grass-commit mailing list