mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Rearrange some things in propgrid
This commit is contained in:
@@ -67,36 +67,6 @@ def run():
|
||||
module.addInclude(INCLUDES)
|
||||
|
||||
|
||||
# Deprecated aliases for the various helper classes in Classic
|
||||
module.addPyCode("""\
|
||||
PyArrayStringProperty = wx.deprecated(ArrayStringProperty, "Use ArrayStringProperty instead.")
|
||||
PyChoiceEditor = wx.deprecated(PGChoiceEditor, "Use PGChoiceEditor instead.")
|
||||
PyColourProperty = wx.deprecated(ColourProperty, "Use ColourProperty instead.")
|
||||
PyComboBoxEditor = wx.deprecated(PGComboBoxEditor, "Use PGComboBoxEditor instead.")
|
||||
PyEditEnumProperty = wx.deprecated(EditEnumProperty, "Use PGEditEnumProperty instead.")
|
||||
PyEditor = wx.deprecated(PGEditor, "Use PGEditor instead.")
|
||||
PyEditorDialogAdapter = wx.deprecated(PGEditorDialogAdapter, "Use PGEditorDialogAdapter instead.")
|
||||
PyEnumProperty = wx.deprecated(EnumProperty, "Use EnumProperty instead.")
|
||||
PyFileDialogAdapter = wx.deprecated(PGFileDialogAdapter, "Use PGFileDialogAdapter instead.")
|
||||
PyFileProperty = wx.deprecated(FileProperty, "Use FileProperty instead.")
|
||||
PyFlagsProperty = wx.deprecated(FlagsProperty, "Use FlagsProperty instead.")
|
||||
PyFloatProperty = wx.deprecated(FloatProperty, "Use FloatProperty instead.")
|
||||
PyFontProperty = wx.deprecated(FontProperty, "Use FontProperty instead.")
|
||||
PyIntProperty = wx.deprecated(IntProperty, "Use IntProperty instead.")
|
||||
PyLongStringDialogAdapter = wx.deprecated(PGLongStringDialogAdapter, "Use PGLongStringDialogAdapter instead.")
|
||||
PyLongStringProperty = wx.deprecated(LongStringProperty, "Use LongStringProperty instead.")
|
||||
PyProperty = wx.deprecated(PGProperty, "Use PGProperty instead.")
|
||||
PyStringProperty = wx.deprecated(StringProperty, "Use StringProperty instead.")
|
||||
PySystemColourProperty = wx.deprecated(SystemColourProperty, "Use SystemColourProperty instead.")
|
||||
PyTextCtrlEditor = wx.deprecated(PGTextCtrlEditor, "Use PGTextCtrlEditor instead.")
|
||||
PyUIntProperty = wx.deprecated(UIntProperty, "Use UIntProperty instead.")
|
||||
""")
|
||||
|
||||
module.addPyFunction('RegisterEditor', '(editor, editorName)',
|
||||
deprecated='Use PropertyGrid.DoRegisterEditor instead',
|
||||
body='return PropertyGrid.DoRegisterEditorClass(editor, editorName)',
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
tools.doCommonTweaks(module)
|
||||
tools.runGenerators(module)
|
||||
|
||||
@@ -59,6 +59,38 @@ def run():
|
||||
if hasattr(item, 'type') and 'wxVariant' in item.type:
|
||||
item.type = item.type.replace('wxVariant', 'wxPGVariant')
|
||||
|
||||
|
||||
# Deprecated aliases for the various helper classes in Classic
|
||||
module.addPyCode("""\
|
||||
PyArrayStringProperty = wx.deprecated(ArrayStringProperty, "Use ArrayStringProperty instead.")
|
||||
PyChoiceEditor = wx.deprecated(PGChoiceEditor, "Use PGChoiceEditor instead.")
|
||||
PyColourProperty = wx.deprecated(ColourProperty, "Use ColourProperty instead.")
|
||||
PyComboBoxEditor = wx.deprecated(PGComboBoxEditor, "Use PGComboBoxEditor instead.")
|
||||
PyEditEnumProperty = wx.deprecated(EditEnumProperty, "Use PGEditEnumProperty instead.")
|
||||
PyEditor = wx.deprecated(PGEditor, "Use PGEditor instead.")
|
||||
PyEditorDialogAdapter = wx.deprecated(PGEditorDialogAdapter, "Use PGEditorDialogAdapter instead.")
|
||||
PyEnumProperty = wx.deprecated(EnumProperty, "Use EnumProperty instead.")
|
||||
PyFileDialogAdapter = wx.deprecated(PGFileDialogAdapter, "Use PGFileDialogAdapter instead.")
|
||||
PyFileProperty = wx.deprecated(FileProperty, "Use FileProperty instead.")
|
||||
PyFlagsProperty = wx.deprecated(FlagsProperty, "Use FlagsProperty instead.")
|
||||
PyFloatProperty = wx.deprecated(FloatProperty, "Use FloatProperty instead.")
|
||||
PyFontProperty = wx.deprecated(FontProperty, "Use FontProperty instead.")
|
||||
PyIntProperty = wx.deprecated(IntProperty, "Use IntProperty instead.")
|
||||
PyLongStringDialogAdapter = wx.deprecated(PGLongStringDialogAdapter, "Use PGLongStringDialogAdapter instead.")
|
||||
PyLongStringProperty = wx.deprecated(LongStringProperty, "Use LongStringProperty instead.")
|
||||
PyProperty = wx.deprecated(PGProperty, "Use PGProperty instead.")
|
||||
PyStringProperty = wx.deprecated(StringProperty, "Use StringProperty instead.")
|
||||
PySystemColourProperty = wx.deprecated(SystemColourProperty, "Use SystemColourProperty instead.")
|
||||
PyTextCtrlEditor = wx.deprecated(PGTextCtrlEditor, "Use PGTextCtrlEditor instead.")
|
||||
PyUIntProperty = wx.deprecated(UIntProperty, "Use UIntProperty instead.")
|
||||
""")
|
||||
|
||||
module.addPyFunction('RegisterEditor', '(editor, editorName)',
|
||||
deprecated='Use PropertyGrid.DoRegisterEditor instead',
|
||||
body='return PropertyGrid.DoRegisterEditorClass(editor, editorName)',
|
||||
)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
tools.doCommonTweaks(module)
|
||||
tools.runGenerators(module)
|
||||
|
||||
@@ -44,6 +44,7 @@ def run():
|
||||
c = module.find('wxPGCellData')
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
c.find('~wxPGCellData').ignore(False)
|
||||
c.bases = ['wxRefCounter']
|
||||
|
||||
c = module.find('wxPGCellRenderer')
|
||||
c.bases = ['wxRefCounter']
|
||||
|
||||
@@ -6,10 +6,10 @@ import wx
|
||||
|
||||
class PIImportTest(unittest.TestCase):
|
||||
"""
|
||||
The *.pi files generated are used with IDE's like WingIDE to create
|
||||
things like autocomplete lists and call tips. They are essentially just
|
||||
Python code with stubs for all the classes and other things that are in
|
||||
the extension modules and that are not easily introspected.
|
||||
The *.pyi files generated are used with some IDE's to create things like
|
||||
autocomplete lists and call tips. They are essentially just Python code
|
||||
with stubs for all the classes and other things that are in the extension
|
||||
modules and that are not easily introspected.
|
||||
|
||||
This test case ensures that the code in the pi files is valid by trying
|
||||
to run the file with a new instance of Python.
|
||||
|
||||
Reference in New Issue
Block a user