From fd639c0219ed853498d7a73a24088c7f95740d8b Mon Sep 17 00:00:00 2001
From: arm64v8a <48624112+arm64v8a@users.noreply.github.com>
Date: Thu, 24 Nov 2022 20:04:41 +0900
Subject: [PATCH] feat: open config folder
---
translations/zh_CN.ts | 4 ++++
ui/mainwindow.cpp | 4 +++-
ui/mainwindow.ui | 8 +++++++-
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/translations/zh_CN.ts b/translations/zh_CN.ts
index d7099ad..cf464f6 100644
--- a/translations/zh_CN.ts
+++ b/translations/zh_CN.ts
@@ -1189,6 +1189,10 @@ End: %2
Current server is incompatible with VPN. Please stop the server first, enable VPN mode, and then restart.
当前服务器与 VPN 不兼容。请先停止服务器,打开 VPN 模式后再启动。
+
+ Open Config Folder
+ 打开配置目录
+
ProxyItem
diff --git a/ui/mainwindow.cpp b/ui/mainwindow.cpp
index 810d437..5c4617e 100644
--- a/ui/mainwindow.cpp
+++ b/ui/mainwindow.cpp
@@ -247,7 +247,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
break;
}
});
- //
+
+ // Misc menu
+ connect(ui->menu_open_config_folder, &QAction::triggered, this, [=] { QDesktopServices::openUrl(QUrl::fromLocalFile(QDir::currentPath())); });
ui->menu_program_preference->addActions(ui->menu_preferences->actions());
connect(ui->menu_add_from_clipboard2, &QAction::triggered, ui->menu_add_from_clipboard, &QAction::trigger);
connect(ui->actionRestart_Program, &QAction::triggered, this, [=] { MW_dialog_message("", "RestartProgram"); });
diff --git a/ui/mainwindow.ui b/ui/mainwindow.ui
index 8ac6b0d..6937fce 100644
--- a/ui/mainwindow.ui
+++ b/ui/mainwindow.ui
@@ -266,7 +266,7 @@
false
- 24
+ 26
@@ -507,6 +507,7 @@
+