[GRASS-dev] Re: [GRASS-CVS] michael: grass6/lib/init epsg_option.tcl.in, 1.6, 1.7 file_option.tcl, 1.3, 1.4 gis_set.tcl, 1.33, 1.34

Michael Barton michael.barton at asu.edu
Mon Sep 25 15:12:06 EDT 2006


No. This is a mistake due to working on different machines.

Please put it back and I'll try again.


Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton


> From: <grass4u at gmail.com>
> Reply-To: <grass-dev at grass.itc.it>
> Date: Mon, 25 Sep 2006 13:18:57 -0500
> To: Michael Barton <michael.barton at asu.edu>
> Subject: Re: [GRASS-CVS] michael: grass6/lib/init epsg_option.tcl.in, 1.6, 1.7
> file_option.tcl, 1.3, 1.4 gis_set.tcl, 1.33, 1.34
> 
> Hi,
> 
> You're reverting Windows patch.  Is there any reason for that?
> PROJSHARE for the browsedepsg variable shouldn't be replaced with any
> other values (e.g., Mac OS X default) since lib/init/Makefile and
> lib/init/projshare.sed will substitute the string with an appropriate
> value.
> 
> Thank you.
> Huidae
> 
> 
> ------------------------------------------------------------------------------
> --
> Author: michael
> 
> Update of /grassrepository/grass6/lib/init
> In directory doto:/tmp/cvs-serv3750
> 
> Modified Files:
> epsg_option.tcl.in file_option.tcl gis_set.tcl
> Log Message:
> change so that default widget format (including fonts) controled
> by option database (in options.tcl)
> 
> Index: epsg_option.tcl.in
> ===================================================================
> RCS file: /grassrepository/grass6/lib/init/epsg_option.tcl.in,v
> retrieving revision 1.6
> retrieving revision 1.7
> diff -u -d -r1.6 -r1.7
> --- epsg_option.tcl.in 15 Sep 2006 10:22:42 -0000 1.6
> +++ epsg_option.tcl.in 25 Sep 2006 17:55:12 -0000 1.7
> @@ -59,11 +59,10 @@
>          global thelocation
>          global browsedepsg
>          global locpath
> - global mingw
>          
> # NOTE: the epsg file is generated in GDAL for PROJ4
> # with gdal/pymod/epsg_tr.py
> - set browsedepsg "PROJSHARE/epsg"
> + set browsedepsg "/Library/Frameworks/PROJ.framework/Resources/proj/epsg"
>          set epsgLocation "newLocation"
>          set epsg_code ""
>          set locpath $database
> @@ -84,13 +83,13 @@
>          
>          #create the form and buttons
>          label .optPopup.input1_ppb -text [G_msg "Name of new location"]
> -justify right -height 2
> -        entry .optPopup.input1_ppbEntry -textvariable epsgLocation -width 35
> -bg white
> +        entry .optPopup.input1_ppbEntry -textvariable epsgLocation -width 35
>          label .optPopup.input2_ppb -text [G_msg "Path to new location"]
> -justify right -height 2
> -        entry .optPopup.input2_ppbEntry -textvariable locpath  -width 35 -bg
> white
> +        entry .optPopup.input2_ppbEntry -textvariable locpath  -width 35
>          label .optPopup.input3_ppb -text [G_msg "Path to the EPSG-codes
> file"] -justify right -height 2
> -        entry .optPopup.input3_ppbEntry -textvariable browsedepsg  -width 35
> -bg white
> +        entry .optPopup.input3_ppbEntry -textvariable browsedepsg  -width 35
>          label .optPopup.input4_ppb -text [G_msg "EPSG code number of
> projection"] -justify right -height 2
> -        entry .optPopup.input4_ppbEntry -textvariable epsg_code  -width 35
> -bg white
> +        entry .optPopup.input4_ppbEntry -textvariable epsg_code  -width 35
>          
> #browse for database path
>          button .optPopup.db -justify center -width 12 -text [G_msg
> "Browse..."] \
> @@ -108,7 +107,7 @@
>                  
>          bind .optPopup.input3_ppbEntry <Leave> {
>               if {$browsedepsg == ""} {
> -                set browsedepsg "PROJSHARE/epsg"
> +                set browsedepsg
> "/Library/Frameworks/PROJ.framework/Resources/proj/epsg"
>              }
>          }
>  
> @@ -148,13 +147,8 @@
> if {[file exists $browsedepsg]== 1} {
> if {[file exists $thelocation ]==0} {
> destroy .optPopup;
> -      if { $mingw == "1" } {
> -       exec -- $env(GISBASE)/etc/grass-xterm-wrapper -e
> $env(GISBASE)/etc/make_location_epsg.sh \
> -        $epsg_code $epsgLocation $locpath;
> -      } else {
> -       exec -- $env(GISBASE)/etc/grass-xterm-wrapper -e
> $env(GISBASE)/etc/make_location_epsg.sh \
> -        $epsg_code $epsgLocation $locpath >@stdout 2>@stderr;
> -      }
> +      exec -- $env(GISBASE)/etc/grass-xterm-wrapper -e
> $env(GISBASE)/etc/make_location_epsg.sh \
> +       $epsg_code $epsgLocation $locpath >@stdout 2>@stderr;
> DialogGen .wrnDlg [G_msg "WARNING: restart GRASS please"] warning \
> [G_msg "WARNING: Please restart GRASS in order find the created location in
> the list (closing it for you now)"] \
> 0 OK; 
> @@ -301,7 +295,7 @@
>          .infoPopup.text insert end [G_msg "\nThe folder (GRASS database) in
> which the location should be created\n\n"] info
>          .infoPopup.text insert end "\n"
>          .infoPopup.text insert end [G_msg "\n   EPSG code number of
> projection:\n\n"] subtitle
> -        .infoPopup.text insert end [G_msg "\nEPSG code number of projection
> (see PROJSHARE/epsg or push the 'EPSG-codes' button)\n\n"] info
> +        .infoPopup.text insert end [G_msg "\nEPSG code number of projection
> (see /Library/Frameworks/PROJ.framework/Resources/proj/epsg or push the
> 'EPSG-codes' button)\n\n"] info
>          
>          pack .infoPopup.text -side left -fill both
>          
> 
> Index: file_option.tcl
> ===================================================================
> RCS file: /grassrepository/grass6/lib/init/file_option.tcl,v
> retrieving revision 1.3
> retrieving revision 1.4
> diff -u -d -r1.3 -r1.4
> --- file_option.tcl 14 Jun 2006 16:50:24 -0000 1.3
> +++ file_option.tcl 25 Sep 2006 17:55:12 -0000 1.4
> @@ -74,11 +74,11 @@
> 
> #create the form and buttons
> set loclab [label .fileloc.lab1 -text [G_msg "Name of new location"] -justify
> right -height 2]
> - set locname [entry .fileloc.loc -textvariable fileLocation -width 35 -bg
> white]
> + set locname [entry .fileloc.loc -textvariable fileLocation -width 35]
> set dblab [label .fileloc.lab2 -text [G_msg "Path to new location"] -justify
> right -height 2]
> - set dbpath [entry .fileloc.locpath -textvariable locpath -width 35 -bg
> white]
> + set dbpath [entry .fileloc.locpath -textvariable locpath -width 35]
> set filelab [label .fileloc.lab3 -text [G_msg "Path to georeferenced file"]
> -justify right -height 2]
> - set fpath [entry .fileloc.filepath -textvariable filepath  -width 35 -bg
> white]
> + set fpath [entry .fileloc.filepath -textvariable filepath  -width 35]
> 
> #browse for database path
> set dbbrowse [button .fileloc.dbbrow -justify center -width 12 \
> 
> Index: gis_set.tcl
> ===================================================================
> RCS file: /grassrepository/grass6/lib/init/gis_set.tcl,v
> retrieving revision 1.33
> retrieving revision 1.34
> diff -u -d -r1.33 -r1.34
> --- gis_set.tcl 16 Sep 2006 01:56:24 -0000 1.33
> +++ gis_set.tcl 25 Sep 2006 17:55:12 -0000 1.34
> @@ -19,12 +19,6 @@
>  #
>  #############################################################################
>  
> -if {[info exists env(MSYSCON)]} {
> - set mingw "1"
> -} else {
> - set mingw "0"
> -}
> -
>  source $env(GISBASE)/etc/gtcltk/gmsg.tcl
>  #############################################################################
>  #
> @@ -32,6 +26,7 @@
>  #   the EPSG codes    (routines epsgLocCom and infoEpsg)
>  #
>  #############################################################################
> +source $env(GISBASE)/etc/gtcltk/options.tcl
>  source $env(GISBASE)/etc/epsg_option.tcl
>  source $env(GISBASE)/etc/file_option.tcl
>  
> @@ -284,22 +279,18 @@
>  
>  proc gisSetWindow {} {
>      global GRASSVERSION
> -
> -    # Window manager configurations
> -
> -    wm title . [format [G_msg "GRASS %s Startup"] $GRASSVERSION]
> -
>      global database
>      global location
>      global mymapset
>      global mapset
>      global oldDb oldLoc oldMap
>      global env
> -
>      global grassrc_list
>      global gisrc_name
>  
> -    global mingw
> +    # Window manager configurations
> +
> +    wm title . [format [G_msg "GRASS %s Startup"] $GRASSVERSION]
>  
>      # ---------------------------
>      # build .frame0
> @@ -313,8 +304,10 @@
> "$env(GISBASE)/etc/gintro.gif"]]
>      set introtitle [text $titlefrm.msg -height 5 \
> -relief flat -fg darkgreen \
> -     -font {Helvetica -14 bold} \
> +     -bg #dddddd \
> +     -font introfont \
> -width 50 ]
> +
>      pack $titlefrm -side top
> pack $introimg -side top
>      pack $introtitle -side top
> @@ -352,8 +345,7 @@
> -relief {sunken} \
> -textvariable database \
> -width 40 \
> -     -xscrollcommand { .frame0.frameDB.mid.hscrollbar set} \
> -     -bg white
> +     -xscrollcommand { .frame0.frameDB.mid.hscrollbar set}
>      
>      scrollbar .frame0.frameDB.mid.hscrollbar \
> -command { .frame0.frameDB.mid.entry xview} \
> @@ -361,31 +353,10 @@
> -width 12 \
> -orient {horizontal}
>   
> -    if { $mingw == "1" } {
> -       # We cannot use Double-Button-1 (change dir) and Button-1 (select dir)
> -       # events at the same time because of MS-Windows TclTk's event bug.
> -       button .frame0.frameDB.right.button \
> -        -text [G_msg "Browse..."] \
> -        -command {set database [tk_chooseDirectory -initialdir $database \
> -     -parent .frame0 -title "New GIS data directory" -mustexist true]
> -
> -  cd $database
> -  .frame0.frameLOC.listbox delete 0 end
> -  .frame0.frameMS.listbox delete 0 end
> -  foreach filename [lsort [glob -nocomplain *]] \
> -  {
> -   if {[file isdirectory $filename]} \
> -   {
> -    .frame0.frameLOC.listbox insert end $filename
> -   }
> -  }
> -  .frame0.frameBUTTONS.ok configure -state disabled}
> -    } else {
> -       button .frame0.frameDB.right.button \
> -        -text [G_msg "Browse..."] \
> -        -command {GetDir .frame0.frameDB.mid.entry .frame0.frameLOC.listbox \
> -            .frame0.frameMS.listbox}
> -    }
> +    button .frame0.frameDB.right.button \
> +     -text [G_msg "Browse..."] \
> +     -command {GetDir .frame0.frameDB.mid.entry .frame0.frameLOC.listbox \
> +         .frame0.frameMS.listbox}
>  
>  
>      pack .frame0.frameDB.left.label -side top
> @@ -410,8 +381,7 @@
> -relief {sunken} \
> -exportselection false \
> -yscrollcommand {.frame0.frameLOC.vscrollbar set} \
> -     -xscrollcommand {.frame0.frameLOC.hscrollbar set} \
> -     -bg white
> +     -xscrollcommand {.frame0.frameLOC.hscrollbar set}
>  
>      scrollbar .frame0.frameLOC.vscrollbar -width 12 \
> -command {.frame0.frameLOC.listbox yview} \
> @@ -442,8 +412,7 @@
>      listbox .frame0.frameMS.listbox \
> -relief {sunken} \
> -yscrollcommand {.frame0.frameMS.vscrollbar set} \
> -     -xscrollcommand {.frame0.frameMS.hscrollbar set} \
> -     -bg white
> +     -xscrollcommand {.frame0.frameMS.hscrollbar set}
>  
>      scrollbar .frame0.frameMS.vscrollbar -width 12 \
> -command {.frame0.frameMS.listbox yview} \
> @@ -494,8 +463,7 @@
>      entry .frame0.frameNMS.second.entry \
> -relief {sunken} \
> -textvariable mymapset \
> -     -width 22 \
> -     -bg white
> +     -width 22 
> 
>      button .frame0.frameNMS.third.button \
> -text [G_msg "Create new mapset"] \
> @@ -512,11 +480,11 @@
>                  puts $varfp "DB_DRIVER: dbf"
>                  puts $varfp "DB_DATABASE:
> \$GISDBASE/\$LOCATION_NAME/\$MAPSET/dbf/"
>                  close $varfp
> -                catch {file attributes $mymapset/VAR -permissions u+rw,go+r}
> +                file attributes $mymapset/VAR -permissions u+rw,go+r
>                  file mkdir $mymapset/dbf
>                  #copy over the WIND definition:
> -  catch {file copy $mymapset/../PERMANENT/WIND $mymapset}
> -                catch {file attributes $mymapset/WIND -permissions u+rw,go+r}
> +                file copy $mymapset/../PERMANENT/WIND $mymapset
> +                file attributes $mymapset/WIND -permissions u+rw,go+r
>                  .frame0.frameMS.listbox insert end $mymapset
>                  #TODO: select new MAPSET
>              }
> @@ -668,7 +636,7 @@
>      }
>      
>      cd $database
> -    foreach i [exec ls -a [pwd]] {
> +    foreach i [exec ls -a [exec pwd]] {
> if { [string compare $i "."] != 0 && \
>              [string compare $i ".."] != 0 && \
>              [file isdirectory $i] } {
> @@ -694,7 +662,7 @@
>      if { [file exists $location] } \
>      {
> cd $location
> - foreach i [exec ls -a [pwd]] {
> + foreach i [exec ls -a [exec pwd]] {
>    if { [string compare $i "."] != 0 && \
> [string compare $i ".."] != 0 && \
> [file isdirectory $i] && [file owned $i] } {
> @@ -726,7 +694,7 @@
>             %W insert 0 $new_path
>             cd $new_path
>             .frame0.frameLOC.listbox delete 0 end
> -           foreach i [exec ls -a [pwd]] {
> +           foreach i [exec ls -a [exec pwd]] {
>                 if { [string compare $i "."] != 0 && \
>                      [string compare $i ".."] != 0 && \
>                      [file isdirectory $i] } {
> @@ -734,7 +702,7 @@
>                 }
>             }
>             .frame0.frameMS.listbox delete 0 end
> -           set database [pwd]
> +           set database [exec pwd]
>          }
> .frame0.frameBUTTONS.ok configure -state disabled
>    }
> @@ -745,7 +713,7 @@
>          set location [%W get [%W nearest %y]]
>          cd $location
>          .frame0.frameMS.listbox delete 0 end
> -        foreach i [exec ls -a [pwd]] {
> +        foreach i [exec ls -a [exec pwd]] {
>             if { [string compare $i "."] != 0 && \
>                  [string compare $i ".."] != 0 && \
>                  [file isdirectory $i] && [file owned $i] } {
> @@ -762,7 +730,7 @@
>          set location [%W get [%W nearest %y]]
>          cd $location
>          .frame0.frameMS.listbox delete 0 end
> -        foreach i [exec ls -a [pwd]] {
> +        foreach i [exec ls -a [exec pwd]] {
>             if { [string compare $i "."] != 0 && \
>                  [string compare $i ".."] != 0 && \
>                  [file isdirectory $i] && [file owned $i] } {
> 
> 
> _______________________________________________
> grass-commit mailing list
> grass-commit at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-commit




More information about the grass-dev mailing list