[GRASS-SVN] r30058 - in grass/branches/releasebranch_6_3/gui: icons tcltk/gis.m

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 10 11:42:53 EST 2008


Author: neteler
Date: 2008-02-10 11:42:53 -0500 (Sun, 10 Feb 2008)
New Revision: 30058

Added:
   grass/branches/releasebranch_6_3/gui/icons/gui-mouse.gif
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gis.m.bat
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmlib.tcl
Modified:
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/Makefile
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/animate.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/barscale.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/chart.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/cmd.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/dtext.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/frames.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/georect.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gm.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmmenu.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmtool2.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmtree.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gridline.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/group.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/histogram.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/labels.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/legend.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/mapcanvas.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/maplabels.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/mapprint.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/maptool.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/profile.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rastarrows.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/raster.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rastnums.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rgbhis.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rules.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/runandoutput.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/thematic.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/tksys.tcl
   grass/branches/releasebranch_6_3/gui/tcltk/gis.m/vector.tcl
Log:
fixes backported from HEAD

Added: grass/branches/releasebranch_6_3/gui/icons/gui-mouse.gif
===================================================================
(Binary files differ)


Property changes on: grass/branches/releasebranch_6_3/gui/icons/gui-mouse.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/Makefile
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/Makefile	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/Makefile	2008-02-10 16:42:53 UTC (rev 30058)
@@ -14,3 +14,6 @@
 	for file in docs/gm_*.html ; do $(INSTALL_DATA) $$file $(GISBASE)/docs/html/ ; done
 	for file in docs/gm_*.png ; do $(INSTALL_DATA) $$file $(GISBASE)/docs/html/ ; done
 	for file in docs/gm_*.jpg ; do $(INSTALL_DATA) $$file $(GISBASE)/docs/html/ ; done
+
+$(BIN)/$(PGM).bat: $(PGM).bat
+	$(INSTALL_DATA) $< $@

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/animate.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/animate.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/animate.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -88,7 +88,7 @@
     
 	# create file for temporary image output
 	if {[catch {set tmpfile [exec g.tempfile pid=[pid]]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	
 }
@@ -856,7 +856,7 @@
             
             # export the map to a PPM file            
             if {[catch {exec r.out.ppm input=$name output=$tmpfile --q} error]} {
-                Gm::errmsg $error
+                GmLib::errmsg $error
                 return -1
             }
             
@@ -933,20 +933,20 @@
     if { $switch == 1 } {
         # set temp region file for changing resolution  
         if {[catch {set region [exec g.region -u save=$tmpregion --o --q]} error]} {
-            Gm::errmsg $error
+            GmLib::errmsg $error
         }
         if {[catch {set env(WIND_OVERRIDE) $tmpregion} error]} {
-            Gm::errmsg $error
+            GmLib::errmsg $error
         }
     
         # change resolution
         if {[catch [exec g.region res=$pnmres] error]} {
-            Gm::errmsg $error
+            GmLib::errmsg $error
         }    
     } else { 
         # switch back to original region
         if {[catch {unset env(WIND_OVERRIDE)} error]} {
-            Gm::errmsg $error
+            GmLib::errmsg $error
         }
         if {[file exists $tmpregion]} {
             catch [exec g.remove region=$tmpregion --q 2> $devnull]
@@ -975,7 +975,7 @@
 
     # set initial canvas geometry to match region    
     if {[catch {set region [exec g.region -ugp]} error]} {
-        Gm::errmsg $error
+        GmLib::errmsg $error
     }
 
     set reglist [split $region "\n"]

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/barscale.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/barscale.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/barscale.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -88,7 +88,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"
@@ -131,7 +131,7 @@
 	if {$GmBarscale::opt($id,1,font) != "" } {
 		set Gm::dfont $GmBarscale::opt($id,1,font)
 	}
-	Gm:DefaultFont dbarscale
+	Gm::defaultfont dbarscale
 	tkwait variable Gm::dfont
 	set GmBarscale::opt($id,1,font) $Gm::dfont
 	set Gm::dfont ""
@@ -288,8 +288,8 @@
     if {$mod} {set opt($id,1,mod) 1}
 
     # set hex colors to rgb         
-    set tcolor [Gm::color $opt($id,1,tcolor)]
-    set bcolor [Gm::color $opt($id,1,bcolor)]
+    set tcolor [GmLib::color $opt($id,1,tcolor)]
+    set bcolor [GmLib::color $opt($id,1,bcolor)]
 
     # no background color
     if { $opt($id,1,bcolor_none) == 1 } { 
@@ -398,7 +398,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/chart.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/chart.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/chart.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -86,7 +86,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"
@@ -134,7 +134,7 @@
 	if ![catch {open "|v.db.connect map=$mapname layer=$layer -g" r} vdb] {
 		set vectdb [read $vdb]
 		if {[catch {close $vdb} error]} {
-            Gm::errmsg $error
+            GmLib::errmsg $error
 		}
 		set vdblist [split $vectdb " "]
 		set tbl [lindex $vdblist 1]
@@ -438,7 +438,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/cmd.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/cmd.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/cmd.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -72,7 +72,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"
@@ -203,7 +203,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/dtext.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/dtext.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/dtext.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -89,7 +89,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"
@@ -114,7 +114,7 @@
 	if {$GmDtext::opt($id,1,font) != "" } {
 		set Gm::dfont $GmDtext::opt($id,1,font)
 	}
-	Gm:DefaultFont dtext
+	Gm::defaultfont dtext
 	tkwait variable Gm::dfont
 	set GmDtext::opt($id,1,font) $Gm::dfont
 	set Gm::dfont ""
@@ -280,7 +280,7 @@
     if {$mod} {set opt($id,1,mod) 1}
 
     # set hex colors to rgb         
-    set color [Gm::color $opt($id,1,color)]
+    set color [GmLib::color $opt($id,1,color)]
     
 
     if { ! ( $opt($id,1,_check) ) } { return } 
@@ -398,7 +398,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/frames.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/frames.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/frames.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -75,7 +75,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 
 	set lfilemask($count) $lfile($count)
@@ -272,7 +272,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/georect.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/georect.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/georect.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -354,7 +354,7 @@
         GRMap::setxyenv $xymset $xyloc
 		set cmd "i.group"
         if {[catch {exec -- $cmd --ui } error]} {
-        	Gm::errmsg $error
+        	GmLib::errmsg $error
         }
 
         # Return to georectified mapset
@@ -403,7 +403,7 @@
 
     set mappid [pid]
 	if {[catch {set grfile [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 
     append grfile ".ppm"
@@ -545,7 +545,7 @@
     catch {set vlist [open $vgfile]}
     set vectnames [read $vlist]
 	if {[catch {close $vlist} error]} {
-		Gm::errmsg $error
+		GmLib::errmsg $error
 	}
    
     set vlines [split $vectnames "\n"]
@@ -583,7 +583,7 @@
 			puts $output $vect
 		}
 	if {[catch {close $output} error]} {
-		Gm::errmsg $error
+		GmLib::errmsg $error
 	}
 
 }
@@ -1164,7 +1164,7 @@
         catch {set pfile [open $gcpfile]}
         set points [read $pfile]
 		if {[catch {close $pfile} error]} {
-			Gm::errmsg $error
+			GmLib::errmsg $error
 		}
         regsub -all {[ ]+} $points " " points
         set plines [split $points "\n"]
@@ -1229,7 +1229,7 @@
     }
     
 	if {[catch {close $output} error]} {
-		Gm::errmsg $error
+		GmLib::errmsg $error
 	}
 
 }
@@ -1269,7 +1269,7 @@
     catch {set input [open "|g.transform group=$xygroup order=$rectorder"]}
     set errorlist [read $input]
 	if {[catch {close $input} error]} {
-		Gm::errmsg $error
+		GmLib::errmsg $error
 	}
 
     # Return to georectified mapset
@@ -1321,7 +1321,7 @@
     catch {set pfile [open $gcpfile]}
     set points [read $pfile]
 	if {[catch {close $pfile} error]} {
-		Gm::errmsg $error
+		GmLib::errmsg $error
 	}
 
     regsub -all {[ ]+} $points " " points
@@ -1573,7 +1573,7 @@
 			}
 		}
 		if {[catch {close $input} error]} {
-			Gm::errmsg $error [G_msg "Error setting region"]
+			GmLib::errmsg $error [G_msg "Error setting region"]
 		}
 		# Finally put this into wind file format to use with GRASS_REGION
 		regexp -nocase {^.* (\(.*\))} $parts(projection) trash end
@@ -1640,7 +1640,7 @@
 			catch {set pfile [open $gcpfile]}
 			set points [read $pfile]
 			if {[catch {close $pfile} error]} {
-				Gm::errmsg $error
+				GmLib::errmsg $error
 			}
 
 			regsub -all {[ ]+} $points " " points
@@ -1950,7 +1950,7 @@
             set parts($key) $value
         }
 		if {[catch {close $input} error]} {
-			Gm::errmsg $error ["Error setting region"]
+			GmLib::errmsg $error ["Error setting region"]
 		}
 
         GRMap::zoom_new $parts(north) $parts(south) $parts(east) $parts(west) $parts(nsres) $parts(ewres)

Added: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gis.m.bat
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gis.m.bat	                        (rev 0)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gis.m.bat	2008-02-10 16:42:53 UTC (rev 30058)
@@ -0,0 +1 @@
+ at start "%GRASS_WISH%" "%GISBASE%/etc/gm/gm.tcl

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gm.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gm.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gm.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -28,6 +28,12 @@
 lappend auto_path $env(GISBASE)/etc/gm
 package require -exact GisM 1.0
 
+# path to GIS Manager files
+set gmpath $env(GISBASE)/etc/gm
+
+# Load common procedure library
+source $gmpath/gmlib.tcl
+
 if {[catch {set env(GISDBASE) [exec g.gisenv get=GISDBASE]} error]} {
 	Gm::errmsg $error
 }
@@ -48,8 +54,6 @@
 	Gm::errmsg $error
 }
 
-# path to GIS Manager files
-set gmpath $env(GISBASE)/etc/gm
 
 # path to icons for GIS Manager
 set iconpath $env(GISBASE)/etc/gui/icons
@@ -115,16 +119,16 @@
 source $gmpath/runandoutput.tcl
 
 namespace eval Gm {
-    variable gm_mainframe
-    variable status
-    variable array tree # mon
-    variable rcfile
-    variable moncount
-    variable prgtext
-    variable mainwindow
-    variable dfont 
-    variable selectedfont
-    variable encoding
+	variable gm_mainframe
+	variable status
+	variable array tree # mon
+	variable rcfile
+	variable moncount
+	variable prgtext
+	variable mainwindow
+	variable dfont 
+	variable selectedfont
+	variable encoding
 	global array filename # mon
 
 }
@@ -136,29 +140,14 @@
 
 set max_prgindic 20
 
-
-###############################################################################
-
-append regexp .* $env(GISBASE) {[^:]*}
-regsub -- $regexp $env(PATH) "&:$env(GISBASE)/etc/gui/scripts" env(PATH)
-
-
-###############################################################################
-
-#read_moncap
-
-proc Gm::color { color } {
-
-    regexp -- {#(..)(..)(..)} $color x r g b
-
-    set r [expr 0x$r ]
-    set g [expr 0x$g ]
-    set b [expr 0x$b ]
-
-    return "$r:$g:$b"
+if { $tcl_platform(platform) == "windows" } {
+	append regexp .* $env(GISBASE) {[^;]*}
+	regsub -- $regexp $env(PATH) "&;$env(GISBASE)/etc/gui/scripts" env(PATH)
+} else {
+	append regexp .* $env(GISBASE) {[^:]*}
+	regsub -- $regexp $env(PATH) "&:$env(GISBASE)/etc/gui/scripts" env(PATH)
 }
 
-
 ###############################################################################
 # Deprecated
 # Use guarantee_xmon and any run command instead.
@@ -176,101 +165,89 @@
 }
 
 ###############################################################################
-# Determine if an element already exists
 
-proc Gm::element_exists {elem name} {
-	global devnull
-	set exists 1
-	
-	set failure [catch {exec g.findfile element=$elem file=$name >& $devnull}]
 
-	return [expr {! $failure}]
-}
-
-###############################################################################
-
-
 proc Gm::create { } {
-    variable mainwindow
-    variable prgtext
-    variable gm_mainframe
-    variable tree
+	variable mainwindow
+	variable prgtext
+	variable gm_mainframe
+	variable tree
 	variable moncount
 	variable dfont
 	variable ecoding
-    global gmpath
-    global mon
-    global tree_pane
-    global options
-    global pgs
-    global prgindic
-    global keycontrol
-    global env
-    
-    # set display rendering environment for PNG/PPM output
-    set env(GRASS_RENDER_IMMEDIATE) "TRUE"
-    
-    # set default font
-    if {[catch {set env(GRASS_FONT)}]} {set env(GRASS_FONT) "romans"}
+	global gmpath
+	global mon
+	global tree_pane
+	global options
+	global pgs
+	global prgindic
+	global keycontrol
+	global env
+	
+	# set display rendering environment for PNG/PPM output
+	set env(GRASS_RENDER_IMMEDIATE) "TRUE"
+	
+	# set default font
+	if {[catch {set env(GRASS_FONT)}]} {set env(GRASS_FONT) "romans"}
 	set Gm::dfont ""
 	set Gm::encoding "ISO-8859-1"
 
 	set moncount 1
 
-    set Gm::prgtext [G_msg "Loading GIS Manager"]
-    set prgindic -1
-    _create_intro
-    update
+	set Gm::prgtext [G_msg "Loading GIS Manager"]
+	set prgindic -1
+	_create_intro
+	update
 
 	source $gmpath/gmmenu.tcl
 
-    set Gm::prgtext [G_msg "Creating MainFrame..."]
-
-    set gm_mainframe [MainFrame .mainframe \
+	set Gm::prgtext [G_msg "Creating MainFrame..."]
+    
+	set gm_mainframe [MainFrame .mainframe \
 		       -menu $descmenu \
 		       -textvariable Gm::status \
 		       -progressvar  Gm::prgindic ]
 
-    set mainwindow [$gm_mainframe getframe]
+	set mainwindow [$gm_mainframe getframe]
+    
+	# toolbar 1 & 2 creation
+	set tb1  [$gm_mainframe addtoolbar]
+	GmToolBar1::create $tb1
+	set tb2  [$gm_mainframe addtoolbar]
+	GmToolBar2::create $tb2
+	set pw1 [PanedWindow $mainwindow.pw1 -side left -pad 0 -width 10 ]
+    
+	# tree
+	set treemon [expr {$mon + 1}]
+	set tree_pane  [$pw1 add  -minsize 50 -weight 1]
+	    set pgs [PagesManager $tree_pane.pgs]
+    
+    
+	    pack $pgs -expand yes -fill both
+    
+    
+	# options
+	set options_pane  [$pw1 add -minsize 50 -weight 1]
+	set options_sw [ScrolledWindow $options_pane.sw -relief flat -borderwidth 1]
+	set options_sf [ScrollableFrame $options_sw.sf]
+	$options_sf configure -height 145 -width 460
+	$options_sw setwidget $options_sf
+	set options [$options_sf getframe]
+	pack $options_sw -fill both -expand yes
+    
+	# Scroll the options window with the mouse
+	bind_scroll $options_sf
+    
+	pack $pw1 -side top -expand yes -fill both -anchor n
+    
+	    # finish up
+	set Gm::prgtext [G_msg "Done"]
+    
+	set Gm::status [G_msg "Welcome to GRASS GIS"]
+	$gm_mainframe showstatusbar status
+    
+	pack $gm_mainframe -fill both -expand yes
 
-    # toolbar 1 & 2 creation
-    set tb1  [$gm_mainframe addtoolbar]
-    GmToolBar1::create $tb1
-    set tb2  [$gm_mainframe addtoolbar]
-    GmToolBar2::create $tb2
-    set pw1 [PanedWindow $mainwindow.pw1 -side left -pad 0 -width 10 ]
-
-    # tree
-    set treemon [expr {$mon + 1}]
-    set tree_pane  [$pw1 add  -minsize 50 -weight 1]
-	set pgs [PagesManager $tree_pane.pgs]
-
-
-	pack $pgs -expand yes -fill both
-
-
-    # options
-    set options_pane  [$pw1 add -minsize 50 -weight 1]
-    set options_sw [ScrolledWindow $options_pane.sw -relief flat -borderwidth 1]
-    set options_sf [ScrollableFrame $options_sw.sf]
-    $options_sf configure -height 145 -width 460
-    $options_sw setwidget $options_sf
-    set options [$options_sf getframe]
-    pack $options_sw -fill both -expand yes
-
-    # Scroll the options window with the mouse
-    bind_scroll $options_sf
-
-    pack $pw1 -side top -expand yes -fill both -anchor n
-
-	# finish up
-    set Gm::prgtext [G_msg "Done"]
-
-    set Gm::status [G_msg "Welcome to GRASS GIS"]
-    $gm_mainframe showstatusbar status
-
-    pack $gm_mainframe -fill both -expand yes
-
 	Gm::startmon
 
 	bind .mainframe <Destroy> {
@@ -387,59 +364,8 @@
 }
 
 ###############################################################################
-
-#open dialog box
-proc Gm::OpenFileBox { } {
-    variable mainwindow
-    global filename
-    global mon
-
-# thanks for brace tip to suchenwi from #tcl at freenode
-    set types [list \
-	    [list [G_msg "Map Resource File"] [list ".dm" ".dmrc" ".grc"]] \
-	    [list [G_msg "All Files"] "*"] \
-    ]
-
-	set filename_new [tk_getOpenFile -parent $mainwindow -filetypes $types \
-		-title [G_msg "Open File"] ]
-	if { $filename_new == "" } { return}
-	set filename($mon) $filename_new
-	GmTree::load $filename($mon)
-
-};
-
-###############################################################################
-
-#save dialog box
-proc Gm::SaveFileBox { } {
-    variable mainwindow
-    global filename
-    global mon
-
-    catch {
-        if {[ regexp -- {^Untitled_} $filename($mon) r]} {
-            set filename($mon) ""
-        }
-    }
-
-    if { $filename($mon) != "" } {
-    	GmTree::save $filename($mon)
-    } else {
-        set types [list \
-            [list [G_msg "Map Resource File"] {.grc}] \
-            [list [G_msg "DM Resource File"] [list {.dm} {.dmrc}]] \
-            [list [G_msg "All Files"] "*"] \
-        ]
-        set filename($mon) [tk_getSaveFile -parent $mainwindow -filetypes $types \
-            -title [G_msg "Save File"] -defaultextension .grc]
-	    if { $filename($mon) == "" } { return}
-	    GmTree::save $filename($mon)
-    }
-};
-
-###############################################################################
 # sets default display font
-proc Gm:DefaultFont { source } {
+proc Gm::defaultfont { source } {
 	global env iconpath
 	variable dfont
 	variable selectedfont
@@ -502,7 +428,7 @@
     
 	set row [ frame .dispfont.buttons ]
 	Button $row.ok -text [G_msg "OK"] -width 8 -bd 1 \
-			-command "Gm::SetFont $source; destroy .dispfont"
+			-command "Gm::setfont $source; destroy .dispfont"
     pack $row.ok -side left -fill x -expand 0
     button $row.cancel -text [G_msg "Cancel"] -width 8 -bd 1 \
     	-command "destroy .dispfont"
@@ -516,7 +442,7 @@
 };
 
 
-proc Gm::SetFont { source } {
+proc Gm::setfont { source } {
 	global env
 	variable dfont
 	variable selectedfont
@@ -529,7 +455,7 @@
 		set env(GRASS_ENCODING) $encoding
 	}
 
-    set dfont $selectedfont
+	set dfont $selectedfont
     
 	if { $source == "menu" && $dfont != "" } {
 		set env(GRASS_FONT) $dfont
@@ -540,24 +466,6 @@
 
 ###############################################################################
 
-proc Gm::errmsg { error args } {
-    # send error report and optional message (args) to tk_messageBox
-    
-    set message ""
-    
-    if { $args != ""} { 
-        set message [join $args]
-        append message ": " 
-     }
-
-    tk_messageBox -type ok -icon error -title [G_msg "Error"] \
-        -message "$message[G_msg $error]"
-    uplevel 1 return
-     
-};
-
-###############################################################################
-
 proc Gm::cleanup { } {
 	global mon
 	global tmpdir

Added: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmlib.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmlib.tcl	                        (rev 0)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmlib.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -0,0 +1,137 @@
+##########################################################################
+#
+# gmlib.tcl
+#
+# Procedures library for GIS Manager: GUI for GRASS 6
+# Author: Michael Barton (Arizona State University)
+# with contributions by Glynn Clements, Markus Neteler, Lorenzo Moretti,
+# Florian Goessmann, and others
+#
+# January 2008
+#
+# COPYRIGHT:	(C) 1999 - 2008 by the GRASS Development Team
+#
+#		This program is free software under the GNU General Public
+#		License (>=v2). Read the file COPYING that comes with GRASS
+#		for details.
+#
+##########################################################################
+
+
+namespace eval GmLib {
+	global array filename # mon
+
+}
+
+
+###############################################################################
+#read_moncap
+
+proc GmLib::color { color } {
+
+    regexp -- {#(..)(..)(..)} $color x r g b
+
+    set r [expr 0x$r ]
+    set g [expr 0x$g ]
+    set b [expr 0x$b ]
+
+    return "$r:$g:$b"
+}
+
+
+###############################################################################
+# Deprecated
+# Use guarantee_xmon and any run command instead.
+
+proc GmLib::xmon { type cmd } {
+	guarantee_xmon
+
+	if { $type == "term" } {
+		term_panel $cmd
+	} else {
+		run_panel $cmd
+	}
+
+	return
+}
+
+###############################################################################
+# Determine if an element already exists
+
+proc GmLib::element_exists {elem name} {
+	global devnull
+	set exists 1
+	
+	set failure [catch {exec g.findfile element=$elem file=$name >& $devnull}]
+
+	return [expr {! $failure}]
+}
+
+###############################################################################
+
+#open dialog box
+proc GmLib::OpenFileBox { } {
+	global filename
+	global mon
+
+	# thanks for brace tip to suchenwi from #tcl at freenode
+	set types [list \
+		[list [G_msg "Map Resource File"] [list ".dm" ".dmrc" ".grc"]] \
+		[list [G_msg "All Files"] "*"] \
+	]
+
+	set filename_new [tk_getOpenFile -parent $Gm::mainwindow -filetypes $types \
+		-title [G_msg "Open File"] ]
+	if { $filename_new == "" } { return}
+	set filename($mon) $filename_new
+	GmTree::load $filename($mon)
+
+};
+
+###############################################################################
+
+#save dialog box
+proc GmLib::SaveFileBox { } {
+	global filename
+	global mon
+    
+	catch {
+		if {[ regexp -- {^Untitled_} $filename($mon) r]} {
+		    set filename($mon) ""
+		}
+	}
+    
+	if { $filename($mon) != "" } {
+	    GmTree::save $filename($mon)
+	} else {
+		set types [list \
+		    [list [G_msg "Map Resource File"] {.grc}] \
+		    [list [G_msg "DM Resource File"] [list {.dm} {.dmrc}]] \
+		    [list [G_msg "All Files"] "*"] \
+		]
+		set filename($mon) [tk_getSaveFile -parent $Gm::mainwindow -filetypes $types \
+		    -title [G_msg "Save File"] -defaultextension .grc]
+		    if { $filename($mon) == "" } { return}
+		    GmTree::save $filename($mon)
+	}
+};
+
+###############################################################################
+
+proc GmLib::errmsg { error args } {
+	# send error report and optional message (args) to tk_messageBox
+	
+	set message ""
+	
+	if { $args != ""} { 
+	    set message [join $args]
+	    append message ": " 
+	 }
+    
+	tk_messageBox -type ok -icon error -title [G_msg "Error"] \
+	    -message "$message[G_msg $error]"
+	uplevel 1 return
+     
+};
+
+


Property changes on: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmlib.tcl
___________________________________________________________________
Name: svn:executable
   + *

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmmenu.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmmenu.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmmenu.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -70,7 +70,7 @@
                 }
             }
             if {[catch {close $menudef} error]} {
-                Gm::errmsg $error ["Error reading xtnmenu.dat file"]
+                GmLib::errmsg $error ["Error reading xtnmenu.dat file"]
             }
         }
         set XtnsMenu "True"
@@ -84,9 +84,9 @@
 set descmenu [subst  {
  {[G_msg "&File"]} all file $tmenu {
 	{cascad {[G_msg "Workspace"]} {} "" $tmenu {			
-		{command {[G_msg "Open..."]} {} "Open gis.m workspace file" {} -accelerator $keyctrl-O -command { Gm::OpenFileBox }}
-		{command {[G_msg "Save"]} {} "Save gis.m workspace file" {} -accelerator $keyctrl-S -command { Gm::SaveFileBox }}
-		{command {[G_msg "Save as..."]} {} "Save gis.m workspace file as new name" {} -command { set filename($mon) "" ; Gm::SaveFileBox }}
+		{command {[G_msg "Open..."]} {} "Open gis.m workspace file" {} -accelerator $keyctrl-O -command { GmLib::OpenFileBox }}
+		{command {[G_msg "Save"]} {} "Save gis.m workspace file" {} -accelerator $keyctrl-S -command { GmLib::SaveFileBox }}
+		{command {[G_msg "Save as..."]} {} "Save gis.m workspace file as new name" {} -command { set filename($mon) "" ; GmLib::SaveFileBox }}
 		{command {[G_msg "Close"]} {} "Close gis.m workspace" {} -accelerator $keyctrl-W -command { GmTree::FileClose {}}}
 	}}
 	{separator}
@@ -204,7 +204,7 @@
 		{command {[G_msg "Change region settings"]} {} "g.region: " {} -command {execute g.region }}
 	}}
 	{cascad {[G_msg "GRASS working environment"]} {} "" $tmenu {			
-		{command {[G_msg "Mapset access"]} {} "g.mapsets.tcl: Access other mapsets in current location" {} -command {spawn $env(GISBASE)/etc/g.mapsets.tcl}}
+		{command {[G_msg "Mapset access"]} {} "g.mapsets.tcl: Access other mapsets in current location" {} -command {exec $env(GRASS_WISH) $env(GISBASE)/etc/g.mapsets.tcl --tcltk &}}
 		{command {[G_msg "Change working environment"]} {} "g.mapset: Change current working session to new mapset, location, or GISDBASE" {} -command {execute g.mapset }}
 		{command {[G_msg "User access"]} {} "g.access: Modify access by other users to current mapset" {} -command {execute g.access }}
 		{command {[G_msg "Show settings"]} {} "g.gisenv: Show current GRASS environment settings" {} -command {run_panel g.gisenv }}
@@ -217,7 +217,7 @@
 		{separator}
 		{command {[G_msg "Convert coordinates"]} {} "m.proj: Convert coordinates from one projection to another" {} -command {execute m.proj }}
 	}}
-	{command {[G_msg "Display font"]} {} "Set default display font" {} -command {Gm:DefaultFont "menu" }}
+	{command {[G_msg "Display font"]} {} "Set default display font" {} -command {Gm::defaultfont "menu" }}
  } 
  {[G_msg "&Raster"]} all options $tmenu {
 	{cascad {[G_msg "Develop map"]} {} "" $tmenu {			

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmtool2.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmtool2.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmtool2.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -84,13 +84,13 @@
         -helptext [G_msg "Create new workspace file (erase current workspace settings first)"]
 
     $bbox3 add -image [image create photo -file "$iconpath/file-open.gif"] \
-    	-command "Gm::OpenFileBox"\
+    	-command "GmLib::OpenFileBox"\
         -highlightthickness 0 -takefocus 0 -relief link -borderwidth 1 \
         -highlightbackground $bgcolor -activebackground $bgcolor \
         -helptext [G_msg "Open existing workspace file"]
 
     $bbox3 add -image [image create photo -file "$iconpath/file-save.gif"]  \
-    	-command "Gm::SaveFileBox"\
+    	-command "GmLib::SaveFileBox"\
         -highlightthickness 0 -takefocus 0 -relief link -borderwidth 1  \
         -highlightbackground $bgcolor -activebackground $bgcolor \
         -helptext [G_msg "Save workspace file"]

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmtree.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmtree.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gmtree.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -480,7 +480,7 @@
     global mon
 
     if { [array size GmTree::tree] < 1 } {
-    	Gm::errmsg $error [G_msg "No layer selected"]
+    	GmLib::errmsg $error [G_msg "No layer selected"]
     }
 
     set sel [ lindex [$tree($mon)  selection get] 0 ]
@@ -628,7 +628,7 @@
     global new_root_node mon
 
     if { [array size GmTree::tree] < 1 } {
-    	Gm::errmsg $error [G_msg "No layer selected"]
+    	GmLib::errmsg $error [G_msg "No layer selected"]
     }
 
     if { [catch {match string {} $new_root_node}] } {
@@ -722,13 +722,13 @@
     set fpath $spth
     
     if {[catch {set rcfile [open $fpath w]} error]} {
-        Gm::errmsg $error [G_msg [format "Could not open file for writing.\n%s" $fpath]]
+        GmLib::errmsg $error [G_msg [format "Could not open file for writing.\n%s" $fpath]]
         return
     }
     GmGroup::save $tree($mon) 0 "root"
 
 	if {[catch {close $rcfile} error]} {
-        Gm::errmsg $error
+        GmLib::errmsg $error
 	}
 
 }
@@ -974,7 +974,7 @@
 			}
 			default {
 				if {[catch {GmTree::node_type $current_node} error]} {
-					Gm::errmsg $error [G_msg [format "Could not open %s - bad file format" $fpath]]
+					GmLib::errmsg $error [G_msg [format "Could not open %s - bad file format" $fpath]]
 					break
 				} else {
 					set type [GmTree::node_type $current_node]
@@ -1043,7 +1043,7 @@
 		set Gm::prgindic $prg
 	} 
 	if {[catch {close $rcfile} error]} {
-	    Gm::errmsg $error
+	    GmLib::errmsg $error
 	}
 
     set Gm::prgindic $max_prgindic

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gridline.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gridline.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/gridline.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -96,7 +96,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"
@@ -120,7 +120,7 @@
 	if {$GmGridline::opt($id,1,font) != "" } {
 		set Gm::dfont $GmGridline::opt($id,1,font)
 	}
-	Gm:DefaultFont dgrid
+	Gm::defaultfont dgrid
 	tkwait variable Gm::dfont
 	set GmGridline::opt($id,1,font) $Gm::dfont
 	set Gm::dfont ""
@@ -299,9 +299,9 @@
     if { ! ( $opt($id,1,_check) ) } { return } 
     
     # set hex colors to rgb         
-    set gridcolor [Gm::color $opt($id,1,gridcolor)]
-    set gridborder [Gm::color $opt($id,1,gridborder)]
-    set txtcolor [Gm::color $opt($id,1,textcolor)]
+    set gridcolor [GmLib::color $opt($id,1,gridcolor)]
+    set gridborder [GmLib::color $opt($id,1,gridborder)]
+    set txtcolor [GmLib::color $opt($id,1,textcolor)]
 
     
     # d.grid command
@@ -403,7 +403,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/group.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/group.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/group.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -68,10 +68,10 @@
 proc GmGroup::display { node mod } {
     variable opt
     variable tree
-	global mon
-	global drawprog
-	global commandlist
-	set commandlist {}
+    global mon
+    global drawprog
+    global commandlist
+    set commandlist {}
 
     set tree($mon) $GmTree::tree($mon)
 	set layers ""
@@ -81,12 +81,12 @@
         if { ! ( $opt($id,_check) ) } { return }
     }
 
-	#invert layer list to put first tree node as top map layer
-	foreach n [$tree($mon) nodes $node] {
-		set layers [linsert $layers 0 $n]
-	}
-	
-	# display each node/layer
+    #invert layer list to put first tree node as top map layer
+    foreach n [$tree($mon) nodes $node] {
+	    set layers [linsert $layers 0 $n]
+    }
+    
+    # display each node/layer
     foreach n $layers {
         GmTree::display_node $n $mod
         incr drawprog
@@ -97,35 +97,40 @@
 ###############################################################################
 
 # display background maps for digitizing in v.digit
-proc GmGroup::vdigit_display { node digitnode } {
+proc GmGroup::vdigit_display { vectmap } {
     variable opt
     variable tree
     variable bg_command 
-	global mon
-	global drawprog
-	global commandlist
-	
-	set bg_command ""
-	
-	# display selected layers to create a display command list if needed
-	if {[llength $commandlist] == 0} {
-		MapCanvas::request_redraw $mon 1
-		vwait commandlist
-	}
+    global mon
+    global drawprog
+    global commandlist
 
-	# if the layer being digitized is the only one displayed, then don't
-	# make it a background layer too. This avoids a black background.
-	if {[llength $commandlist] == 1} {return $bg_command}
+    set bg_command ""
+    
+    # display selected layers to create a display command list if needed
+    if {[llength $commandlist] == 0} {
+            MapCanvas::request_redraw $mon 1
+            vwait commandlist
+    }
+    
+    # if the layer being digitized is the only one displayed, then don't
+    # make it a background layer too. This avoids a black background.
+    set mapname [lindex [split [lindex [split [lindex $commandlist 0] ] 1] =] 1]
+    
+    if {[llength $commandlist] == 1 && $mapname == $vectmap} {
+        return $bg_command
+    }
 
-	# add each command in display command list to background commands
-	foreach cmd $commandlist {
-		append bg_command "$cmd;"
-	}
-		
-	# get rid of the ; at the end of the background command list
-	set bg_command [string trimright $bg_command ";"]
-	
-	return $bg_command
+    # add each command in display command list to background commands
+    foreach cmd $commandlist {
+            append bg_command "$cmd;"
+    }
+    
+            
+    # get rid of the ; at the end of the background command list
+    set bg_command [string trimright $bg_command ";"]
+    
+    return $bg_command
 				
 }
 
@@ -164,7 +169,7 @@
 		}
 		
 		if {[catch {eval exec "$cmd 2> $devnull &"} error]} {
-		    Gm::errmsg $error
+		    GmLib::errmsg $error
 		}
 	}
 
@@ -204,13 +209,13 @@
 			if {![catch {set rinfo [eval exec "r.info map=$surf 2> $devnull"]} error]} {
 				if { $rinfo == "" } {set surf ""}
 			} else {
-				Gm::errmsg $error
+				GmLib::errmsg $error
 			}
 
 			if {![catch {set rinfo [eval exec "r.info map=$clr 2> $devnull"]} error]} {
 				if { $rinfo == "" } {set surf ""}
 			} else {
-				Gm::errmsg $error
+				GmLib::errmsg $error
 			}
 
 			if { $surf == "" || $clr == "" } { return }
@@ -235,7 +240,7 @@
 			if {![catch {set vinfo [eval exec "v.info map=$vect 2> $devnull"]} error]} {
 				if { $vinfo == "" } {set vect ""}
 			} else {
-				Gm::errmsg $error
+				GmLib::errmsg $error
 			}
 			
 			if {$vect == ""} {return}

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/histogram.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/histogram.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/histogram.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -81,7 +81,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"
@@ -118,7 +118,7 @@
 	if {$GmHist::opt($id,1,font) != "" } {
 		set Gm::dfont $GmHist::opt($id,1,font)
 	}
-	Gm:DefaultFont dhist
+	Gm::defaultfont dhist
 	tkwait variable Gm::dfont
 	set GmHist::opt($id,1,font) $Gm::dfont
 	set Gm::dfont ""
@@ -239,8 +239,8 @@
 
     if { $opt($id,1,map) == "" } { return } 
     
-	set color [Gm::color $opt($id,1,color)]
-    set bgcolor [Gm::color $opt($id,1,bgcolor)]
+	set color [GmLib::color $opt($id,1,color)]
+    set bgcolor [GmLib::color $opt($id,1,bgcolor)]
 
     # transparent background color
     if { $opt($id,1,bgcolor_none) == 1 } { 
@@ -260,7 +260,7 @@
 		catch {set rt [open "|r.info map=$opt($id,1,map) -t" r]}
 		set rasttype [read $rt]
 		if {[catch {close $rt} error]} {
-			Gm::errmsg $error [G_msg "r.info error"]
+			GmLib::errmsg $error [G_msg "r.info error"]
 		}
 		if {[regexp -nocase ".=FCELL" $rasttype] || [regexp -nocase ".=DCELL" $rasttype]} {
             append cmd " nsteps=$opt($id,1,nsteps)"
@@ -365,7 +365,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/labels.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/labels.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/labels.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -75,7 +75,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"
@@ -276,7 +276,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/legend.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/legend.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/legend.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -92,7 +92,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"
@@ -473,7 +473,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/mapcanvas.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/mapcanvas.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/mapcanvas.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -209,7 +209,7 @@
 	# set tempfile for ppm output
 	set mappid [pid]
 	if {[catch {set mapfile($mon) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set maskfile($mon) $mapfile($mon)
 	append mapfile($mon) ".ppm"
@@ -218,7 +218,7 @@
 	# set tempfile and tmp directory path for composite output
 	set mappid [pid]
 	if {[catch {set outfile($mon) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	
 	set tmpdir [file dirname $outfile($mon)]
@@ -430,7 +430,7 @@
 	    	set prj($key) $value	
 	    }
 	    if {[catch {close $input} error]} {
-			Gm::errmsg $error [G_msg "g.proj or projection error"]
+			GmLib::errmsg $error [G_msg "g.proj or projection error"]
 	    } 
 	}
 	# Length is calculated from the map canvas arrows
@@ -590,7 +590,7 @@
 			}
 		}
 		if {[catch {close $input} error]} {
-			Gm::errmsg $error [G_msg "Error setting region"]
+			GmLib::errmsg $error [G_msg "Error setting region"]
 		}
 		# Finally put this into wind file format to use with GRASS_REGION
 		regexp -nocase {^([0-9]+)} $parts(projection) trash parts(projection)
@@ -1133,7 +1133,7 @@
 		}
 		
 		if {[catch {close $input} error]} {
-			Gm::errmsg $error [G_msg "Error setting region"]
+			GmLib::errmsg $error [G_msg "Error setting region"]
 		}
 		
 		#set start point (sw corner)
@@ -1170,23 +1170,51 @@
 	variable zoom_attrs
 	global devnull
 
+	#get current region settings for resolution
+	if {![catch {open [concat "|g.region" "-ugp" $args "2> $devnull"] r} input]} {
+		while {[gets $input line] >= 0} {
+			if { [regexp -nocase {^([a-z]+)=(.*)$} $line trash key value] } {
+				set parts($key) $value
+			}
+		}
+		
+		if {[catch {close $input} error]} {
+			GmLib::errmsg $error [G_msg "Error reading current resolution with g.region"]
+		}
+		
+	} else {
+		puts $input
+	}
+
+	#set computational region extents while maintaining current resolution
 	set values [MapCanvas::currentzoom $mon]
 	
 	set cmd "g.region"
 
 	set options {}
+	
+	lappend options "-a"
+	
 	foreach attr $zoom_attrs value $values {
-		if {$attr != "rows" && $attr != "cols"} {
+		if {$attr != "rows" && $attr != "cols" && $attr != "ewres" && $attr!= "nsres"} {
 			lappend options "$attr=$value"
 		}		
 	}
+	
+	if {$parts(nsres) != ""} {
+		lappend options "nsres=$parts(nsres)"		
+	}
 
+	if {$parts(ewres) != ""} {
+		lappend options "ewres=$parts(ewres)"		
+	}
+
 	if {$overwrite == 1} {
 		lappend options "--overwrite" 
 	}
 	
 	if {[catch {eval [list exec -- $cmd] $args $options >& $devnull} error]} {
-		Gm::errmsg $error [G_msg "Error setting region"]
+		GmLib::errmsg $error [G_msg "Error setting region"]
 	}
 	
 }

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/maplabels.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/maplabels.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/maplabels.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -542,7 +542,7 @@
 	}
 	# close labels file
 	if {[catch {close $labelfile} error]} {
-		Gm::errmsg $error
+		GmLib::errmsg $error
 	}
 }
 

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/mapprint.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/mapprint.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/mapprint.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -191,14 +191,14 @@
 	# get temporary file for postscript printing
 	set pid [ pid ]
 	if {[catch {set tmppsfile [ exec g.tempfile pid=$pid ]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 
 	append tmppsfile ".ps"
 	set pid [ pid ]
     
 	if {[catch {set tmppngfile [ exec g.tempfile pid=$pid ]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	    append tmppngfile ".png"
 }
@@ -431,14 +431,14 @@
 	# lpr printing		
  	if { $printmode == "lpr" } {
  		if {[catch {exec lpr -o position=center $tmppsfile } error]} {
-			Gm::errmsg $error
+			GmLib::errmsg $error
 		}
 	}
 
 	# postsript printing via ghostsript
 	if { $printmode == "psprint" && $printer != "" } {
 		if {[catch {exec $cmd  $format -sDEVICE#$printer -r$res -sNOPAUSE -dBATCH -- $tmppsfile} error]} {
-			Gm::errmsg $error
+			GmLib::errmsg $error
 		}
 		 
 	}
@@ -446,7 +446,7 @@
 	# output to pdf file via ghostscript	
 	if { $printmode == "pdf" && $pdffile != "" } {
 		if {[catch {exec $cmd  $format -sDEVICE#pdfwrite -r$res -sNOPAUSE -sOutputFile#$pdffile -dBATCH -- $tmppsfile} error]} {
-			Gm::errmsg $error
+			GmLib::errmsg $error
 		}
 		 
 	}

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/maptool.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/maptool.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/maptool.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -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
@@ -391,19 +391,19 @@
 		switch $type {
 			"bmp" {
 				if { [catch {exec gdal_translate $path.ppm $path.bmp -of BMP} error ]} {
-					Gm::errmsg $error [G_msg "Could not create BMP"]
+					GmLib::errmsg $error [G_msg "Could not create BMP"]
 				}
 				catch {file delete $path.ppm}
 			}
 			"jpg" {
 			    if { $quality == 300 } {
 					if { [catch {exec gdal_translate $path.ppm $path.jpg -of JPEG -co QUALITY=95 -outsize 300% 300% } error ]} {
-						Gm::errmsg $error [G_msg "Could not create JPG"]
+						GmLib::errmsg $error [G_msg "Could not create JPG"]
 					}					
 					catch {file delete $path.ppm}
 				} else {
 					if { [catch {exec gdal_translate $path.ppm $path.jpg -of JPEG -co QUALITY=$quality  } error ]} {
-						Gm::errmsg $error [G_msg "Could not create JPG"]
+						GmLib::errmsg $error [G_msg "Could not create JPG"]
 					}					
 
 					catch {file delete $path.ppm}
@@ -411,7 +411,7 @@
 			}
 			"png" {
 				if { [catch {exec gdal_translate $path.ppm $path.png -of PNG} error ]} {
-					Gm::errmsg $error [G_msg "Could not create PNG"]
+					GmLib::errmsg $error [G_msg "Could not create PNG"]
 				}
 				
 				catch {file delete $path.ppm}
@@ -421,7 +421,7 @@
 			}
 			"tif" {
 				if { [catch {exec gdal_translate $path.ppm $path.tif -of GTIFF} error ]} {
-					Gm::errmsg $error [G_msg "Could not create TIF"]
+					GmLib::errmsg $error [G_msg "Could not create TIF"]
 				}
 				
 				catch {file delete $path.ppm}

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/profile.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/profile.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/profile.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -174,7 +174,7 @@
 			set elev($key) $value	
 		}
 		if {[catch {close $input} error]} {
-			Gm::errmsg $error [G_msg "r.univar error"]
+			GmLib::errmsg $error [G_msg "r.univar error"]
 		}
 	
 		set elevmax $elev(max)
@@ -412,7 +412,7 @@
 	    set prj($key) $value    
 	}
 	if {[catch {close $input} error]} {
-	    Gm::errmsg $error [G_msg "g.proj or projection error"]
+	    GmLib::errmsg $error [G_msg "g.proj or projection error"]
 	} 
     }
 
@@ -531,7 +531,7 @@
 			}
 		}
 		if {[catch {close $input} error]} {
-			Gm::errmsg $error [G_msg "r.profile error"]
+			GmLib::errmsg $error [G_msg "r.profile error"]
 		}
 	}
 
@@ -616,7 +616,7 @@
 			}
 		}
 		if {[catch {close $input} error]} {
-			Gm::errmsg $error [G_msg "r.profile error"]
+			GmLib::errmsg $error [G_msg "r.profile error"]
 		}
 	}
 

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rastarrows.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rastarrows.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rastarrows.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -80,7 +80,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"
@@ -354,7 +354,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/raster.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/raster.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/raster.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -83,7 +83,7 @@
     # create files in tmp diretory for layer output
     set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
     set lfilemask($count) $lfile($count)
     append lfile($count) ".ppm"
@@ -348,7 +348,7 @@
     if {![catch {open "|r.info map=$opt($id,1,map) -t" r} rt]} {
         set rasttype [read $rt]
 		if {[catch {close $rt} error]} {
-			Gm::errmsg $error
+			GmLib::errmsg $error
 		}
     }
 
@@ -460,7 +460,7 @@
     # create files in tmp directory for layer output
     set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
     set lfilemask($count) $lfile($count)
     append lfile($count) ".ppm"

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rastnums.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rastnums.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rastnums.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -76,7 +76,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 		return
 	}
 	set lfilemask($count) $lfile($count)
@@ -246,7 +246,7 @@
 	catch {set rc [open "|g.region -ugp" r]}
 	set rowscolumns [read $rc]
 	if {[catch {close $rc} error]} {
-		Gm::errmsg $error "Region settings error"
+		GmLib::errmsg $error "Region settings error"
 	}
 	regexp {rows=(\d*)} $rowscolumns string rows
 	regexp {cols=(\d*)} $rowscolumns string cols
@@ -357,7 +357,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rgbhis.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rgbhis.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rgbhis.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -80,7 +80,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"
@@ -359,7 +359,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rules.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rules.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/rules.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -204,7 +204,7 @@
     set rulespid [pid]
 	
 	if {[catch {set rulesfile [exec g.tempfile pid=$rulespid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 
     # get rules from text widget
@@ -218,7 +218,7 @@
     catch {set output [open $rulesfile w ]}
         puts $output $rules
 	if {[catch {close $output} error]} {
-		Gm::errmsg $error [G_msg "Error creating rules file"]
+		GmLib::errmsg $error [G_msg "Error creating rules file"]
 		return
 	}
 	

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/runandoutput.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/runandoutput.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/runandoutput.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -73,7 +73,7 @@
     set code ""
 
 	if {[catch {set code [exec -- $program --tcltk 2> $devnull]} error]} {
-		Gm::errmsg $error
+		GmLib::errmsg $error
 	}
 
     set path .dialog$dlg
@@ -94,7 +94,7 @@
 
 proc run_disabled {gronsole button cmd} {
 	if {[catch {$button configure -state disabled} error]} {
-		Gm::errmsg $error
+		GmLib::errmsg $error
 	}
 
 	$gronsole run $cmd {running} "catch {$button configure -state active}"
@@ -166,7 +166,7 @@
 proc spawn {cmd args} {
 
 	if {[catch {eval [list exec -- $cmd] $args &} error]} {
-		Gm::errmsg $error
+		GmLib::errmsg $error
 	}
 
 }
@@ -196,7 +196,7 @@
 	# eval exec -- $cmd $args >@ stdout 2>@ stderr
 	
 	if {[catch {eval [list exec -- $cmd] $args >& $devnull} error]} {
-		Gm::errmsg $error
+		GmLib::errmsg $error
 	}
 
 	
@@ -228,12 +228,12 @@
 	
 	if { $mingw == "1" } {
 		if {[catch {eval [list exec -- cmd.exe /c start $env(GISBASE)/etc/grass-run.bat $cmd] $args &} error]} {
-			Gm::errmsg $error
+			GmLib::errmsg $error
 		}
 	   
 	} else {
 		if {[catch {eval [list exec -- $env(GISBASE)/etc/grass-xterm-wrapper -name xterm-grass -e $env(GISBASE)/etc/grass-run.sh $cmd] $args &} error]} {
-			Gm::errmsg $error
+			GmLib::errmsg $error
 		}
 	   
 	}

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/thematic.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/thematic.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/thematic.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -104,7 +104,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"
@@ -175,7 +175,7 @@
 	if {![catch {open "|v.db.connect map=$mapname layer=$layer -g" r} vdb]} {
 		set vectdb [read $vdb]
 		if {[catch {close $vdb} error]} {
-			Gm::errmsg $error
+			GmLib::errmsg $error
 		}
 		set vdblist [split $vectdb " "]
 		set tbl [lindex $vdblist 1]
@@ -484,10 +484,10 @@
     if { $opt($id,1,column) == "" } { return }
 
     # set hex colors to rgb         
-    set pointcolor [Gm::color $opt($id,1,pointcolor)]
-    set linecolor [Gm::color $opt($id,1,linecolor)]
-    set startcolor [Gm::color $opt($id,1,startcolor)]
-    set endcolor [Gm::color $opt($id,1,endcolor)]
+    set pointcolor [GmLib::color $opt($id,1,pointcolor)]
+    set linecolor [GmLib::color $opt($id,1,linecolor)]
+    set startcolor [GmLib::color $opt($id,1,startcolor)]
+    set endcolor [GmLib::color $opt($id,1,endcolor)]
     
     # turn off x11 display
     set monitor "none"
@@ -604,7 +604,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"
@@ -677,7 +677,7 @@
 	# get legend file created by d.vect.thematic in GRASS tmp diretory
 	set mappid [pid]
 	if {[catch {set tmpdir [file dirname [exec g.tempfile pid=$mappid]]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 
 	set legfile "$tmpdir/gismlegend.txt"
@@ -779,7 +779,7 @@
 		}
 	}
 	if {[catch {close $ltxt} error]} {
-		Gm::errmsg $error
+		GmLib::errmsg $error
 	}
 
 	return

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/tksys.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/tksys.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/tksys.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -13,6 +13,7 @@
 
 source $env(GISBASE)/etc/gtcltk/options.tcl
 source $env(GISBASE)/etc/gtcltk/gmsg.tcl
+source $env(GISBASE)/etc/gm/gmlib.tcl
 
 array set items { 
     platform   "Platform               "
@@ -77,7 +78,7 @@
     if { [string compare "$sys(user)" "unknown"] == 0 && \
 	 [string compare "$sys(platform)" "$tcl_platform_subst(unix)"] == 0 } {
 		if {[catch {set sys(user) [exec whoami]} error]} {
-			Gm::errmsg $error
+			GmLib::errmsg $error
 		}
     }
 
@@ -99,7 +100,7 @@
 
 	if { [string compare "$sys(platform)" "$tcl_platform_subst(unix)"] == 0 } { 
 		if {[catch {set tmp [exec uname -srm]} error]} {
-			Gm::errmsg $error
+			GmLib::errmsg $error
 		}
 		regsub -all { } $tmp {-} tmp 
 		set sys(uname) $tmp
@@ -211,11 +212,11 @@
 		return
     }
     if [catch {open $file w} error] {
-		Gm::errmsg $error 
+		GmLib::errmsg $error 
 	} else {
 		sys_putinfo $out
 		if {[catch {close $out} error]} {
-			Gm::errmsg $error
+			GmLib::errmsg $error
 		}
     }
 

Modified: grass/branches/releasebranch_6_3/gui/tcltk/gis.m/vector.tcl
===================================================================
--- grass/branches/releasebranch_6_3/gui/tcltk/gis.m/vector.tcl	2008-02-10 16:34:42 UTC (rev 30057)
+++ grass/branches/releasebranch_6_3/gui/tcltk/gis.m/vector.tcl	2008-02-10 16:42:53 UTC (rev 30058)
@@ -191,7 +191,7 @@
 	# create files in tmp diretory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"
@@ -252,7 +252,7 @@
 	if {![catch {open "|v.db.connect map=$mapname layer=$layernum -g" r} vdb]} {
 		set vectdb [read $vdb]
 		if {[catch {close $vdb} error]} {
-			Gm::errmsg $error
+			GmLib::errmsg $error
 		}
 
 		set vdblist [split $vectdb " "]
@@ -570,7 +570,7 @@
 	if {![catch {open "|v.info map=$vect 2> $devnull" r} rv]} {
 		set vinfo [read $rv]
 		if {[catch {close $rv} error]} {
-			Gm::errmsg $error
+			GmLib::errmsg $error
 		}
 
 		if { $vinfo == "" } {return}
@@ -627,9 +627,9 @@
     # color
     if { $opt($id,1,rdmcolor) } { append cmd " -c" }
     if { $opt($id,1,sqlcolor) } { append cmd " -a" }
-    set color [Gm::color $opt($id,1,color)]
-    set fcolor [Gm::color $opt($id,1,fcolor)]
-    set lcolor [Gm::color $opt($id,1,lcolor)]
+    set color [GmLib::color $opt($id,1,color)]
+    set fcolor [GmLib::color $opt($id,1,fcolor)]
+    set lcolor [GmLib::color $opt($id,1,lcolor)]
 
     if { $opt($id,1,_use_color) } { append cmd " color=$color" } { append cmd " color=none" }
     append cmd " lcolor=$lcolor" 
@@ -739,7 +739,7 @@
 
     if { $opt($id,1,vect) == "" } { return } 
     
-    if {[Gm::element_exists "vector" $opt($id,1,vect)]} {
+    if {[GmLib::element_exists "vector" $opt($id,1,vect)]} {
         set cmd [list v.digit "map=$opt($id,1,vect)"]
     } else { 
         set cmd [list v.digit -n "map=$opt($id,1,vect)"]
@@ -816,7 +816,7 @@
 	# create files in tmp directory for layer output
 	set mappid [pid]
 	if {[catch {set lfile($count) [exec g.tempfile pid=$mappid]} error]} {
-		Gm::errmsg $error [G_msg "Error creating tempfile"]
+		GmLib::errmsg $error [G_msg "Error creating tempfile"]
 	}
 	set lfilemask($count) $lfile($count)
 	append lfile($count) ".ppm"



More information about the grass-commit mailing list