From 9eb9497afcf1c5c26007eb887bf8f10466a92f5c Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 22 Jan 2020 20:36:00 -0800 Subject: [PATCH] The new native wxSearchCtrl on GTK does not include the wxTextCtrl methods, just those from wxTextEntry. --- etg/srchctrl.py | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/etg/srchctrl.py b/etg/srchctrl.py index e46a28ea..1f5964bc 100644 --- a/etg/srchctrl.py +++ b/etg/srchctrl.py @@ -42,21 +42,21 @@ def run(): c.addCppMethod('void', 'SetSearchBitmap', '(const wxBitmap* bmp)', """\ - #ifdef __WXMAC__ + #if wxUSE_NATIVE_SEARCH_CONTROL #else self->SetSearchBitmap(*bmp); #endif """) c.addCppMethod('void', 'SetSearchMenuBitmap', '(const wxBitmap* bmp)', """\ - #ifdef __WXMAC__ + #if wxUSE_NATIVE_SEARCH_CONTROL #else self->SetSearchMenuBitmap(*bmp); #endif """) c.addCppMethod('void', 'SetCancelBitmap', '(const wxBitmap* bmp)', """\ - #ifdef __WXMAC__ + #if wxUSE_NATIVE_SEARCH_CONTROL #else self->SetCancelBitmap(*bmp); #endif @@ -85,25 +85,6 @@ def run(): klass = mod.find('wxTextEntry') searchCtrl.items.extend(klass.items) - # Do the same with wxTextCtrl, but also remove things like the - # Constructors and Create methods first. - import textctrl - mod = textctrl.parseAndTweakModule() - klass = mod.find('wxTextCtrl') - # get just the methods that are not ctors, dtor or Create - items = [item for item in klass.items if isinstance(item, etgtools.MethodDef) and - not item.isCtor and - not item.isDtor and - item.name != 'Create'] - searchCtrl.items.extend(items) - - - searchCtrl.find('LoadFile').ignore() - searchCtrl.find('SaveFile').ignore() - searchCtrl.find('MacCheckSpelling').ignore() - searchCtrl.find('ShowNativeCaret').ignore() - searchCtrl.find('HideNativeCaret').ignore() - # Add some properties that autoProperties would not see because they are # not using 'Get' and 'Set'