add front_proxy_clear button

This commit is contained in:
arm64v8a
2023-05-26 16:05:07 +09:00
parent e4831b97f8
commit 22f912e0f8
4 changed files with 48 additions and 8 deletions

View File

@@ -298,6 +298,10 @@ For NekoBox, this rewrites the underlying(localhost) DNS in VPN mode, normal mod
<source>None</source>
<translation type="unfinished">هیچ یک</translation>
</message>
<message>
<source>Clear</source>
<translation type="unfinished">پاک کردن</translation>
</message>
</context>
<context>
<name>DialogEditProfile</name>

View File

@@ -298,6 +298,10 @@ For NekoBox, this rewrites the underlying(localhost) DNS in VPN mode, normal mod
<source>None</source>
<translation></translation>
</message>
<message>
<source>Clear</source>
<translation></translation>
</message>
</context>
<context>
<name>DialogEditProfile</name>
@@ -1103,7 +1107,7 @@ This needs to be run NekoBox with administrator privileges.</source>
</message>
<message>
<source>Add profile from clipboard</source>
<translation></translation>
<translation></translation>
</message>
<message>
<source>Debug Info</source>

View File

@@ -36,6 +36,10 @@ DialogEditGroup::DialogEditGroup(const std::shared_ptr<NekoGui::Group> &ent, QWi
CACHE.front_proxy = ent->front_proxy_id;
refresh_front_proxy();
connect(ui->front_proxy_clear, &QPushButton::clicked, this, [=] {
CACHE.front_proxy = -1;
refresh_front_proxy();
});
connect(ui->copy_links, &QPushButton::clicked, this, [=] {
QStringList links;

View File

@@ -84,13 +84,6 @@
</item>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="front_proxy">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="front_proxy_l">
<property name="text">
@@ -98,6 +91,30 @@
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="front_proxy">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="front_proxy_clear">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
@@ -173,6 +190,17 @@
<header>ui/widget/MyLineEdit.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>name</tabstop>
<tabstop>type</tabstop>
<tabstop>front_proxy</tabstop>
<tabstop>front_proxy_clear</tabstop>
<tabstop>manually_column_width</tabstop>
<tabstop>archive</tabstop>
<tabstop>url</tabstop>
<tabstop>copy_links</tabstop>
<tabstop>copy_links_nkr</tabstop>
</tabstops>
<resources/>
<connections>
<connection>