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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jan 26 11:13:43 EST 2008


Author: cmbarton
Date: 2008-01-26 11:13:42 -0500 (Sat, 26 Jan 2008)
New Revision: 29845

Modified:
   grass/trunk/gui/tcltk/gis.m/mapcanvas.tcl
   grass/trunk/gui/tcltk/gis.m/maptool.tcl
Log:
Changed zoom menu descriptions a little to be more consistent with current terminology ("computational region") and more clearly indicate what they do.

Changed "set computational region to match display" option to only change extents rather than change resolution too. Resolution should be set from g.region. This is the way the display zoom works with other settings. Caveat: changing extents always changes resolution a tiny bit (some rounding error or the like) due to the way that g.region works. 

Modified: grass/trunk/gui/tcltk/gis.m/mapcanvas.tcl
===================================================================
--- grass/trunk/gui/tcltk/gis.m/mapcanvas.tcl	2008-01-26 11:28:16 UTC (rev 29844)
+++ grass/trunk/gui/tcltk/gis.m/mapcanvas.tcl	2008-01-26 16:13:42 UTC (rev 29845)
@@ -1058,8 +1058,8 @@
 	set ewres [lindex $region 5]
 
 	if { $nsres == $ewres } {
-	    set MapCanvas::regionstr [format [G_msg "Display: rows=%d columns=%d  resolution=%g %s"] \
-		$rows $cols $nsres $mapunits]
+	    set MapCanvas::regionstr [format [G_msg "Display: rows=%d columns=%d  resolution=%g $mapunits"] \
+		$rows $cols $nsres]
 	} else {
 	    set MapCanvas::regionstr [format [G_msg "Display: rows=%d cols=%d  N-S res=%g  E-W res=%g"] \
 		$rows $cols $nsres $ewres]
@@ -1176,7 +1176,7 @@
 
 	set options {}
 	foreach attr $zoom_attrs value $values {
-		if {$attr != "rows" && $attr != "cols"} {
+		if {$attr != "rows" && $attr != "cols" && $attr != "ewres" && $attr!= "nsres"} {
 			lappend options "$attr=$value"
 		}		
 	}
@@ -1684,9 +1684,9 @@
 
 
 	monitor_annotate $measurement_annotation_handle \
-		[format [G_msg " --segment length = %s\n"] $out_seg]
+		[G_msg " --segment length = $out_seg\n"]
 	monitor_annotate $measurement_annotation_handle \
-		[format [G_msg "cumulative length = %s\n"] $out_tot]
+		[G_msg "cumulative length = $out_tot\n"]
 
 	set linex1 $linex2
 	set liney1 $liney2

Modified: grass/trunk/gui/tcltk/gis.m/maptool.tcl
===================================================================
--- grass/trunk/gui/tcltk/gis.m/maptool.tcl	2008-01-26 11:28:16 UTC (rev 29844)
+++ grass/trunk/gui/tcltk/gis.m/maptool.tcl	2008-01-26 16:13:42 UTC (rev 29845)
@@ -181,22 +181,22 @@
 #	set zdimg [image create photo -file "$iconpath/gui-zoom_default.gif"]
 
 	$zoommenu add command \
-		-label [G_msg "Zoom to selected map"] \
+		-label [G_msg "Zoom display to selected map"] \
 		-command {MapCanvas::zoom_map $mon}
 	$zoommenu add command \
-		-label [G_msg "Zoom to saved region"] \
+		-label [G_msg "Zoom display to saved region"] \
 		-command {MapCanvas::zoom_region $mon}
 	$zoommenu add command \
-		-label [G_msg "Save display geometry to named region"] \
+		-label [G_msg "Save display extents to named region"] \
 		-command {MapCanvas::save_region $mon}
 	$zoommenu add command \
-		-label [G_msg "Zoom to current region (set with g.region)"] \
+		-label [G_msg "Zoom display to computational region (set with g.region)"] \
 		-command {MapCanvas::zoom_current $mon}
 	$zoommenu add command \
-		-label [G_msg "Zoom to default region"] \
+		-label [G_msg "Zoom display to default region"] \
 		-command {MapCanvas::zoom_default $mon}
 	$zoommenu add command \
-		-label [G_msg "Set current region (WIND file) to match display"] \
+		-label [G_msg "Set computational region extents to match display"] \
 		-command {MapCanvas::set_wind $mon "" 0}
 
 	$mapzoom configure -menu $zoommenu



More information about the grass-commit mailing list