Will raise the SystemExit exception now on wxGTK since wxGTK can not

save XPM files. <grumble>


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2001-04-09 21:15:44 +00:00
parent fbcadfca9c
commit bddab5e98b

View File

@ -24,6 +24,10 @@ Options:
import sys, os, glob, getopt, string
from wxPython.wx import *
if wxPlatform == "__WXGTK__":
raise SystemExit, "This tool can not be used on wxGTK until wxGTK can save XPM files."
wxInitAllImageHandlers()
@ -50,7 +54,11 @@ def convert(file, maskClr, outputDir, outputName):
if img.SaveFile(newname, wxBITMAP_TYPE_XPM):
return 1, file + " converted to " + newname
else:
return 0, file + " failed to save!"
img = wxImageFromBitmap(img)
if img.SaveFile(newname, wxBITMAP_TYPE_XPM):
return 1, "ok"
else:
return 0, file + " failed to save!"
@ -91,6 +99,9 @@ def main(args):
if __name__ == "__main__":
if wxPlatform == "__WXGTK__":
app = wxPySimpleApp() # Blech! the GUI needs initialized before
# bitmaps can be created...
main(sys.argv[1:])