[GRASS-SVN] r34874 - in grass/trunk/gui/wxpython: . gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 14 11:22:36 EST 2008


Author: martinl
Date: 2008-12-14 11:22:36 -0500 (Sun, 14 Dec 2008)
New Revision: 34874

Modified:
   grass/trunk/gui/wxpython/gui_modules/gdialogs.py
   grass/trunk/gui/wxpython/gui_modules/mapdisp.py
   grass/trunk/gui/wxpython/gui_modules/menuform.py
   grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
   grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: fix decoration dialog
       (merge from devbr6, r34873)


Modified: grass/trunk/gui/wxpython/gui_modules/gdialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2008-12-14 16:20:40 UTC (rev 34873)
+++ grass/trunk/gui/wxpython/gui_modules/gdialogs.py	2008-12-14 16:22:36 UTC (rev 34874)
@@ -436,9 +436,6 @@
         if  self.name == 'legend':
             if params and not self.btnOK.IsEnabled():
                 self.btnOK.Enable()
-        
-            #self.SetTitle(_('Legend of raster map <%s>') % \
-            #              utils.GetLayerNameFromCmd(self.parent.MapWindow.overlays[self.ovlId]['cmd']))
             
 class TextLayerDialog(wx.Dialog):
     """

Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2008-12-14 16:20:40 UTC (rev 34873)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2008-12-14 16:22:36 UTC (rev 34874)
@@ -2514,9 +2514,6 @@
         @param page notebook page with layer tree
         @param Map instance of render.Map
         """
-
-        wx.Frame.__init__(self, parent, id, title, pos, size, style)
-
         self.gismanager = gismgr    # GIS Manager object
         self.Map        = Map       # instance of render.Map
         self.tree       = tree      # GIS Manager layer tree object
@@ -2537,6 +2534,9 @@
             "sizenwse": wx.StockCursor(wx.CURSOR_SIZENWSE)
             }
 
+        wx.Frame.__init__(self, parent, id, title, pos, size, style)
+        self.SetName("MapWindow")
+
         #
         # set the size & system icon
         #

Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py	2008-12-14 16:20:40 UTC (rev 34873)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py	2008-12-14 16:22:36 UTC (rev 34874)
@@ -828,8 +828,12 @@
     def OnCancel(self, event):
         """Cancel button pressed"""
         self.MakeModal(False)
+        
         if self.get_dcmd and \
-                hasattr(self.parent, "GetPyData"):
+                self.parent and \
+                self.parent.GetName() in ('LayerManager',
+                                          'LayerTree',
+                                          'MapWindow'):
             # display decorations and 
             # pressing OK or cancel after setting layer properties
             if self.task.name in ['d.barscale','d.legend','d.histogram'] \

Modified: grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py	2008-12-14 16:20:40 UTC (rev 34873)
+++ grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py	2008-12-14 16:22:36 UTC (rev 34874)
@@ -69,6 +69,7 @@
         self.items = []
         self.itemCounter = 0
         super(LayerTree, self).__init__(parent, id, pos, size, style=style, ctstyle=ctstyle)
+        self.SetName("LayerTree")
 
         ### SetAutoLayout() causes that no vertical scrollbar is displayed
         ### when some layers are not visible in layer tree

Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2008-12-14 16:20:40 UTC (rev 34873)
+++ grass/trunk/gui/wxpython/wxgui.py	2008-12-14 16:22:36 UTC (rev 34874)
@@ -104,6 +104,7 @@
         wx.Frame.__init__(self, parent=parent, id=id, size=(500, 400),
                           style=wx.DEFAULT_FRAME_STYLE)
         self.SetTitle(self.baseTitle)
+        self.SetName("LayerManager")
 
         self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass.ico'), wx.BITMAP_TYPE_ICO))
 



More information about the grass-commit mailing list