[GRASS-SVN] r72456 - in grass/trunk/gui/wxpython: animation gcp image2target lmgr mapwin modules photo2image psmap

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 20 18:07:35 PDT 2018


Author: annakrat
Date: 2018-03-20 18:07:35 -0700 (Tue, 20 Mar 2018)
New Revision: 72456

Modified:
   grass/trunk/gui/wxpython/animation/controller.py
   grass/trunk/gui/wxpython/gcp/manager.py
   grass/trunk/gui/wxpython/image2target/ii2t_manager.py
   grass/trunk/gui/wxpython/lmgr/frame.py
   grass/trunk/gui/wxpython/mapwin/buffered.py
   grass/trunk/gui/wxpython/modules/colorrules.py
   grass/trunk/gui/wxpython/modules/histogram.py
   grass/trunk/gui/wxpython/photo2image/ip2i_manager.py
   grass/trunk/gui/wxpython/psmap/frame.py
Log:
wxGUI: make wx.BusyInfo compatible with wxPython 4

Modified: grass/trunk/gui/wxpython/animation/controller.py
===================================================================
--- grass/trunk/gui/wxpython/animation/controller.py	2018-03-21 00:55:21 UTC (rev 72455)
+++ grass/trunk/gui/wxpython/animation/controller.py	2018-03-21 01:07:35 UTC (rev 72456)
@@ -539,7 +539,7 @@
 
         images = []
         busy = wx.BusyInfo(
-            message=_("Preparing export, please wait..."),
+            _("Preparing export, please wait..."),
             parent=self.frame)
         wx.Yield()
         lastBitmaps = {}
@@ -621,7 +621,7 @@
 
         # export
         pilImages = [WxImageToPil(image) for image in images]
-        busy = wx.BusyInfo(message=_("Exporting animation, please wait..."),
+        busy = wx.BusyInfo(_("Exporting animation, please wait..."),
                            parent=self.frame)
         wx.Yield()
         try:

Modified: grass/trunk/gui/wxpython/gcp/manager.py
===================================================================
--- grass/trunk/gui/wxpython/gcp/manager.py	2018-03-21 00:55:21 UTC (rev 72455)
+++ grass/trunk/gui/wxpython/gcp/manager.py	2018-03-21 01:07:35 UTC (rev 72456)
@@ -1594,7 +1594,7 @@
             else:
                 flags = "a"
 
-            busy = wx.BusyInfo(message=_("Rectifying images, please wait..."),
+            busy = wx.BusyInfo(_("Rectifying images, please wait..."),
                                parent=self)
             wx.Yield()
 
@@ -1608,7 +1608,7 @@
                                   method=self.gr_method,
                                   flags=flags)
 
-            busy.Destroy()
+            del busy
 
             # provide feedback on failure
             if ret != 0:
@@ -1639,7 +1639,7 @@
                 ret = msg = ''
 
                 busy = wx.BusyInfo(
-                    message=_("Rectifying vector map <%s>, please wait...") %
+                    _("Rectifying vector map <%s>, please wait...") %
                     vect, parent=self)
                 wx.Yield()
 
@@ -1652,7 +1652,7 @@
                                       group=self.xygroup,
                                       order=self.gr_order)
 
-                busy.Destroy()
+                del busy
 
                 # provide feedback on failure
                 if ret != 0:

Modified: grass/trunk/gui/wxpython/image2target/ii2t_manager.py
===================================================================
--- grass/trunk/gui/wxpython/image2target/ii2t_manager.py	2018-03-21 00:55:21 UTC (rev 72455)
+++ grass/trunk/gui/wxpython/image2target/ii2t_manager.py	2018-03-21 01:07:35 UTC (rev 72456)
@@ -1660,7 +1660,7 @@
             else:
                 flags = "a"
 
-            busy = wx.BusyInfo(message=_("Rectifying images, please wait..."),
+            busy = wx.BusyInfo(_("Rectifying images, please wait..."),
                                parent=self)
             wx.Yield()
 
@@ -1674,7 +1674,7 @@
                                   angle=self.grwiz.cam_angle,
                                   flags=flags)
 
-            busy.Destroy()
+            del busy
 
             # provide feedback on failure
             if ret != 0:
@@ -1705,7 +1705,7 @@
                 ret = msg = ''
 
                 busy = wx.BusyInfo(
-                    message=_("Rectifying vector map <%s>, please wait...") %
+                    _("Rectifying vector map <%s>, please wait...") %
                     vect, parent=self)
                 wx.Yield()
 
@@ -1718,7 +1718,7 @@
                                       group=self.xygroup,
                                       order=self.gr_order)
 
-                busy.Destroy()
+                del busy
 
                 # provide feedback on failure
                 if ret != 0:

Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py	2018-03-21 00:55:21 UTC (rev 72455)
+++ grass/trunk/gui/wxpython/lmgr/frame.py	2018-03-21 01:07:35 UTC (rev 72456)
@@ -1393,7 +1393,7 @@
                 filename)
             return
 
-        busy = wx.BusyInfo(message=_("Please wait, loading workspace..."),
+        busy = wx.BusyInfo(_("Please wait, loading workspace..."),
                            parent=self)
         wx.Yield()
 
@@ -1501,9 +1501,8 @@
             else:
                 maptree.SelectItem(layer, select=False)
 
+        del busy
 
-        busy.Destroy()
-
         # set render property again when all layers are loaded
         for i, display in enumerate(gxwXml.displays):
             mapdisplay[i].mapWindowProperties.autoRender = display['render']
@@ -1565,7 +1564,7 @@
         if not self.currentPage:
             self.NewDisplay()
 
-        busy = wx.BusyInfo(message=_("Please wait, loading workspace..."),
+        busy = wx.BusyInfo(_("Please wait, loading workspace..."),
                            parent=self)
         wx.Yield()
 
@@ -1579,7 +1578,7 @@
                                        lcmd=layer['cmd'],
                                        lgroup=layer['group'])
 
-            busy.Destroy()
+        del busy
 
         if maptree:
             # reverse list of map layers

Modified: grass/trunk/gui/wxpython/mapwin/buffered.py
===================================================================
--- grass/trunk/gui/wxpython/mapwin/buffered.py	2018-03-21 00:55:21 UTC (rev 72455)
+++ grass/trunk/gui/wxpython/mapwin/buffered.py	2018-03-21 01:07:35 UTC (rev 72456)
@@ -698,7 +698,7 @@
         self._fileType = FileType
         self._saveToFileCallback = callback
 
-        self._busy = wx.BusyInfo(message=_("Please wait, exporting image..."),
+        self._busy = wx.BusyInfo(_("Please wait, exporting image..."),
                                  parent=self)
         wx.Yield()
 
@@ -758,7 +758,6 @@
             self.pdcVector.DrawToDC(dc)
         ibuffer.SaveFile(self._fileName, self._fileType)
 
-        self._busy.Destroy()
         del self._busy
         del self._fileName
         del self._fileType

Modified: grass/trunk/gui/wxpython/modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/modules/colorrules.py	2018-03-21 00:55:21 UTC (rev 72455)
+++ grass/trunk/gui/wxpython/modules/colorrules.py	2018-03-21 01:07:35 UTC (rev 72456)
@@ -1549,7 +1549,7 @@
             return
 
         busy = wx.BusyInfo(
-            message=_("Please wait, loading data from attribute table..."),
+            _("Please wait, loading data from attribute table..."),
             parent=self)
         wx.Yield()
 
@@ -1570,7 +1570,7 @@
                              stdout=outFile)
         else:
             self.preview.EraseMap()
-            busy.Destroy()
+            del busy
             return
 
         outFile.seek(0)
@@ -1620,7 +1620,7 @@
                     readvals = True
                     dlg.Destroy()
                 else:
-                    busy.Destroy()
+                    del busy
                     dlg.Destroy()
                     self.updateColumn = False
                     return
@@ -1636,7 +1636,7 @@
         else:
             self.rulesPanel.Clear()
 
-        busy.Destroy()
+        del busy
 
     def SetRangeLabel(self):
         """Set labels with info about attribute column range"""

Modified: grass/trunk/gui/wxpython/modules/histogram.py
===================================================================
--- grass/trunk/gui/wxpython/modules/histogram.py	2018-03-21 00:55:21 UTC (rev 72455)
+++ grass/trunk/gui/wxpython/modules/histogram.py	2018-03-21 01:07:35 UTC (rev 72456)
@@ -188,7 +188,7 @@
         file. See the wx.Windows docs for wx.Bitmap::SaveFile for the
         details
         """
-        busy = wx.BusyInfo(message=_("Please wait, exporting image..."),
+        busy = wx.BusyInfo(_("Please wait, exporting image..."),
                            parent=self)
         wx.Yield()
 
@@ -204,7 +204,7 @@
         self.pdc.DrawToDC(dc)
         ibuffer.SaveFile(FileName, FileType)
 
-        busy.Destroy()
+        del busy
 
     def GetImage(self):
         """Converts files to wx.Image

Modified: grass/trunk/gui/wxpython/photo2image/ip2i_manager.py
===================================================================
--- grass/trunk/gui/wxpython/photo2image/ip2i_manager.py	2018-03-21 00:55:21 UTC (rev 72455)
+++ grass/trunk/gui/wxpython/photo2image/ip2i_manager.py	2018-03-21 01:07:35 UTC (rev 72456)
@@ -1019,7 +1019,7 @@
             else:
                 flags = "a"
 
-            busy = wx.BusyInfo(message=_("Rectifying images, please wait..."),
+            busy = wx.BusyInfo(_("Rectifying images, please wait..."),
                                parent=self)
             wx.Yield()
 
@@ -1033,7 +1033,7 @@
                                   method=self.gr_method,
                                   flags=flags)
 
-            busy.Destroy()
+            del busy
 
             # provide feedback on failure
             if ret != 0:
@@ -1041,7 +1041,7 @@
                 print(self.grwiz.src_map, file=sys.stderr)
                 print(msg, file=sys.stderr)
 
-            busy = wx.BusyInfo(message=_("Writing output image to group, please wait..."),
+            busy = wx.BusyInfo(_("Writing output image to group, please wait..."),
                                parent=self)
             wx.Yield()
 
@@ -1052,7 +1052,7 @@
                                   group=self.xygroup,
                                   input=''.join([self.grwiz.src_map.split('@')[0],self.extension]))
 
-            busy.Destroy()
+            del busy
 
             if ret1 != 0:
                 print('ip2i: Error in i.group', file=sys.stderr)

Modified: grass/trunk/gui/wxpython/psmap/frame.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/frame.py	2018-03-21 00:55:21 UTC (rev 72455)
+++ grass/trunk/gui/wxpython/psmap/frame.py	2018-03-21 01:07:35 UTC (rev 72456)
@@ -385,7 +385,7 @@
                        'cols'], rows=event.userData['regionOld']['rows'])
             # wx.BusyInfo does not display the message
             busy = wx.BusyInfo(
-                message=_("Generating preview, wait please"),
+                _("Generating preview, wait please"),
                 parent=self)
             wx.Yield()
             try:



More information about the grass-commit mailing list