[GRASS-SVN] r49358 - in grass/trunk/gui/wxpython: gmodeler gui_core lmgr modules nviz psmap vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Nov 25 15:02:34 EST 2011


Author: martinl
Date: 2011-11-25 12:02:33 -0800 (Fri, 25 Nov 2011)
New Revision: 49358

Removed:
   grass/trunk/gui/wxpython/gui_core/task.py
Modified:
   grass/trunk/gui/wxpython/gmodeler/model_file.py
   grass/trunk/gui/wxpython/gui_core/dialogs.py
   grass/trunk/gui/wxpython/gui_core/forms.py
   grass/trunk/gui/wxpython/gui_core/goutput.py
   grass/trunk/gui/wxpython/gui_core/menu.py
   grass/trunk/gui/wxpython/gui_core/prompt.py
   grass/trunk/gui/wxpython/lmgr/layertree.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/nviz/main.py
   grass/trunk/gui/wxpython/nviz/tools.py
   grass/trunk/gui/wxpython/psmap/frame.py
   grass/trunk/gui/wxpython/vdigit/wxdigit.py
Log:
wxGUI major code reorganization (cont'ed)


Modified: grass/trunk/gui/wxpython/gmodeler/model_file.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/model_file.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/gmodeler/model_file.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -19,7 +19,7 @@
 import time
 import re
 
-from gui_core.task  import GUI
+from gui_core.forms import GUI
 from core.gcmd      import GWarning, EncodeString
 
 class ProcessModelFile:

Modified: grass/trunk/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/dialogs.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/gui_core/dialogs.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -48,7 +48,7 @@
 from core             import globalvar
 from core.gcmd        import GError, RunCommand, GMessage
 from gui_core.gselect import ElementSelect, LocationSelect, MapsetSelect, Select, OgrTypeSelect, GdalSelect
-from gui_core.task    import GUI
+from gui_core.forms   import GUI
 from core.utils       import GetListOfMapsets, GetLayerNameFromCmd, GetValidLayerName
 from core.settings    import UserSettings
 from core.debug       import Debug

Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/gui_core/forms.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -5,12 +5,9 @@
 description.
 
 Classes:
- - helpPanel
- - mainFrame
- - cmdPanel
+ - TaskFrame
+ - CmdPanel
  - GrassGUIApp
- - GUI
- - FloatValidator
 
 This program is just a coarse approach to automatically build a GUI
 from a xml-based GRASS user interface description.
@@ -53,6 +50,16 @@
 from threading import Thread
 import Queue
 
+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."
+    gisbase = os.path.join(os.path.dirname(sys.argv[0]), os.path.pardir)
+    wxbase = gisbase
+else:
+    wxbase = os.path.join(gisbase, 'etc', 'gui', 'wxpython')
+
+sys.path.append(wxbase)
+
 from core import globalvar
 import wx
 try:
@@ -64,16 +71,6 @@
 import wx.lib.scrolledpanel    as scrolled
 from wx.lib.newevent import NewEvent
 
-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."
-    gisbase = os.path.join(os.path.dirname(sys.argv[0]), os.path.pardir)
-    wxbase = gisbase
-else:
-    wxbase = os.path.join(globalvar.ETCWXDIR)
-
-sys.path.append(wxbase)
-
 from grass.script import core as grass
 from grass.script import task as gtask
 
@@ -82,10 +79,8 @@
 from gui_core         import gselect
 from core             import gcmd
 from core             import utils
-from gui_core.goutput import GMConsole
 from core.settings    import UserSettings
-from gui_core.widgets import FloatValidator
-from gui_core.task    import GUI
+from gui_core.widgets import FloatValidator, GNotebook
 
 wxUpdateDialog, EVT_DIALOG_UPDATE = NewEvent()
 
@@ -361,7 +356,7 @@
                 event = wxUpdateDialog(data = self.request.data)
                 wx.PostEvent(self.parent, event)
 
-class mainFrame(wx.Frame):
+class TaskFrame(wx.Frame):
     """!This is the Frame containing the dialog for options input.
 
     The dialog is organized in a notebook according to the guisections
@@ -375,8 +370,9 @@
     The command is checked and sent to the clipboard when clicking
     'Copy'.
     """
-    def __init__(self, parent, ID, task_description,
-                 get_dcmd = None, layer = None):
+    def __init__(self, parent, task_description, id = wx.ID_ANY,
+                 get_dcmd = None, layer = None,
+                 style = wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL, **kwargs):
         self.get_dcmd = get_dcmd
         self.layer    = layer
         self.task     = task_description
@@ -397,9 +393,8 @@
         except ValueError:
             pass
         
-        wx.Frame.__init__(self, parent = parent, id = ID, title = title,
-                          pos = wx.DefaultPosition, style = wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL,
-                          name = "MainFrame")
+        wx.Frame.__init__(self, parent = parent, id = id, title = title,
+                          name = "MainFrame", **kwargs)
         
         self.locale = wx.Locale(language = wx.LANGUAGE_DEFAULT)
         
@@ -446,8 +441,8 @@
         self.Layout()
         
         # notebooks
-        self.notebookpanel = cmdPanel(parent = self.panel, task = self.task,
-                                      mainFrame = self)
+        self.notebookpanel = CmdPanel(parent = self.panel, task = self.task,
+                                      frame = self)
         self.goutput = self.notebookpanel.goutput
         self.notebookpanel.OnUpdateValues = self.updateValuesHook
         guisizer.Add(item = self.notebookpanel, proportion = 1, flag = wx.EXPAND)
@@ -760,13 +755,13 @@
         return self.notebookpanel.createCmd(ignoreErrors = ignoreErrors,
                                             ignoreRequired = ignoreRequired)
 
-class cmdPanel(wx.Panel):
+class CmdPanel(wx.Panel):
     """!A panel containing a notebook dividing in tabs the different
     guisections of the GRASS cmd.
     """
-    def __init__(self, parent, task, id = wx.ID_ANY, mainFrame = None, *args, **kwargs):
-        if mainFrame:
-            self.parent = mainFrame
+    def __init__(self, parent, task, id = wx.ID_ANY, frame = None, *args, **kwargs):
+        if frame:
+            self.parent = frame
         else:
             self.parent = parent
         self.task = task
@@ -822,6 +817,7 @@
         # are we running from command line?
         ### add 'command output' tab regardless standalone dialog
         if self.parent.GetName() ==  "MainFrame" and self.parent.get_dcmd is None:
+            from gui_core.goutput import GMConsole
             self.goutput = GMConsole(parent = self, margin = False)
             self.outpage = self.notebook.AddPage(page = self.goutput, text = _("Command output"), name = 'output')
         else:
@@ -1911,6 +1907,179 @@
             
         event.Skip()
         
+class GUI:
+    def __init__(self, parent = None, show = True, modal = False,
+                 centreOnParent = False, checkError = False):
+        """!Parses GRASS commands when module is imported and used from
+        Layer Manager.
+        """
+        self.parent = parent
+        self.show   = show
+        self.modal  = modal
+        self.centreOnParent = centreOnParent
+        self.checkError     = checkError
+        
+        self.grass_task = None
+        self.cmd = list()
+        
+        global _blackList
+        if self.parent:
+            _blackList['enabled'] = True
+        else:
+            _blackList['enabled'] = False
+        
+    def GetCmd(self):
+        """!Get validated command"""
+        return self.cmd
+    
+    def ParseCommand(self, cmd, gmpath = None, completed = None):
+        """!Parse command
+        
+        Note: cmd is given as list
+        
+        If command is given with options, return validated cmd list:
+         - add key name for first parameter if not given
+         - change mapname to mapname at mapset
+        """
+        start = time.time()
+        dcmd_params = {}
+        if completed == None:
+            get_dcmd = None
+            layer = None
+            dcmd_params = None
+        else:
+            get_dcmd = completed[0]
+            layer = completed[1]
+            if completed[2]:
+                dcmd_params.update(completed[2])
+        
+        # parse the interface decription
+        try:
+            global _blackList
+            self.grass_task = gtask.parse_interface(cmd[0],
+                                                    blackList = _blackList)
+        except ValueError, e: #grass.ScriptError, e:
+            GError(e.value)
+            return
+        
+        # if layer parameters previously set, re-insert them into dialog
+        if completed is not None:
+            if 'params' in dcmd_params:
+                self.grass_task.params = dcmd_params['params']
+            if 'flags' in dcmd_params:
+                self.grass_task.flags = dcmd_params['flags']
+        
+        err = list()
+        # update parameters if needed && validate command
+        if len(cmd) > 1:
+            i = 0
+            cmd_validated = [cmd[0]]
+            for option in cmd[1:]:
+                if option[0] ==  '-': # flag
+                    if option[1] ==  '-':
+                        self.grass_task.set_flag(option[2:], True)
+                    else:
+                        self.grass_task.set_flag(option[1], True)
+                    cmd_validated.append(option)
+                else: # parameter
+                    try:
+                        key, value = option.split('=', 1)
+                    except:
+                        if self.grass_task.firstParam:
+                            if i == 0: # add key name of first parameter if not given
+                                key = self.grass_task.firstParam
+                                value = option
+                            else:
+                                raise GException, _("Unable to parse command '%s'") % ' '.join(cmd)
+                        else:
+                            continue
+                    
+                    element = self.grass_task.get_param(key, raiseError = False)
+                    if not element:
+                        err.append(_("%(cmd)s: parameter '%(key)s' not available") % \
+                                       { 'cmd' : cmd[0],
+                                         'key' : key })
+                        continue
+                    element = element['element']
+                    
+                    if element in ['cell', 'vector']:
+                        # mapname -> mapname at mapset
+                        try:
+                            name, mapset = value.split('@')
+                        except ValueError:
+                            mapset = grass.find_file(value, element)['mapset']
+                            curr_mapset = grass.gisenv()['MAPSET']
+                            if mapset and mapset !=  curr_mapset:
+                                value = value + '@' + mapset
+                    
+                    self.grass_task.set_param(key, value)
+                    cmd_validated.append(key + '=' + value)
+                    i += 1
+            
+            # update original command list
+            cmd = cmd_validated
+        
+        if self.show is not None:
+            self.mf = TaskFrame(parent = self.parent,
+                                task_description = self.grass_task,
+                                get_dcmd = get_dcmd, layer = layer)
+        else:
+            self.mf = None
+        
+        if get_dcmd is not None:
+            # update only propwin reference
+            get_dcmd(dcmd = None, layer = layer, params = None,
+                     propwin = self.mf)
+        
+        if self.show is not None:
+            self.mf.notebookpanel.OnUpdateSelection(None)
+            if self.show is True:
+                if self.parent and self.centreOnParent:
+                    self.mf.CentreOnParent()
+                else:
+                    self.mf.CenterOnScreen()
+                self.mf.Show(self.show)
+                self.mf.MakeModal(self.modal)
+            else:
+                self.mf.OnApply(None)
+        
+        self.cmd = cmd
+        
+        if self.checkError:
+            return self.grass_task, err
+        else:
+            return self.grass_task
+    
+    def GetCommandInputMapParamKey(self, cmd):
+        """!Get parameter key for input raster/vector map
+        
+        @param cmd module name
+        
+        @return parameter key
+        @return None on failure
+        """
+        # parse the interface decription
+        if not self.grass_task:
+            enc = locale.getdefaultlocale()[1]
+            if enc and enc.lower() == "cp932":
+                p = re.compile('encoding="' + enc + '"', re.IGNORECASE)
+                tree = etree.fromstring(p.sub('encoding="utf-8"',
+                                              gtask.get_interface_description(cmd).decode(enc).encode('utf-8')))
+            else:
+                tree = etree.fromstring(gtask.get_interface_description(cmd))
+            self.grass_task = gtask.processTask(tree).get_task()
+            
+            for p in self.grass_task.params:
+                if p.get('name', '') in ('input', 'map'):
+                    age = p.get('age', '')
+                    prompt = p.get('prompt', '')
+                    element = p.get('element', '') 
+                    if age ==  'old' and \
+                            element in ('cell', 'grid3', 'vector') and \
+                            prompt in ('raster', '3d-raster', 'vector'):
+                        return p.get('name', None)
+        return None
+
 class GrassGUIApp(wx.App):
     """!Stand-alone GRASS command GUI
     """
@@ -1924,7 +2093,7 @@
             gcmd.GError(msg + '\n\nTry to set up GRASS_ADDON_PATH variable.')
             return True
         
-        self.mf = mainFrame(parent = None, ID = wx.ID_ANY, task_description = self.grass_task)
+        self.mf = TaskFrame(parent = None, task_description = self.grass_task)
         self.mf.CentreOnScreen()
         self.mf.Show(True)
         self.SetTopWindow(self.mf)
@@ -1941,7 +2110,7 @@
     if sys.argv[1] !=  'test':
         q = wx.LogNull()
         cmd = utils.split(sys.argv[1])
-        task = gtask.grassTask(cmd[0], blackList = _blackList)
+        task = gtask.grassTask(cmd[0])
         task.set_options(cmd[1:])
         app = GrassGUIApp(task)
         app.MainLoop()

Modified: grass/trunk/gui/wxpython/gui_core/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/goutput.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/gui_core/goutput.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -39,7 +39,7 @@
 from core            import globalvar
 from core            import utils
 from core.gcmd       import CommandThread, GMessage, GError, GException, EncodeString
-from gui_core.task   import GUI
+from gui_core.forms  import GUI
 from gui_core.prompt import GPromptSTC
 from core.debug      import Debug
 from core.settings   import UserSettings, Settings
@@ -1145,7 +1145,7 @@
                 elif 'GRASS_DB_ENCODING' in os.environ:
                     txt = unicode(txt, os.environ['GRASS_DB_ENCODING'])
                 else:
-                    txt = utils.EncodeString(txt)
+                    txt = EncodeString(txt)
                 
                 self.AddText(txt)
         

Modified: grass/trunk/gui/wxpython/gui_core/menu.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/menu.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/gui_core/menu.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -85,7 +85,7 @@
             try: 
                 cmd = utils.split(str(gcmd)) 
             except UnicodeError: 
-                cmd = utils.split(utils.EncodeString((gcmd))) 
+                cmd = utils.split(EncodeString((gcmd))) 
             if cmd and cmd[0] not in globalvar.grassCmd['all']: 
                 menuItem.Enable(False)
         

Modified: grass/trunk/gui/wxpython/gui_core/prompt.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/prompt.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/gui_core/prompt.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -1094,8 +1094,8 @@
             try:
                 cmd = utils.split(str(line))
             except UnicodeError:
-                cmd = utils.split(utils.EncodeString((line)))
-            cmd = map(utils.DecodeString, cmd)
+                cmd = utils.split(EncodeString((line)))
+            cmd = map(DecodeString, cmd)
             
             #  send the command list to the processor 
             if cmd[0] in ('r.mapcalc', 'r3.mapcalc') and len(cmd) == 1:

Deleted: grass/trunk/gui/wxpython/gui_core/task.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/task.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/gui_core/task.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -1,210 +0,0 @@
-"""
- at package gui_core.task
-
- at brief Construct simple wxPython GUI from a GRASS command interface
-description.
-
-Classes:
- - GUI
-
-(C) 2000-2011 by the GRASS Development Team
-This program is free software under the GPL(>=v2) Read the file
-COPYING coming with GRASS for details.
-
- at author Jan-Oliver Wagner <jan at intevation.de>
- at author Bernhard Reiter <bernhard at intevation.de>
- at author Michael Barton, Arizona State University
- at author Daniel Calvelo <dca.gis at gmail.com>
- at author Martin Landa <landa.martin at gmail.com>
- at author Luca Delucchi <lucadeluge at gmail.com>
-"""
-
-import sys
-import re
-import os
-import time
-import locale
-try:
-    import xml.etree.ElementTree as etree
-except ImportError:
-    import elementtree.ElementTree as etree # Python <= 2.4
-
-from core import globalvar
-import wx
-
-from grass.script import core as grass
-from grass.script import task as gtask
-from core.gcmd    import GException, GError
-
-class GUI:
-    def __init__(self, parent = None, show = True, modal = False,
-                 centreOnParent = False, checkError = False):
-        """!Parses GRASS commands when module is imported and used from
-        Layer Manager.
-        """
-        self.parent = parent
-        self.show   = show
-        self.modal  = modal
-        self.centreOnParent = centreOnParent
-        self.checkError     = checkError
-        
-        self.grass_task = None
-        self.cmd = list()
-        
-        global _blackList
-        if self.parent:
-            _blackList['enabled'] = True
-        else:
-            _blackList['enabled'] = False
-        
-    def GetCmd(self):
-        """!Get validated command"""
-        return self.cmd
-    
-    def ParseCommand(self, cmd, gmpath = None, completed = None):
-        """!Parse command
-        
-        Note: cmd is given as list
-        
-        If command is given with options, return validated cmd list:
-         - add key name for first parameter if not given
-         - change mapname to mapname at mapset
-        """
-        start = time.time()
-        dcmd_params = {}
-        if completed == None:
-            get_dcmd = None
-            layer = None
-            dcmd_params = None
-        else:
-            get_dcmd = completed[0]
-            layer = completed[1]
-            if completed[2]:
-                dcmd_params.update(completed[2])
-        
-        # parse the interface decription
-        try:
-            global _blackList
-            self.grass_task = gtask.parse_interface(cmd[0],
-                                                    blackList = _blackList)
-        except ValueError, e: #grass.ScriptError, e:
-            GError(e.value)
-            return
-        
-        # if layer parameters previously set, re-insert them into dialog
-        if completed is not None:
-            if 'params' in dcmd_params:
-                self.grass_task.params = dcmd_params['params']
-            if 'flags' in dcmd_params:
-                self.grass_task.flags = dcmd_params['flags']
-        
-        err = list()
-        # update parameters if needed && validate command
-        if len(cmd) > 1:
-            i = 0
-            cmd_validated = [cmd[0]]
-            for option in cmd[1:]:
-                if option[0] ==  '-': # flag
-                    if option[1] ==  '-':
-                        self.grass_task.set_flag(option[2:], True)
-                    else:
-                        self.grass_task.set_flag(option[1], True)
-                    cmd_validated.append(option)
-                else: # parameter
-                    try:
-                        key, value = option.split('=', 1)
-                    except:
-                        if self.grass_task.firstParam:
-                            if i == 0: # add key name of first parameter if not given
-                                key = self.grass_task.firstParam
-                                value = option
-                            else:
-                                raise GException, _("Unable to parse command '%s'") % ' '.join(cmd)
-                        else:
-                            continue
-                    
-                    element = self.grass_task.get_param(key, raiseError = False)
-                    if not element:
-                        err.append(_("%(cmd)s: parameter '%(key)s' not available") % \
-                                       { 'cmd' : cmd[0],
-                                         'key' : key })
-                        continue
-                    element = element['element']
-                    
-                    if element in ['cell', 'vector']:
-                        # mapname -> mapname at mapset
-                        try:
-                            name, mapset = value.split('@')
-                        except ValueError:
-                            mapset = grass.find_file(value, element)['mapset']
-                            curr_mapset = grass.gisenv()['MAPSET']
-                            if mapset and mapset !=  curr_mapset:
-                                value = value + '@' + mapset
-                    
-                    self.grass_task.set_param(key, value)
-                    cmd_validated.append(key + '=' + value)
-                    i += 1
-            
-            # update original command list
-            cmd = cmd_validated
-        
-        if self.show is not None:
-            self.mf = mainFrame(parent = self.parent, ID = wx.ID_ANY,
-                                task_description = self.grass_task,
-                                get_dcmd = get_dcmd, layer = layer)
-        else:
-            self.mf = None
-        
-        if get_dcmd is not None:
-            # update only propwin reference
-            get_dcmd(dcmd = None, layer = layer, params = None,
-                     propwin = self.mf)
-        
-        if self.show is not None:
-            self.mf.notebookpanel.OnUpdateSelection(None)
-            if self.show is True:
-                if self.parent and self.centreOnParent:
-                    self.mf.CentreOnParent()
-                else:
-                    self.mf.CenterOnScreen()
-                self.mf.Show(self.show)
-                self.mf.MakeModal(self.modal)
-            else:
-                self.mf.OnApply(None)
-        
-        self.cmd = cmd
-        
-        if self.checkError:
-            return self.grass_task, err
-        else:
-            return self.grass_task
-    
-    def GetCommandInputMapParamKey(self, cmd):
-        """!Get parameter key for input raster/vector map
-        
-        @param cmd module name
-        
-        @return parameter key
-        @return None on failure
-        """
-        # parse the interface decription
-        if not self.grass_task:
-            enc = locale.getdefaultlocale()[1]
-            if enc and enc.lower() == "cp932":
-                p = re.compile('encoding="' + enc + '"', re.IGNORECASE)
-                tree = etree.fromstring(p.sub('encoding="utf-8"',
-                                              gtask.get_interface_description(cmd).decode(enc).encode('utf-8')))
-            else:
-                tree = etree.fromstring(gtask.get_interface_description(cmd))
-            self.grass_task = gtask.processTask(tree).get_task()
-            
-            for p in self.grass_task.params:
-                if p.get('name', '') in ('input', 'map'):
-                    age = p.get('age', '')
-                    prompt = p.get('prompt', '')
-                    element = p.get('element', '') 
-                    if age ==  'old' and \
-                            element in ('cell', 'grid3', 'vector') and \
-                            prompt in ('raster', '3d-raster', 'vector'):
-                        return p.get('name', None)
-        return None

Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -30,7 +30,7 @@
 
 from core                import globalvar
 from gui_core.dialogs    import SqlQueryFrame, SetOpacityDialog
-from gui_core.task       import GUI
+from gui_core.forms      import GUI
 from mapdisp.frame       import MapFrame
 from core.render         import Map
 from modules.histogram   import HistogramFrame

Modified: grass/trunk/gui/wxpython/modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/modules/colorrules.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/modules/colorrules.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -38,7 +38,7 @@
 from core.gcmd        import GMessage, RunCommand
 from gui_core.gselect import Select, LayerSelect, ColumnSelect, VectorDBInfo
 from core.render      import Map
-from gui_core.task    import GUI
+from gui_core.forms   import GUI
 from core.debug       import Debug as Debug
 from core.settings    import UserSettings
 from nviz.mapwindow   import wxUpdateProperties

Modified: grass/trunk/gui/wxpython/modules/extensions.py
===================================================================
--- grass/trunk/gui/wxpython/modules/extensions.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/modules/extensions.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -28,7 +28,7 @@
 
 from core             import globalvar
 from core.gcmd        import GError, RunCommand
-from gui_core.task    import GUI
+from gui_core.forms   import GUI
 from gui_core.widgets import ItemTree
 
 class InstallExtensionWindow(wx.Frame):

Modified: grass/trunk/gui/wxpython/modules/histogram.py
===================================================================
--- grass/trunk/gui/wxpython/modules/histogram.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/modules/histogram.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -22,7 +22,7 @@
 
 from core                 import globalvar
 from core.render          import Map
-from gui_core.task        import GUI
+from gui_core.forms       import GUI
 from mapdisp.gprint       import PrintOptions
 from core.utils           import GetLayerNameFromCmd
 from gui_core.dialogs     import GetImageHandlers, ImageSizeDialog

Modified: grass/trunk/gui/wxpython/modules/mcalc_builder.py
===================================================================
--- grass/trunk/gui/wxpython/modules/mcalc_builder.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/modules/mcalc_builder.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -24,7 +24,7 @@
 
 from core.gcmd        import GError, RunCommand
 from gui_core.gselect import Select
-from gui_core.task    import GUI
+from gui_core.forms   import GUI
 from core.settings    import UserSettings
 
 class MapCalcFrame(wx.Frame):

Modified: grass/trunk/gui/wxpython/nviz/main.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/main.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/nviz/main.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -21,7 +21,7 @@
 
 try:
     from wx import glcanvas
-    import nviz.mapdisp
+    import nviz.mapwindow
     import nviz.tools
     import wxnviz
     haveNviz = True
@@ -30,7 +30,7 @@
     errorMsg = err
 
 if haveNviz:
-    GLWindow       = nviz.mapdisp.GLWindow
+    GLWindow       = nviz.mapwindow.GLWindow
     NvizToolWindow = nviz.tools.NvizToolWindow
 else:
     GLWindow       = None

Modified: grass/trunk/gui/wxpython/nviz/tools.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/tools.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/nviz/tools.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -52,7 +52,7 @@
 from core.debug         import Debug
 try:
     from nviz.mapwindow import wxUpdateProperties
-    import nviz.main as wxnviz
+    import wxnviz
 except ImportError:
     pass
 

Modified: grass/trunk/gui/wxpython/psmap/frame.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/frame.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/psmap/frame.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -41,7 +41,7 @@
 from psmap.toolbars   import PsMapToolbar
 from icon             import Icons, MetaIcon, iconSet
 from core.gcmd        import RunCommand, GError, GMessage
-from gui_core.task    import GUI
+from gui_core.forms   import GUI
 from psmap.dialogs    import *
 
 class PsMapFrame(wx.Frame):

Modified: grass/trunk/gui/wxpython/vdigit/wxdigit.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/wxdigit.py	2011-11-25 15:10:47 UTC (rev 49357)
+++ grass/trunk/gui/wxpython/vdigit/wxdigit.py	2011-11-25 20:02:33 UTC (rev 49358)
@@ -27,7 +27,7 @@
 
 import grass.script.core as grass
 
-from core.cmd         import GError
+from core.gcmd        import GError
 from core.debug       import Debug
 from core.settings    import UserSettings
 from vdigit.wxdisplay import DisplayDriver, GetLastError



More information about the grass-commit mailing list