[GRASS-SVN] r33607 - grass/branches/develbranch_6/gui/tcltk/gis.m
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 30 02:06:27 EDT 2008
Author: marisn
Date: 2008-09-30 02:06:27 -0400 (Tue, 30 Sep 2008)
New Revision: 33607
Modified:
grass/branches/develbranch_6/gui/tcltk/gis.m/mapcanvas.tcl
grass/branches/develbranch_6/gui/tcltk/gis.m/profile.tcl
Log:
Make some errors more fatal to avoid leaving gis.m in unusable state
Modified: grass/branches/develbranch_6/gui/tcltk/gis.m/mapcanvas.tcl
===================================================================
--- grass/branches/develbranch_6/gui/tcltk/gis.m/mapcanvas.tcl 2008-09-30 03:49:44 UTC (rev 33606)
+++ grass/branches/develbranch_6/gui/tcltk/gis.m/mapcanvas.tcl 2008-09-30 06:06:27 UTC (rev 33607)
@@ -210,6 +210,7 @@
set mappid [pid]
if {[catch {set mapfile($mon) [exec g.tempfile pid=$mappid]} error]} {
GmLib::errmsg $error [G_msg "Error creating tempfile"]
+ return
}
set maskfile($mon) $mapfile($mon)
append mapfile($mon) ".ppm"
@@ -219,6 +220,7 @@
set mappid [pid]
if {[catch {set outfile($mon) [exec g.tempfile pid=$mappid]} error]} {
GmLib::errmsg $error [G_msg "Error creating tempfile"]
+ return
}
set tmpdir [file dirname $outfile($mon)]
@@ -431,6 +433,7 @@
}
if {[catch {close $input} error]} {
GmLib::errmsg $error [G_msg "g.proj or projection error"]
+ return
}
}
# Length is calculated from the map canvas arrows
@@ -591,6 +594,7 @@
}
if {[catch {close $input} error]} {
GmLib::errmsg $error [G_msg "Error setting region"]
+ return
}
# Finally put this into wind file format to use with GRASS_REGION
regexp -nocase {^([0-9]+)} $parts(projection) trash parts(projection)
@@ -1134,6 +1138,7 @@
if { [catch {close $input} error] || ![info exists parts] } {
GmLib::errmsg $error [G_msg "Error setting region (Problem with g.region?)"]
+ return
}
#set start point (sw corner)
Modified: grass/branches/develbranch_6/gui/tcltk/gis.m/profile.tcl
===================================================================
--- grass/branches/develbranch_6/gui/tcltk/gis.m/profile.tcl 2008-09-30 03:49:44 UTC (rev 33606)
+++ grass/branches/develbranch_6/gui/tcltk/gis.m/profile.tcl 2008-09-30 06:06:27 UTC (rev 33607)
@@ -51,7 +51,7 @@
variable pmap
variable status
- set m [GSelect cell title "Raster map for profile" parent [winfo containing [winfo pointerx .] [winfo pointery .]]]
+ set m [GSelect cell title [G_msg "Raster map for profile"] parent [winfo containing [winfo pointerx .] [winfo pointery .]]]
if { $m != "" } {
set pmap $m
}
@@ -74,7 +74,7 @@
if { [winfo exists .profile] } {return}
- set ptitle "Profile Window"
+ set ptitle [G_msg "Profile Window"]
toplevel .profile
wm title .profile [G_msg $ptitle]
More information about the grass-commit
mailing list