More lib and demo patches to drop the wx prefix (Jeff has been busy!)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-12-22 19:09:54 +00:00
parent 88568e48e4
commit d4b73b1b8e
62 changed files with 865 additions and 580 deletions

View File

@@ -8,25 +8,31 @@
# Copyright: (c) 2002 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------
# 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o V2.5 compatability update
#
import getopt
import glob
import os
import sys
import sys, os, glob, getopt
from wxPython.wx import *
import wx
def convert(file, maskClr, outputDir, outputName, outType, outExt):
if os.path.splitext(file)[1].lower() == ".ico":
icon = wxIcon(file, wxBITMAP_TYPE_ICO)
img = wxBitmapFromIcon(icon)
icon = wx.Icon(file, wx.BITMAP_TYPE_ICO)
img = wx.BitmapFromIcon(icon)
else:
img = wxBitmap(file, wxBITMAP_TYPE_ANY)
img = wx.Bitmap(file, wx.BITMAP_TYPE_ANY)
if not img.Ok():
return 0, file + " failed to load!"
else:
if maskClr:
om = img.GetMask()
mask = wxMaskColour(img, maskClr)
mask = wx.MaskColour(img, maskClr)
img.SetMask(mask)
if om is not None:
om.Destroy()
@@ -38,7 +44,7 @@ def convert(file, maskClr, outputDir, outputName, outType, outExt):
if img.SaveFile(newname, outType):
return 1, file + " converted to " + newname
else:
img = wxImageFromBitmap(img)
img = wx.ImageFromBitmap(img)
if img.SaveFile(newname, outType):
return 1, "ok"
else: