[GRASS-SVN] r50228 - in grass/trunk/gui/wxpython: core gui_core psmap

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 17 03:16:33 EST 2012


Author: annakrat
Date: 2012-01-17 00:16:33 -0800 (Tue, 17 Jan 2012)
New Revision: 50228

Modified:
   grass/trunk/gui/wxpython/core/globalvar.py
   grass/trunk/gui/wxpython/gui_core/dialogs.py
   grass/trunk/gui/wxpython/gui_core/forms.py
   grass/trunk/gui/wxpython/gui_core/widgets.py
   grass/trunk/gui/wxpython/psmap/dialogs.py
   grass/trunk/gui/wxpython/psmap/toolbars.py
Log:
wxGUI: dialog for symbol thumbnails selection added

Modified: grass/trunk/gui/wxpython/core/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/core/globalvar.py	2012-01-17 06:25:13 UTC (rev 50227)
+++ grass/trunk/gui/wxpython/core/globalvar.py	2012-01-17 08:16:33 UTC (rev 50228)
@@ -23,6 +23,7 @@
 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")
 
 sys.path.append(os.path.join(ETCDIR, "python"))
 import grass.script as grass

Modified: grass/trunk/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/dialogs.py	2012-01-17 06:25:13 UTC (rev 50227)
+++ grass/trunk/gui/wxpython/gui_core/dialogs.py	2012-01-17 08:16:33 UTC (rev 50228)
@@ -47,6 +47,7 @@
 from core.gcmd        import GError, RunCommand, GMessage
 from gui_core.gselect import ElementSelect, LocationSelect, MapsetSelect, Select, OgrTypeSelect, GdalSelect, MapsetSelect
 from gui_core.forms   import GUI
+from gui_core.widgets import SingleSymbolPanel, EVT_SYMBOL_SELECTION_CHANGED
 from core.utils       import GetListOfMapsets, GetLayerNameFromCmd, GetValidLayerName
 from core.settings    import UserSettings
 from core.debug       import Debug
@@ -2382,3 +2383,175 @@
         """!Close window
         """
         self.Close()
+
+class SymbolDialog(wx.Dialog):
+    """!Dialog for GRASS symbols selection.
+    
+    Dialog is called in gui_core::forms module.
+    """
+    def __init__(self, parent, symbolPath, currentSymbol = None, title = _("Symbols")):
+        """!Dialog constructor.
+        
+        It is assumed that symbolPath contains folders with symbols.
+        
+        @param parent dialog parent
+        @param symbolPath absolute path to symbols
+        @param currentSymbol currently selected symbol (e.g. 'basic/x')
+        @param title dialog title
+        """
+        wx.Dialog.__init__(self, parent = parent, title = title, id = wx.ID_ANY)
+        
+        self.symbolPath = symbolPath
+        self.currentSymbol = currentSymbol # default basic/x
+        self.selected = None
+        self.selectedDir = None
+        
+        self._layout()
+        
+    def _layout(self):
+        mainPanel = wx.Panel(self, id = wx.ID_ANY)
+        mainSizer = wx.BoxSizer(wx.VERTICAL)
+        vSizer = wx.BoxSizer( wx.VERTICAL)
+        fgSizer = wx.FlexGridSizer(rows = 2, vgap = 5, hgap = 5)
+        self.folderChoice = wx.Choice(mainPanel, id = wx.ID_ANY, choices = os.listdir(self.symbolPath))
+        self.folderChoice.Bind(wx.EVT_CHOICE, self.OnFolderSelect)
+        
+        fgSizer.Add(item = wx.StaticText(mainPanel, id = wx.ID_ANY, label = _("Symbol directory:")),
+                   proportion = 0,
+                   flag = wx.ALIGN_CENTER_VERTICAL)
+                   
+        fgSizer.Add(item = self.folderChoice, proportion = 0,
+                   flag = wx.ALIGN_CENTER, border = 0)
+                   
+        self.infoLabel = wx.StaticText(mainPanel, id = wx.ID_ANY)
+        fgSizer.Add(wx.StaticText(mainPanel, id = wx.ID_ANY, label = _("Symbol name:")), 
+                    flag = wx.ALIGN_CENTRE_VERTICAL)
+        fgSizer.Add(self.infoLabel, proportion = 0, 
+                    flag = wx.ALIGN_CENTRE_VERTICAL)
+        vSizer.Add(fgSizer, proportion = 0, flag = wx.ALL, border = 5)
+        
+        self.panels = self._createSymbolPanels(mainPanel)
+        for panel in self.panels:
+            vSizer.Add(panel, proportion = 0, flag = wx.ALL | wx.EXPAND, border = 5)
+            panel.Bind(EVT_SYMBOL_SELECTION_CHANGED, self.SelectionChanged)
+        
+        mainSizer.Add(vSizer, proportion = 1, flag = wx.ALL| wx.EXPAND, border = 5)
+        self.btnCancel = wx.Button(parent = mainPanel, id = wx.ID_CANCEL)
+        self.btnOK     = wx.Button(parent = mainPanel, id = wx.ID_OK)
+        self.btnOK.SetDefault()
+        self.btnOK.Enable(False)
+        
+        # buttons
+        btnSizer = wx.StdDialogButtonSizer()
+        btnSizer.AddButton(self.btnCancel)
+        btnSizer.AddButton(self.btnOK)
+        btnSizer.Realize()
+        mainSizer.Add(item = btnSizer, proportion = 0,
+                      flag = wx.EXPAND | wx.ALL, border = 5)
+                      
+        # show panel with the largest number of images and fit size
+        count = []
+        for folder in os.listdir(self.symbolPath):
+            count.append(len(os.listdir(os.path.join(self.symbolPath, folder))))
+            
+        index = count.index(max(count))
+        self.folderChoice.SetSelection(index)
+        self.OnFolderSelect(None)
+        self.infoLabel.Show()
+        
+        mainPanel.SetSizerAndFit(mainSizer)
+        self.SetSize(self.GetBestSize())
+        
+        # show currently selected symbol
+        if self.currentSymbol:
+            # set directory
+            self.selectedDir, self.selected = os.path.split(self.currentSymbol)
+            self.folderChoice.SetStringSelection(self.selectedDir)
+            # select symbol
+            panelIdx = self.folderChoice.GetSelection()
+            for panel in self.symbolPanels[panelIdx]:
+                if panel.GetName() == self.selected:
+                    panel.Select()
+        else:
+            self.folderChoice.SetSelection(0)
+            
+        self.OnFolderSelect(None)
+        
+    def _createSymbolPanels(self, parent):
+        """!Creates multiple panels with symbols.
+        
+        Panels are shown/hidden according to selected folder."""
+        folders = os.listdir(self.symbolPath)
+        
+        panels = []
+        self.symbolPanels = []
+        maxImages = 0
+        
+        for folder in folders:
+            panel = wx.Panel(parent, style = wx.BORDER_RAISED)
+            sizer = wx.GridSizer(cols = 6, vgap = 3, hgap = 3)
+            images = self._getSymbols(path = os.path.join(self.symbolPath, folder))
+        
+            symbolPanels = []
+            for img in images:
+                iP = SingleSymbolPanel(parent = panel, symbolPath = img)
+                sizer.Add(item = iP, proportion = 0, flag = wx.ALIGN_CENTER)
+                symbolPanels.append(iP)
+            
+            panel.SetSizerAndFit(sizer)
+            panel.Hide()
+            panels.append(panel)
+            self.symbolPanels.append(symbolPanels)
+            
+        return panels
+        
+    def _getSymbols(self, path):
+        # we assume that images are in subfolders (1 level only)
+        imageList = []
+        for image in os.listdir(path):
+            imageList.append(os.path.join(path, image))
+                
+        return sorted(imageList)
+            
+    def OnFolderSelect(self, event):
+        """!Selected folder with symbols changed."""
+        idx = self.folderChoice.GetSelection()
+        for i in range(len(self.panels)):
+            sizer = self.panels[i].GetContainingSizer()
+            sizer.Show(self.panels[i], i == idx, recursive = True)
+            sizer.Layout()
+        
+        if self.selectedDir == self.folderChoice.GetStringSelection():
+            self.btnOK.Enable()
+            self.infoLabel.SetLabel(self.selected)
+        else:
+            self.btnOK.Disable()
+            self.infoLabel.SetLabel('')
+        
+    def SelectionChanged(self, event):
+        """!Selected symbol changed."""
+        if event.doubleClick:
+            self.EndModal(wx.ID_OK)
+        # deselect all
+        for i in range(len(self.panels)):
+            for panel in self.symbolPanels[i]:
+                if panel.GetName() != event.name:
+                    panel.Deselect()
+                
+        self.btnOK.Enable()
+        
+        self.selected = event.name
+        self.selectedDir = self.folderChoice.GetStringSelection()
+        
+        self.infoLabel.SetLabel(event.name)
+        
+    def GetSelectedSymbol(self, fullPath = False):
+        """!Returns currently selected symbol.
+        
+        @param fullPath true to return absolute path to symbol,
+        otherwise returns e.g. 'basic/x'
+        """
+        if fullPath:
+            return os.path.join(self.symbolPath, self.selectedDir, self.selected)
+            
+        return os.path.join(self.selectedDir, self.selected)

Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py	2012-01-17 06:25:13 UTC (rev 50227)
+++ grass/trunk/gui/wxpython/gui_core/forms.py	2012-01-17 08:16:33 UTC (rev 50228)
@@ -1034,19 +1034,38 @@
                         p['wxId'] = [ txt2.GetId(), ]
                         txt2.Bind(wx.EVT_TEXT, self.OnSetValue)
                     else:
-                        # list of values (combo)
+                        
                         title_txt.SetLabel(title + ':')
-                        cb = wx.ComboBox(parent = which_panel, id = wx.ID_ANY, value = p.get('default',''),
-                                         size = globalvar.DIALOG_COMBOBOX_SIZE,
-                                         choices = valuelist, style = wx.CB_DROPDOWN)
                         value = self._getValue(p)
-                        if value:
-                            cb.SetValue(value) # parameter previously set
-                        which_sizer.Add(item = cb, proportion = 0,
-                                        flag = wx.ADJUST_MINSIZE | wx.BOTTOM | wx.LEFT, border = 5)
-                        p['wxId'] = [cb.GetId(),]
-                        cb.Bind(wx.EVT_COMBOBOX, self.OnSetValue)
-                        cb.Bind(wx.EVT_TEXT, self.OnSetValue)
+                        
+                        if p['name'] == 'icon': # symbols
+                            bitmap = wx.Bitmap(os.path.join(globalvar.ETCSYMBOLDIR, value) + '.png')
+                            bb = wx.BitmapButton(parent = which_panel, id = wx.ID_ANY,
+                                                 bitmap = bitmap)
+                            iconLabel = wx.StaticText(parent = which_panel, id = wx.ID_ANY)
+                            iconLabel.SetLabel(value)
+                            p['value'] = value
+                            p['wxId'] = [bb.GetId(), iconLabel.GetId()]
+                            bb.Bind(wx.EVT_BUTTON, self.OnSetSymbol)
+                            this_sizer = wx.BoxSizer(wx.HORIZONTAL)
+                            this_sizer.Add(item = bb, proportion = 0,
+                                            flag = wx.ADJUST_MINSIZE | wx.BOTTOM | wx.LEFT, border = 5)
+                            this_sizer.Add(item = iconLabel, proportion = 0,
+                                            flag = wx.ADJUST_MINSIZE | wx.BOTTOM | wx.LEFT | wx.ALIGN_CENTER_VERTICAL, border = 5)
+                            which_sizer.Add(item = this_sizer, proportion = 0,
+                                            flag = wx.ADJUST_MINSIZE, border = 0)
+                        else:
+                            # list of values (combo)
+                            cb = wx.ComboBox(parent = which_panel, id = wx.ID_ANY, value = p.get('default',''),
+                                             size = globalvar.DIALOG_COMBOBOX_SIZE,
+                                             choices = valuelist, style = wx.CB_DROPDOWN)
+                            if value:
+                                cb.SetValue(value) # parameter previously set
+                            which_sizer.Add(item = cb, proportion = 0,
+                                            flag = wx.ADJUST_MINSIZE | wx.BOTTOM | wx.LEFT, border = 5)
+                            p['wxId'] = [cb.GetId(),]
+                            cb.Bind(wx.EVT_COMBOBOX, self.OnSetValue)
+                            cb.Bind(wx.EVT_TEXT, self.OnSetValue)
             
             # text entry
             if (p.get('type','string') in ('string','integer','float')
@@ -1863,6 +1882,29 @@
         
         event.Skip()
         
+    def OnSetSymbol(self, event):
+        """!Shows dialog for symbol selection"""
+        myId = event.GetId()
+        
+        for p in self.task.params:
+            if 'wxId' in p and myId in p['wxId']:
+                from gui_core.dialogs import SymbolDialog
+                dlg = SymbolDialog(self, symbolPath = globalvar.ETCSYMBOLDIR,
+                                   currentSymbol = p['value'])
+                if dlg.ShowModal() == wx.ID_OK:
+                    img = dlg.GetSelectedSymbol(fullPath = True)
+                    p['value'] = dlg.GetSelectedSymbol(fullPath = False)
+                    
+                    bitmapButton = wx.FindWindowById(p['wxId'][0])
+                    label = wx.FindWindowById(p['wxId'][1])
+                    
+                    bitmapButton.SetBitmapLabel(wx.Bitmap(img + '.png'))
+                    label.SetLabel(p['value'])
+                    
+                    self.OnUpdateValues(event)
+                    
+                dlg.Destroy()
+        
     def OnUpdateSelection(self, event):
         """!Update dialog (layers, tables, columns, etc.)
         """

Modified: grass/trunk/gui/wxpython/gui_core/widgets.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/widgets.py	2012-01-17 06:25:13 UTC (rev 50227)
+++ grass/trunk/gui/wxpython/gui_core/widgets.py	2012-01-17 08:16:33 UTC (rev 50228)
@@ -25,6 +25,7 @@
 @author Anna Kratochvilova <kratochanna gmail.com> (Google SoC 2011)
 """
 
+import os
 import string
 
 import wx
@@ -45,6 +46,9 @@
 from core        import globalvar
 from core.debug  import Debug
 
+from wx.lib.newevent import NewEvent
+wxSymbolSelectionChanged, EVT_SYMBOL_SELECTION_CHANGED  = NewEvent()
+
 class GNotebook(FN.FlatNotebook):
     """!Generic notebook widget
     """
@@ -409,3 +413,59 @@
             if itemSelected:
                 self.ToggleItemSelection(itemSelected)
             self.itemSelected = None
+
+class SingleSymbolPanel(wx.Panel):
+    """!Panel for displaying one symbol.
+    
+    Changes background when selected. Assumes that parent will catch
+    events emitted on mouse click. Used in gui_core::dialog::SymbolDialog.
+    """
+    def __init__(self, parent, symbolPath):
+        """!Panel constructor
+        
+        @param parent parent (gui_core::dialog::SymbolDialog)
+        @param symbolPath absolute path to symbol
+        """
+        wx.Panel.__init__(self, parent, id = wx.ID_ANY, style = wx.BORDER_RAISED)
+        self.SetName(os.path.splitext(os.path.basename(symbolPath))[0])
+        self.sBmp = wx.StaticBitmap(self, wx.ID_ANY, wx.Bitmap(symbolPath))
+
+        self.selected = False
+        self.selectColor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHT)
+        self.deselectColor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW)
+        
+        sizer = wx.BoxSizer()
+        sizer.Add(item = self.sBmp, proportion = 0, flag = wx.ALL | wx.ALIGN_CENTER, border = 5)
+        self.SetBackgroundColour(self.deselectColor)
+        self.SetMinSize(self.GetBestSize())
+        self.SetSizerAndFit(sizer)
+        
+        # binding to both (staticBitmap, Panel) necessary
+        self.sBmp.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
+        self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
+        self.Bind(wx.EVT_LEFT_DCLICK, self.OnDoubleClick)
+        self.sBmp.Bind(wx.EVT_LEFT_DCLICK, self.OnDoubleClick)
+        
+    def OnLeftDown(self, event):
+        """!Panel selected, background changes"""
+        self.selected = True
+        self.SetBackgroundColour(self.selectColor)
+        event.Skip()
+        
+        event = wxSymbolSelectionChanged(name = self.GetName(), doubleClick = False)
+        wx.PostEvent(self.GetParent(), event)
+        
+    def OnDoubleClick(self, event):
+        event = wxSymbolSelectionChanged(name = self.GetName(), doubleClick = True)
+        wx.PostEvent(self.GetParent(), event)
+        
+    def Deselect(self):
+        """!Panel deselected, background changes back to default"""
+        self.selected = False
+        self.SetBackgroundColour(self.deselectColor)
+        
+    def Select(self):
+        """!Select panel, no event emitted"""
+        self.selected = True
+        self.SetBackgroundColour(self.selectColor)
+        

Modified: grass/trunk/gui/wxpython/psmap/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/dialogs.py	2012-01-17 06:25:13 UTC (rev 50227)
+++ grass/trunk/gui/wxpython/psmap/dialogs.py	2012-01-17 08:16:33 UTC (rev 50228)
@@ -77,6 +77,7 @@
 from core.utils       import CmdToTuple, GetCmdString
 from gui_core.gselect import Select
 from core.gcmd        import RunCommand, GError, GMessage, GWarning
+from gui_core.dialogs import SymbolDialog
 
 # grass.set_raise_on_error(True)
 
@@ -1651,7 +1652,7 @@
         
         # size and style
         if self.subType == 'points':
-            if dic['symbol']:
+            if not dic['eps']:
                 vInstruction += string.Template("    symbol $symbol\n").substitute(dic)
             else: #eps
                 vInstruction += string.Template("    eps $eps\n").substitute(dic)
@@ -3270,6 +3271,7 @@
         if self.type == 'points':
             self.OnSize(None)
             self.OnRotation(None)
+            self.OnSymbology(None)
         if self.type == 'areas':
             self.OnPattern(None)
         
@@ -3598,8 +3600,11 @@
         self.symbolRadio = wx.RadioButton(panel, id = wx.ID_ANY, label = _("symbol:"), style = wx.RB_GROUP)
         self.symbolRadio.SetValue(bool(self.vPropertiesDict['symbol']))
             
-         
-        self.symbolChoice = wx.Choice(panel, id = wx.ID_ANY, choices = self.symbols)
+        self.symbolName = wx.StaticText(panel, id = wx.ID_ANY)
+        self.symbolName.SetLabel(self.vPropertiesDict['symbol'])
+        bitmap = wx.Bitmap(os.path.join(globalvar.ETCSYMBOLDIR,
+                                        self.vPropertiesDict['symbol']) + '.png')
+        self.symbolButton = wx.BitmapButton(panel, id = wx.ID_ANY, bitmap = bitmap)
             
         self.epsRadio = wx.RadioButton(panel, id = wx.ID_ANY, label = _("eps file:"))
         self.epsRadio.SetValue(bool(self.vPropertiesDict['eps']))
@@ -3608,24 +3613,28 @@
                                 buttonText =  _("Browse"), toolTip = _("Type filename or click browse to choose file"), 
                                 dialogTitle = _("Choose a file"), startDirectory = '', initialValue = '',
                                 fileMask = "Encapsulated PostScript (*.eps)|*.eps|All files (*.*)|*.*", fileMode = wx.OPEN)
-        if self.vPropertiesDict['symbol']:
-            self.symbolChoice.SetStringSelection(self.vPropertiesDict['symbol'])
+        if not self.vPropertiesDict['eps']:
             self.epsFileCtrl.SetValue('')
         else: #eps chosen
             self.epsFileCtrl.SetValue(self.vPropertiesDict['eps'])
-            self.symbolChoice.SetSelection(0)
             
+        gridBagSizer.AddGrowableCol(2)
         gridBagSizer.Add(self.symbolRadio, pos = (0, 0), flag = wx.ALIGN_CENTER_VERTICAL, border = 0)
-        gridBagSizer.Add(self.symbolChoice, pos = (0, 1), flag = wx.ALIGN_CENTER_VERTICAL, border = 0)
+        gridBagSizer.Add(self.symbolName, pos = (0, 1), flag = wx.ALIGN_CENTER_VERTICAL | wx.LEFT, border = 10)
+        gridBagSizer.Add(self.symbolButton, pos = (0, 2), flag = wx.ALIGN_RIGHT , border = 0)
         gridBagSizer.Add(self.epsRadio, pos = (1, 0), flag = wx.ALIGN_CENTER_VERTICAL, border = 0)
-        gridBagSizer.Add(self.epsFileCtrl, pos = (1, 1), flag = wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, border = 0)
+        gridBagSizer.Add(self.epsFileCtrl, pos = (1, 1), span = (1, 2), flag = wx.ALIGN_CENTER_VERTICAL|wx.EXPAND, border = 0)
         
         sizer.Add(gridBagSizer, proportion = 1, flag = wx.EXPAND|wx.ALL, border = 5)
         border.Add(item = sizer, proportion = 0, flag = wx.ALL | wx.EXPAND, border = 5)
         
+        self.Bind(wx.EVT_BUTTON, self.OnSymbolSelection, self.symbolButton)
+        self.Bind(wx.EVT_RADIOBUTTON, self.OnSymbology, self.symbolRadio)
+        self.Bind(wx.EVT_RADIOBUTTON, self.OnSymbology, self.epsRadio)
+        
         #size
         
-        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Size"))        
+        box   = wx.StaticBox (parent = panel, id = wx.ID_ANY, label = " %s " % _("Size"))
         sizer = wx.StaticBoxSizer(box, wx.HORIZONTAL)
         gridBagSizer = wx.GridBagSizer(hgap = 5, vgap = 5)
         gridBagSizer.AddGrowableCol(0)
@@ -3882,6 +3891,24 @@
         for each in (self.patFileCtrl, self.patWidthText, self.patWidthSpin, self.patScaleText, self.patScaleSpin):
             each.Enable(self.patternCheck.GetValue())
             
+    def OnSymbology(self, event):
+        useSymbol = self.symbolRadio.GetValue()
+        
+        self.symbolButton.Enable(useSymbol)
+        self.symbolName.Enable(useSymbol)
+        self.epsFileCtrl.Enable(not useSymbol)
+            
+    def OnSymbolSelection(self, event):
+        dlg = SymbolDialog(self, symbolPath = globalvar.ETCSYMBOLDIR,
+                           currentSymbol = self.symbolName.GetLabel())
+        if dlg.ShowModal() == wx.ID_OK:
+            img = dlg.GetSelectedSymbol(fullPath = True)
+            name = dlg.GetSelectedSymbol(fullPath = False)
+            self.symbolButton.SetBitmapLabel(wx.Bitmap(img + '.png'))
+            self.symbolName.SetLabel(name)
+            
+        dlg.Destroy()
+                
     def EnableLayerSelection(self, enable = True):
         for widget in self.gridBagSizerL.GetChildren():
             if widget.GetWindow() != self.warning:
@@ -3965,11 +3992,10 @@
         if self.type == 'points':
             #symbols
             if self.symbolRadio.GetValue():
-                self.vPropertiesDict['symbol'] = self.symbolChoice.GetStringSelection()
+                self.vPropertiesDict['symbol'] = self.symbolName.GetLabel()
                 self.vPropertiesDict['eps'] = None
             else:
                 self.vPropertiesDict['eps'] = self.epsFileCtrl.GetValue()
-                self.vPropertiesDict['symbol'] = None
             #size
             if self.sizeRadio.GetValue():
                 self.vPropertiesDict['size'] = self.sizeSpin.GetValue()

Modified: grass/trunk/gui/wxpython/psmap/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/toolbars.py	2012-01-17 06:25:13 UTC (rev 50227)
+++ grass/trunk/gui/wxpython/psmap/toolbars.py	2012-01-17 08:16:33 UTC (rev 50228)
@@ -21,7 +21,7 @@
 
 from core              import globalvar
 from gui_core.toolbars import BaseToolbar, BaseIcons
-from icon              import MetaIcon
+from icons.icon        import MetaIcon
 
 class PsMapToolbar(BaseToolbar):
     def __init__(self, parent):



More information about the grass-commit mailing list