diff --git a/etg/menu.py b/etg/menu.py index fc5b87cf..277dcd8e 100644 --- a/etg/menu.py +++ b/etg/menu.py @@ -48,7 +48,7 @@ def run(): addTransferAnnotations(c, 'menuItem') addTransferAnnotations(c, 'subMenu') c.find('AppendSubMenu.submenu').transfer = True - c.find('GetMenuItems').overloads[0].ignore() + c.find('GetMenuItems').ignore() # keep the overload, but not the first one. c.addPyMethod('AppendMenu', '(self, id, item, subMenu, help="")', deprecated=True, body='return self.Append(id, item, subMenu, help)') diff --git a/etg/menuitem.py b/etg/menuitem.py index 27bb5709..98f0a6bb 100644 --- a/etg/menuitem.py +++ b/etg/menuitem.py @@ -52,6 +52,7 @@ def run(): self->SetBackgroundColour(*colour); #endif """) + c.find('GetFont').type = 'wxFont*' c.find('GetFont').setCppCode("""\ #ifdef __WXMSW__ @@ -60,11 +61,13 @@ def run(): return &wxNullFont; #endif """) + c.find('SetFont').setCppCode("""\ #ifdef __WXMSW__ self->SetFont(*font); #endif """) + c.find('GetMarginWidth').setCppCode("""\ #ifdef __WXMSW__ return self->GetMarginWidth(); @@ -72,11 +75,13 @@ def run(): return -1; #endif """) + c.find('SetMarginWidth').setCppCode("""\ #ifdef __WXMSW__ self->SetMarginWidth(width); #endif """) + c.find('GetTextColour').type = 'wxColour*' c.find('GetTextColour').setCppCode("""\ #ifdef __WXMSW__ @@ -85,6 +90,7 @@ def run(): return &wxNullColour; #endif """) + c.find('SetTextColour').setCppCode("""\ #ifdef __WXMSW__ self->SetTextColour(*colour); @@ -99,6 +105,7 @@ def run(): self->SetBitmap(*bmp); // no checked arg in this case #endif """) + c.find('SetBitmaps').setCppCode("""\ #ifdef __WXMSW__ self->SetBitmaps(*checked, *unchecked); diff --git a/src/window_ex.cpp b/src/window_ex.cpp index a9e3c907..f2128727 100644 --- a/src/window_ex.cpp +++ b/src/window_ex.cpp @@ -15,7 +15,7 @@ -wxUIntPtr wxPyGetWinHandle(wxWindow* win) +wxUIntPtr wxPyGetWinHandle(const wxWindow* win) { #ifdef __WXMSW__ return (wxUIntPtr)win->GetHandle();