diff --git a/etg/accel.py b/etg/accel.py index e36c25a3..20c8b0f1 100644 --- a/etg/accel.py +++ b/etg/accel.py @@ -102,7 +102,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/bitmap.py b/etg/bitmap.py index 03e37344..2e9582a2 100644 --- a/etg/bitmap.py +++ b/etg/bitmap.py @@ -74,7 +74,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/button.py b/etg/button.py index 4746484f..3790d090 100644 --- a/etg/button.py +++ b/etg/button.py @@ -35,7 +35,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/checkbox.py b/etg/checkbox.py index dcc66920..bcaba8b0 100644 --- a/etg/checkbox.py +++ b/etg/checkbox.py @@ -38,7 +38,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/checklst.py b/etg/checklst.py index 173095e3..6aa792e8 100644 --- a/etg/checklst.py +++ b/etg/checklst.py @@ -87,7 +87,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/choice.py b/etg/choice.py index 25aaedc5..19dd9b04 100644 --- a/etg/choice.py +++ b/etg/choice.py @@ -42,7 +42,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/collpane.py b/etg/collpane.py index 2c062d82..64b79b06 100644 --- a/etg/collpane.py +++ b/etg/collpane.py @@ -45,7 +45,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/combobox.py b/etg/combobox.py index 91088ff4..d77cf3a4 100644 --- a/etg/combobox.py +++ b/etg/combobox.py @@ -54,7 +54,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/config.py b/etg/config.py index fb0f09e5..5fdf7db6 100644 --- a/etg/config.py +++ b/etg/config.py @@ -130,7 +130,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/control.py b/etg/control.py index 3a6cfdcb..4a78acf5 100644 --- a/etg/control.py +++ b/etg/control.py @@ -39,7 +39,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/cursor.py b/etg/cursor.py index 67bdf749..ef556805 100644 --- a/etg/cursor.py +++ b/etg/cursor.py @@ -82,7 +82,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/dataobj.py b/etg/dataobj.py index 08ac9619..2ba9da3b 100644 --- a/etg/dataobj.py +++ b/etg/dataobj.py @@ -52,7 +52,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/dataview.py b/etg/dataview.py index 67e0b274..9ccfef84 100644 --- a/etg/dataview.py +++ b/etg/dataview.py @@ -60,7 +60,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/dc.py b/etg/dc.py index 17ca14e2..31247550 100644 --- a/etg/dc.py +++ b/etg/dc.py @@ -225,7 +225,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/dcgraph.py b/etg/dcgraph.py index 64a3ce7e..07136056 100644 --- a/etg/dcgraph.py +++ b/etg/dcgraph.py @@ -45,7 +45,6 @@ def run(): #----------------------------------------------------------------- - tools.addAutoProperties(module) tools.doCommonTweaks(module) tools.runGenerators(module) diff --git a/etg/dialog.py b/etg/dialog.py index 655c7d21..ff7db1fd 100644 --- a/etg/dialog.py +++ b/etg/dialog.py @@ -58,7 +58,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/dirdlg.py b/etg/dirdlg.py index 01db2ed8..65b8ca9f 100644 --- a/etg/dirdlg.py +++ b/etg/dirdlg.py @@ -36,7 +36,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/filedlg.py b/etg/filedlg.py index 1ae6e7df..c94edb49 100644 --- a/etg/filedlg.py +++ b/etg/filedlg.py @@ -67,7 +67,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/gauge.py b/etg/gauge.py index 9b2af8e1..4a8fcdad 100644 --- a/etg/gauge.py +++ b/etg/gauge.py @@ -38,7 +38,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/graphics.py b/etg/graphics.py index 7871738e..ad41908f 100644 --- a/etg/graphics.py +++ b/etg/graphics.py @@ -225,7 +225,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/imaglist.py b/etg/imaglist.py index 0c54928e..404a27f1 100644 --- a/etg/imaglist.py +++ b/etg/imaglist.py @@ -43,7 +43,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/intl.py b/etg/intl.py index b18a1751..f874b3e6 100644 --- a/etg/intl.py +++ b/etg/intl.py @@ -62,7 +62,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/listbox.py b/etg/listbox.py index 1b11dc4b..7cb1038e 100644 --- a/etg/listbox.py +++ b/etg/listbox.py @@ -58,7 +58,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/log.py b/etg/log.py index ae9ebb5b..8f4dca1b 100644 --- a/etg/log.py +++ b/etg/log.py @@ -106,7 +106,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/menu.py b/etg/menu.py index ad8716e0..fc5b87cf 100644 --- a/etg/menu.py +++ b/etg/menu.py @@ -121,7 +121,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/menuitem.py b/etg/menuitem.py index aea44c08..27bb5709 100644 --- a/etg/menuitem.py +++ b/etg/menuitem.py @@ -114,7 +114,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/msgdlg.py b/etg/msgdlg.py index a00fb486..0d96c0c0 100644 --- a/etg/msgdlg.py +++ b/etg/msgdlg.py @@ -57,7 +57,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/nonownedwnd.py b/etg/nonownedwnd.py index 9205ab81..337f3e92 100644 --- a/etg/nonownedwnd.py +++ b/etg/nonownedwnd.py @@ -37,7 +37,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/notebook.py b/etg/notebook.py index 2a9981df..432a5372 100644 --- a/etg/notebook.py +++ b/etg/notebook.py @@ -40,7 +40,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/platinfo.py b/etg/platinfo.py index bafd7845..ad73e8d7 100644 --- a/etg/platinfo.py +++ b/etg/platinfo.py @@ -53,7 +53,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/process.py b/etg/process.py index 94b560be..a96f6c14 100644 --- a/etg/process.py +++ b/etg/process.py @@ -17,7 +17,9 @@ DOCSTRING = "" # The classes and/or the basename of the Doxygen XML files to be processed by # this script. -ITEMS = [ 'wxProcess' ] +ITEMS = [ 'wxProcess', + 'wxProcessEvent', + ] #--------------------------------------------------------------------------- @@ -32,6 +34,7 @@ def run(): + module.addPyCode('EVT_END_PROCESS = wx.PyEventBinder( wxEVT_END_PROCESS )') #----------------------------------------------------------------- diff --git a/etg/radiobox.py b/etg/radiobox.py index 86799f02..325fb74d 100644 --- a/etg/radiobox.py +++ b/etg/radiobox.py @@ -43,7 +43,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/radiobtn.py b/etg/radiobtn.py index 2c24bffa..a3773601 100644 --- a/etg/radiobtn.py +++ b/etg/radiobtn.py @@ -37,7 +37,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/scrolwin.py b/etg/scrolwin.py index a0ddf7d8..4589ae70 100644 --- a/etg/scrolwin.py +++ b/etg/scrolwin.py @@ -52,7 +52,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/searchctrl.py b/etg/searchctrl.py index 1981b059..126b6452 100644 --- a/etg/searchctrl.py +++ b/etg/searchctrl.py @@ -39,7 +39,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/sizer.py b/etg/sizer.py index 6ddcacf4..62bdfb2f 100644 --- a/etg/sizer.py +++ b/etg/sizer.py @@ -78,7 +78,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/slider.py b/etg/slider.py index 021e4c7f..25a0859b 100644 --- a/etg/slider.py +++ b/etg/slider.py @@ -42,7 +42,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/spinctrl.py b/etg/spinctrl.py index 8b7c1700..cf811602 100644 --- a/etg/spinctrl.py +++ b/etg/spinctrl.py @@ -35,7 +35,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/splitter.py b/etg/splitter.py index 83e5fce7..72ed278a 100644 --- a/etg/splitter.py +++ b/etg/splitter.py @@ -39,7 +39,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/statbmp.py b/etg/statbmp.py index e7f56138..c708ea36 100644 --- a/etg/statbmp.py +++ b/etg/statbmp.py @@ -38,7 +38,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/statline.py b/etg/statline.py index d8046ca2..16ab9287 100644 --- a/etg/statline.py +++ b/etg/statline.py @@ -35,7 +35,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/stattext.py b/etg/stattext.py index c56df596..0234e3af 100644 --- a/etg/stattext.py +++ b/etg/stattext.py @@ -37,7 +37,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/statusbar.py b/etg/statusbar.py index b8a454e9..862f2f8a 100644 --- a/etg/statusbar.py +++ b/etg/statusbar.py @@ -35,7 +35,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/stdpaths.py b/etg/stdpaths.py index d9003ff4..89aba866 100644 --- a/etg/stdpaths.py +++ b/etg/stdpaths.py @@ -52,7 +52,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/textctrl.py b/etg/textctrl.py index 95494c65..92b8f469 100644 --- a/etg/textctrl.py +++ b/etg/textctrl.py @@ -58,7 +58,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/timer.py b/etg/timer.py index aecada29..7972c61d 100644 --- a/etg/timer.py +++ b/etg/timer.py @@ -55,7 +55,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/togglebtn.py b/etg/togglebtn.py index fa5a9e87..78c7e01f 100644 --- a/etg/togglebtn.py +++ b/etg/togglebtn.py @@ -37,7 +37,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etg/utils.py b/etg/utils.py index 9210fec7..a2956084 100644 --- a/etg/utils.py +++ b/etg/utils.py @@ -60,11 +60,14 @@ def run(): if 'Env' in item.name: item.ignore() module.find('wxGetenv').ignore() - + # Keep just the first wxExecute overload f = module.find('wxExecute') f.overloads = [] + module.find('wxGetOsVersion.major').out = True + module.find('wxGetOsVersion.minor').out = True + #----------------------------------------------------------------- tools.doCommonTweaks(module) tools.runGenerators(module) diff --git a/etg/withimage.py b/etg/withimage.py index dc8ec823..406dbd5c 100644 --- a/etg/withimage.py +++ b/etg/withimage.py @@ -38,7 +38,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etgtools/extractors.py b/etgtools/extractors.py index 70b37be8..6f14fb75 100644 --- a/etgtools/extractors.py +++ b/etgtools/extractors.py @@ -503,6 +503,7 @@ class ClassDef(BaseDef): self.external = False # class is in another module self.noDefCtor = False # do not generate a default constructor self.singlton = False # class is a singleton so don't call the dtor until the interpreter exits + self.allowAutoProperties = True self.headerCode = [] self.cppCode = [] self.convertToPyObject = None diff --git a/etgtools/make-new-etg-file.py b/etgtools/make-new-etg-file.py index 3781886d..4b83f435 100644 --- a/etgtools/make-new-etg-file.py +++ b/etgtools/make-new-etg-file.py @@ -61,7 +61,6 @@ def run(): #----------------------------------------------------------------- tools.doCommonTweaks(module) - tools.addAutoProperties(module) tools.runGenerators(module) diff --git a/etgtools/tweaker_tools.py b/etgtools/tweaker_tools.py index 4dcbbbc0..1318e72a 100644 --- a/etgtools/tweaker_tools.py +++ b/etgtools/tweaker_tools.py @@ -68,10 +68,16 @@ def ignoreAllOperators(node): def addAutoProperties(node): """ - Call klass.addAutoProperties for all classes in node. + Call klass.addAutoProperties for all classes in node with + allowAutoProperties set and which do not already have properties added by + hand in the tweaker code. """ for item in node.allItems(): if isinstance(item, extractors.ClassDef): + if not item.allowAutoProperties: + continue + if len([i for i in item if isinstance(i, extractors.PropertyDef)]): + continue item.addAutoProperties() @@ -274,6 +280,7 @@ def doCommonTweaks(module): """ ignoreAssignmentOperators(module) removeWxPrefixes(module) + addAutoProperties(module) def changeTypeNames(module, oldName, newName, skipTypedef=False):