浏览代码

wxGUI: use wx.App instead of wx.PySimpleApp to avoid deprecation warning in wxPython 3

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59221 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 年之前
父节点
当前提交
c9a3b560de

+ 1 - 1
gui/wxpython/animation/dialogs.py

@@ -1586,7 +1586,7 @@ class PreferencesDialog(PreferencesBaseDialog):
 def test():
     import wx.lib.inspection
 
-    app = wx.PySimpleApp()
+    app = wx.App()
 
 #    testTemporalLayer()
 #    testAnimLmgr()

+ 1 - 1
gui/wxpython/animation/g.gui.animation.py

@@ -122,7 +122,7 @@ def main():
         layer.cmd = ['d.vect', 'map=']
         layerList.AddLayer(layer)
 
-    app = wx.PySimpleApp()
+    app = wx.App()
     if not CheckWxVersion([2, 9]):
         wx.InitAllImageHandlers()
 

+ 1 - 1
gui/wxpython/dbmgr/g.gui.dbmgr.py

@@ -48,7 +48,7 @@ def main():
         grass.set_raise_on_error(False)
         grass.fatal(_("Vector map <%s> not found") % options['map'])
     
-    app = wx.PySimpleApp()
+    app = wx.App()
     grass.message(_("Loading attribute data for vector map <%s>...") % mapName)
     f = AttributeManager(parent = None, id = wx.ID_ANY,
                          title = "%s - <%s>" % (_("GRASS GIS Attribute Table Manager"),

+ 1 - 1
gui/wxpython/gcp/g.gui.gcp.py

@@ -61,7 +61,7 @@ def main():
     else:
         os.environ['GRASS_RENDER_IMMEDIATE'] = 'cairo'
     
-    app = wx.PySimpleApp()
+    app = wx.App()
     if not CheckWxVersion([2, 9]):
         wx.InitAllImageHandlers()
 

+ 1 - 1
gui/wxpython/gis_set_error.py

@@ -18,7 +18,7 @@ from core import globalvar
 import wx
 
 def main():
-    app = wx.PySimpleApp()
+    app = wx.App()
     
     if len(sys.argv) == 1:
         msg = "Unknown reason"

+ 1 - 1
gui/wxpython/gmodeler/g.gui.gmodeler.py

@@ -51,7 +51,7 @@ from core.utils import _, GuiModuleMain
 from gmodeler.frame import ModelFrame
 
 def main():
-    app = wx.PySimpleApp()
+    app = wx.App()
     if not CheckWxVersion([2, 9]):
         wx.InitAllImageHandlers()
     frame = ModelFrame(parent = None, giface = StandaloneGrassInterface())

+ 1 - 1
gui/wxpython/gui_core/goutput.py

@@ -736,7 +736,7 @@ class GConsoleFrame(wx.Frame):
 
 
 def testGConsole():
-    app = wx.PySimpleApp()
+    app = wx.App()
     frame = GConsoleFrame(parent = None)
     frame.Show()
     app.MainLoop()

+ 1 - 1
gui/wxpython/gui_core/query.py

@@ -243,7 +243,7 @@ def PrepareQueryResults(coordinates, result):
 
 
 def test():
-    app = wx.PySimpleApp()
+    app = wx.App()
     from grass.script import vector as gvect
     from grass.script import raster as grast
     testdata1 = grast.raster_what(map = ('elevation_shade@PERMANENT','landclass96'),

+ 1 - 1
gui/wxpython/gui_core/treeview.py

@@ -218,7 +218,7 @@ def main():
     n111 = tree.AppendNode(parent=n11, label='node111', data={'xxx': 'A'}) # pylint: disable=W0612
 
 
-    app = wx.PySimpleApp()
+    app = wx.App()
     frame = TreeFrame(model=tree)
 #    frame.tree.Select(n111)
     frame.Show()

+ 1 - 1
gui/wxpython/iclass/frame.py

@@ -1343,7 +1343,7 @@ class MapManager:
 def test():
     import core.render as render
 
-    app = wx.PySimpleApp()
+    app = wx.App()
     wx.InitAllImageHandlers()
     
     frame = IClassMapFrame()

+ 1 - 1
gui/wxpython/iclass/g.gui.iclass.py

@@ -98,7 +98,7 @@ def main():
         os.environ['GRASS_RENDER_IMMEDIATE'] = 'cairo'
     
     # launch application
-    app = wx.PySimpleApp()
+    app = wx.App()
     if not CheckWxVersion([2, 9]):
         wx.InitAllImageHandlers()
     

+ 1 - 1
gui/wxpython/location_wizard/dialogs.py

@@ -624,7 +624,7 @@ def testRegionDef():
     import wx.lib.inspection
     import grass.script as grass
 
-    app = wx.PySimpleApp()
+    app = wx.App()
 
     dlg = RegionDef(None, location = grass.gisenv()["LOCATION_NAME"])
     dlg.Show()

+ 1 - 1
gui/wxpython/mapdisp/test_mapdisp.py

@@ -290,7 +290,7 @@ def main():
     options, flags = grass.parser()
     test = options['test']
 
-    app = wx.PySimpleApp()
+    app = wx.App()
     if not CheckWxVersion([2, 9]):
         wx.InitAllImageHandlers()
 

+ 1 - 1
gui/wxpython/mapswipe/g.gui.mapswipe.py

@@ -81,7 +81,7 @@ def main():
             if not gfile['name']:
                 grass.fatal(_("Raster map <%s> not found") % mapName)
 
-    app = wx.PySimpleApp()
+    app = wx.App()
     if not CheckWxVersion([2, 9]):
         wx.InitAllImageHandlers()
 

+ 1 - 1
gui/wxpython/psmap/g.gui.psmap.py

@@ -49,7 +49,7 @@ from psmap.frame import PsMapFrame
 from psmap.instructions import Instruction
 
 def main():
-    app = wx.PySimpleApp()
+    app = wx.App()
     if not CheckWxVersion([2, 9]):
         wx.InitAllImageHandlers()
     frame = PsMapFrame(parent = None)

+ 1 - 1
gui/wxpython/rlisetup/g.gui.rlisetup.py

@@ -43,7 +43,7 @@ from rlisetup.frame import RLiSetupFrame
 
 
 def main():
-    app = wx.PySimpleApp()
+    app = wx.App()
     if not CheckWxVersion([2, 9]):
         wx.InitAllImageHandlers()
     frame = RLiSetupFrame(parent=None, giface=StandaloneGrassInterface())

+ 1 - 1
gui/wxpython/vdigit/g.gui.vdigit.py

@@ -78,7 +78,7 @@ def main():
     else:
         os.environ['GRASS_RENDER_IMMEDIATE'] = 'cairo'
     
-    app = wx.PySimpleApp()
+    app = wx.App()
     if not CheckWxVersion([2, 9]):
         wx.InitAllImageHandlers()
     frame = VDigitMapFrame(options['map'])