From a69601c7c485d7bba5638c4a77df9f9111d54a10 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 21 Jan 2017 19:07:59 -0800 Subject: [PATCH] Set mustHaveApp for all window classes --- etgtools/tweaker_tools.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etgtools/tweaker_tools.py b/etgtools/tweaker_tools.py index 3a4f6d0f..d5e44965 100644 --- a/etgtools/tweaker_tools.py +++ b/etgtools/tweaker_tools.py @@ -230,6 +230,10 @@ def fixWindowClass(klass, hideVirtuals=True, ignoreProtected=True): """ Do common tweaks for a window class. """ + # NOTE: it may be okay to just do this for top-level windows + # TODO: look into that possibility + klass.mustHaveApp() + # The ctor and Create method transfer ownership of the this pointer to the parent for func in klass.findAll(klass.name) + klass.findAll('Create'): if isinstance(func, extractors.MethodDef): @@ -269,6 +273,8 @@ def fixTopLevelWindowClass(klass, hideVirtuals=True, ignoreProtected=True): """ Tweaks for TLWs """ + klass.mustHaveApp() + # TLW tweaks are a little different. We use the function annotation for # TransferThis instead of the argument annotation. klass.find(klass.name).findOverload('parent').transfer = True