More wx.PySimpleApp —> wx.App migrations

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75609 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2014-01-14 02:34:31 +00:00
parent 40f84f3724
commit 24bf92a45d
15 changed files with 19 additions and 15 deletions

View File

@@ -121,7 +121,7 @@ if __name__ == '__main__':
self.tp = TestPanel(self, sys.stdout)
app = wx.PySimpleApp()
app = wx.App()
frame = TestFrame()
frame.Show(True)
app.MainLoop()

View File

@@ -171,7 +171,7 @@ if __name__ == '__main__':
self.tp.Destroy()
self.Destroy()
app = wx.PySimpleApp()
app = wx.App()
frame = TestFrame()
frame.Show(True)

View File

@@ -217,6 +217,9 @@ class GridEditorTest(gridlib.Grid):
attr.SetEditor(MyCellEditor(self.log))
self.SetColAttr(2, attr)
self.SetCellValue(1, 2, "or any in this column")
self.SetCellValue(2, 2, "and watch the log.")
self.SetCellValue(4, 0, "(The log shows if the custom cell editor is being used.)")
self.SetColSize(0, 150)
self.SetColSize(1, 150)
@@ -235,7 +238,7 @@ class TestFrame(wx.Frame):
if __name__ == '__main__':
import sys
app = wx.PySimpleApp()
app = wx.App()
frame = TestFrame(None, sys.stdout)
frame.Show(True)
app.MainLoop()

View File

@@ -86,7 +86,7 @@ class TestFrame(wx.Frame):
if __name__ == '__main__':
import sys
app = wx.PySimpleApp()
app = wx.App()
frame = TestFrame(None, sys.stdout)
frame.Show(True)
app.MainLoop()

View File

@@ -197,7 +197,7 @@ class TestFrame(wx.Frame):
if __name__ == '__main__':
import sys
app = wx.PySimpleApp()
app = wx.App()
frame = TestFrame(None, sys.stdout)
frame.Show(True)
app.MainLoop()

View File

@@ -56,7 +56,7 @@ class TestFrame(wx.Frame):
if __name__ == '__main__':
import sys
app = wx.PySimpleApp()
app = wx.App()
frame = TestFrame(None, sys.stdout)
frame.Show(True)
app.MainLoop()

View File

@@ -78,7 +78,7 @@ class TestFrame(wx.Frame):
if __name__ == '__main__':
import sys
app = wx.PySimpleApp()
app = wx.App()
frame = TestFrame(None, sys.stdout)
frame.Show(True)
app.MainLoop()

View File

@@ -175,7 +175,7 @@ class TestFrame(wx.Frame):
if __name__ == '__main__':
import sys
app = wx.PySimpleApp()
app = wx.App()
frame = TestFrame(None, sys.stdout)
frame.Show(True)
app.MainLoop()

View File

@@ -626,11 +626,12 @@ def runTest(frame, nb, log):
return testWin
def RunStandalone():
app = wx.PySimpleApp()
app = wx.App()
frame = wx.Frame(None, -1, "Test MaskedEditCtrls", size=(640, 480))
win = TestMaskedTextCtrls(frame, -1, sys.stdout)
frame.Show(True)
app.MainLoop()
#----------------------------------------------------------------------------
import wx.lib.masked.maskededit as maskededit
# strip out module header used for pydoc:

View File

@@ -415,7 +415,7 @@ if __name__ == '__main__':
import sys
import run
except ImportError:
app = wx.PySimpleApp(False)
app = wx.App(False)
frame = wx.Frame(None, title="PlateButton Test")
sizer = wx.BoxSizer(wx.HORIZONTAL)
sizer.Add(TestPanel(frame, TestLog()), 1, wx.EXPAND)

View File

@@ -318,7 +318,7 @@ if __name__ == '__main__':
import sys
import run
except ImportError:
app = wx.PySimpleApp(False)
app = wx.App(False)
frame = wx.Frame(None, title="SystemSettings Demo", size=(500, 500))
sizer = wx.BoxSizer(wx.HORIZONTAL)
sizer.Add(TestPanel(frame, TestLog()), 1, wx.EXPAND)

View File

@@ -1655,7 +1655,7 @@ class GeneralOptionsPanel(wx.Panel):
return wx.GetApp().GetDefaultIcon()
class DocApp(wx.PySimpleApp):
class DocApp(wx.App):
"""
The DocApp class serves as the base class for pydocview applications and offers
functionality such as services, creation of SDI and MDI frames, show tips,

View File

@@ -33,7 +33,7 @@ def main(args=None):
# unfortunatly we need to make an app, frame and an instance of
# the ActiceX control in order to get the TypeInfo about it...
app = wx.PySimpleApp()
app = wx.App()
f = wx.Frame(None, -1, "")
clsid = wx.activex.CLSID(args[1])
axw = wx.activex.ActiveXWindow(f, clsid)

View File

@@ -45,7 +45,7 @@ def main():
# some bitmap related things need to have a wxApp initialized...
if wx.GetApp() is None:
global app
app = wx.PySimpleApp()
app = wx.App()
img2img.main(sys.argv[1:], wx.BITMAP_TYPE_PNG, ".png", __doc__)
if __name__ == '__main__':

View File

@@ -44,7 +44,7 @@ def main():
# some bitmap related things need to have a wxApp initialized...
if wx.GetApp() is None:
global app
app = wx.PySimpleApp()
app = wx.App()
img2img.main(sys.argv[1:], wx.BITMAP_TYPE_XPM, ".xpm", __doc__)