[GRASS-SVN] r41476 - grass/branches/develbranch_6/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Mar 19 08:46:52 EDT 2010
Author: marisn
Date: 2010-03-19 08:46:52 -0400 (Fri, 19 Mar 2010)
New Revision: 41476
Modified:
grass/branches/develbranch_6/lib/init/gis_set.tcl
Log:
tcltk: Hide welcome image on small screens
Modified: grass/branches/develbranch_6/lib/init/gis_set.tcl
===================================================================
--- grass/branches/develbranch_6/lib/init/gis_set.tcl 2010-03-19 10:24:08 UTC (rev 41475)
+++ grass/branches/develbranch_6/lib/init/gis_set.tcl 2010-03-19 12:46:52 UTC (rev 41476)
@@ -34,6 +34,10 @@
set GRASSVERSION [read -nonewline $fp]
close $fp
+# If window height is smaller, then consider it a small window
+# 660px is approximate full welcome screen height
+set small_window 670
+
#############################################################################
proc searchGISRC { filename } {
@@ -168,6 +172,7 @@
global grassrc_list
global gisrc_name
global refresh
+ global small_window
set refresh 0
@@ -185,22 +190,42 @@
-relief {raised}]
set titlefrm [frame .frame0.intro -borderwidth 2 ]
- set introimg [label $titlefrm.img -image [image create photo -file \
- "$env(GISBASE)/etc/gui/images/gintro.gif"]]
- set introtitle [text $titlefrm.msg -height 5 \
- -relief flat -fg darkgreen \
- -bg #dddddd \
- -font introfont \
- -width 50 ]
-
pack $titlefrm -side top
+
+ # Don't show picture on small screens
+ if { [info exists env(GRASS_HEIGHT)] } {
+ set screen_height $env(GRASS_HEIGHT)
+ } else {
+ set screen_height [winfo screenheight .]
+ }
+
+ if { $screen_height > $small_window } {
+ set introimg [label $titlefrm.img -image [image create photo -file \
+ "$env(GISBASE)/etc/gui/images/gintro.gif"]]
pack $introimg -side top
+
+ set introtitle [text $titlefrm.msg -height 5 \
+ -relief flat -fg darkgreen \
+ -bg #dddddd \
+ -font introfont \
+ -width 50 ]
+ } else {
+ set introtitle [text $titlefrm.msg -height 2 \
+ -relief flat -fg darkgreen \
+ -bg #dddddd \
+ -font introfont \
+ -width 50 ]
+ }
+
pack $introtitle -side top
.frame0.intro.msg tag configure all -justify center
- .frame0.intro.msg insert end [G_msg "Welcome to GRASS GIS Version"]
- .frame0.intro.msg insert end [G_msg " $GRASSVERSION\n"]
- .frame0.intro.msg insert end [G_msg "The world's leading open source GIS\n\n"]
+ # Welcome text takes too much space on small screens
+ if { $screen_height > $small_window } {
+ .frame0.intro.msg insert end [G_msg "Welcome to GRASS GIS Version"]
+ .frame0.intro.msg insert end [G_msg " $GRASSVERSION\n"]
+ .frame0.intro.msg insert end [G_msg "The world's leading open source GIS\n\n"]
+ }
.frame0.intro.msg insert end [G_msg "Select an existing project location and mapset\n"]
.frame0.intro.msg insert end [G_msg "or define a new location\n"]
.frame0.intro.msg tag add all 1.0 end
More information about the grass-commit
mailing list