From fc9f2f05d29074bcdd66f4ac8e8c6a637d92367d Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Sat, 29 Jun 2024 08:46:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=85=81=E8=AE=B8=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7=E5=BC=80=E5=A4=B4=E8=BE=93=E5=85=A5=E9=A6=96=E5=AD=97?= =?UTF-8?q?=E6=AF=8D=E4=BB=A5=E5=8F=8A=E7=89=88=E6=9C=AC=E5=8F=B7=E4=B8=8D?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E5=87=BA=E7=8E=B0=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deepin-wine-packager.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/deepin-wine-packager.py b/deepin-wine-packager.py index 70292fe..9d78fac 100755 --- a/deepin-wine-packager.py +++ b/deepin-wine-packager.py @@ -2247,7 +2247,14 @@ def DelTab(): def ChangeBottleName(): global bottleNameLock global bottleNameChangeLock - e1_text.setText(e1_text.text().replace(" ", "")) + replaceForum = [e1_text, e2_text] + for i in replaceForum: + if " " in i.text(): + i.setText(i.text().replace(" ", "")) + # 进行版本号限制 + if len(e2_text.text()) > 0: + if ord(e2_text.text()[0]) < 48 or ord(e2_text.text()[0]) > 57: + e2_text.setText(e2_text.text()[1:]) if bottleNameLock: return if os.path.basename(e6_text.text()) == ".wine" or e6_text.text() == "": @@ -2409,6 +2416,7 @@ build7z.clicked.connect(Build7zButton_Clicked) installDeb.clicked.connect(InstallDeb) wineFrame.addWidget(wineVersion) e1_text.textChanged.connect(ChangeBottleName) +e2_text.textChanged.connect(ChangeBottleName) e5_text.textChanged.connect(LockBottleName) e6_text.textChanged.connect(ChangeBottleName) e7_text.textChanged.connect(ChangeTapTitle)