[GRASS-SVN] r47680 - grass/trunk/visualization/nviz/scripts

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 16 12:58:53 EDT 2011


Author: marisn
Date: 2011-08-16 09:58:53 -0700 (Tue, 16 Aug 2011)
New Revision: 47680

Modified:
   grass/trunk/visualization/nviz/scripts/config.tcl
   grass/trunk/visualization/nviz/scripts/mapBrowser.tcl
   grass/trunk/visualization/nviz/scripts/nviz2.2_script
Log:
Fix NVIZ parts broken by other GRASS 7 changes

Modified: grass/trunk/visualization/nviz/scripts/config.tcl
===================================================================
--- grass/trunk/visualization/nviz/scripts/config.tcl	2011-08-16 14:14:35 UTC (rev 47679)
+++ grass/trunk/visualization/nviz/scripts/config.tcl	2011-08-16 16:58:53 UTC (rev 47680)
@@ -39,6 +39,15 @@
     set mingw "0"
 }
 
+# set correct devnull 
+if {![catch {set env(OS)}] && $env(OS) == "Windows_NT"} {
+        set mingw "1"
+        set devnull "NUL:"
+} else {
+        set mingw "0"
+        set devnull "/dev/null"
+}
+
 # Set up auto_path directories
 if {[catch {set env(Nviz_PanelPath)} user_path]} then {
     set user_path [list]

Modified: grass/trunk/visualization/nviz/scripts/mapBrowser.tcl
===================================================================
--- grass/trunk/visualization/nviz/scripts/mapBrowser.tcl	2011-08-16 14:14:35 UTC (rev 47679)
+++ grass/trunk/visualization/nviz/scripts/mapBrowser.tcl	2011-08-16 16:58:53 UTC (rev 47680)
@@ -34,11 +34,12 @@
 
 proc grass_mapset_list {} {
     global src_boot
+    global devnull
 
     set list {}
     set location [grass_location]
-
-    foreach name [exec $src_boot/bin/g.mapsets -p] {
+    
+    foreach name [exec $src_boot/bin/g.mapsets -p 2> $devnull] {
 	if {[file isdir $location/$name]} {
 	    lappend list $name
 	}

Modified: grass/trunk/visualization/nviz/scripts/nviz2.2_script
===================================================================
--- grass/trunk/visualization/nviz/scripts/nviz2.2_script	2011-08-16 14:14:35 UTC (rev 47679)
+++ grass/trunk/visualization/nviz/scripts/nviz2.2_script	2011-08-16 16:58:53 UTC (rev 47680)
@@ -261,8 +261,10 @@
 		-background #FFFFFF -textvariable Nv_(text)
 	pack .bottom.entry -side left -fill both -expand yes
 
-	set cwidth [exec $src_boot/bin/g.gisenv X3D_WIDTH]
-	set cheight [exec $src_boot/bin/g.gisenv X3D_HEIGHT]
+	set cwidth {}
+	set cheight {}
+	catch { set cwidth [exec $src_boot/bin/g.gisenv X3D_WIDTH] }
+	catch { set cheight [exec $src_boot/bin/g.gisenv X3D_HEIGHT] }
 	
 	if {$cwidth > 0 && $cheight > 0} {
 		if { [catch {togl $Nv_(TOP).canvas -rgba true -double true -depth true \



More information about the grass-commit mailing list