[GRASS-SVN] r45588 - in grass/branches/develbranch_6: gui/images gui/wxpython gui/wxpython/gui_modules lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 6 13:37:10 EST 2011


Author: martinl
Date: 2011-03-06 10:37:09 -0800 (Sun, 06 Mar 2011)
New Revision: 45588

Added:
   grass/branches/develbranch_6/gui/images/__init__.py
   grass/branches/develbranch_6/gui/images/grass_form.png
   grass/branches/develbranch_6/gui/images/grass_splash.png
   grass/branches/develbranch_6/gui/images/grass_splash.xcf
   grass/branches/develbranch_6/gui/images/loc_wizard.png
   grass/branches/develbranch_6/gui/images/loc_wizard_qgis.png
   grass/branches/develbranch_6/gui/images/qgis_world.png
   grass/branches/develbranch_6/gui/images/small_down_arrow.png
   grass/branches/develbranch_6/gui/images/small_up_arrow.png
   grass/branches/develbranch_6/gui/images/startup_banner.gif
Removed:
   grass/branches/develbranch_6/gui/images/gintro.gif
   grass/branches/develbranch_6/gui/wxpython/images/
Modified:
   grass/branches/develbranch_6/gui/images/Makefile
   grass/branches/develbranch_6/gui/wxpython/Makefile
   grass/branches/develbranch_6/gui/wxpython/gis_set.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmanager.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmapdisp.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/location_wizard.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
   grass/branches/develbranch_6/gui/wxpython/wxgui.py
   grass/branches/develbranch_6/lib/init/gis_set.tcl
Log:
wxGUI: improve splash screen
      clean up images


Modified: grass/branches/develbranch_6/gui/images/Makefile
===================================================================
--- grass/branches/develbranch_6/gui/images/Makefile	2011-03-06 18:00:13 UTC (rev 45587)
+++ grass/branches/develbranch_6/gui/images/Makefile	2011-03-06 18:37:09 UTC (rev 45588)
@@ -1,9 +1,21 @@
 MODULE_TOPDIR = ../..
 
-include $(MODULE_TOPDIR)/include/Make/Dir.make
+include $(MODULE_TOPDIR)/include/Make/Platform.make
+include $(MODULE_TOPDIR)/include/Make/Grass.make
+include $(MODULE_TOPDIR)/include/Make/Rules.make
 
-default:
-	if [ ! -d $(ETC)/gui ] ; then $(MKDIR) $(ETC)/gui ; fi
-	if [ ! -d $(ETC)/gui/images ] ; then $(MKDIR) $(ETC)/gui/images ; fi
-	$(INSTALL_DATA) gintro.gif $(ETC)/gui/images/gintro.gif
+ETCDIR = $(ETC)/gui/images
 
+FILES := $(wildcard *.png)
+FILES += $(wildcard *.gif)
+
+default: $(patsubst %,$(ETCDIR)/%,$(FILES))
+
+$(ETCDIR)/%.png: %.png | $(ETCDIR)
+	$(INSTALL_DATA) $< $@
+
+$(ETCDIR)/%.gif: %.gif | $(ETCDIR)
+	$(INSTALL_DATA) $< $@
+
+$(ETCDIR):
+	$(MKDIR) $@

Copied: grass/branches/develbranch_6/gui/images/__init__.py (from rev 45587, grass/trunk/gui/images/__init__.py)
===================================================================
--- grass/branches/develbranch_6/gui/images/__init__.py	                        (rev 0)
+++ grass/branches/develbranch_6/gui/images/__init__.py	2011-03-06 18:37:09 UTC (rev 45588)
@@ -0,0 +1,8 @@
+all = [
+    "grass_form.png",
+    "grass_splash.png",
+    "grass_splash.xcf",
+    "loc_wizard.png",
+    "loc_wizard_qgis.png",
+    "qgis_world.png",
+    ]

Deleted: grass/branches/develbranch_6/gui/images/gintro.gif
===================================================================
(Binary files differ)

Copied: grass/branches/develbranch_6/gui/images/grass_form.png (from rev 45587, grass/trunk/gui/images/grass_form.png)
===================================================================
(Binary files differ)

Copied: grass/branches/develbranch_6/gui/images/grass_splash.png (from rev 45587, grass/trunk/gui/images/grass_splash.png)
===================================================================
(Binary files differ)

Copied: grass/branches/develbranch_6/gui/images/grass_splash.xcf (from rev 45587, grass/trunk/gui/images/grass_splash.xcf)
===================================================================
(Binary files differ)

Copied: grass/branches/develbranch_6/gui/images/loc_wizard.png (from rev 45587, grass/trunk/gui/images/loc_wizard.png)
===================================================================
(Binary files differ)

Copied: grass/branches/develbranch_6/gui/images/loc_wizard_qgis.png (from rev 45587, grass/trunk/gui/images/loc_wizard_qgis.png)
===================================================================
(Binary files differ)

Copied: grass/branches/develbranch_6/gui/images/qgis_world.png (from rev 45587, grass/trunk/gui/images/qgis_world.png)
===================================================================
(Binary files differ)

Copied: grass/branches/develbranch_6/gui/images/small_down_arrow.png (from rev 45587, grass/trunk/gui/images/small_down_arrow.png)
===================================================================
(Binary files differ)

Copied: grass/branches/develbranch_6/gui/images/small_up_arrow.png (from rev 45587, grass/trunk/gui/images/small_up_arrow.png)
===================================================================
(Binary files differ)

Added: grass/branches/develbranch_6/gui/images/startup_banner.gif
===================================================================
(Binary files differ)


Property changes on: grass/branches/develbranch_6/gui/images/startup_banner.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: grass/branches/develbranch_6/gui/wxpython/Makefile
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/Makefile	2011-03-06 18:00:13 UTC (rev 45587)
+++ grass/branches/develbranch_6/gui/wxpython/Makefile	2011-03-06 18:37:09 UTC (rev 45588)
@@ -10,7 +10,7 @@
 
 ETCDIR = $(ETC)/wxpython
 
-SRCFILES := $(wildcard compat/* gui_modules/* icons/*.* icons/silk/* images/* xml/*) gis_set.py wxgui.py README
+SRCFILES := $(wildcard compat/* gui_modules/* icons/*.* icons/silk/* xml/*) gis_set.py wxgui.py README
 DSTFILES := $(patsubst %,$(ETCDIR)/%,$(SRCFILES)) $(patsubst %.py,$(ETCDIR)/%.pyc,$(filter %.py,$(SRCFILES)))
 
 default: install_scripts
@@ -19,7 +19,7 @@
 clean: cleansubdirs
 
 install_scripts:
-	-for dir in '' compat gui_modules icons icons/silk images xml; do \
+	-for dir in '' compat gui_modules icons icons/silk xml; do \
 	if [ ! -d $(ETCDIR)/$$dir ] ; then $(MKDIR) $(ETCDIR)/$$dir ; fi ; \
 	done
 	$(MAKE) $(DSTFILES)

Modified: grass/branches/develbranch_6/gui/wxpython/gis_set.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gis_set.py	2011-03-06 18:00:13 UTC (rev 45587)
+++ grass/branches/develbranch_6/gui/wxpython/gis_set.py	2011-03-06 18:37:09 UTC (rev 45588)
@@ -82,7 +82,7 @@
         #
         # image
         try:
-            name = os.path.join(globalvar.ETCDIR, "gui", "images", "gintro.gif")
+            name = os.path.join(globalvar.ETCIMGDIR, "startup_banner.gif")
             self.hbitmap = wx.StaticBitmap(self.panel, wx.ID_ANY,
                                            wx.Bitmap(name = name,
                                                      type = wx.BITMAP_TYPE_GIF))

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmanager.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmanager.py	2011-03-06 18:00:13 UTC (rev 45587)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmanager.py	2011-03-06 18:37:09 UTC (rev 45588)
@@ -59,11 +59,8 @@
     sys.path.append(CompatPath)
     from compat import subprocess
 
-gmpath = os.path.join(globalvar.ETCWXDIR, "icons")
-sys.path.append(gmpath)
+sys.path.append(os.path.join(globalvar.ETCWXDIR, "icons"))
 
-imgpath = os.path.join(globalvar.ETCWXDIR, "images")
-
 #
 # global variables
 #
@@ -76,7 +73,7 @@
 maptype = 'cell'
 
 def getSmallUpArrowImage():
-    stream = open(os.path.join(imgpath, 'small_up_arrow.png'), 'rb')
+    stream = open(os.path.join(globalvar.ETCIMGDIR, 'small_up_arrow.png'), 'rb')
     try:
         img = wx.ImageFromStream(stream)
     finally:
@@ -84,7 +81,7 @@
     return img
 
 def getSmallDnArrowImage():
-    stream = open(os.path.join(imgpath, 'small_down_arrow.png'), 'rb')
+    stream = open(os.path.join(globalvar.ETCIMGDIR, 'small_down_arrow.png'), 'rb')
     try:
         img = wx.ImageFromStream(stream)
     finally:

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmapdisp.py	2011-03-06 18:00:13 UTC (rev 45587)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmapdisp.py	2011-03-06 18:37:09 UTC (rev 45588)
@@ -63,13 +63,6 @@
 from mapdisp_command import Command
 from mapdisp_window import BufferedWindow
 
-import images
-imagepath = images.__path__[0]
-sys.path.append(imagepath)
-
-###
-### global variables
-###
 # for standalone app
 cmdfilename = None
 

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py	2011-03-06 18:00:13 UTC (rev 45587)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/globalvar.py	2011-03-06 18:37:09 UTC (rev 45588)
@@ -28,6 +28,7 @@
 ETCDIR = os.path.join(os.getenv("GISBASE"), "etc")
 ETCICONDIR = os.path.join(os.getenv("GISBASE"), "etc", "gui", "icons")
 ETCWXDIR = os.path.join(ETCDIR, "wxpython")
+ETCIMGDIR = os.path.join(ETCDIR, "gui", "images")
 
 sys.path.append(os.path.join(ETCDIR, "python"))
 import grass.script as grass

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/location_wizard.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/location_wizard.py	2011-03-06 18:00:13 UTC (rev 45587)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/location_wizard.py	2011-03-06 18:37:09 UTC (rev 45588)
@@ -1729,7 +1729,7 @@
         #
         # define wizard image
         #
-        imagePath = os.path.join(globalvar.ETCWXDIR, "images", "loc_wizard_qgis.png")
+        imagePath = os.path.join(globalvar.ETCIMGDIR, "loc_wizard_qgis.png")
         wizbmp = wx.Image(imagePath, wx.BITMAP_TYPE_PNG)
         wizbmp = wizbmp.ConvertToBitmap()
         
@@ -2143,8 +2143,8 @@
         #
         # image
         #
-        self.img = wx.Image(os.path.join(globalvar.ETCWXDIR, "images",
-                                         "qgis_world.png"), wx.BITMAP_TYPE_PNG).ConvertToBitmap()
+        self.img = wx.Image(os.path.join(globalvar.ETCIMGDIR, "qgis_world.png"),
+                            wx.BITMAP_TYPE_PNG).ConvertToBitmap()
         
         #
         # set current working environment to PERMANENT mapset

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2011-03-06 18:00:13 UTC (rev 45587)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2011-03-06 18:37:09 UTC (rev 45588)
@@ -71,13 +71,6 @@
 from mapdisp_command import Command
 from mapdisp_window import BufferedWindow
 
-import images
-imagepath = images.__path__[0]
-sys.path.append(imagepath)
-
-###
-### global variables
-###
 # for standalone app
 cmdfilename = None
 

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2011-03-06 18:00:13 UTC (rev 45587)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/menuform.py	2011-03-06 18:37:09 UTC (rev 45588)
@@ -91,8 +91,6 @@
     wxbase = os.path.join(globalvar.ETCWXDIR)
 
 sys.path.append(wxbase)
-imagepath = os.path.join(wxbase, "images")
-sys.path.append(imagepath)
 
 from grass.script import core as grass
 
@@ -720,8 +718,8 @@
         
         # GRASS logo
         self.logo = wx.StaticBitmap(parent = self.panel,
-                                    bitmap = wx.Bitmap(name = os.path.join(imagepath,
-                                                                       'grass_form.png'),
+                                    bitmap = wx.Bitmap(name = os.path.join(globalvar.ETCIMGDIR,
+                                                                           'grass_form.png'),
                                                      type = wx.BITMAP_TYPE_PNG))
         topsizer.Add(item = self.logo, proportion = 0, border = 3,
                      flag = wx.ALL | wx.ALIGN_CENTER_VERTICAL)

Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py	2011-03-06 18:00:13 UTC (rev 45587)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py	2011-03-06 18:37:09 UTC (rev 45588)
@@ -57,6 +57,11 @@
     import wx.lib.customtreectrl as CT
     import wx.lib.flatnotebook   as FN
 
+try:
+    import wx.lib.agw.advancedsplash as SC
+except ImportError:
+    SC = None
+
 sys.path.append(os.path.join(globalvar.ETCDIR, "python"))
 from grass.script import core as grass
 
@@ -1526,11 +1531,22 @@
         wx.InitAllImageHandlers()
 
         # create splash screen
-        introImagePath = os.path.join(globalvar.ETCWXDIR, "images", "grass_splash.png")
+        introImagePath = os.path.join(globalvar.ETCIMGDIR, "grass_splash.png")
         introImage     = wx.Image(introImagePath, wx.BITMAP_TYPE_PNG)
         introBmp       = introImage.ConvertToBitmap()
-        wx.SplashScreen (bitmap = introBmp, splashStyle = wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT,
-                         milliseconds = 2000, parent = None, id = wx.ID_ANY)
+        if SC:
+            splash = SC.AdvancedSplash(bitmap = introBmp, 
+                                       extrastyle = SC.AS_TIMEOUT | SC.AS_CENTER_ON_SCREEN,
+                                       timeout = 2000, parent = None, id = wx.ID_ANY)
+            splash.SetText(_('Starting GRASS GUI...'))
+            splash.SetTextColour(wx.Colour(45, 52, 27))
+            splash.SetTextFont(wx.Font(pointSize = 15, family = wx.DEFAULT, style = wx.NORMAL,
+                                       weight = wx.BOLD))
+            splash.SetTextPosition((150, 430))
+        else:
+            wx.SplashScreen (bitmap = introBmp, splashStyle = wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT,
+                             milliseconds = 2000, parent = None, id = wx.ID_ANY)
+        
         wx.Yield()
         
         w, h = wx.GetDisplaySize()

Modified: grass/branches/develbranch_6/lib/init/gis_set.tcl
===================================================================
--- grass/branches/develbranch_6/lib/init/gis_set.tcl	2011-03-06 18:00:13 UTC (rev 45587)
+++ grass/branches/develbranch_6/lib/init/gis_set.tcl	2011-03-06 18:37:09 UTC (rev 45588)
@@ -201,7 +201,7 @@
     
     if { $screen_height > $small_window } {
 	set introimg  [label $titlefrm.img -image [image create photo -file \
-	    "$env(GISBASE)/etc/gui/images/gintro.gif"]]
+	    "$env(GISBASE)/etc/gui/images/startup_banner.gif"]]
 	pack $introimg -side top
     
 	set introtitle [text $titlefrm.msg -height 5 \



More information about the grass-commit mailing list