mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 04:24:38 +03:00
remove DialogFirstSetup
This commit is contained in:
@@ -225,10 +225,6 @@ set(PROJECT_SOURCES
|
||||
ui/dialog_hotkey.h
|
||||
ui/dialog_hotkey.ui
|
||||
|
||||
ui/dialog_first_setup.cpp
|
||||
ui/dialog_first_setup.h
|
||||
ui/dialog_first_setup.ui
|
||||
|
||||
ui/widget/ProxyItem.cpp
|
||||
ui/widget/ProxyItem.h
|
||||
ui/widget/ProxyItem.ui
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// Switch core support
|
||||
|
||||
namespace NekoGui {
|
||||
inline int coreType = CoreType::V2RAY;
|
||||
inline int coreType = CoreType::SING_BOX;
|
||||
|
||||
QString FindCoreAsset(const QString &name);
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "main/NekoGui.hpp"
|
||||
|
||||
#include "ui/mainwindow_interface.h"
|
||||
#include "ui/dialog_first_setup.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include "sys/windows/MiniDump.h"
|
||||
@@ -159,28 +158,6 @@ int main(int argc, char* argv[]) {
|
||||
QIcon::setThemeName("breeze");
|
||||
}
|
||||
|
||||
// Load coreType
|
||||
auto coreLoaded = ReadFileText("groups/coreType");
|
||||
if (coreLoaded.isEmpty()) {
|
||||
NekoGui::coreType = -1;
|
||||
loadTranslate(QLocale().name());
|
||||
auto dialogFirstSetup = new DialogFirstSetup;
|
||||
dialogFirstSetup->exec();
|
||||
dialogFirstSetup->deleteLater();
|
||||
if (NekoGui::coreType < 0) {
|
||||
return 0;
|
||||
} else {
|
||||
QDir().mkdir("groups");
|
||||
QFile file;
|
||||
file.setFileName("groups/coreType");
|
||||
file.open(QIODevice::ReadWrite | QIODevice::Truncate);
|
||||
file.write(Int2String(NekoGui::coreType).toUtf8());
|
||||
file.close();
|
||||
}
|
||||
} else {
|
||||
NekoGui::coreType = coreLoaded.toInt();
|
||||
}
|
||||
|
||||
// Dir
|
||||
QDir dir;
|
||||
bool dir_success = true;
|
||||
|
||||
@@ -490,23 +490,6 @@ For NekoBox, this rewrites the underlying(localhost) DNS in Tun Mode, normal mod
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DialogFirstSetup</name>
|
||||
<message>
|
||||
<source>First time setup</source>
|
||||
<translation type="unfinished">تنظیم دفعه اول</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>It looks like you are using this software for the first time, please select a core.
|
||||
|
||||
These settings can be changed later.</source>
|
||||
<translation type="unfinished">به نظر میرسد که شما برای اولین بار است که از این نرم افزار استفاده میکنید ، لطفا یک هسته را انتخاب کنید ، این تنظیمات میتواند بعدا تغییر یابد.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Quit</source>
|
||||
<translation type="unfinished">خروج</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DialogHotkey</name>
|
||||
<message>
|
||||
|
||||
@@ -490,25 +490,6 @@ For NekoBox, this rewrites the underlying(localhost) DNS in Tun Mode, normal mod
|
||||
<translation>Подтвердить</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DialogFirstSetup</name>
|
||||
<message>
|
||||
<source>First time setup</source>
|
||||
<translation>Первоначальная настройка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>It looks like you are using this software for the first time, please select a core.
|
||||
|
||||
These settings can be changed later.</source>
|
||||
<translation>Привет! Кажется, вы запустили эту программу впервые. Пожалуйста, выберите ядро.
|
||||
|
||||
Эти настройки будет возможно в дальнейшем изменить.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Quit</source>
|
||||
<translation>Выход</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DialogHotkey</name>
|
||||
<message>
|
||||
|
||||
@@ -490,25 +490,6 @@ For NekoBox, this rewrites the underlying(localhost) DNS in Tun Mode, normal mod
|
||||
<translation>Reality short id. 只接受一个值。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DialogFirstSetup</name>
|
||||
<message>
|
||||
<source>First time setup</source>
|
||||
<translation>首次设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>It looks like you are using this software for the first time, please select a core.
|
||||
|
||||
These settings can be changed later.</source>
|
||||
<translation>看来您是第一次使用该软件,请选择内核。
|
||||
|
||||
这些设置可以稍后更改。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Quit</source>
|
||||
<translation>退出</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>DialogHotkey</name>
|
||||
<message>
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#include "dialog_first_setup.h"
|
||||
#include "ui_dialog_first_setup.h"
|
||||
|
||||
#include "main/NekoGui.hpp"
|
||||
|
||||
DialogFirstSetup::DialogFirstSetup(QWidget *parent) : QDialog(parent), ui(new Ui::DialogFirstSetup) {
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
DialogFirstSetup::~DialogFirstSetup() {
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DialogFirstSetup::onButtonClicked() {
|
||||
auto s = sender();
|
||||
if (s == ui->v2ray) {
|
||||
NekoGui::coreType = NekoGui::CoreType::V2RAY;
|
||||
} else if (s == ui->singbox) {
|
||||
NekoGui::coreType = NekoGui::CoreType::SING_BOX;
|
||||
}
|
||||
done(0);
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui {
|
||||
class DialogFirstSetup;
|
||||
}
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class DialogFirstSetup : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogFirstSetup(QWidget *parent = nullptr);
|
||||
~DialogFirstSetup() override;
|
||||
|
||||
private:
|
||||
Ui::DialogFirstSetup *ui;
|
||||
|
||||
private slots:
|
||||
void onButtonClicked();
|
||||
};
|
||||
@@ -1,116 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogFirstSetup</class>
|
||||
<widget class="QDialog" name="DialogFirstSetup">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>First time setup</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>It looks like you are using this software for the first time, please select a core.
|
||||
|
||||
These settings can be changed later.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string notr="true"><html><head/><body><p><a href="https://matsuridayo.github.io/n-configuration/#nekobox"><span style=" text-decoration: underline; color:#2980b9;">Help</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="v2ray">
|
||||
<property name="text">
|
||||
<string notr="true">Xray</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="singbox">
|
||||
<property name="text">
|
||||
<string notr="true">sing-box</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="quit">
|
||||
<property name="text">
|
||||
<string>Quit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>v2ray</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>DialogFirstSetup</receiver>
|
||||
<slot>onButtonClicked()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>199</x>
|
||||
<y>196</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>199</x>
|
||||
<y>149</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>singbox</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>DialogFirstSetup</receiver>
|
||||
<slot>onButtonClicked()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>199</x>
|
||||
<y>236</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>199</x>
|
||||
<y>149</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>quit</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>DialogFirstSetup</receiver>
|
||||
<slot>onButtonClicked()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>199</x>
|
||||
<y>276</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>199</x>
|
||||
<y>149</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>onButtonClicked()</slot>
|
||||
</slots>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user