remove switch core

This commit is contained in:
armv9
2024-06-28 11:54:59 +09:00
parent 48e04d2173
commit 9bc3be6ea0
5 changed files with 2 additions and 114 deletions

View File

@@ -145,10 +145,6 @@
<source>Ignore TLS errors when updating subscription</source> <source>Ignore TLS errors when updating subscription</source>
<translation>هنگام بهروزرسانی اشتراک، خطاهای TLS را نادیده گرفته شود</translation> <translation>هنگام بهروزرسانی اشتراک، خطاهای TLS را نادیده گرفته شود</translation>
</message> </message>
<message>
<source>Switch core</source>
<translation>سوئیچ هسته</translation>
</message>
<message> <message>
<source>Enable hook.js</source> <source>Enable hook.js</source>
<translation type="unfinished">فعال سازی hook.js</translation> <translation type="unfinished">فعال سازی hook.js</translation>
@@ -157,14 +153,6 @@
<source>Advanced system proxy settings. Please select a format.</source> <source>Advanced system proxy settings. Please select a format.</source>
<translation>تنظیمات پیشرفته پروکسی سیستم. لطفا یک قالب را انتخاب کنید.</translation> <translation>تنظیمات پیشرفته پروکسی سیستم. لطفا یک قالب را انتخاب کنید.</translation>
</message> </message>
<message>
<source>Confirmation</source>
<translation>تائیدیه</translation>
</message>
<message>
<source>Switching the core to %1, click &quot;Yes&quot; to complete the switch and the program will restart. This feature may be unstable, please do not switch frequently.</source>
<translation>هسته به 1% تغییر میابد، روی &quot;Yes&quot; کلیک کنید تا تغییر پایان یابد و برنامه ریستارت شود. این قابلیت ممکن است پایدار نباشد، لطفا مکررا تعویض نکنید</translation>
</message>
<message> <message>
<source>Please select a PNG file.</source> <source>Please select a PNG file.</source>
<translation>لطفاً یک فایل PNG انتخاب کنید.</translation> <translation>لطفاً یک فایل PNG انتخاب کنید.</translation>

View File

@@ -143,10 +143,6 @@
<source>Core Options</source> <source>Core Options</source>
<translation>Параметры ядра</translation> <translation>Параметры ядра</translation>
</message> </message>
<message>
<source>Switch core</source>
<translation>Выбор ядра</translation>
</message>
<message> <message>
<source>Extra Core</source> <source>Extra Core</source>
<translation>Дополнительные ядра</translation> <translation>Дополнительные ядра</translation>
@@ -187,14 +183,6 @@
<source>Please select the core name.</source> <source>Please select the core name.</source>
<translation>Выберите имя ядра.</translation> <translation>Выберите имя ядра.</translation>
</message> </message>
<message>
<source>Confirmation</source>
<translation>Подтверждение</translation>
</message>
<message>
<source>Switching the core to %1, click &quot;Yes&quot; to complete the switch and the program will restart. This feature may be unstable, please do not switch frequently.</source>
<translation>Переключаем ядро на %1, нажмите &quot;Да&quot; для изменения и перезапуска программы. Эта функция может быть нестабильной, поэтому, пожалуйста, не переключайте ядро часто.</translation>
</message>
<message> <message>
<source>Please select a PNG file.</source> <source>Please select a PNG file.</source>
<translation>Выберите PNG файл</translation> <translation>Выберите PNG файл</translation>

View File

@@ -143,18 +143,6 @@
<source>Cancel</source> <source>Cancel</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>Switch core</source>
<translation></translation>
</message>
<message>
<source>Confirmation</source>
<translation></translation>
</message>
<message>
<source>Switching the core to %1, click &quot;Yes&quot; to complete the switch and the program will restart. This feature may be unstable, please do not switch frequently.</source>
<translation> %1 &quot;&quot; </translation>
</message>
<message> <message>
<source>System proxy format</source> <source>System proxy format</source>
<translation></translation> <translation></translation>

View File

@@ -217,33 +217,6 @@ DialogBasicSettings::DialogBasicSettings(QWidget *parent)
} }
}); });
// switch core
ui->switch_core_v2ray->setChecked(!IS_NEKO_BOX);
ui->switch_core_sing_box->setChecked(IS_NEKO_BOX);
auto switch_core_on_click = [=] {
int neko_core_new;
if (sender() == ui->switch_core_sing_box) {
if (IS_NEKO_BOX) return;
neko_core_new = NekoGui::CoreType::SING_BOX;
} else {
if (!IS_NEKO_BOX) return;
neko_core_new = NekoGui::CoreType::V2RAY;
}
QString core_name_new = dynamic_cast<QRadioButton *>(sender())->text();
if (QMessageBox::question(this, tr("Confirmation"),
tr("Switching the core to %1, click \"Yes\" to complete the switch and the program will restart. This feature may be unstable, please do not switch frequently.")
.arg(core_name_new)) == QMessageBox::StandardButton::Yes) {
QFile file;
file.setFileName("groups/coreType");
file.open(QIODevice::ReadWrite | QIODevice::Truncate);
file.write(Int2String(neko_core_new).toUtf8());
file.close();
MW_dialog_message("", "RestartProgram");
}
};
connect(ui->switch_core_v2ray, &QRadioButton::clicked, this, switch_core_on_click);
connect(ui->switch_core_sing_box, &QRadioButton::clicked, this, switch_core_on_click);
// Mux // Mux
D_LOAD_INT(mux_concurrency) D_LOAD_INT(mux_concurrency)
D_LOAD_COMBO_STRING(mux_protocol) D_LOAD_COMBO_STRING(mux_protocol)

View File

@@ -689,55 +689,6 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="QGroupBox" name="groupBox3">
<property name="title">
<string>Switch core</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_21">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QRadioButton" name="switch_core_v2ray">
<property name="text">
<string notr="true">Xray</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="switch_core_sing_box">
<property name="text">
<string notr="true">sing-box</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_6"> <widget class="QWidget" name="tab_6">
@@ -758,8 +709,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>198</width> <width>632</width>
<height>58</height> <height>299</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_6"> <layout class="QVBoxLayout" name="verticalLayout_6">