From: Robin Dunn Date: Mon, 17 May 2004 19:16:17 +0000 (+0000) Subject: wx.InitAllImageHandlers is now an empty function that does nothing but X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a31507415d5eb92b6cc3a2032569e1f963a598c6 wx.InitAllImageHandlers is now an empty function that does nothing but exist for backwards compatibility. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/docs/CHANGES.txt b/wxPython/docs/CHANGES.txt index ad7f25d0ae..57dcb78491 100644 --- a/wxPython/docs/CHANGES.txt +++ b/wxPython/docs/CHANGES.txt @@ -42,6 +42,14 @@ inheritance the new way. If you have custom controls of your own you should review stattxt.py or one of the others to see how it is to be done. +wx.InitAllImageHandlers is now an empty function that does nothing but +exist for backwards compatibility. The C++ version is now called +automatically when wxPython is initialized. Since all the handlers +are included in the wxWidgets shared library anyway, this imposes only +a very small amount of overhead and removes several unneccessary +problems. + + 2.5.1.5 diff --git a/wxPython/src/__core_rename.i b/wxPython/src/__core_rename.i index e5a396a8f2..919a557543 100644 --- a/wxPython/src/__core_rename.i +++ b/wxPython/src/__core_rename.i @@ -485,7 +485,6 @@ %rename(ImageHandler) wxImageHandler; %rename(ImageHistogram) wxImageHistogram; %rename(Image) wxImage; -%rename(InitAllImageHandlers) wxInitAllImageHandlers; %rename(NullImage) wxNullImage; %rename(IMAGE_RESOLUTION_INCHES) wxIMAGE_RESOLUTION_INCHES; %rename(IMAGE_RESOLUTION_CM) wxIMAGE_RESOLUTION_CM; diff --git a/wxPython/src/__core_reverse.txt b/wxPython/src/__core_reverse.txt index 105ac00801..c5b49ab163 100644 --- a/wxPython/src/__core_reverse.txt +++ b/wxPython/src/__core_reverse.txt @@ -39,6 +39,7 @@ DLG_SZE PyAssertionError MemoryFSHandler_AddFile +InitAllImageHandlers # With the * on the end these will cause code to be added that diff --git a/wxPython/src/_app_ex.py b/wxPython/src/_app_ex.py index ed611bb1f7..f70c78c26f 100644 --- a/wxPython/src/_app_ex.py +++ b/wxPython/src/_app_ex.py @@ -236,7 +236,6 @@ class PySimpleApp(wx.App): wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt) def OnInit(self): - wx.InitAllImageHandlers() return True diff --git a/wxPython/src/_image.i b/wxPython/src/_image.i index 4f35d16f6b..700cfdc938 100644 --- a/wxPython/src/_image.i +++ b/wxPython/src/_image.i @@ -332,7 +332,17 @@ success flag and rgb values.", ""); -void wxInitAllImageHandlers(); +///void wxInitAllImageHandlers(); + +%pythoncode { + def InitAllImageHandlers(): + """ + The former functionality of InitAllImageHanders is now done internal to + the _core_ extension module and so this function has become a simple NOP. + """ + pass +} + // See also wxPy_ReinitStockObjects in helpers.cpp diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index 5ea1b5c9aa..13f96f4dbd 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -523,6 +523,8 @@ void __wxPyPreStart(PyObject* moduleDict) // Init the stock objects to a non-NULL value so SWIG doesn't create them as None wxPy_ReinitStockObjects(1); + + wxInitAllImageHandlers(); } diff --git a/wxPython/wxPython/_core.py b/wxPython/wxPython/_core.py index c9118d7558..d0468cb020 100644 --- a/wxPython/wxPython/_core.py +++ b/wxPython/wxPython/_core.py @@ -654,7 +654,6 @@ wxImage_AddHandler = wx._core.Image_AddHandler wxImage_InsertHandler = wx._core.Image_InsertHandler wxImage_RemoveHandler = wx._core.Image_RemoveHandler wxImage_GetImageExtWildcard = wx._core.Image_GetImageExtWildcard -wxInitAllImageHandlers = wx._core.InitAllImageHandlers wxNullImage = wx._core.NullImage wxIMAGE_OPTION_BMP_FORMAT = wx._core.IMAGE_OPTION_BMP_FORMAT wxIMAGE_OPTION_CUR_HOTSPOT_X = wx._core.IMAGE_OPTION_CUR_HOTSPOT_X @@ -1075,6 +1074,7 @@ wxDLG_PNT = wx._core.DLG_PNT wxDLG_SZE = wx._core.DLG_SZE wxPyAssertionError = wx._core.PyAssertionError wxMemoryFSHandler_AddFile = wx._core.MemoryFSHandler_AddFile +wxInitAllImageHandlers = wx._core.InitAllImageHandlers d = globals()