From 744cab49a4897dd528d890bfe61b55831e5c6d98 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 28 Jul 2012 20:02:48 +0000 Subject: [PATCH] SIP's deprecated annotation didn't work the way I thought it would, at least for CppMethods. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- etg/dc.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/etg/dc.py b/etg/dc.py index cde9aef7..d3d96cfd 100644 --- a/etg/dc.py +++ b/etg/dc.py @@ -148,24 +148,26 @@ def run(): #else wxPyRaiseNotImplemented(); return 0; - #endif""", - deprecated='Use GetHandle instead.') + #endif""") c.addCppMethod('void*', 'GetCGContext', '()', """\ #ifdef __WXMAC__ return self->GetHandle(); #else wxPyRaiseNotImplemented(); return NULL; - #endif""", - deprecated='Use GetHandle instead.') + #endif""") c.addCppMethod('void*', 'GetGdkDrawable', '()', """\ #ifdef __WXGTK__ return self->GetHandle(); #else wxPyRaiseNotImplemented(); return NULL; - #endif""", - deprecated='Use GetHandle instead.') + #endif""") + + c.addPyCode('DC.GetHDC = wx.deprecated(DC.GetHDC, "Use GetHandle instead.")') + c.addPyCode('DC.GetCGContext = wx.deprecated(DC.GetCGContext, "Use GetHandle instead.")') + c.addPyCode('DC.GetGdkDrawable = wx.deprecated(DC.GetGdkDrawable, "Use GetHandle instead.")') + # TODO: Port the wxPyDrawXXX code and the DrawXXXList methods from Classic