mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 01:30:07 +01:00
Since they're now raising DeprecationWarnings in 4.0.2 we can drop some method compatibility wrappers here.
This commit is contained in:
@@ -29,7 +29,11 @@ New and improved stuff in this release:
|
||||
|
||||
Other changes in this release:
|
||||
|
||||
*
|
||||
* Many of the deprecated items in wxWidgets and wxPython are being or have
|
||||
been removed. Be sure to test your code in 4.0.2 or a later 4.0.x release
|
||||
with warnings enabled so you can see which class, method or function calls
|
||||
you need to change.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -815,7 +815,7 @@
|
||||
"DirProperty":"wx.propgrid.",
|
||||
"DirSelector":"wx.",
|
||||
"DirSelectorPromptStr":"wx.",
|
||||
"Direction":"wx.",
|
||||
"Direction":"wx.DataObject.",
|
||||
"DisableAsserts":"wx.",
|
||||
"Display":"wx.",
|
||||
"DisplayChangedEvent":"wx.",
|
||||
|
||||
@@ -49,8 +49,8 @@ def run():
|
||||
c.find('GetBitmap').mustHaveApp()
|
||||
c.find('GetIcon').mustHaveApp()
|
||||
|
||||
# deprecated and removed
|
||||
c.find('Insert').ignore()
|
||||
c.addPyCode("ArtProvider.Insert = wx.deprecated(ArtProvider.PushBack, 'Use ArtProvider.PushBack instead')")
|
||||
|
||||
# Change the types of the art constants from wxString to const char*
|
||||
# since that is what they really are.
|
||||
|
||||
@@ -60,11 +60,9 @@ def run():
|
||||
c.find('SetSelection.from').name = 'frm'
|
||||
|
||||
|
||||
# deprecated and removed
|
||||
c.find('GetTextIndent').ignore()
|
||||
c.find('SetTextIndent').ignore()
|
||||
c.addPyCode("ComboCtrl.GetTextIndent = wx.deprecated(ComboCtrl.GetMargins, 'Use GetMargins instead.')")
|
||||
c.addPyCode("ComboCtrl.SetTextIndent = wx.deprecated(ComboCtrl.SetMargins, 'Use SetMargins instead.')")
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
tools.doCommonTweaks(module)
|
||||
|
||||
@@ -577,8 +577,9 @@ def run():
|
||||
#---------------------------------------
|
||||
# wxIconizeEvent
|
||||
c = module.find('wxIconizeEvent')
|
||||
|
||||
# deprecated and removed
|
||||
c.find('Iconized').ignore()
|
||||
c.addPyCode("IconizeEvent.Iconized = wx.deprecated(IconizeEvent.IsIconized, 'Use IsIconized instead')")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -170,10 +170,9 @@ def run():
|
||||
c.addPyProperty('Menus GetMenus SetMenus')
|
||||
|
||||
|
||||
# deprecated and removed
|
||||
c.find('GetLabelTop').ignore()
|
||||
c.find('SetLabelTop').ignore()
|
||||
c.addPyCode("MenuBar.GetLabelTop = wx.deprecated(MenuBar.GetMenuLabelText, 'Use GetMenuLabelText instead')")
|
||||
c.addPyCode("MenuBar.SetLabelTop = wx.deprecated(MenuBar.SetMenuLabel, 'Use SetMenuLabel instead')")
|
||||
|
||||
module.addItem(tools.wxListWrapperTemplate('wxMenuList', 'wxMenu', module))
|
||||
|
||||
|
||||
@@ -38,18 +38,13 @@ def run():
|
||||
|
||||
c.find('SetSubMenu.menu').transfer = True
|
||||
|
||||
# deprecated and removed
|
||||
c.find('GetLabel').ignore()
|
||||
c.find('GetName').ignore()
|
||||
c.find('GetText').ignore()
|
||||
c.find('SetText').ignore()
|
||||
c.find('GetLabelFromText').ignore()
|
||||
|
||||
c.addPyCode("MenuItem.GetLabel = wx.deprecated(MenuItem.GetItemLabelText, 'Use GetItemLabelText instead')")
|
||||
c.addPyCode("MenuItem.GetName = wx.deprecated(MenuItem.GetItemLabelText, 'Use GetItemLabelText instead')")
|
||||
c.addPyCode("MenuItem.GetText = wx.deprecated(MenuItem.GetItemLabel, 'Use GetItemLabel instead')")
|
||||
c.addPyCode("MenuItem.SetText = wx.deprecated(MenuItem.SetItemLabel, 'Use SetItemLabel instead')")
|
||||
c.addPyCode("MenuItem.GetLabelFromText = wx.deprecated(MenuItem.GetLabelText, 'Use GetLabelText instead')")
|
||||
|
||||
|
||||
# These are MSW only. Make them be empty stubs for the other ports
|
||||
c.find('GetBackgroundColour').type = 'wxColour*'
|
||||
|
||||
@@ -135,11 +135,9 @@ def run():
|
||||
|
||||
c.find('GetEditorDialog').factory = True
|
||||
|
||||
|
||||
# deprecated and removed
|
||||
c.find('AddChild').ignore()
|
||||
c.find('GetValueString').ignore()
|
||||
c.addPyCode("PGProperty.AddChild = wx.deprecated(PGProperty.AddPrivateChild, 'Use AddPrivateChild instead')")
|
||||
c.addPyCode("PGProperty.GetValueString = wx.deprecated(PGProperty.GetValueAsString, 'Use GetValueAsString instead')")
|
||||
|
||||
|
||||
#---------------------------------------------------------
|
||||
|
||||
@@ -94,8 +94,8 @@ def run():
|
||||
# Needs wxWin 2.6 compatibility
|
||||
c.find('Remove').findOverload('(wxWindow *window)').ignore()
|
||||
|
||||
# deprecated and removed
|
||||
c.find('SetVirtualSizeHints').ignore()
|
||||
c.addPyCode("Sizer.SetVirtualSizeHints = wx.deprecated(Sizer.FitInside, 'Use FitInside instead')")
|
||||
|
||||
c.addPyMethod('AddMany', '(self, items)',
|
||||
doc="""\
|
||||
|
||||
@@ -63,8 +63,8 @@ def run():
|
||||
module.find('wxSetDisplayName').ignore()
|
||||
module.find('wxPostDelete').ignore()
|
||||
|
||||
# deprecated and removed
|
||||
module.find('wxUsleep').ignore()
|
||||
module.addPyCode("Usleep = deprecated(MilliSleep, 'Use MilliSleep instead.')")
|
||||
|
||||
|
||||
# ignore all the environment related functions
|
||||
|
||||
Reference in New Issue
Block a user