[GRASS-CVS] markus: grass6/gui/tcltk/gis.m description.html, 1.14.2.4, 1.14.2.5 georect.tcl, 1.37.2.2, 1.37.2.3 gm_profile.html, 1.3.2.3, 1.3.2.4 gmmenu.tcl, 1.53.2.2, 1.53.2.3 mapcanvas.tcl, 1.77, 1.77.2.1

grass at intevation.de grass at intevation.de
Mon Dec 3 09:14:42 EST 2007


Author: markus

Update of /grassrepository/grass6/gui/tcltk/gis.m
In directory doto:/tmp/cvs-serv22583

Modified Files:
      Tag: releasebranch_6_3
	description.html georect.tcl gm_profile.html gmmenu.tcl 
	mapcanvas.tcl 
Log Message:
zoom fix; msg update (merge from HEAD)

Index: description.html
===================================================================
RCS file: /grassrepository/grass6/gui/tcltk/gis.m/description.html,v
retrieving revision 1.14.2.4
retrieving revision 1.14.2.5
diff -u -d -r1.14.2.4 -r1.14.2.5

Index: georect.tcl
===================================================================
RCS file: /grassrepository/grass6/gui/tcltk/gis.m/georect.tcl,v
retrieving revision 1.37.2.2
retrieving revision 1.37.2.3
diff -u -d -r1.37.2.2 -r1.37.2.3
--- georect.tcl	28 Oct 2007 13:30:02 -0000	1.37.2.2
+++ georect.tcl	3 Dec 2007 14:14:39 -0000	1.37.2.3
@@ -279,8 +279,8 @@
         set groupfile "$xygdb/$xyloc/$xymset/group/$xygroup/REF"
         if {![file exists $groupfile] } {
             set GRMap::xygroup ""
-            set msg "There is no raster group file (REF). You must select \
-                    the 'create/edit group' option to create a group file."
+            set msg [G_msg "There is no raster group file (REF). You must select\
+                    the 'create/edit group' option to create a group file."]
             tk_messageBox -message $msg -parent .grstart -type ok
             return
         }
@@ -301,8 +301,8 @@
         puts "groupfile = $groupfile"
         if {![file exists $groupfile] } {
             set GRMap::xygroup ""
-            set msg "There is no vector group file (VREF). You must select \
-                    the 'create/edit group' option to create a group file."
+            set msg [G_msg "There is no vector group file (VREF). You must select\
+                    the 'create/edit group' option to create a group file."]
             tk_messageBox -message $msg -parent .grstart -type ok
             return
         }
@@ -382,7 +382,7 @@
     variable selftarget
 
     set path [tk_chooseDirectory -initialdir $currgdb \
-            -title "Select mapset of raster to georectify" \
+            -title [G_msg "Select mapset of raster to georectify"] \
             -mustexist true ]
     # try to make sure that a valid mapset has been picked
     if { $path == "" || $path == $currgdb || [file dirname $path] == $currgdb } { return }
@@ -430,7 +430,7 @@
     set vg_mf [MainFrame .vgwin.mf \
             -textvariable GRMap::vgmsg]
 
-    set GRMap::vgmsg "Create a group REF file and directory for vectors"
+    set GRMap::vgmsg [G_msg "Create a group REF file and directory for vectors"]
 
     set vg_frame [$vg_mf getframe]
 
@@ -610,7 +610,7 @@
     global bgcolor
     global iconpath
     
-    set grstarttitle "GRASS Georectifier"
+    set grstarttitle [G_msg "GRASS Georectifier"]
     toplevel .grstart
 
     wm title .grstart [G_msg $grstarttitle]
@@ -621,7 +621,7 @@
     set grstart_mf [MainFrame .grstart.mf \
             -textvariable GRMap::grstartmsg]
 
-    set GRMap::grstartmsg "Set up environment for georectifying rasters or vectors"
+    set GRMap::grstartmsg [G_msg "Set up environment for georectifying rasters or vectors"]
 
     set grstartup [$grstart_mf getframe ]
 
@@ -796,7 +796,7 @@
 
     # Create canvas monitor as top level mainframe
     toplevel .mapgrcan
-    wm title .mapgrcan "Displaying xy map to be georectified"
+    wm title .mapgrcan [G_msg "Displaying xy map to be georectified"]
 
     set grmapframe [MainFrame .mapgrcan.mf \
             -textvariable GRMap::msg \
@@ -1099,21 +1099,21 @@
         -command "GRMap::savegcp" \
         -highlightthickness 0 -takefocus 0 -relief link -borderwidth 1  \
         -highlightbackground $bgcolor  -activebackground $bgcolor\
-        -helptext [G_msg "save GCPs to POINTS file"]
+        -helptext [G_msg "Save GCPs to POINTS file"]
 
     # clear
     $bbox add -image [image create photo -file "$iconpath/gui-gcperase.gif"] \
         -command "GRMap::cleargcp" \
         -highlightthickness 0 -takefocus 0 -relief link -borderwidth 1  \
         -highlightbackground $bgcolor  -activebackground $bgcolor\
-        -helptext [G_msg "clear all unchecked GCP entries"]
+        -helptext [G_msg "Clear all unchecked GCP entries"]
 
     # rms
     $bbox add -image [image create photo -file "$iconpath/gui-rms.gif"] \
         -command "GRMap::gcp_error" \
         -highlightthickness 0 -takefocus 0 -relief link -borderwidth 1  \
         -highlightbackground $bgcolor  -activebackground $bgcolor\
-        -helptext [G_msg "calculate RMS error"]
+        -helptext [G_msg "Calculate RMS error"]
 
     # rectify
     $bbox add -image [image create photo -file "$iconpath/gui-georect.gif"] \
@@ -1310,8 +1310,8 @@
 
     set gcpfile "$xygdb/$xyloc/$xymset/group/$xygroup/POINTS"
     if {![file exists $gcpfile] } {
-            set msg "There is no POINTS file of ground control points for group. \
-                    You must create ground control points before georectifying map."
+            set msg [G_msg "There is no POINTS file of ground control points for group.\
+                    You must create ground control points before georectifying map."]
             tk_messageBox -message $msg -parent .gcpwin -type ok
             return
     }
@@ -1340,8 +1340,8 @@
 
     if { $maptype == "rast" } {
         if { $gcpcnt<3 || ($gcpcnt<6 && $rectorder==2) || ($gcpcnt<10 && $rectorder==3) } {
-            set msg "Insufficient ground control points for georectification method. \
-                    You need at least 3 points for 1st order, 6 points for 2nd order, and 10 points for 3rd order"
+            set msg [G_msg "Insufficient ground control points for georectification method.\
+                    You need at least 3 points for 1st order, 6 points for 2nd order and 10 points for 3rd order."]
             tk_messageBox -message $msg -parent .gcpwin -type ok
             return
         }
@@ -1370,8 +1370,8 @@
         GRMap::resetenv
     } elseif { $maptype == "vect" } {
         if { $gcpcnt < 1 } {
-            set msg "No valid ground control points in gcp file. \
-            You must create valid ground control points before georectifying map."
+            set msg [G_msg "No valid ground control points in GCP file.\
+            You must create valid ground control points before georectifying map."]
             tk_messageBox -message $msg -parent .gcpwin -type ok
             return
         }
@@ -1582,7 +1582,7 @@
 		set gregion "projection:$parts(projection); zone:$parts(zone); north:$parts(north); south:$parts(south); east:$parts(east); west:$parts(west); e-w resol:$parts(ewres);	 n-s resol:$parts(nsres)"
 	}
 
-    set GRMap::msg "please wait..."
+    set GRMap::msg [G_msg "Please wait..."]
     $grmapframe showstatusbar progression
 
     incr drawprog
@@ -1663,7 +1663,7 @@
     set drawprog 100
 
     set drawprog 0
-    set GRMap::msg "Georectifying maps in $xygroup group"
+    set GRMap::msg [G_msg "Georectifying maps in $xygroup group"]
 
     $grmapframe showstatusbar status
 
@@ -1792,7 +1792,7 @@
     bind $grcan <ButtonRelease-1> ""
 
     # reset status display to normal
-    set GRMap::msg "Georectifying maps in $xygroup group"
+    set GRMap::msg [G_msg "Georectifying maps in $xygroup group"]
 
     GRMap::restorecursor
 }
@@ -2015,9 +2015,9 @@
     GRMap::setcursor "plus"
 
     if {$zoom == 1} {
-        set GRMap::msg "Drag or click mouse to zoom"
+        set GRMap::msg [G_msg "Drag or click mouse to zoom"]
     } elseif {$zoom == -1} {
-        set GRMap::msg "Drag or click mouse to unzoom"
+        set GRMap::msg [G_msg "Drag or click mouse to unzoom"]
     }
 
     bind $grcan <1> {
@@ -2215,7 +2215,7 @@
     variable msg
     variable grcoords_mov
 
-    set GRMap::msg "Drag with mouse to pan"
+    set GRMap::msg [G_msg "Drag with mouse to pan"]
 
     GRMap::setcursor "hand2"
 

Index: gm_profile.html
===================================================================
RCS file: /grassrepository/grass6/gui/tcltk/gis.m/gm_profile.html,v
retrieving revision 1.3.2.3
retrieving revision 1.3.2.4
diff -u -d -r1.3.2.3 -r1.3.2.4

Index: gmmenu.tcl
===================================================================
RCS file: /grassrepository/grass6/gui/tcltk/gis.m/gmmenu.tcl,v
retrieving revision 1.53.2.2
retrieving revision 1.53.2.3
diff -u -d -r1.53.2.2 -r1.53.2.3
--- gmmenu.tcl	2 Nov 2007 12:19:33 -0000	1.53.2.2
+++ gmmenu.tcl	3 Dec 2007 14:14:39 -0000	1.53.2.3
@@ -37,6 +37,7 @@
 # Check for existence of xtnmenu.dat file and parse it
 # into an extensions menu
 
+lappend menudatlist "$env(GISBASE)/etc/xtnmenu.dat"
 if {[info exists env(GRASS_ADDON_ETC)]} {
     set pathlist [split $env(GRASS_ADDON_ETC) ":"]
     foreach path $pathlist {

Index: mapcanvas.tcl
===================================================================
RCS file: /grassrepository/grass6/gui/tcltk/gis.m/mapcanvas.tcl,v
retrieving revision 1.77
retrieving revision 1.77.2.1
diff -u -d -r1.77 -r1.77.2.1
--- mapcanvas.tcl	8 Sep 2007 03:55:06 -0000	1.77
+++ mapcanvas.tcl	3 Dec 2007 14:14:39 -0000	1.77.2.1
@@ -501,7 +501,6 @@
 	variable driver_w
 	variable driver_h
 	variable mapfile
-
 	variable monitor_zooms
 	variable exploremode
 
@@ -517,9 +516,12 @@
 
 		set mapwd [expr {abs(1.0 * ($map_e - $map_w))}]
 		set mapht [expr {abs(1.0 * ($map_n - $map_s))}]
-		if {$mapwd == 0.0 || $mapht == 0.0} {
+					   
+		# only zoom in to 1x1 cell
+		if {$monitor_zooms($mon,1,cols) < 1 || $monitor_zooms($mon,1,rows) < 1} {
 			tk_messageBox -type ok -icon info -parent .mapcan($mon) \
-				-title [G_msg "Max zoom in reached"] -message [G_msg "Max zoom in reached"]
+				-message [G_msg "Maximum zoom-in reached"]
+			MapCanvas::zoom_back $mon
 			return 1
 		}
 		set mapar [expr {$mapwd / $mapht}]




More information about the grass-commit mailing list