[GRASS-SVN] r35991 - grass/branches/develbranch_6/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Feb 20 14:34:03 EST 2009
Author: marisn
Date: 2009-02-20 14:34:03 -0500 (Fri, 20 Feb 2009)
New Revision: 35991
Modified:
grass/branches/develbranch_6/lib/init/gis_set.tcl
Log:
Provide user-friendly startup expierience
Modified: grass/branches/develbranch_6/lib/init/gis_set.tcl
===================================================================
--- grass/branches/develbranch_6/lib/init/gis_set.tcl 2009-02-20 19:17:37 UTC (rev 35990)
+++ grass/branches/develbranch_6/lib/init/gis_set.tcl 2009-02-20 19:34:03 UTC (rev 35991)
@@ -555,8 +555,16 @@
.frame0.frameDB.mid.entry xview moveto 1
- if { ! [file exists $database] } {
- DialogGen .wrnDlg [G_msg "WARNING: Invalid Database"] warning \
+ if { [string equal $location "<UNKNOWN>"] } {
+ DialogGen .wrnDlg "Starting GRASS for first time" warning \
+ "GRASS needs a direcotry where to store data. Create one in any file manager if You have not done it yet." 0 OK
+ set tmp [tk_chooseDirectory -initialdir $database \
+ -parent .frame0 -title [G_msg "Select GIS data directory"] -mustexist true]
+ if {$tmp != ""} { set database $tmp }
+ set location ""
+ .frame0.frameBUTTONS.ok configure -state disabled
+ } elseif { ! [file exists $database] } {
+ DialogGen .wrnDlg [G_msg "WARNING: Invalid Database"] warning \
[G_msg "WARNING: Invalid database. Finding first valid directory in parent tree"] \
0 OK
More information about the grass-commit
mailing list