Changes when/how the wxApp object is created.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-09-22 23:02:36 +00:00
parent f00a46313d
commit f3927bf5d3
4 changed files with 10 additions and 5 deletions

View File

@@ -13,11 +13,6 @@
import sys, os, glob, getopt
from wxPython.wx import *
if wxPlatform == "__WXGTK__":
# some bitmap related things need to have a wxApp initialized...
app = wxPySimpleApp()
wxInitAllImageHandlers()
def convert(file, maskClr, outputDir, outputName, outType, outExt):
if os.path.splitext(file)[1].lower() == ".ico":

View File

@@ -37,6 +37,9 @@ import img2img
from wxPython import wx
def main():
# some bitmap related things need to have a wxApp initialized...
if wx.wxGetApp() is None:
app = wx.wxPySimpleApp()
img2img.main(sys.argv[1:], wx.wxBITMAP_TYPE_PNG, ".png", __doc__)
if __name__ == '__main__':

View File

@@ -115,6 +115,10 @@ def main(args):
print __doc__
return
# some bitmap related things need to have a wxApp initialized...
if wx.wxGetApp() is None:
app = wx.wxPySimpleApp()
append = 0
compressed = 1
maskClr = None

View File

@@ -37,6 +37,9 @@ import img2img
from wxPython import wx
def main():
# some bitmap related things need to have a wxApp initialized...
if wx.wxGetApp() is None:
app = wx.wxPySimpleApp()
img2img.main(sys.argv[1:], wx.wxBITMAP_TYPE_XPM, ".xpm", __doc__)