[GRASS-SVN] r31350 - grass/branches/develbranch_6/gui/tcltk/gis.m

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 14 21:18:15 EDT 2008


Author: cmbarton
Date: 2008-05-14 21:18:14 -0400 (Wed, 14 May 2008)
New Revision: 31350

Modified:
   grass/branches/develbranch_6/gui/tcltk/gis.m/runandoutput.tcl
Log:
Guarantee_xmon procedure should fail gracefully in windows with a message that functions that require X Windows are not available.

Modified: grass/branches/develbranch_6/gui/tcltk/gis.m/runandoutput.tcl
===================================================================
--- grass/branches/develbranch_6/gui/tcltk/gis.m/runandoutput.tcl	2008-05-14 21:10:51 UTC (rev 31349)
+++ grass/branches/develbranch_6/gui/tcltk/gis.m/runandoutput.tcl	2008-05-15 01:18:14 UTC (rev 31350)
@@ -244,6 +244,13 @@
 # Used in menus.
 
 proc guarantee_xmon {} {
+	global mingw
+	
+	if {$mingw == 1} {
+		tk_messageBox -type ok -icon error -title [G_msg "X Windows not available"] \
+			-message [G_msg "Functions that require X Windows are not available in Windows"]
+		return
+	}
 	if {![catch {open "|d.mon -L" r} input]} {
 		while {[gets $input line] >= 0 } {
 			if {[regexp -nocase {(x[0-9]+).*not running} $line dummy monitor]} {



More information about the grass-commit mailing list