[GRASS-SVN] r60008 - in grass/trunk/gui: icons images scripts wxpython wxpython/animation wxpython/core wxpython/dbmgr wxpython/gcp wxpython/gmodeler wxpython/gui_core wxpython/iclass wxpython/icons wxpython/iscatt wxpython/lmgr wxpython/location_wizard wxpython/mapdisp wxpython/mapswipe wxpython/modules wxpython/nviz wxpython/psmap wxpython/rlisetup wxpython/scripts wxpython/timeline wxpython/tools wxpython/vdigit wxpython/vnet wxpython/wxplot xml

svn_grass at osgeo.org svn_grass at osgeo.org
Thu May 1 09:12:10 PDT 2014


Author: martinl
Date: 2014-05-01 09:12:10 -0700 (Thu, 01 May 2014)
New Revision: 60008

Modified:
   grass/trunk/gui/icons/Makefile
   grass/trunk/gui/images/Makefile
   grass/trunk/gui/scripts/Makefile
   grass/trunk/gui/wxpython/Makefile
   grass/trunk/gui/wxpython/animation/dialogs.py
   grass/trunk/gui/wxpython/animation/frame.py
   grass/trunk/gui/wxpython/animation/g.gui.animation.py
   grass/trunk/gui/wxpython/animation/nviztask.py
   grass/trunk/gui/wxpython/animation/provider.py
   grass/trunk/gui/wxpython/animation/temporal_manager.py
   grass/trunk/gui/wxpython/core/giface.py
   grass/trunk/gui/wxpython/core/globalvar.py
   grass/trunk/gui/wxpython/core/menutree.py
   grass/trunk/gui/wxpython/core/toolboxes.py
   grass/trunk/gui/wxpython/core/units.py
   grass/trunk/gui/wxpython/core/utils.py
   grass/trunk/gui/wxpython/dbmgr/base.py
   grass/trunk/gui/wxpython/dbmgr/g.gui.dbmgr.py
   grass/trunk/gui/wxpython/dbmgr/manager.py
   grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py
   grass/trunk/gui/wxpython/gcp/g.gui.gcp.py
   grass/trunk/gui/wxpython/gcp/manager.py
   grass/trunk/gui/wxpython/gis_set.py
   grass/trunk/gui/wxpython/gmodeler/dialogs.py
   grass/trunk/gui/wxpython/gmodeler/frame.py
   grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.py
   grass/trunk/gui/wxpython/gmodeler/menudata.py
   grass/trunk/gui/wxpython/gmodeler/model.py
   grass/trunk/gui/wxpython/gui_core/dialogs.py
   grass/trunk/gui/wxpython/gui_core/forms.py
   grass/trunk/gui/wxpython/gui_core/ghelp.py
   grass/trunk/gui/wxpython/gui_core/goutput.py
   grass/trunk/gui/wxpython/gui_core/gselect.py
   grass/trunk/gui/wxpython/gui_core/mapdisp.py
   grass/trunk/gui/wxpython/gui_core/query.py
   grass/trunk/gui/wxpython/gui_core/simplelmgr.py
   grass/trunk/gui/wxpython/gui_core/toolbars.py
   grass/trunk/gui/wxpython/gui_core/treeview.py
   grass/trunk/gui/wxpython/iclass/frame.py
   grass/trunk/gui/wxpython/iclass/g.gui.iclass.py
   grass/trunk/gui/wxpython/icons/grass_icons.py
   grass/trunk/gui/wxpython/icons/icon.py
   grass/trunk/gui/wxpython/iscatt/frame.py
   grass/trunk/gui/wxpython/lmgr/frame.py
   grass/trunk/gui/wxpython/lmgr/menudata.py
   grass/trunk/gui/wxpython/location_wizard/dialogs.py
   grass/trunk/gui/wxpython/location_wizard/wizard.py
   grass/trunk/gui/wxpython/mapdisp/frame.py
   grass/trunk/gui/wxpython/mapdisp/main.py
   grass/trunk/gui/wxpython/mapdisp/test_mapdisp.py
   grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py
   grass/trunk/gui/wxpython/modules/colorrules.py
   grass/trunk/gui/wxpython/modules/extensions.py
   grass/trunk/gui/wxpython/modules/histogram.py
   grass/trunk/gui/wxpython/modules/mcalc_builder.py
   grass/trunk/gui/wxpython/modules/vclean.py
   grass/trunk/gui/wxpython/nviz/preferences.py
   grass/trunk/gui/wxpython/psmap/dialogs.py
   grass/trunk/gui/wxpython/psmap/frame.py
   grass/trunk/gui/wxpython/psmap/g.gui.psmap.py
   grass/trunk/gui/wxpython/psmap/menudata.py
   grass/trunk/gui/wxpython/rlisetup/frame.py
   grass/trunk/gui/wxpython/rlisetup/g.gui.rlisetup.py
   grass/trunk/gui/wxpython/rlisetup/sampling_frame.py
   grass/trunk/gui/wxpython/rlisetup/wizard.py
   grass/trunk/gui/wxpython/scripts/vkrige.py
   grass/trunk/gui/wxpython/timeline/frame.py
   grass/trunk/gui/wxpython/timeline/g.gui.timeline.py
   grass/trunk/gui/wxpython/tools/update_menudata.py
   grass/trunk/gui/wxpython/vdigit/g.gui.vdigit.py
   grass/trunk/gui/wxpython/vdigit/toolbars.py
   grass/trunk/gui/wxpython/vnet/dialogs.py
   grass/trunk/gui/wxpython/vnet/widgets.py
   grass/trunk/gui/wxpython/wxgui.py
   grass/trunk/gui/wxpython/wxplot/base.py
   grass/trunk/gui/xml/Makefile
Log:
wxGUI: moved to DISTDIR/gui
       eliminate hardcoded paths


Modified: grass/trunk/gui/icons/Makefile
===================================================================
--- grass/trunk/gui/icons/Makefile	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/icons/Makefile	2014-05-01 16:12:10 UTC (rev 60008)
@@ -5,14 +5,14 @@
 SRCICO := $(wildcard *.ico *.png)
 SRCICONS := $(wildcard grass/*.png)
 SRCFLAGS := $(wildcard flags/*.png)
-ETCICONS := $(patsubst %,$(ETC)/gui/icons/%,$(SRCICONS) $(SRCICO) $(SRCFLAGS))
+ETCICONS := $(patsubst %,$(GUIDIR)/icons/%,$(SRCICONS) $(SRCICO) $(SRCFLAGS))
 HTMLICONS := $(patsubst grass/%,$(HTMLDIR)/icons/%,$(SRCICONS))
 
-ETCDIRS = \
-	$(ETC)/gui \
-	$(ETC)/gui/icons \
-	$(ETC)/gui/icons/grass \
-	$(ETC)/gui/icons/flags
+DSTDIRS = \
+	$(GUIDIR) \
+	$(GUIDIR)/icons \
+	$(GUIDIR)/icons/grass \
+	$(GUIDIR)/icons/flags
 
 HTMLDIRS = \
 	$(HTMLDIR)/icons
@@ -21,11 +21,11 @@
 	$(MKDIR) $(ARCH_DISTDIR)/share/applications
 	$(INSTALL_DATA) grass.desktop $(ARCH_DISTDIR)/share/applications
 
-$(ETC)/gui/icons/%: % | $(ETCDIRS)
+$(GUIDIR)/icons/%: % | $(DSTDIRS)
 	$(INSTALL_DATA) $< $@
 
 $(HTMLDIR)/icons/%: grass/% | $(HTMLDIRS)
 	$(INSTALL_DATA) $< $@
 
-$(ETCDIRS) $(HTMLDIRS): %:
+$(DSTDIRS) $(HTMLDIRS): %:
 	$(MKDIR) $@

Modified: grass/trunk/gui/images/Makefile
===================================================================
--- grass/trunk/gui/images/Makefile	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/images/Makefile	2014-05-01 16:12:10 UTC (rev 60008)
@@ -2,34 +2,34 @@
 
 include $(MODULE_TOPDIR)/include/Make/Other.make
 
-ETCDIR = $(ETC)/gui/images
+DSTDIR = $(GUIDIR)/images
 
 # images
 IMGSRC := $(wildcard *.png)
-IMGDST := $(patsubst %,$(ETCDIR)/%,$(IMGSRC))
+IMGDST := $(patsubst %,$(DSTDIR)/%,$(IMGSRC))
 
 # symbols
 CATEGORIES = basic demo extra geology n_arrows
 SYMSRC := $(foreach dir,$(CATEGORIES),$(wildcard symbols/$(dir)/*.png))
-SYMDST := $(patsubst symbols/%,$(ETCDIR)/symbols/%,$(SYMSRC))
+SYMDST := $(patsubst symbols/%,$(DSTDIR)/symbols/%,$(SYMSRC))
 
 default: $(IMGDST) $(SYMDST)
 
 define symbols_rule
-$(ETCDIR)/symbols/$(1)/%.png: symbols/$(1)/%.png | $(ETCDIR)/symbols/$(1)
+$(DSTDIR)/symbols/$(1)/%.png: symbols/$(1)/%.png | $(DSTDIR)/symbols/$(1)
 	$(INSTALL_DATA) $$< $$@
 
-$(ETCDIR)/symbols/$(1): | $(ETCDIR)/symbols
+$(DSTDIR)/symbols/$(1): | $(DSTDIR)/symbols
 	$(MKDIR) $$@
 endef
 
 $(foreach category,$(CATEGORIES),$(eval $(call symbols_rule,$(category))))
 
-$(ETCDIR)/%.png: %.png | $(ETCDIR)
+$(DSTDIR)/%.png: %.png | $(DSTDIR)
 	$(INSTALL_DATA) $< $@
 
-$(ETCDIR):
+$(DSTDIR):
 	$(MKDIR) $@
 
-$(ETCDIR)/symbols: $(ETCDIR)
+$(DSTDIR)/symbols: $(DSTDIR)
 	$(MKDIR) $@

Modified: grass/trunk/gui/scripts/Makefile
===================================================================
--- grass/trunk/gui/scripts/Makefile	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/scripts/Makefile	2014-05-01 16:12:10 UTC (rev 60008)
@@ -4,21 +4,21 @@
 include $(MODULE_TOPDIR)/include/Make/Vars.make
 include $(MODULE_TOPDIR)/include/Make/Python.make
 
-SCRIPTDIR = $(ETC)/gui/scripts
+DSTDIR = $(GUIDIR)/scripts
 
 ifdef MINGW
-PYFILES := $(patsubst %.py, $(SCRIPTDIR)/%.py, $(filter %.py, $(PY_SOURCES)))
+PYFILES := $(patsubst %.py, $(GUIDIR)/%.py, $(filter %.py, $(PY_SOURCES)))
 else
-PYFILES := $(patsubst %.py, $(SCRIPTDIR)/%, $(filter %.py, $(PY_SOURCES)))
+PYFILES := $(patsubst %.py, $(GUIDIR)/%, $(filter %.py, $(PY_SOURCES)))
 endif
 
 default: $(PYFILES)
 
-$(SCRIPTDIR)/%: %.py | $(SCRIPTDIR)
+$(GUIDIR)/%: %.py | $(GUIDIR)
 	$(INSTALL) $< $@
 
-$(SCRIPTDIR)/%.py: %.py | $(SCRIPTDIR)
+$(GUIDIR)/%.py: %.py | $(GUIDIR)
 	$(INSTALL) $< $@
 
-$(SCRIPTDIR):
+$(GUIDIR):
 	-test -d $@ | $(MKDIR) $@

Modified: grass/trunk/gui/wxpython/Makefile
===================================================================
--- grass/trunk/gui/wxpython/Makefile	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/Makefile	2014-05-01 16:12:10 UTC (rev 60008)
@@ -7,7 +7,7 @@
 include $(MODULE_TOPDIR)/include/Make/Doxygen.make
 include $(MODULE_TOPDIR)/include/Make/Python.make
 
-ETCDIR = $(ETC)/gui/wxpython
+DSTDIR = $(GUIDIR)/wxpython
 
 SRCFILES := $(wildcard icons/*.py scripts/*.py xml/*) \
 	$(wildcard animation/* core/*.py dbmgr/* gcp/*.py gmodeler/* \
@@ -16,25 +16,25 @@
 	vnet/*.py web_services/*.py wxplot/*.py iscatt/*.py) \
 	gis_set.py gis_set_error.py wxgui.py README
 
-DSTFILES := $(patsubst %,$(ETCDIR)/%,$(SRCFILES)) \
-	$(patsubst %.py,$(ETCDIR)/%.pyc,$(filter %.py,$(SRCFILES)))
+DSTFILES := $(patsubst %,$(DSTDIR)/%,$(SRCFILES)) \
+	$(patsubst %.py,$(DSTDIR)/%.pyc,$(filter %.py,$(SRCFILES)))
 
-PYDSTDIRS := $(patsubst %,$(ETCDIR)/%,animation core dbmgr gcp gmodeler \
+PYDSTDIRS := $(patsubst %,$(DSTDIR)/%,animation core dbmgr gcp gmodeler \
 	gui_core iclass lmgr location_wizard mapwin mapdisp modules nviz psmap \
 	mapswipe vdigit wxplot web_services rlisetup vnet timeline iscatt)
 
 
-DSTDIRS := $(patsubst %,$(ETCDIR)/%,icons scripts xml)
+DSTDIRS := $(patsubst %,$(DSTDIR)/%,icons scripts xml)
 
 default: $(DSTFILES)
-	-$(MAKE) $(ETCDIR)/xml/module_items.xml
+	-$(MAKE) $(DSTDIR)/xml/module_items.xml
 	-$(MAKE) xml/menudata.xml
 	-$(MAKE) xml/module_tree_menudata.xml
 	-$(MAKE) menustrings.py
 	$(MAKE) parsubdirs
 
 
-$(ETCDIR)/%: % | $(PYDSTDIRS) $(DSTDIRS)
+$(DSTDIR)/%: % | $(PYDSTDIRS) $(DSTDIRS)
 	$(INSTALL_DATA) $< $@
 
 xml/menudata.xml: core/toolboxes.py
@@ -43,24 +43,24 @@
 xml/module_tree_menudata.xml: core/toolboxes.py
 	$(call run_grass,$(PYTHON) $< "module_tree" > $@)
 
-menustrings.py: core/menutree.py $(ETCDIR)/xml/menudata.xml $(ETCDIR)/xml/module_tree_menudata.xml $(ETCDIR)/xml/menudata_modeler.xml $(ETCDIR)/xml/menudata_psmap.xml
+menustrings.py: core/menutree.py $(DSTDIR)/xml/menudata.xml $(DSTDIR)/xml/module_tree_menudata.xml $(DSTDIR)/xml/menudata_modeler.xml $(DSTDIR)/xml/menudata_psmap.xml
 	@echo "# This is a generated file.\n" > $@
 	$(call run_grass,$(PYTHON) $< "manager" >> $@)
 	$(call run_grass,$(PYTHON) $< "module_tree" >> $@)
 	$(call run_grass,$(PYTHON) $< "modeler" >> $@)
 	$(call run_grass,$(PYTHON) $< "psmap" >> $@)
 
-$(ETCDIR)/xml/module_items.xml: tools/build_modules_xml.py
+$(DSTDIR)/xml/module_items.xml: tools/build_modules_xml.py
 	@echo "Generating interface description for all modules..."
 	$(call run_grass,$(PYTHON) $< > $@)
-	
-$(PYDSTDIRS): %: | $(ETCDIR)
+
+$(PYDSTDIRS): %: | $(DSTDIR)
 	$(MKDIR) $@
 
-$(DSTDIRS): %: | $(ETCDIR)
+$(DSTDIRS): %: | $(DSTDIR)
 	$(MKDIR) $@
 
-$(ETCDIR):
+$(DSTDIR):
 	$(MKDIR) $@
 
 #doxygen:

Modified: grass/trunk/gui/wxpython/animation/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/animation/dialogs.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/animation/dialogs.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -20,7 +20,6 @@
 @author Anna Petrasova <kratochanna gmail.com>
 """
 import os
-import sys
 import wx
 import copy
 import datetime
@@ -28,9 +27,6 @@
 import wx.lib.scrolledpanel as SP
 import wx.lib.colourselect as csel
 
-if __name__ == '__main__':
-    sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
-
 from core.gcmd import GMessage, GError, GException
 from core import globalvar
 from gui_core.dialogs import MapLayersDialog, GetImageHandlers
@@ -1274,7 +1270,7 @@
 
         self.tselect = Select(parent=self, type='strds')
         iconTheme = UserSettings.Get(group='appearance', key='iconTheme', subkey='type')
-        bitmapPath = os.path.join(globalvar.ETCICONDIR, iconTheme, 'layer-open.png')
+        bitmapPath = os.path.join(globalvar.ICONDIR, iconTheme, 'layer-open.png')
         if os.path.isfile(bitmapPath) and os.path.getsize(bitmapPath):
             bitmap = wx.Bitmap(name=bitmapPath)
         else:

Modified: grass/trunk/gui/wxpython/animation/frame.py
===================================================================
--- grass/trunk/gui/wxpython/animation/frame.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/animation/frame.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -23,8 +23,6 @@
 import wx.aui
 import tempfile
 
-if __name__ == '__main__':
-    sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
 import grass.script as gcore
 import grass.temporal as tgis
 from core import globalvar
@@ -57,7 +55,7 @@
         self.SetClientSize(self.GetSize())
         self.iconsize = (16, 16)
 
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass_map.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass_map.ico'), wx.BITMAP_TYPE_ICO))
 
         # Make sure the temporal database exists
         tgis.init()

Modified: grass/trunk/gui/wxpython/animation/g.gui.animation.py
===================================================================
--- grass/trunk/gui/wxpython/animation/g.gui.animation.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/animation/g.gui.animation.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -51,16 +51,12 @@
 #%end
 
 import os
-import sys
 
 import wx
 
 import grass.script as grass
 import grass.temporal as tgis
 
-if __name__ == '__main__':
-    sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
-
 from core.globalvar import CheckWxVersion
 from core.utils import _, GuiModuleMain
 from core.giface import StandaloneGrassInterface

Modified: grass/trunk/gui/wxpython/animation/nviztask.py
===================================================================
--- grass/trunk/gui/wxpython/animation/nviztask.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/animation/nviztask.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -15,15 +15,11 @@
 """
 
 import os
-import sys
 try:
     import xml.etree.ElementTree as etree
 except ImportError:
     import elementtree.ElementTree as etree  # Python <= 2.4
 
-if __name__ == '__main__':
-    sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
-
 from core.workspace import ProcessWorkspaceFile
 from core.gcmd import RunCommand, GException
 from core.utils import GetLayerNameFromCmd, CmdToTuple, _

Modified: grass/trunk/gui/wxpython/animation/provider.py
===================================================================
--- grass/trunk/gui/wxpython/animation/provider.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/animation/provider.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -25,8 +25,6 @@
 import wx
 import tempfile
 from multiprocessing import Process, Queue
-if __name__ == '__main__':
-    sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
 
 from core.gcmd import RunCommand, GException
 from core.settings import UserSettings

Modified: grass/trunk/gui/wxpython/animation/temporal_manager.py
===================================================================
--- grass/trunk/gui/wxpython/animation/temporal_manager.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/animation/temporal_manager.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -18,12 +18,8 @@
 """
 
 import os
-import sys
 import datetime
 
-if __name__ == '__main__':
-    sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
-
 import grass.script as grass
 import grass.temporal as tgis
 from core.gcmd import GException

Modified: grass/trunk/gui/wxpython/core/giface.py
===================================================================
--- grass/trunk/gui/wxpython/core/giface.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/core/giface.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -6,7 +6,7 @@
 Classes:
  - giface::StandaloneGrassInterface
 
-(C) 2012 by the GRASS Development Team
+(C) 2012-2014 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.

Modified: grass/trunk/gui/wxpython/core/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/core/globalvar.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/core/globalvar.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -3,7 +3,7 @@
 
 @brief Global variables used by wxGUI
 
-(C) 2007-2011 by the GRASS Development Team
+(C) 2007-2014 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.
@@ -19,11 +19,11 @@
     sys.exit("GRASS is not running. Exiting...")
 
 # path to python scripts
-ETCDIR = os.path.join(os.getenv("GISBASE"), "etc")
-ETCICONDIR = os.path.join(os.getenv("GISBASE"), "etc", "gui", "icons")
-ETCWXDIR = os.path.join(ETCDIR, "gui", "wxpython")
-ETCIMGDIR = os.path.join(ETCDIR, "gui", "images")
-ETCSYMBOLDIR = os.path.join(ETCDIR, "gui", "images", "symbols")
+ETCDIR   = os.path.join(os.getenv("GISBASE"), "etc")
+GUIDIR   = os.path.join(os.getenv("GISBASE"), "gui")
+WXGUIDIR = os.path.join(os.getenv("GISBASE"), "gui", "wxpython")
+ICONDIR  = os.path.join(GUIDIR, "icons")
+IMGDIR  = os.path.join(GUIDIR, "images")
 
 from core.debug import Debug
 
@@ -38,12 +38,8 @@
         return string
     _ = null_gettext
 
-if os.path.join(ETCDIR, "python") not in sys.path:
-    sys.path.append(os.path.join(ETCDIR, "python"))
-
 from grass.script.core import get_commands
 
-
 def CheckWxVersion(version = [2, 8, 11, 0]):
     """!Check wx version"""
     ver = wx.version().split(' ')[0]

Modified: grass/trunk/gui/wxpython/core/menutree.py
===================================================================
--- grass/trunk/gui/wxpython/core/menutree.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/core/menutree.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -43,11 +43,6 @@
 
 import wx
 
-if __name__ == '__main__':
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
 from core.treemodel import TreeModel, ModuleNode
 from core.settings import UserSettings
 from core.toolboxes import expandAddons as expAddons
@@ -230,21 +225,17 @@
         elif arg in ('manager', 'module_tree', 'modeler', 'psmap'):
             menu = arg
 
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
     # FIXME: cross-dependencies
     if menu == 'manager':
         from lmgr.menudata     import LayerManagerMenuData
-        from core.globalvar    import ETCWXDIR
-        filename = os.path.join(ETCWXDIR, 'xml', 'menudata.xml')
+        from core.globalvar    import WXGUIDIR
+        filename = os.path.join(WXGUIDIR, 'xml', 'menudata.xml')
         menudata = LayerManagerMenuData(filename)
     # FIXME: since module descriptions are used again we have now the third copy of the same string (one is in modules)
     elif menu == 'module_tree':
         from lmgr.menudata import LayerManagerModuleTree
-        from core.globalvar import ETCWXDIR
-        filename = os.path.join(ETCWXDIR, 'xml', 'module_tree_menudata.xml')
+        from core.globalvar import WXGUIDIR
+        filename = os.path.join(WXGUIDIR, 'xml', 'module_tree_menudata.xml')
         menudata = LayerManagerModuleTree(filename)
     elif menu == 'modeler':
         from gmodeler.menudata import ModelerMenuData

Modified: grass/trunk/gui/wxpython/core/toolboxes.py
===================================================================
--- grass/trunk/gui/wxpython/core/toolboxes.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/core/toolboxes.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -30,13 +30,7 @@
 else:
     has_xpath = False
 
-
-if __name__ == '__main__':
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
-from core.globalvar import ETCWXDIR
+from core.globalvar import WXGUIDIR
 from core.utils import GetSettingsPath, _
 from core.gcmd import GError, RunCommand
 
@@ -47,10 +41,10 @@
 
 
 # this could be placed to functions
-mainMenuFile = os.path.join(ETCWXDIR, 'xml', 'main_menu.xml')
-toolboxesFile = os.path.join(ETCWXDIR, 'xml', 'toolboxes.xml')
-wxguiItemsFile = os.path.join(ETCWXDIR, 'xml', 'wxgui_items.xml')
-moduleItemsFile = os.path.join(ETCWXDIR, 'xml', 'module_items.xml')
+mainMenuFile    = os.path.join(WXGUIDIR, 'xml', 'main_menu.xml')
+toolboxesFile   = os.path.join(WXGUIDIR, 'xml', 'toolboxes.xml')
+wxguiItemsFile  = os.path.join(WXGUIDIR, 'xml', 'wxgui_items.xml')
+moduleItemsFile = os.path.join(WXGUIDIR, 'xml', 'module_items.xml')
 
 userToolboxesFile = os.path.join(GetSettingsPath(), 'toolboxes', 'toolboxes.xml')
 userMainMenuFile = os.path.join(GetSettingsPath(), 'toolboxes', 'main_menu.xml')
@@ -79,12 +73,11 @@
     """
     Debug.msg(1, "toolboxes.getMenudataFile: {userRootFile}, {newFile}, {fallback}".format(**locals()))
 
-    distributionRootFile = os.path.join(ETCWXDIR, 'xml', userRootFile)
+    distributionRootFile = os.path.join(WXGUIDIR, 'xml', userRootFile)
     userRootFile = os.path.join(GetSettingsPath(), 'toolboxes', userRootFile)
     if not os.path.exists(userRootFile):
         userRootFile = None
 
-    ##fallback = os.path.join(ETCWXDIR, 'xml', 'menudata.xml')
     # always create toolboxes directory if does not exist yet
     tbDir = _setupToolboxes()
 
@@ -685,11 +678,11 @@
     """Tests the module using test files included in the current directory and
     in files from distribution.
     """
-    toolboxesFile = os.path.join(ETCWXDIR, 'xml', 'toolboxes.xml')
+    toolboxesFile   = os.path.join(WXGUIDIR, 'xml', 'toolboxes.xml')
     userToolboxesFile = 'test.toolboxes_user_toolboxes.xml'
     menuFile = 'test.toolboxes_menu.xml'
-    wxguiItemsFile = os.path.join(ETCWXDIR, 'xml', 'wxgui_items.xml')
-    moduleItemsFile = os.path.join(ETCWXDIR, 'xml', 'module_items.xml')
+    wxguiItemsFile  = os.path.join(WXGUIDIR, 'xml', 'wxgui_items.xml')
+    moduleItemsFile = os.path.join(WXGUIDIR, 'xml', 'module_items.xml')
 
     toolboxes = etree.parse(toolboxesFile)
     userToolboxes = etree.parse(userToolboxesFile)
@@ -743,9 +736,9 @@
     """
     # TODO: fix parameter handling
     if len(sys.argv) > 1:
-        mainFile = os.path.join(ETCWXDIR, 'xml', 'module_tree.xml')
+        mainFile = os.path.join(WXGUIDIR, 'xml', 'module_tree.xml')
     else:
-        mainFile = os.path.join(ETCWXDIR, 'xml', 'main_menu.xml')
+        mainFile = os.path.join(WXGUIDIR, 'xml', 'main_menu.xml')
     tree = createTree(distributionRootFile=mainFile, userRootFile=None,
                       userDefined=False)
     root = tree.getroot()

Modified: grass/trunk/gui/wxpython/core/units.py
===================================================================
--- grass/trunk/gui/wxpython/core/units.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/core/units.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -27,9 +27,6 @@
 if __name__ == '__main__':
     import os
     import sys
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
 
 from core.utils import _
 

Modified: grass/trunk/gui/wxpython/core/utils.py
===================================================================
--- grass/trunk/gui/wxpython/core/utils.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/core/utils.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -21,21 +21,12 @@
 import re
 import inspect
 
-if __name__ == '__main__':
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
-from core.globalvar import ETCDIR
-if os.path.join(ETCDIR, "python") not in sys.path:
-    sys.path.append(os.path.join(ETCDIR, "python"))
-
 from grass.script import core as grass
 from grass.script import task as gtask
 
+from core import globalvar
 from core.gcmd  import RunCommand
 from core.debug import Debug
-# from core.settings import UserSettings
 
 try:
     # intended to be used also outside this module
@@ -845,7 +836,7 @@
     """!Get full path to the settings directory
     """
     try:
-        verFd = open(os.path.join(ETCDIR, "VERSIONNUMBER"))
+        verFd = open(os.path.join(globalvar.ETCDIR, "VERSIONNUMBER"))
         version = int(verFd.readlines()[0].split(' ')[0].split('.')[0])
     except (IOError, ValueError, TypeError, IndexError), e:
         sys.exit(_("ERROR: Unable to determine GRASS version. Details: %s") % e)

Modified: grass/trunk/gui/wxpython/dbmgr/base.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/base.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/dbmgr/base.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -34,11 +34,6 @@
 import copy
 import types
 
-if __name__ == "__main__":
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
 from core import globalvar
 import wx
 import wx.lib.mixins.listctrl as listmix

Modified: grass/trunk/gui/wxpython/dbmgr/g.gui.dbmgr.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/g.gui.dbmgr.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/dbmgr/g.gui.dbmgr.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -29,16 +29,11 @@
 #%end
 
 import os
-import sys
 
 import  wx
 
 import grass.script as grass
 
-gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-if gui_wx_path not in sys.path:
-    sys.path.append(gui_wx_path)
-
 from core.utils import _, GuiModuleMain
 from dbmgr.manager import AttributeManager
 

Modified: grass/trunk/gui/wxpython/dbmgr/manager.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/manager.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/dbmgr/manager.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -76,7 +76,7 @@
         self.SetTitle(title)
         
         # icon
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass_sql.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass_sql.ico'), wx.BITMAP_TYPE_ICO))
 
         self.panel = wx.Panel(parent = self, id = wx.ID_ANY)
              

Modified: grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -27,11 +27,6 @@
 import os
 import sys
 
-if __name__ == "__main__":
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
 from core import globalvar
 from core.utils import _
 import wx
@@ -51,7 +46,7 @@
                  layer = 1):
         wx.Frame.__init__(self, parent, id, title)
         
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass_sql.ico'),
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass_sql.ico'),
                              wx.BITMAP_TYPE_ICO))
         
         self.parent     = parent

Modified: grass/trunk/gui/wxpython/gcp/g.gui.gcp.py
===================================================================
--- grass/trunk/gui/wxpython/gcp/g.gui.gcp.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gcp/g.gui.gcp.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -33,17 +33,10 @@
 """
 
 import os
-import sys
 import  wx
 
 import grass.script as grass
 
-# adding a path to wxGUI modules
-if __name__ == '__main__':
-    WXGUIBASE = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if WXGUIBASE not in sys.path:
-        sys.path.append(WXGUIBASE)
-
 from core.settings import UserSettings
 from core.globalvar import CheckWxVersion
 from core.giface import StandaloneGrassInterface

Modified: grass/trunk/gui/wxpython/gcp/manager.py
===================================================================
--- grass/trunk/gui/wxpython/gcp/manager.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gcp/manager.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -65,7 +65,7 @@
 maptype = 'raster'
 
 def getSmallUpArrowImage():
-    stream = open(os.path.join(globalvar.ETCIMGDIR, 'small_up_arrow.png'), 'rb')
+    stream = open(os.path.join(globalvar.IMGDIR, 'small_up_arrow.png'), 'rb')
     try:
         img = wx.ImageFromStream(stream)
     finally:
@@ -73,7 +73,7 @@
     return img
 
 def getSmallDnArrowImage():
-    stream = open(os.path.join(globalvar.ETCIMGDIR, 'small_down_arrow.png'), 'rb')
+    stream = open(os.path.join(globalvar.IMGDIR, 'small_down_arrow.png'), 'rb')
     try:
         img = wx.ImageFromStream(stream)
     finally:

Modified: grass/trunk/gui/wxpython/gis_set.py
===================================================================
--- grass/trunk/gui/wxpython/gis_set.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gis_set.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -28,11 +28,6 @@
 import codecs
 import getpass
 
-if __name__ == "__main__":
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
 from core import globalvar
 from core.utils import _
 import wx
@@ -82,9 +77,9 @@
         # image
         try:
             if os.getenv('ISISROOT'):
-                name = os.path.join(globalvar.ETCDIR, "gui", "images", "startup_banner_isis.png")
+                name = os.path.join(globalvar.GUIDIR, "images", "startup_banner_isis.png")
             else:
-                name = os.path.join(globalvar.ETCDIR, "gui", "images", "startup_banner.png")
+                name = os.path.join(globalvar.GUIDIR, "images", "startup_banner.png")
             self.hbitmap = wx.StaticBitmap(self.panel, wx.ID_ANY,
                                            wx.Bitmap(name = name,
                                                      type = wx.BITMAP_TYPE_PNG))
@@ -210,7 +205,7 @@
     def _set_properties(self):
         """!Set frame properties"""
         self.SetTitle(_("Welcome to GRASS GIS"))
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, "grass.ico"),
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, "grass.ico"),
                              wx.BITMAP_TYPE_ICO))
 
         self.lwelcome.SetForegroundColour(wx.Colour(35, 142, 35))

Modified: grass/trunk/gui/wxpython/gmodeler/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/dialogs.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gmodeler/dialogs.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -151,7 +151,7 @@
         
         wx.Dialog.__init__(self, parent = parent, id = wx.ID_ANY, title = title, **kwargs)
         self.SetName("ModelerDialog")
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
         
         self._command = None
         self.panel = wx.Panel(parent = self, id = wx.ID_ANY)
@@ -301,7 +301,7 @@
         
         self.valid = True
         wx.Dialog.__init__(self, parent, id, title, style = style, **kwargs)
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
         
         self.panel = wx.Panel(parent = self, id = wx.ID_ANY)
         

Modified: grass/trunk/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/frame.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gmodeler/frame.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -83,7 +83,7 @@
         
         wx.Frame.__init__(self, parent = parent, id = id, title = title, **kwargs)
         self.SetName("Modeler")
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
         
         self.menubar = Menu(parent = self, model = ModelerMenuData().GetModel(separators=True))        
         self.SetMenuBar(self.menubar)

Modified: grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -35,16 +35,11 @@
 #%end
 
 import os
-import sys
 
 import  wx
 
 import grass.script as grass
 
-gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-if gui_wx_path not in sys.path:
-    sys.path.append(gui_wx_path)
-
 from core.giface import StandaloneGrassInterface
 from core.globalvar import CheckWxVersion
 from core.utils import _, GuiModuleMain

Modified: grass/trunk/gui/wxpython/gmodeler/menudata.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/menudata.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gmodeler/menudata.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -22,7 +22,7 @@
 class ModelerMenuData(MenuTreeModelBuilder):
     def __init__(self, filename = None):
         if not filename:
-            filename = os.path.join(globalvar.ETCWXDIR, 'xml', 'menudata_modeler.xml')
+            filename = os.path.join(globalvar.WXGUIDIR, 'xml', 'menudata_modeler.xml')
         
         MenuTreeModelBuilder.__init__(self, filename)
 

Modified: grass/trunk/gui/wxpython/gmodeler/model.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/model.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gmodeler/model.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -289,7 +289,7 @@
         
         Raise exception on error.
         """
-        dtdFilename = os.path.join(globalvar.ETCWXDIR, "xml", "grass-gxm.dtd")
+        dtdFilename = os.path.join(globalvar.WXGUIDIR, "xml", "grass-gxm.dtd")
         
         # parse workspace file
         try:

Modified: grass/trunk/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/dialogs.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gui_core/dialogs.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -2419,7 +2419,7 @@
         self.parent = parent
 
         wx.Frame.__init__(self, parent = parent, id = id, title = title, *kwargs)
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass_sql.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass_sql.ico'), wx.BITMAP_TYPE_ICO))
         self.panel = wx.Panel(parent = self, id = wx.ID_ANY)
         
         self.sqlBox = wx.StaticBox(parent = self.panel, id = wx.ID_ANY,

Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gui_core/forms.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -58,18 +58,11 @@
 
 from threading import Thread
 
-gisbase = os.getenv("GISBASE")
-if gisbase is None:
-    print >>sys.stderr, "We don't seem to be properly installed, or we are being run outside GRASS. Expect glitches."
+if not os.getenv("GISBASE"):
+    sys.write("We don't seem to be properly installed, or we are being run "
+              "outside GRASS. Expect glitches.\n")
     gisbase = os.path.join(os.path.dirname(sys.argv[0]), os.path.pardir)
-    wxbase = gisbase
-else:
-    wxbase = os.path.join(gisbase, 'etc', 'gui', 'wxpython')
 
-if wxbase not in sys.path:
-    sys.path.append(wxbase)
-
-from core import globalvar
 import wx
 try:
     import wx.lib.agw.flatnotebook as FN
@@ -89,6 +82,7 @@
 from grass.script import core as grass
 from grass.script import task as gtask
 
+from core import globalvar
 from gui_core.widgets import StaticWrapText, ScrolledPanel, ColorTablesComboBox, \
                              BarscalesComboBox, NArrowsComboBox
 from gui_core.ghelp   import HelpPanel
@@ -417,7 +411,7 @@
         self.CreateStatusBar()
         
         # icon
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass_dialog.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass_dialog.ico'), wx.BITMAP_TYPE_ICO))
         
         guisizer = wx.BoxSizer(wx.VERTICAL)
         
@@ -432,7 +426,7 @@
         
         # GRASS logo
         self.logo = wx.StaticBitmap(parent = self.panel,
-                                    bitmap = wx.Bitmap(name = os.path.join(globalvar.ETCIMGDIR,
+                                    bitmap = wx.Bitmap(name = os.path.join(globalvar.IMGDIR,
                                                                            'grass_form.png'),
                                                      type = wx.BITMAP_TYPE_PNG))
         topsizer.Add(item = self.logo, proportion = 0, border = 3,
@@ -1269,7 +1263,7 @@
                             showButton = False
                         if showButton:
                             iconTheme = UserSettings.Get(group='appearance', key='iconTheme', subkey='type')
-                            bitmap = wx.Bitmap(os.path.join(globalvar.ETCICONDIR, iconTheme, 'map-info.png'))
+                            bitmap = wx.Bitmap(os.path.join(globalvar.ICONDIR, iconTheme, 'map-info.png'))
                             bb = wx.BitmapButton(parent=which_panel, bitmap=bitmap)
                             bb.Bind(wx.EVT_BUTTON, self.OnTimelineTool)
                             bb.SetToolTipString(_("Show graphical representation of temporal extent of dataset(s) ."))
@@ -2237,7 +2231,7 @@
         
     def AddBitmapToImageList(self, section, imageList):
         iconTheme = UserSettings.Get(group = 'appearance', key = 'iconTheme', subkey = 'type')
-        iconSectionDict = {'manual': os.path.join(globalvar.ETCICONDIR, iconTheme, 'help.png')}
+        iconSectionDict = {'manual': os.path.join(globalvar.ICONDIR, iconTheme, 'help.png')}
         if section in iconSectionDict.keys():
             image = wx.Image(iconSectionDict[section]).Scale(16, 16, wx.IMAGE_QUALITY_HIGH)
             idx = imageList.Add(wx.BitmapFromImage(image))

Modified: grass/trunk/gui/wxpython/gui_core/ghelp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/ghelp.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gui_core/ghelp.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -50,7 +50,7 @@
         self.panel = wx.Panel(parent = self, id = wx.ID_ANY)
         
         # icon
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
 
         # notebook
         self.aboutNotebook = FormNotebook(self.panel, style = wx.BK_LEFT)
@@ -794,7 +794,7 @@
     """
     info = wx.AboutDialogInfo()
     
-    info.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+    info.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
     info.SetName(prgName)
     info.SetWebSite('http://grass.osgeo.org')
     info.SetDescription(_grassDevTeam(startYear) + '\n\n' +

Modified: grass/trunk/gui/wxpython/gui_core/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/goutput.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gui_core/goutput.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -20,13 +20,8 @@
 """
 
 import os
-import sys
 import textwrap
 
-gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-if gui_wx_path not in sys.path:
-    sys.path.append(gui_wx_path)
-
 import wx
 from   wx import stc
 

Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -2147,7 +2147,7 @@
                                        size=globalvar.DIALOG_TEXTCTRL_SIZE,
                                        validator=CoordinatesValidator())
         
-        icon = wx.Bitmap(os.path.join(globalvar.ETCICONDIR, "grass", "pointer.png"))
+        icon = wx.Bitmap(os.path.join(globalvar.ICONDIR, "grass", "pointer.png"))
         self.buttonInsCoords = buttons.ThemedGenBitmapToggleButton(parent=self, id=wx.ID_ANY,
                                                                    bitmap=icon,
                                                                    size=globalvar.DIALOG_COLOR_SIZE)

Modified: grass/trunk/gui/wxpython/gui_core/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/mapdisp.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gui_core/mapdisp.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -83,7 +83,7 @@
         self.SetClientSize(self.GetSize())
         self.iconsize = (16, 16)
 
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass_map.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass_map.ico'), wx.BITMAP_TYPE_ICO))
         
         # toolbars
         self.toolbars = {}

Modified: grass/trunk/gui/wxpython/gui_core/query.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/query.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gui_core/query.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -14,14 +14,8 @@
 @author Anna Kratochvilova <kratochanna gmail.com>
 """
 import os
-import sys
 import wx
 
-if __name__ == '__main__':
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
 from core.utils import _
 from gui_core.treeview import TreeListView
 from core.treemodel import TreeModel, DictNode

Modified: grass/trunk/gui/wxpython/gui_core/simplelmgr.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/simplelmgr.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gui_core/simplelmgr.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -16,13 +16,7 @@
 @author Anna Petrasova (kratochanna gmail.com)
 """
 import os
-import sys
 
-# adding a path to wxGUI modules
-if __name__ == '__main__':
-    WXGUIBASE = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if WXGUIBASE not in sys.path:
-        sys.path.append(WXGUIBASE)
 import wx
 import wx.aui
 

Modified: grass/trunk/gui/wxpython/gui_core/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/toolbars.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gui_core/toolbars.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -26,7 +26,7 @@
 from core.utils import _
 from icons.icon import MetaIcon
 from collections import defaultdict
-from core.globalvar import ETCIMGDIR
+from core.globalvar import IMGDIR
 
 from grass.pydispatch.signal import Signal
 
@@ -257,7 +257,7 @@
 
         Button must be custom (not toolbar tool) to set smaller width.
         """
-        arrowPath = os.path.join(ETCIMGDIR, 'small_down_arrow.png')
+        arrowPath = os.path.join(IMGDIR, 'small_down_arrow.png')
         if os.path.isfile(arrowPath) and os.path.getsize(arrowPath):
             bitmap = wx.Bitmap(name = arrowPath)
         else:

Modified: grass/trunk/gui/wxpython/gui_core/treeview.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/treeview.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/gui_core/treeview.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -15,7 +15,7 @@
 """
 
 import os
-import sys
+
 import wx
 from wx.lib.mixins.treemixin import VirtualTree, ExpansionState
 try:
@@ -24,11 +24,6 @@
     import wx.lib.customtreectrl as CT
 import wx.gizmos as gizmos
 
-if __name__ == '__main__':
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
 from core.globalvar import hasAgw
 from core.treemodel import TreeModel, DictNode
 from core.utils import _

Modified: grass/trunk/gui/wxpython/iclass/frame.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/frame.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/iclass/frame.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -24,11 +24,6 @@
 import types
 from core.utils import _
 
-if __name__ == "__main__":
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
 from core import globalvar
 import wx
 

Modified: grass/trunk/gui/wxpython/iclass/g.gui.iclass.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/g.gui.iclass.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/iclass/g.gui.iclass.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -50,17 +50,11 @@
 #%end
 
 import os
-import sys
 
 import  wx
 
 import grass.script as grass
 
-if __name__ == '__main__':
-    wxbase = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if wxbase not in sys.path:
-        sys.path.append(wxbase)
-
 from core.settings import UserSettings
 from core.globalvar import CheckWxVersion
 from core.giface import StandaloneGrassInterface

Modified: grass/trunk/gui/wxpython/icons/grass_icons.py
===================================================================
--- grass/trunk/gui/wxpython/icons/grass_icons.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/icons/grass_icons.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -9,7 +9,7 @@
 
 from core import globalvar
 
-iconPath = os.path.join(globalvar.ETCDIR, "gui", "icons", "grass")
+iconPath = os.path.join(globalvar.ICONDIR, "grass")
 
 iconSet = dict()
 

Modified: grass/trunk/gui/wxpython/icons/icon.py
===================================================================
--- grass/trunk/gui/wxpython/icons/icon.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/icons/icon.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -6,7 +6,7 @@
 Classes:
  - MetaIcon
 
-(C) 2007-2008, 2010-2011 by the GRASS Development Team
+(C) 2007-2014 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.

Modified: grass/trunk/gui/wxpython/iscatt/frame.py
===================================================================
--- grass/trunk/gui/wxpython/iscatt/frame.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/iscatt/frame.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -146,7 +146,7 @@
     def __init__(self, parent, giface, title=_("GRASS GIS Interactive Scatter Plot Tool"),
                  id=wx.ID_ANY, style=wx.DEFAULT_FRAME_STYLE, **kwargs):
         wx.Dialog.__init__(self, parent, id, style=style, title = title, **kwargs)
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
 
         self.iscatt_panel = MapDispIScattPanel(self, giface)
 

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -110,7 +110,7 @@
         self._setTitle()
         self.SetName("LayerManager")
         
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
         
         self._giface = LayerManagerGrassInterface(self)
         
@@ -1166,9 +1166,6 @@
         @return True on success
         @return False on error
         """
-        # dtd
-        # dtdFilename = os.path.join(globalvar.ETCWXDIR, "xml", "grass-gxw.dtd")
-        
         # parse workspace file
         try:
             gxwXml = ProcessWorkspaceFile(etree.parse(filename))

Modified: grass/trunk/gui/wxpython/lmgr/menudata.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/menudata.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/lmgr/menudata.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -19,7 +19,7 @@
 
 from core.menutree  import MenuTreeModelBuilder
 from core.toolboxes import getMenudataFile
-from core.globalvar import ETCWXDIR
+from core.globalvar import WXGUIDIR
 from core.gcmd import GError
 from core.utils import _
 
@@ -31,7 +31,7 @@
         else:
             expandAddons = True
 
-        fallback = os.path.join(ETCWXDIR, 'xml', 'menudata.xml')
+        fallback = os.path.join(WXGUIDIR, 'xml', 'menudata.xml')
         if not filename:
             filename = getMenudataFile(userRootFile='main_menu.xml',
                                        newFile='menudata.xml',
@@ -41,7 +41,7 @@
         except (ValueError, AttributeError, TypeError):
             GError(_("Unable to parse user toolboxes XML files. "
                      "Default main menu will be loaded."))
-            fallback = os.path.join(ETCWXDIR, 'xml', 'menudata.xml')
+            fallback = os.path.join(WXGUIDIR, 'xml', 'menudata.xml')
             MenuTreeModelBuilder.__init__(self, fallback)
 
 
@@ -52,7 +52,7 @@
         else:
             expandAddons = True
 
-        fallback = os.path.join(ETCWXDIR, 'xml', 'module_tree_menudata.xml')
+        fallback = os.path.join(WXGUIDIR, 'xml', 'module_tree_menudata.xml')
         if not filename:
             filename = getMenudataFile(userRootFile='module_tree.xml',
                                        newFile='module_tree_menudata.xml',

Modified: grass/trunk/gui/wxpython/location_wizard/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/location_wizard/dialogs.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/location_wizard/dialogs.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -18,16 +18,10 @@
 @author Martin Landa <landa.martin gmail.com>   
 """
 import os
-import sys
 
 import wx
 import wx.lib.scrolledpanel as scrolled
 
-if __name__ == '__main__':
-    wxbase = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if wxbase not in sys.path:
-        sys.path.append(wxbase)
-
 from core                 import globalvar
 from core.gcmd            import RunCommand
 from core.utils import _
@@ -43,7 +37,7 @@
         wx.Dialog.__init__(self, parent, id, title, size = size)
         panel = wx.Panel(self, id = wx.ID_ANY)
         
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
         
         self.parent = parent
         self.location = location
@@ -93,7 +87,7 @@
         #
         # image
         #
-        self.img = wx.Image(os.path.join(globalvar.ETCIMGDIR, "qgis_world.png"),
+        self.img = wx.Image(os.path.join(globalvar.IMGDIR, "qgis_world.png"),
                             wx.BITMAP_TYPE_PNG).ConvertToBitmap()
         
         #

Modified: grass/trunk/gui/wxpython/location_wizard/wizard.py
===================================================================
--- grass/trunk/gui/wxpython/location_wizard/wizard.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/location_wizard/wizard.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -1809,7 +1809,7 @@
         #
         # define wizard image
         #
-        imagePath = os.path.join(globalvar.ETCIMGDIR, "loc_wizard_qgis.png")
+        imagePath = os.path.join(globalvar.IMGDIR, "loc_wizard_qgis.png")
         wizbmp = wx.Image(imagePath, wx.BITMAP_TYPE_PNG)
         wizbmp = wizbmp.ConvertToBitmap()
         

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -30,11 +30,6 @@
 import wx
 import wx.aui
 
-if os.path.join(globalvar.ETCWXDIR, "icons") not in sys.path:
-    sys.path.append(os.path.join(globalvar.ETCWXDIR, "icons"))
-if os.path.join(globalvar.ETCDIR, "python") not in sys.path:
-    sys.path.append(os.path.join(globalvar.ETCDIR, "python"))
-
 from core               import globalvar
 from core.render        import Map
 from vdigit.toolbars    import VDigitToolbar

Modified: grass/trunk/gui/wxpython/mapdisp/main.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/main.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/mapdisp/main.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -29,11 +29,6 @@
 import os
 import sys
 
-if __name__ == "__main__":
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
 from core          import globalvar
 import wx
 

Modified: grass/trunk/gui/wxpython/mapdisp/test_mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/test_mapdisp.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/mapdisp/test_mapdisp.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -55,12 +55,6 @@
 
 import grass.script as grass
 
-# adding a path to wxGUI modules
-if __name__ == '__main__':
-    WXGUIBASE = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if WXGUIBASE not in sys.path:
-        sys.path.append(WXGUIBASE)
-
 from core.utils import _
 from core.settings import UserSettings
 from core.globalvar import CheckWxVersion

Modified: grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -46,17 +46,11 @@
 
 
 import os
-import sys
 
 import  wx
 
 import grass.script as grass
 
-if __name__ == '__main__':
-    wxbase = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if wxbase not in sys.path:
-        sys.path.append(wxbase)
-
 from core.settings import UserSettings
 from core.globalvar import CheckWxVersion
 from core.giface import StandaloneGrassInterface

Modified: grass/trunk/gui/wxpython/modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/modules/colorrules.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/modules/colorrules.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -327,7 +327,7 @@
         
         wx.Frame.__init__(self, parent, id, title, style = style, **kwargs)
         
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
         
         self.panel = wx.Panel(parent = self, id = wx.ID_ANY)
         

Modified: grass/trunk/gui/wxpython/modules/extensions.py
===================================================================
--- grass/trunk/gui/wxpython/modules/extensions.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/modules/extensions.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -42,7 +42,7 @@
         self.options = dict() # list of options
 
         wx.Frame.__init__(self, parent = parent, id = id, title = title, **kwargs)
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
         
         self.panel = wx.Panel(parent = self, id = wx.ID_ANY)
 
@@ -354,7 +354,7 @@
         self.parent = parent
         
         wx.Frame.__init__(self, parent = parent, id = id, title = title, **kwargs)
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
         
         self.panel = wx.Panel(parent = self, id = wx.ID_ANY)
 

Modified: grass/trunk/gui/wxpython/modules/histogram.py
===================================================================
--- grass/trunk/gui/wxpython/modules/histogram.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/modules/histogram.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -270,7 +270,7 @@
                  size = wx.Size(500, 350),
                  style = wx.DEFAULT_FRAME_STYLE, **kwargs):
         wx.Frame.__init__(self, parent, id, title, size = size, style = style, **kwargs)
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
 
         self._giface = giface
         self.Map   = Map()         # instance of render.Map to be associated with display

Modified: grass/trunk/gui/wxpython/modules/mcalc_builder.py
===================================================================
--- grass/trunk/gui/wxpython/modules/mcalc_builder.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/modules/mcalc_builder.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -17,17 +17,11 @@
 """
 
 import os
-import sys
 import re
 
 import wx
 import grass.script as grass
 
-if __name__ == "__main__":
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
 from core             import globalvar
 from core.gcmd        import GError, RunCommand
 from core.giface      import StandaloneGrassInterface
@@ -61,7 +55,7 @@
             title = _('GRASS GIS 3D Raster Map Calculator')
             
         wx.Frame.__init__(self, parent, id = id, title = title, **kwargs)
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
         
         self.panel = wx.Panel(parent = self, id = wx.ID_ANY)
         self.CreateStatusBar()

Modified: grass/trunk/gui/wxpython/modules/vclean.py
===================================================================
--- grass/trunk/gui/wxpython/modules/vclean.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/modules/vclean.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -15,16 +15,10 @@
 """
 
 import os
-import sys
 
 import wx
 import wx.lib.scrolledpanel as scrolled
 
-if __name__ == '__main__':
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
 from core.gcmd        import RunCommand, GError
 from core             import globalvar
 from core.utils import _
@@ -55,7 +49,7 @@
         self.CreateStatusBar()
 
         # icon
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
 
         self.panel = wx.Panel(parent=self, id=wx.ID_ANY)
 

Modified: grass/trunk/gui/wxpython/nviz/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/preferences.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/nviz/preferences.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -33,7 +33,7 @@
                  settings = UserSettings):
         PreferencesBaseDialog.__init__(self, parent = parent, title = title, giface = giface,
                                        settings = settings)
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass_nviz.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass_nviz.ico'), wx.BITMAP_TYPE_ICO))
 
         self.toolWin = self.parent.nviz
         

Modified: grass/trunk/gui/wxpython/psmap/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/dialogs.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/psmap/dialogs.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -3529,7 +3529,7 @@
         sbTypeText = wx.StaticText(panel, id = wx.ID_ANY, label = _("Type:"))
         self.sbCombo = wx.combo.BitmapComboBox(panel, style = wx.CB_READONLY)
         # only temporary, images must be moved away
-        imagePath = os.path.join(globalvar.ETCIMGDIR, "scalebar-fancy.png"), os.path.join(globalvar.ETCIMGDIR, "scalebar-simple.png") 
+        imagePath = os.path.join(globalvar.IMGDIR, "scalebar-fancy.png"), os.path.join(globalvar.IMGDIR, "scalebar-simple.png") 
         for item, path in zip(['fancy', 'simple'], imagePath):
             if not os.path.exists(path):
                 bitmap = wx.EmptyBitmap(0,0)

Modified: grass/trunk/gui/wxpython/psmap/frame.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/frame.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/psmap/frame.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -60,7 +60,7 @@
         self.parent = parent
 
         wx.Frame.__init__(self, parent = parent, id = id, title = title, name = "PsMap", **kwargs)
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
         #menubar
         self.menubar = Menu(parent = self, model = PsMapMenuData().GetModel(separators=True))
         self.SetMenuBar(self.menubar)

Modified: grass/trunk/gui/wxpython/psmap/g.gui.psmap.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/g.gui.psmap.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/psmap/g.gui.psmap.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -33,16 +33,11 @@
 #%end
 
 import os
-import sys
 
 import  wx
 
 import grass.script as grass
 
-wxbase = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-if wxbase not in sys.path:
-    sys.path.append(wxbase)
-
 from core.globalvar import CheckWxVersion
 from core.utils import _, GuiModuleMain
 from psmap.frame import PsMapFrame

Modified: grass/trunk/gui/wxpython/psmap/menudata.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/menudata.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/psmap/menudata.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -26,6 +26,6 @@
         @param path path to XML to be read (None for menudata_psmap.xml)
         """
         if not path:
-            path = os.path.join(globalvar.ETCWXDIR, 'xml', 'menudata_psmap.xml')
+            path = os.path.join(globalvar.WXGUIDIR, 'xml', 'menudata_psmap.xml')
         
         MenuTreeModelBuilder.__init__(self, path)

Modified: grass/trunk/gui/wxpython/rlisetup/frame.py
===================================================================
--- grass/trunk/gui/wxpython/rlisetup/frame.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/rlisetup/frame.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -28,7 +28,7 @@
         self.pathfile = os.path.join(self.rlipath, conf)
         wx.Frame.__init__(self, parent=parent, id=id, title=title,
                           **kwargs)
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'),
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'),
                              wx.BITMAP_TYPE_ICO))
         self.panel = wx.Panel(parent=self, id=wx.ID_ANY)
         self.confilesBox = wx.StaticBox(parent=self.panel, id=wx.ID_ANY,
@@ -114,7 +114,7 @@
         #init of frame
         wx.Frame.__init__(self, parent=parent, id=id, title=title,
                           **kwargs)
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'),
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'),
                              wx.BITMAP_TYPE_ICO))
         self.panel = wx.Panel(parent=self, id=wx.ID_ANY)
         #box for select configuration file

Modified: grass/trunk/gui/wxpython/rlisetup/g.gui.rlisetup.py
===================================================================
--- grass/trunk/gui/wxpython/rlisetup/g.gui.rlisetup.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/rlisetup/g.gui.rlisetup.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -27,15 +27,10 @@
 #%end
 
 import os
-import sys
 
 import wx
 import grass.script as grass
 
-wxbase = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-if wxbase not in sys.path:
-    sys.path.append(wxbase)
-
 from core.giface import StandaloneGrassInterface
 from core.globalvar import CheckWxVersion
 from core.utils import _, GuiModuleMain

Modified: grass/trunk/gui/wxpython/rlisetup/sampling_frame.py
===================================================================
--- grass/trunk/gui/wxpython/rlisetup/sampling_frame.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/rlisetup/sampling_frame.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -18,7 +18,7 @@
 """
 
 import os
-import sys
+
 import wx
 import wx.aui
 
@@ -36,14 +36,6 @@
 except ImportError:
     pass
 
-#end new import
-
-# adding a path to wxGUI modules
-if __name__ == '__main__':
-    WXGUIBASE = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if WXGUIBASE not in sys.path:
-        sys.path.append(WXGUIBASE)
-
 from core.utils import _
 from core.giface import StandaloneGrassInterface
 from mapwin.base import MapWindowProperties

Modified: grass/trunk/gui/wxpython/rlisetup/wizard.py
===================================================================
--- grass/trunk/gui/wxpython/rlisetup/wizard.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/rlisetup/wizard.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -20,13 +20,8 @@
 @author Luca Delucchi <lucadeluge gmail com>
 """
 
-import sys
 import os
 
-wxbase = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-if wxbase not in sys.path:
-    sys.path.append(wxbase)
-
 import wx
 import wx.wizard as wiz
 import wx.lib.scrolledpanel as scrolled

Modified: grass/trunk/gui/wxpython/scripts/vkrige.py
===================================================================
--- grass/trunk/gui/wxpython/scripts/vkrige.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/scripts/vkrige.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -23,18 +23,14 @@
 import thread
 from core.utils import _
 
-### dependencies to be checked once, as they are quite time-consuming. cfr. grass.parser.
-# GRASS binding
+### dependencies to be checked once, as they are quite
+### time-consuming. cfr. grass.parser.
+
 try:
     import grass.script as grass
 except ImportError:
     sys.exit(_("No GRASS-python library found."))
-### wxGUI imports
 
-GUIModulesPath = os.path.join(os.getenv("GISBASE"), "etc", "gui", "wxpython")
-if GUIModulesPath not in sys.path:
-    sys.path.append(GUIModulesPath)
-
 from core import globalvar
 from gui_core import gselect
 from core import gconsole
@@ -278,7 +274,7 @@
         wx.Frame.__init__(self, parent, *args, **kwargs)
         # setting properties and all widgettery
         self.SetTitle(_("Kriging Module"))
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass_dialog.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass_dialog.ico'), wx.BITMAP_TYPE_ICO))
         self.log = Log(self) 
         self.CreateStatusBar()
         self.log.message(_("Ready."))

Modified: grass/trunk/gui/wxpython/timeline/frame.py
===================================================================
--- grass/trunk/gui/wxpython/timeline/frame.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/timeline/frame.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -16,13 +16,13 @@
 @author Anna Kratochvilova <kratochanna gmail.com>
 """
 import os
-import sys
-import wx
 import signal
 from math import ceil
 from itertools import cycle
 import numpy as np
 
+import wx
+
 try:
     import matplotlib
     # The recommended way to use wx with mpl is with the WXAgg
@@ -37,9 +37,6 @@
 except ImportError:
     raise ImportError(_('The Timeline Tool needs "Matplotlib" package to be installed.'))
 
-if __name__ == '__main__':
-    sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
-
 import grass.script as grass
 from core.utils import _
 

Modified: grass/trunk/gui/wxpython/timeline/g.gui.timeline.py
===================================================================
--- grass/trunk/gui/wxpython/timeline/g.gui.timeline.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/timeline/g.gui.timeline.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -35,13 +35,9 @@
 
 
 import os
-import sys
+
 import  wx
 
-gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-if gui_wx_path not in sys.path:
-    sys.path.append(gui_wx_path)
-
 import grass.script as grass
 from core.utils import _, GuiModuleMain
 

Modified: grass/trunk/gui/wxpython/tools/update_menudata.py
===================================================================
--- grass/trunk/gui/wxpython/tools/update_menudata.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/tools/update_menudata.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -30,8 +30,6 @@
 from grass.script import core as grass
 from grass.script import task as gtask
 
-if __name__ == "__main__":
-    sys.path.append(os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython'))
 from lmgr.menudata  import LayerManagerMenuData
 from core.globalvar import grassCmd
 

Modified: grass/trunk/gui/wxpython/vdigit/g.gui.vdigit.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/g.gui.vdigit.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/vdigit/g.gui.vdigit.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -35,17 +35,11 @@
 #%end
 
 import os
-import sys
 
 import grass.script as grass
 
 import wx
 
-if __name__ == '__main__':
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
 from core.globalvar import CheckWxVersion
 from core.utils import _, GuiModuleMain
 from mapdisp.frame import MapFrame

Modified: grass/trunk/gui/wxpython/vdigit/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/toolbars.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/vdigit/toolbars.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -42,7 +42,8 @@
         BaseToolbar.__init__(self, parent, toolSwitcher)
         self.digit         = None
         self._giface       = giface
-        
+        self.fType         = None     # feature type for simple features editing
+
         self.editingStarted = Signal("VDigitToolbar.editingStarted")
         self.editingStopped = Signal("VDigitToolbar.editingStopped")
         self.editingBgMap = Signal("VDigitToolbar.editingBgMap")

Modified: grass/trunk/gui/wxpython/vnet/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/vnet/dialogs.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/vnet/dialogs.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -69,7 +69,7 @@
         """!Dialog for vector network analysis"""
 
         wx.Dialog.__init__(self, parent, id, style=style, title = title, **kwargs)
-        self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(globalvar.ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
 
         self.parent  = parent
         self.mapWin = giface.GetMapWindow()
@@ -341,7 +341,7 @@
                 self.inputData[dataSel[0]] = dataSel[2](parent = selPanels[dataSel[0]],
                                                         size = (-1, -1), 
                                                         type = 'vector')
-                icon = wx.Image(os.path.join(globalvar.ETCICONDIR, "grass", "layer-vector-add.png"))
+                icon = wx.Image(os.path.join(globalvar.ICONDIR, "grass", "layer-vector-add.png"))
                 icon.Rescale(18, 18)
                 icon = wx.BitmapFromImage(icon) 
                 self.addToTreeBtn = wx.BitmapButton(parent = selPanels[dataSel[0]], 

Modified: grass/trunk/gui/wxpython/vnet/widgets.py
===================================================================
--- grass/trunk/gui/wxpython/vnet/widgets.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/vnet/widgets.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -410,7 +410,7 @@
 
     def getSmallUpArrowImage(self):
         """!Get arrow up symbol for indication of sorting"""
-        stream = open(os.path.join(globalvar.ETCIMGDIR, 'small_up_arrow.png'), 'rb')
+        stream = open(os.path.join(globalvar.IMGDIR, 'small_up_arrow.png'), 'rb')
         try:
             img = wx.ImageFromStream(stream)
         finally:
@@ -419,7 +419,7 @@
 
     def getSmallDnArrowImage(self):
         """!Get arrow down symbol for indication of sorting"""
-        stream = open(os.path.join(globalvar.ETCIMGDIR, 'small_down_arrow.png'), 'rb')
+        stream = open(os.path.join(globalvar.IMGDIR, 'small_down_arrow.png'), 'rb')
         try:
             img = wx.ImageFromStream(stream)
         finally:

Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/wxgui.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -22,11 +22,6 @@
 import sys
 import getopt
 
-if __name__ == "__main__":
-    gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
-    if gui_wx_path not in sys.path:
-        sys.path.append(gui_wx_path)
-
 from core import globalvar
 from core.utils import _
 
@@ -60,7 +55,7 @@
             wx.InitAllImageHandlers()
         
         # create splash screen
-        introImagePath = os.path.join(globalvar.ETCIMGDIR, "silesia_splash.png")
+        introImagePath = os.path.join(globalvar.IMGDIR, "silesia_splash.png")
         introImage     = wx.Image(introImagePath, wx.BITMAP_TYPE_PNG)
         introBmp       = introImage.ConvertToBitmap()
         if SC and sys.platform != 'darwin':

Modified: grass/trunk/gui/wxpython/wxplot/base.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/base.py	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/wxpython/wxplot/base.py	2014-05-01 16:12:10 UTC (rev 60008)
@@ -24,7 +24,7 @@
 except ImportError, e:
     print >> sys.stderr, e
 
-from core.globalvar    import ETCICONDIR
+from core.globalvar    import ICONDIR
 from core.settings     import UserSettings
 from wxplot.dialogs    import TextDialog, OptDialog
 from core.render       import Map
@@ -73,7 +73,7 @@
         #
         # Icon
         #
-        self.SetIcon(wx.Icon(os.path.join(ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
+        self.SetIcon(wx.Icon(os.path.join(ICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
                 
         #
         # Add statusbar

Modified: grass/trunk/gui/xml/Makefile
===================================================================
--- grass/trunk/gui/xml/Makefile	2014-05-01 16:10:07 UTC (rev 60007)
+++ grass/trunk/gui/xml/Makefile	2014-05-01 16:12:10 UTC (rev 60008)
@@ -2,7 +2,10 @@
 
 include $(MODULE_TOPDIR)/include/Make/Dir.make
 
-default: $(ETC)/grass-interface.dtd 
+default: $(GUIDIR)/grass-interface.dtd 
 
-$/$(ETC)/grass-interface.dtd : grass-interface.dtd 
-	$(INSTALL_DATA) grass-interface.dtd $(ETC)/grass-interface.dtd 
+$(GUIDIR)/grass-interface.dtd : grass-interface.dtd | $(GUIDIR) 
+	$(INSTALL_DATA) $< $@
+
+$(GUIDIR): %:
+	$(MKDIR) $@



More information about the grass-commit mailing list