Merge branch 'release/1.10.x'
This commit is contained in:
commit
ecc1e30ef6
|
|
@ -229,7 +229,12 @@ class DirectGuiBase(DirectObject.DirectObject):
|
|||
del keywords[name]
|
||||
else:
|
||||
# Use optionDefs value
|
||||
optionInfo[name] = [default, default, function]
|
||||
value = default
|
||||
if isinstance(value, list):
|
||||
value = list(value)
|
||||
elif isinstance(value, dict):
|
||||
value = dict(value)
|
||||
optionInfo[name] = [default, value, function]
|
||||
elif optionInfo[name][FUNCTION] is None:
|
||||
# Only override function if not defined by derived class
|
||||
optionInfo[name][FUNCTION] = function
|
||||
|
|
|
|||
|
|
@ -382,6 +382,7 @@ SectionGroup "Python modules" SecGroupPython
|
|||
!insertmacro PyBindingSection 3.10-32 .cp310-win32.pyd
|
||||
!insertmacro PyBindingSection 3.11-32 .cp311-win32.pyd
|
||||
!insertmacro PyBindingSection 3.12-32 .cp312-win32.pyd
|
||||
!insertmacro PyBindingSection 3.13-32 .cp313-win32.pyd
|
||||
!else
|
||||
!insertmacro PyBindingSection 3.5 .cp35-win_amd64.pyd
|
||||
!insertmacro PyBindingSection 3.6 .cp36-win_amd64.pyd
|
||||
|
|
@ -391,6 +392,7 @@ SectionGroup "Python modules" SecGroupPython
|
|||
!insertmacro PyBindingSection 3.10 .cp310-win_amd64.pyd
|
||||
!insertmacro PyBindingSection 3.11 .cp311-win_amd64.pyd
|
||||
!insertmacro PyBindingSection 3.12 .cp312-win_amd64.pyd
|
||||
!insertmacro PyBindingSection 3.13 .cp313-win_amd64.pyd
|
||||
!endif
|
||||
SectionGroupEnd
|
||||
|
||||
|
|
@ -501,6 +503,7 @@ Function .onInit
|
|||
!insertmacro MaybeEnablePyBindingSection 3.10-32
|
||||
!insertmacro MaybeEnablePyBindingSection 3.11-32
|
||||
!insertmacro MaybeEnablePyBindingSection 3.12-32
|
||||
!insertmacro MaybeEnablePyBindingSection 3.13-32
|
||||
${EndIf}
|
||||
!else
|
||||
!insertmacro MaybeEnablePyBindingSection 3.5
|
||||
|
|
@ -512,6 +515,7 @@ Function .onInit
|
|||
!insertmacro MaybeEnablePyBindingSection 3.10
|
||||
!insertmacro MaybeEnablePyBindingSection 3.11
|
||||
!insertmacro MaybeEnablePyBindingSection 3.12
|
||||
!insertmacro MaybeEnablePyBindingSection 3.13
|
||||
${EndIf}
|
||||
!endif
|
||||
|
||||
|
|
@ -533,6 +537,10 @@ Function .onInit
|
|||
SectionSetFlags ${SecPyBindings3.12} ${SF_RO}
|
||||
SectionSetInstTypes ${SecPyBindings3.12} 0
|
||||
!endif
|
||||
!ifdef SecPyBindings3.13
|
||||
SectionSetFlags ${SecPyBindings3.13} ${SF_RO}
|
||||
SectionSetInstTypes ${SecPyBindings3.13} 0
|
||||
!endif
|
||||
${EndUnless}
|
||||
FunctionEnd
|
||||
|
||||
|
|
@ -851,6 +859,7 @@ Section Uninstall
|
|||
!insertmacro RemovePythonPath 3.10-32
|
||||
!insertmacro RemovePythonPath 3.11-32
|
||||
!insertmacro RemovePythonPath 3.12-32
|
||||
!insertmacro RemovePythonPath 3.13-32
|
||||
!else
|
||||
!insertmacro RemovePythonPath 3.5
|
||||
!insertmacro RemovePythonPath 3.6
|
||||
|
|
@ -860,6 +869,7 @@ Section Uninstall
|
|||
!insertmacro RemovePythonPath 3.10
|
||||
!insertmacro RemovePythonPath 3.11
|
||||
!insertmacro RemovePythonPath 3.12
|
||||
!insertmacro RemovePythonPath 3.13
|
||||
!endif
|
||||
|
||||
SetDetailsPrint both
|
||||
|
|
@ -930,6 +940,7 @@ SectionEnd
|
|||
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.10-32} $(DESC_SecPyBindings3.10-32)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.11-32} $(DESC_SecPyBindings3.11-32)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.12-32} $(DESC_SecPyBindings3.12-32)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.13-32} $(DESC_SecPyBindings3.13-32)
|
||||
!else
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.5} $(DESC_SecPyBindings3.5)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.6} $(DESC_SecPyBindings3.6)
|
||||
|
|
@ -939,6 +950,7 @@ SectionEnd
|
|||
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.10} $(DESC_SecPyBindings3.10)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.11} $(DESC_SecPyBindings3.11)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.12} $(DESC_SecPyBindings3.12)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.13} $(DESC_SecPyBindings3.13)
|
||||
!endif
|
||||
!ifdef INCLUDE_PYVER
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecPython} $(DESC_SecPython)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,21 @@
|
|||
from direct.gui.DirectButton import DirectButton
|
||||
|
||||
|
||||
def test_button_default_extraArgs():
|
||||
btn = DirectButton()
|
||||
|
||||
assert btn.configure('extraArgs') == ('extraArgs', [], [])
|
||||
assert btn._optionInfo['extraArgs'] == [[], [], None]
|
||||
|
||||
# Changing will not affect default value
|
||||
btn['extraArgs'].append(1)
|
||||
assert btn.configure('extraArgs') == ('extraArgs', [], [1])
|
||||
|
||||
# Changing this does
|
||||
btn.configure('extraArgs')[1].append(2)
|
||||
assert btn.configure('extraArgs') == ('extraArgs', [2], [1])
|
||||
|
||||
|
||||
def test_button_destroy():
|
||||
btn = DirectButton(text="Test")
|
||||
btn.destroy()
|
||||
|
|
|
|||
Loading…
Reference in New Issue