feat: open config folder

This commit is contained in:
arm64v8a
2022-11-24 20:04:41 +09:00
parent 6583caadf8
commit fd639c0219
3 changed files with 14 additions and 2 deletions

View File

@@ -1189,6 +1189,10 @@ End: %2</source>
<source>Current server is incompatible with VPN. Please stop the server first, enable VPN mode, and then restart.</source> <source>Current server is incompatible with VPN. Please stop the server first, enable VPN mode, and then restart.</source>
<translation> VPN VPN </translation> <translation> VPN VPN </translation>
</message> </message>
<message>
<source>Open Config Folder</source>
<translation></translation>
</message>
</context> </context>
<context> <context>
<name>ProxyItem</name> <name>ProxyItem</name>

View File

@@ -247,7 +247,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
break; 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()); 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->menu_add_from_clipboard2, &QAction::triggered, ui->menu_add_from_clipboard, &QAction::trigger);
connect(ui->actionRestart_Program, &QAction::triggered, this, [=] { MW_dialog_message("", "RestartProgram"); }); connect(ui->actionRestart_Program, &QAction::triggered, this, [=] { MW_dialog_message("", "RestartProgram"); });

View File

@@ -266,7 +266,7 @@
<bool>false</bool> <bool>false</bool>
</attribute> </attribute>
<attribute name="verticalHeaderDefaultSectionSize"> <attribute name="verticalHeaderDefaultSectionSize">
<number>24</number> <number>26</number>
</attribute> </attribute>
<column> <column>
<property name="text"> <property name="text">
@@ -507,6 +507,7 @@
<addaction name="menu_routing_settings"/> <addaction name="menu_routing_settings"/>
<addaction name="menu_vpn_settings"/> <addaction name="menu_vpn_settings"/>
<addaction name="menu_hotkey_settings"/> <addaction name="menu_hotkey_settings"/>
<addaction name="menu_open_config_folder"/>
</widget> </widget>
<widget class="QMenu" name="menu_server"> <widget class="QMenu" name="menu_server">
<property name="title"> <property name="title">
@@ -840,6 +841,11 @@
<string>Restart Program</string> <string>Restart Program</string>
</property> </property>
</action> </action>
<action name="menu_open_config_folder">
<property name="text">
<string>Open Config Folder</string>
</property>
</action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>