diff --git a/mainwindow.py b/mainwindow.py index 31c851e..dff6e96 100755 --- a/mainwindow.py +++ b/mainwindow.py @@ -2146,8 +2146,12 @@ installDxvk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装 D uninstallDxvk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "卸载 DXVK")) dxvkMenu.addAction(installDxvk) dxvkMenu.addAction(uninstallDxvk) -wineOption.addSeparator() wineOption.addAction(deleteDesktopIcon) +settingWineBottleCreateLink = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "允许/禁止指定 wine 容器生成快捷方式")) +enabledWineBottleCreateLink = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "允许指定 wine 容器生成快捷方式")) +disbledWineBottleCreateLink = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁止指定 wine 容器生成快捷方式")) +settingWineBottleCreateLink.addAction(enabledWineBottleCreateLink) +settingWineBottleCreateLink.addAction(disbledWineBottleCreateLink) w1.triggered.connect(OpenWineBotton) w2.triggered.connect(InstallWineFont) w3.triggered.connect(OpenWineFontPath) @@ -2181,6 +2185,8 @@ wm4_2.triggered.connect(lambda: os.system(f"'{programPath}/launch.sh' deepin-ter installDxvk.triggered.connect(InstallDXVK) uninstallDxvk.triggered.connect(UninstallDXVK) deleteDesktopIcon.triggered.connect(DeleteDesktopIcon) +enabledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' delete 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f")) +disbledWineBottleCreateLink.triggered.connect(lambda: RunWineProgram("reg' add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe '/f")) virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)")) v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用"))