diff --git a/etg/calctrl.py b/etg/calctrl.py index 55e13a7c..cf1d85fd 100644 --- a/etg/calctrl.py +++ b/etg/calctrl.py @@ -33,6 +33,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. + c = module.find('wxCalendarEvent') assert isinstance(c, etgtools.ClassDef) tools.fixEventClass(c) @@ -68,6 +69,8 @@ def run(): CalendarCtrl.PySetDateRange = wx.deprecated(CalendarCtrl.SetDateRange) """) + cc.find('EnableYearChange').ignore() + gcc.addHeaderCode("#include ") module.addGlobalStr('wxCalendarNameStr', cc) diff --git a/etg/datectrl.py b/etg/datectrl.py index 962883fb..74423c4c 100644 --- a/etg/datectrl.py +++ b/etg/datectrl.py @@ -33,7 +33,6 @@ def run(): # customizing the generated code and docstrings. module.addHeaderCode("#include ") - module.addHeaderCode("#include ") dpc = module.find('wxDatePickerCtrl') assert isinstance(dpc, etgtools.ClassDef) @@ -51,6 +50,8 @@ def run(): tools.fixWindowClass(c) c.find('GetRange.dt1').out = True c.find('GetRange.dt2').out = True + + gdpc.addHeaderCode("#include ") #----------------------------------------------------------------- tools.doCommonTweaks(module) diff --git a/etg/dragimag.py b/etg/dragimag.py index 1853105c..914c8da0 100644 --- a/etg/dragimag.py +++ b/etg/dragimag.py @@ -31,6 +31,7 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. + di = module.find('wxDragImage') assert isinstance(di, etgtools.ClassDef) @@ -46,7 +47,7 @@ def run(): # and for wxGenericDragImage gdi.addPrivateCopyCtor() - + gdi.addHeaderCode("#include ") #----------------------------------------------------------------- diff --git a/unittests/test_aboutdlg.py b/unittests/test_aboutdlg.py index 0bb7b175..6d57cd82 100644 --- a/unittests/test_aboutdlg.py +++ b/unittests/test_aboutdlg.py @@ -15,13 +15,21 @@ class aboutdlg_Tests(wtc.WidgetTestCase): info.SetDescription('This is a very goofy application') info.SetCopyright('(c) by Goofy Enterprises, Inc.') return info + + def _closeDlg(self): + for w in wx.GetTopLevelWindows(): + if isinstance(w, wx.Dialog): + w.EndModal(wx.ID_OK) def test_aboutdlgNative(self): - info = self._makeInfo() - wx.adv.AboutBox(info, self.frame) + if not 'wxMSW' in wx.PlatformInfo(): + info = self._makeInfo() + wx.CallLater(250, self._closeDlg) + wx.adv.AboutBox(info, self.frame) def test_aboutdlgGeneric(self): info = self._makeInfo() + wx.CallLater(250, self._closeDlg) wx.adv.GenericAboutBox(info, self.frame)