This commit is contained in:
恍兮惚兮 2025-01-01 22:19:02 +08:00
parent 972e7346a0
commit 45d913db65

View File

@ -47,7 +47,7 @@ def loadlist(combo: _SuperCombo):
combo.setlist.emit(lang, inter) combo.setlist.emit(lang, inter)
def installx(combo: _SuperCombo, btninstall): def installx(combo: _SuperCombo, btninstall, supportlang):
if combo.currentIndex() == -1: if combo.currentIndex() == -1:
return return
btninstall.setEnabled(False) btninstall.setEnabled(False)
@ -62,6 +62,7 @@ def installx(combo: _SuperCombo, btninstall):
combo.setlist.emit(lang, inter) combo.setlist.emit(lang, inter)
btninstall.setEnabled(True) btninstall.setEnabled(True)
combo.setEnabled(True) combo.setEnabled(True)
supportlang.setText(", ".join([_[1] for _ in winrtutils.getlanguagelist()]))
def question(): def question():
@ -90,7 +91,9 @@ def question():
combo.setlist.connect(combo.addItems) combo.setlist.connect(combo.addItems)
btninstall = LPushButton("添加") btninstall = LPushButton("添加")
btninstall.clicked.connect( btninstall.clicked.connect(
lambda: threading.Thread(target=installx, args=(combo, btninstall)).start() lambda: threading.Thread(
target=installx, args=(combo, btninstall, supportlang)
).start()
) )
lst.append(combo) lst.append(combo)
lst.append(btninstall) lst.append(btninstall)