mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-09 05:20:08 +01:00
@@ -92,7 +92,8 @@ Changes in this release include the following:
|
||||
* Add a step to wx.Config.ReadInt to attempt converting from long to int
|
||||
under python2. (#384)
|
||||
|
||||
|
||||
* Add virtual behavior for wx.RichTextCtrl and wx.TextCtrl's Copy/Cut/Paste methods
|
||||
and their Can* counterparts. (#954)
|
||||
|
||||
|
||||
4.0.3 "The show must go on. (Die show-stoppers! Die!)"
|
||||
|
||||
@@ -36,6 +36,8 @@ def run():
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
tools.fixWindowClass(c)
|
||||
|
||||
tools.fixTextClipboardMethods(c)
|
||||
|
||||
c.find('wxComboBox').findOverload('wxString choices').ignore()
|
||||
c.find('wxComboBox').findOverload('wxArrayString').find('choices').default = 'wxArrayString()'
|
||||
c.find('wxComboBox').findOverload('wxArrayString').find('value').default = 'wxEmptyString'
|
||||
|
||||
@@ -76,6 +76,8 @@ def run():
|
||||
c.find('SetListStyle.def').name = 'styleDef'
|
||||
c.find('ApplyStyle.def').name = 'styleDef'
|
||||
|
||||
tools.fixTextClipboardMethods(c)
|
||||
|
||||
c.addPyMethod('GetDefaultStyle', '(self)', 'return self.GetDefaultStyleEx()',
|
||||
deprecated='Use GetDefaultStyleEx instead')
|
||||
|
||||
|
||||
@@ -47,6 +47,9 @@ def parseAndTweakModule():
|
||||
c.find('SetSelection.to').name = 'to_'
|
||||
c.find('AutoComplete').findOverload('wxTextCompleter').find('completer').transfer = True
|
||||
|
||||
# Re-enable virtualness for (Can)Cut/Copy/Paste/Undo/Redo
|
||||
tools.fixTextClipboardMethods(c)
|
||||
|
||||
return module
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
@@ -381,7 +381,19 @@ def fixRefCountedClass(klass):
|
||||
if isinstance(item, extractors.MethodDef) and item.isCtor:
|
||||
item.transfer = True
|
||||
|
||||
def fixTextClipboardMethods(klass):
|
||||
"""
|
||||
Adds virtual behavior to Copy/Cut/Paste/Undo/Redo methods, and their Can*
|
||||
counterparts, of the given class.
|
||||
|
||||
:param ClassDef klass: The class to modify.
|
||||
"""
|
||||
for name in ('Cut', 'Copy', 'Paste', 'Undo', 'Redo'):
|
||||
for method in (name, "Can{}".format(name)):
|
||||
try:
|
||||
klass.find(method).isVirtual = True
|
||||
except extractors.ExtractorError:
|
||||
pass
|
||||
|
||||
def removeVirtuals(klass):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user