From 88ca313779aa960bbe57f24f62fec992bb9f65f0 Mon Sep 17 00:00:00 2001 From: gfdgd_xi <3025613752@qq.com> Date: Sun, 24 Jul 2022 23:12:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=8F=90=E5=8F=96=E5=9B=BE?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 071d0a3..aa2e639 100755 --- a/main.py +++ b/main.py @@ -470,19 +470,19 @@ def SaveIconToOtherPath(): if apkPath == "": QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["ChooseApkError"]) return - path = filedialog.asksaveasfilename(title="保存图标", filetypes=[("PNG 图片", "*.png"), ("所有文件", "*.*")], initialdir=json.loads(readtxt(get_home() + "/.config/uengine-runner/SaveApkIcon.json"))["path"])[0] + path = QtWidgets.QFileDialog.getSaveFileName(widget, "保存图标", "icon.png", "PNG 图片(*.png);;所有文件(*.*)", json.loads(readtxt(get_home() + "/.config/uengine-runner/SaveApkIcon.json"))["path"])[0] if not path == "": try: SaveApkIcon(apkPath, path) except: traceback.print_exc() - messagebox.showerror(title="错误", message=langFile[lang]["Main"]["MainWindow"]["Error"]["SaveApkIconError"]) + QtWidgets.QMessageBox.critical(widget, "错误", langFile[lang]["Main"]["MainWindow"]["Error"]["SaveApkIconError"]) return write_txt(get_home() + "/.config/uengine-runner/SaveApkIcon.json", json.dumps({"path": os.path.dirname(path)})) # 写入配置文件 - findApkHistory.append(ComboInstallPath.get()) - ComboInstallPath['value'] = findApkHistory + findApkHistory.append(ComboInstallPath.currentText()) + UpdateCombobox(0) write_txt(get_home() + "/.config/uengine-runner/FindApkHistory.json", str(json.dumps(ListToDictionary(findApkHistory)))) # 将历史记录的数组转换为字典并写入 - messagebox.showinfo(title="提示", message="保存成功!") + QtWidgets.QMessageBox.information(widget, "提示", "保存成功!") # 清空 uengine 数据 def BackUengineClean()->"清空 uengine 数据":