This commit is contained in:
arm64v8a
2022-09-27 12:39:40 +08:00
parent 94c893b194
commit e44279742c
12 changed files with 193 additions and 101 deletions

View File

@@ -585,9 +585,13 @@ void MainWindow::neko_set_spmode(int mode, bool save) {
return;
}
#endif
SetSystemProxy("127.0.0.1",
NekoRay::dataStore->inbound_http_port,
NekoRay::dataStore->inbound_socks_port);
auto socks_port = NekoRay::dataStore->inbound_socks_port;
auto http_port = NekoRay::dataStore->inbound_http_port;
if (IS_NEKO_BOX) {
http_port = socks_port;
socks_port = -1;
}
SetSystemProxy("127.0.0.1", http_port, socks_port);
} else if (mode == NekoRay::SystemProxyMode::VPN) {
if (!StartVPNProcess()) {
refresh_status();
@@ -974,7 +978,10 @@ void MainWindow::on_menu_profile_debug_info_triggered() {
}
void MainWindow::on_menu_copy_links_triggered() {
if (ui->masterLogBrowser->hasFocus()) return;
if (ui->masterLogBrowser->hasFocus()) {
ui->masterLogBrowser->copy();
return;
};
auto ents = get_now_selected();
QStringList links;
for (const auto &ent: ents) {
@@ -1227,6 +1234,9 @@ void MainWindow::keyPressEvent(QKeyEvent *event) {
case Qt::Key_Escape:
// take over by shortcut_esc
break;
case Qt::Key_Enter:
neko_start();
break;
default:
QMainWindow::keyPressEvent(event);
}