For .setCppCode fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2011-09-25 04:09:16 +00:00
parent e44dd28fd4
commit 45990bae2f
3 changed files with 12 additions and 10 deletions

View File

@@ -35,7 +35,7 @@ def run():
c = module.find('wxDataFormat')
assert isinstance(c, etgtools.ClassDef)
c.find('GetType').setCppCode("sipRes = static_cast<wxDataFormatId>(sipCpp->GetType());")
c.find('GetType').setCppCode("return static_cast<wxDataFormatId>(self->GetType());")
#-----------------------------------------------------------------
tools.doCommonTweaks(module)

View File

@@ -36,7 +36,7 @@ def run():
c = module.find('wxIndividualLayoutConstraint')
assert isinstance(c, etgtools.ClassDef)
c.find('GetOtherWindow').setCppCode('sipRes = (wxWindow*)sipCpp->GetOtherWindow();')
c.find('GetOtherWindow').setCppCode('return (wxWindow*)self->GetOtherWindow();')
c.addProperty('Done GetDone SetDone')
c.addProperty('Margin GetMargin SetMargin')

View File

@@ -50,17 +50,19 @@ def run():
c.find('wxMenuBar').findOverload('wxMenu *menus[], const wxString titles[], long style=0)').ignore()
c.find('FindItem').ignore()
mac_scmb = c.find('MacSetCommonMenuBar')
mac_scmb.setCppCode("""
#ifdef __WXMAC__
wxMenuBar::MacSetCommonMenuBar(menubar);
#endif
mac_scmb.setCppCode("""\
#ifdef __WXMAC__
wxMenuBar::MacSetCommonMenuBar(menubar);
#endif
""")
mac_gcmb = c.find('MacGetCommonMenuBar')
mac_gcmb.setCppCode("""
#ifdef __WXMAC__
sipRes = wxMenuBar::MacGetCommonMenuBar();
#endif
mac_gcmb.setCppCode("""\
#ifdef __WXMAC__
return wxMenuBar::MacGetCommonMenuBar();
#else
return NULL;
#endif
""")
# don't transfer on other platforms, as this is a no-op there.