diff -Nru kylin-nm-4.10.0.0/debian/changelog kylin-nm-4.10.0.0/debian/changelog --- kylin-nm-4.10.0.0/debian/changelog 2024-10-23 20:18:44.000000000 +0800 +++ kylin-nm-4.10.0.0/debian/changelog 2025-02-28 15:53:07.000000000 +0800 @@ -1,3 +1,12 @@ +kylin-nm (4.10.0.0-ok0.14) nile; urgency=medium + + * BUG:无 + * 需求:无 + * 其他改动说明:v11代码同源 + * 其他改动影响域:无 + + -- lixiang1 <lixiang1@kylinos.cn> Fri, 28 Feb 2025 15:53:07 +0800 + kylin-nm (4.10.0.0-ok0.13) nile; urgency=medium * BUG:#I9W15H【移动热点】移动热点界面进行搜索,下拉列表内容显示不全 diff -Nru kylin-nm-4.10.0.0/debian/control kylin-nm-4.10.0.0/debian/control --- kylin-nm-4.10.0.0/debian/control 2024-10-23 20:18:44.000000000 +0800 +++ kylin-nm-4.10.0.0/debian/control 2025-02-28 15:53:07.000000000 +0800 @@ -41,6 +41,7 @@ ukui-control-center (>= 3.1.1+1217), dpkg-dev, libkysdk-sysinfo, + network-manager-gnome, ${shlibs:Depends}, ${misc:Depends} Description: Gui Applet tool for display and edit network simply diff -Nru kylin-nm-4.10.0.0/debian/patches/0066-95-v11.patch kylin-nm-4.10.0.0/debian/patches/0066-95-v11.patch --- kylin-nm-4.10.0.0/debian/patches/0066-95-v11.patch 1970-01-01 08:00:00.000000000 +0800 +++ kylin-nm-4.10.0.0/debian/patches/0066-95-v11.patch 2025-02-28 15:53:07.000000000 +0800 @@ -0,0 +1,3380 @@ +From: =?utf-8?b?6YKT5omY?= <dengtuo@kylinos.cn> +Date: Wed, 22 Jan 2025 02:50:02 +0000 +Subject: =?utf-8?b?ITk1IHYxMeS7o+eggeWQjOa6kCBNZXJnZSBwdWxsIHJlcXVlc3QgITk1?= + =?utf-8?b?IGZyb20g5p2O5LqrL29wZW5reWxpbi9uaWxl?= + +--- + plugins/mobilehotspot/blacklistpage.cpp | 3 +- + plugins/mobilehotspot/blacklistpage.h | 4 +- + plugins/mobilehotspot/connectdevpage.cpp | 3 +- + plugins/mobilehotspot/connectdevpage.h | 4 +- + plugins/mobilehotspot/mobilehotspot.cpp | 16 +- + plugins/mobilehotspot/mobilehotspotwidget.cpp | 142 +++-------- + plugins/mobilehotspot/mobilehotspotwidget.h | 24 +- + plugins/netconnect/deviceframe.cpp | 18 +- + plugins/netconnect/lanitem.cpp | 5 +- + plugins/netconnect/lanitem.h | 6 +- + plugins/netconnect/netconnect.cpp | 284 ++++++++++++++++----- + plugins/netconnect/netconnect.h | 8 +- + plugins/proxy/aptproxydialog.cpp | 2 +- + plugins/proxy/aptproxydialog.h | 4 +- + plugins/proxy/proxy.cpp | 7 +- + plugins/proxy/proxy.h | 8 +- + plugins/vpn/vpn.cpp | 2 +- + plugins/vpn/vpnitem.cpp | 5 +- + plugins/vpn/vpnitem.h | 6 +- + plugins/wlanconnect/wlanconnect.cpp | 71 +++++- + plugins/wlanconnect/wlanconnect.h | 3 +- + plugins/wlanconnect/wlanitem.cpp | 2 +- + plugins/wlanconnect/wlanitem.h | 7 +- + src-vpn/frontend/list-items/vpnlistitem.cpp | 4 - + src-vpn/frontend/single-pages/singlepage.cpp | 3 +- + src-vpn/frontend/single-pages/vpnpage.cpp | 57 ++--- + src-vpn/frontend/single-pages/vpnpage.h | 3 +- + .../dbus-interface/kylinactiveconnectresource.cpp | 27 +- + .../dbus-interface/kylinconnectresource.cpp | 11 +- + .../dbus-interface/kywirelessconnectoperation.h | 33 +-- + src/backend/dbus-interface/kywirelessnetitem.cpp | 4 +- + .../dbus-interface/kywirelessnetresource.cpp | 21 +- + src/backend/dbus.cpp | 15 +- + src/backend/dbus.h | 3 +- + src/backend/dbus_adaptor.cpp | 12 +- + src/backend/dbus_adaptor.h | 7 +- + src/backend/dbus_interface.h | 6 - + src/common/common.h | 25 ++ + src/common/common.pri | 11 + + src/frontend/list-items/wlanlistitem.cpp | 14 +- + src/frontend/mainwindow.cpp | 194 ++++++++------ + src/frontend/mainwindow.h | 22 +- + src/frontend/netdetails/detailpage.cpp | 2 +- + src/frontend/netdetails/ipv4page.h | 4 +- + src/frontend/netdetails/netdetail.cpp | 178 ++----------- + src/frontend/netdetails/netdetail.h | 8 - + src/frontend/netdetails/securitypage.cpp | 51 ++-- + src/frontend/tab-pages/lanpage.cpp | 145 ++++++++--- + src/frontend/tab-pages/lanpage.h | 10 +- + src/frontend/tab-pages/wlanpage.cpp | 6 +- + src/frontend/tab-pages/wlanpage.h | 4 + + src/frontend/tools/infobutton.cpp | 33 ++- + src/frontend/tools/infobutton.h | 1 + + src/src.pro | 1 + + sys-dbus-register/kynmsystemdbus.cpp | 22 +- + sys-dbus-register/kynmsystemdbus.h | 9 + + 56 files changed, 894 insertions(+), 686 deletions(-) + create mode 100644 src/common/common.h + create mode 100644 src/common/common.pri + +diff --git a/plugins/mobilehotspot/blacklistpage.cpp b/plugins/mobilehotspot/blacklistpage.cpp +index aa22f45..74b34ea 100644 +--- a/plugins/mobilehotspot/blacklistpage.cpp ++++ b/plugins/mobilehotspot/blacklistpage.cpp +@@ -43,8 +43,9 @@ BlacklistPage::BlacklistPage(QWidget *parent) : QWidget(parent) + m_blacklistLayout->setContentsMargins(0, 0, 0, 0); + m_blacklistLayout->setSpacing(0); + +- m_titleLabel = new TitleLabel(this); ++ m_titleLabel = new KLabel(this); + m_titleLabel->setText(tr("Blacklist")); ++ m_titleLabel->setContentsMargins(16, 0, 0, 0); + + Vlayout->addWidget(m_titleLabel); + Vlayout->addSpacing(8); +diff --git a/plugins/mobilehotspot/blacklistpage.h b/plugins/mobilehotspot/blacklistpage.h +index c7e075d..6c12098 100644 +--- a/plugins/mobilehotspot/blacklistpage.h ++++ b/plugins/mobilehotspot/blacklistpage.h +@@ -30,7 +30,7 @@ + #include <QDBusReply> + #include <QDBusMetaType> + +-#include "titlelabel.h" ++#include "klabel.h" + #include "blacklistitem.h" + + using namespace kdk; +@@ -60,7 +60,7 @@ private: + + private: + QFrame *m_blacklistFrame = nullptr; +- TitleLabel *m_titleLabel = nullptr; ++ KLabel *m_titleLabel = nullptr; + QVBoxLayout *m_blacklistLayout = nullptr; + QMap<QString, QString> m_blacklistMap; + +diff --git a/plugins/mobilehotspot/connectdevpage.cpp b/plugins/mobilehotspot/connectdevpage.cpp +index d64342b..a479617 100644 +--- a/plugins/mobilehotspot/connectdevpage.cpp ++++ b/plugins/mobilehotspot/connectdevpage.cpp +@@ -44,8 +44,9 @@ ConnectdevPage::ConnectdevPage(QWidget *parent) : + m_staListLayout->setContentsMargins(0, 0, 0, 0); + m_staListLayout->setSpacing(0); + +- m_titleLabel = new TitleLabel(this); ++ m_titleLabel = new KLabel(this); + m_titleLabel->setText(tr("Connect device")); ++ m_titleLabel->setContentsMargins(16, 0, 0, 0); + + Vlayout->addWidget(m_titleLabel); + Vlayout->addSpacing(8); +diff --git a/plugins/mobilehotspot/connectdevpage.h b/plugins/mobilehotspot/connectdevpage.h +index 9468e92..bd8fb54 100644 +--- a/plugins/mobilehotspot/connectdevpage.h ++++ b/plugins/mobilehotspot/connectdevpage.h +@@ -30,7 +30,7 @@ + #include <QDBusReply> + #include <QDBusMetaType> + +-#include "titlelabel.h" ++#include "klabel.h" + #include "connectdevlistitem.h" + + using namespace kdk; +@@ -64,7 +64,7 @@ private: + private: + QFrame *m_staistFrame = nullptr; + +- TitleLabel *m_titleLabel = nullptr; ++ KLabel *m_titleLabel = nullptr; + QVBoxLayout *m_staListLayout = nullptr; + QMap<QString, QString> m_staMap; + +diff --git a/plugins/mobilehotspot/mobilehotspot.cpp b/plugins/mobilehotspot/mobilehotspot.cpp +index 44c0c1f..406f79e 100644 +--- a/plugins/mobilehotspot/mobilehotspot.cpp ++++ b/plugins/mobilehotspot/mobilehotspot.cpp +@@ -97,18 +97,10 @@ QString MobileHotspot::translationPath() const + + void MobileHotspot::initSearchText() + { +- //~ contents_path /mobilehotspot/Mobile Hotspot +- tr("Mobile Hotspot"); +- //~ contents_path /mobilehotspot/Open mobile hotspot +- tr("Open mobile hotspot"); +- //~ contents_path /mobilehotspot/Wi-Fi Name +- tr("Wi-Fi Name"); +- //~ contents_path /mobilehotspot/Network Password +- tr("Network Password"); +- //~ contents_path /mobilehotspot/Network Frequency band +- tr("Network Frequency band"); +- //~ contents_path /mobilehotspot/Shared NIC port +- tr("Shared NIC port"); ++ //~ contents_path /mobilehotspot/mobilehotspot ++ tr("mobilehotspot"); ++ //~ contents_path /mobilehotspot/mobilehotspot open ++ tr("mobilehotspot open"); + } + + bool MobileHotspot::isExitWirelessDevice() +diff --git a/plugins/mobilehotspot/mobilehotspotwidget.cpp b/plugins/mobilehotspot/mobilehotspotwidget.cpp +index 199b807..99b2b2c 100644 +--- a/plugins/mobilehotspot/mobilehotspotwidget.cpp ++++ b/plugins/mobilehotspot/mobilehotspotwidget.cpp +@@ -27,17 +27,20 @@ + #define FRAME_MIN_SIZE 550, 60 + #define FRAME_MAX_SIZE 16777215, 16777215 + #define CONTECT_FRAME_MAX_SIZE 16777215, 60 ++ + #define HINT_TEXT_MARGINS 8, 0, 0, 0 + #define FRAME_MIN_SIZE 550, 60 ++ + #define LABLE_MIN_WIDTH 188 + #define COMBOBOX_MIN_WIDTH 200 + #define LINE_MAX_SIZE 16777215, 1 + #define LINE_MIN_SIZE 0, 1 + #define ICON_SIZE 24,24 ++ + #define PASSWORD_FRAME_MIN_HIGHT 60 + #define PASSWORD_FRAME_FIX_HIGHT 90 + #define PASSWORD_FRAME_MIN_SIZE 550, 60 +-#define PASSWORD_FRAME_MAX_SIZE 16777215, 90 ++#define PASSWORD_FRAME_MAX_SIZE 16777215, 86 + #define PASSWORD_ITEM_MARGINS 16, 10, 16, 10 + + #define WIRELESS 1 +@@ -45,7 +48,6 @@ + #define AP_NAME_MAX_LENGTH 32 + + #define REFRESH_MSEC 20*1000 +-#define FRAME_SPEED 150 + + #define LOG_HEAD "[MobileHotspotWidget]" + +@@ -179,7 +181,7 @@ bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event) + return true; + } + if (m_pwdNameLine->text().length() < 8) { +- ++// showDesktopNotify(tr("can not create hotspot with password length less than eight!")); + return true; + } + // showDesktopNotify(tr("start to open hotspot ") + m_apNameLine->text()); +@@ -192,7 +194,6 @@ bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event) + qDebug() << LOG_HEAD << "call activeWirelessAp failed "; + return true; + } +- + } + return true; + } +@@ -228,8 +229,9 @@ void MobileHotspotWidget::initUI() + hotspotLyt->setContentsMargins(0, 0, 0, 0); + m_hotspotFrame->setLayout(hotspotLyt); + +- m_hotspotTitleLabel = new TitleLabel(this); ++ m_hotspotTitleLabel = new KLabel(this); + m_hotspotTitleLabel->setText(tr("Hotspot")); ++ m_hotspotTitleLabel->setContentsMargins(16, 0, 0, 0); + + setSwitchFrame(); + setApNameFrame(); +@@ -261,7 +263,6 @@ void MobileHotspotWidget::initUI() + + } + +- + void MobileHotspotWidget::initDbusConnect() + { + if(m_interface->isValid()) { +@@ -270,9 +271,8 @@ void MobileHotspotWidget::initDbusConnect() + connect(m_interface,SIGNAL(wirelessDeviceStatusChanged()), this, SLOT(onDeviceStatusChanged()), Qt::QueuedConnection); + connect(m_interface,SIGNAL(deviceNameChanged(QString, QString, int)), this, SLOT(onDeviceNameChanged(QString, QString, int)), Qt::QueuedConnection); + connect(m_interface,SIGNAL(hotspotDeactivated(QString, QString)), this, SLOT(onHotspotDeactivated(QString, QString)), Qt::QueuedConnection); ++ + connect(m_interface,SIGNAL(hotspotActivated(QString, QString, QString, QString, QString)), this, SLOT(onHotspotActivated(QString, QString, QString, QString, QString)), Qt::QueuedConnection); +- connect(m_interface,SIGNAL(hotspotDeactivating(QString, QString)), this, SLOT(startLoading()), Qt::QueuedConnection); +- connect(m_interface,SIGNAL(hotspotActivating(QString, QString)), this, SLOT(startLoading()), Qt::QueuedConnection); + + connect(m_interface, SIGNAL(wlanactiveConnectionStateChanged(QString, QString, QString, int)), this, SLOT(onActiveConnectionChanged(QString, QString, QString, int)), Qt::QueuedConnection); + +@@ -290,32 +290,12 @@ void MobileHotspotWidget::onApLineEditTextEdit(QString text) + { + int count = 0; + int i = 0; +- if (text.toLocal8Bit().length() <= AP_NAME_MAX_LENGTH) { +- return; +- } + +- int index = m_apNameLine->cursorPosition(); +- +- QString leftStr = text.left(index); +- QString rightStr = text.mid(index); +- +- if (rightStr.isEmpty()) { +- for ( ; i < text.length(); ++i) { +- count += text.mid(i,1).toLocal8Bit().length(); +- if (count > AP_NAME_MAX_LENGTH) { +- m_apNameLine->setText(text.left(i)); +- return; +- } +- } +- } else { +- count = rightStr.toLocal8Bit().length(); +- for ( ; i < leftStr.length(); ++i) { +- count += leftStr.mid(i,1).toLocal8Bit().length(); +- if (count > AP_NAME_MAX_LENGTH) { +- m_apNameLine->setText(leftStr.left(i) + rightStr); +- m_apNameLine->setCursorPosition(i); +- return; +- } ++ for ( ; i < text.length(); ++i) { ++ count += text.mid(i,1).toLocal8Bit().length(); ++ if (count > AP_NAME_MAX_LENGTH) { ++ m_apNameLine->setText(text.left(i)); ++ return; + } + } + } +@@ -372,8 +352,7 @@ void MobileHotspotWidget::onInterfaceChanged() + void MobileHotspotWidget::onActiveConnectionChanged(QString deviceName, QString ssid, QString uuid, int status) + { + if(m_uuid == uuid && status == 4) { +- if(m_switchBtn->isChecked()) +- showDesktopNotify(tr("hotspot already close")); ++ showDesktopNotify(tr("hotspot already close")); + m_switchBtn->setChecked(false); + setUiEnabled(false); + m_uuid.clear(); +@@ -390,10 +369,7 @@ void MobileHotspotWidget::onActiveConnectionChanged(QString deviceName, QString + + void MobileHotspotWidget::onWirelessBtnChanged(bool state) + { +- stopLoading(); + if (!state) { +- if(m_switchBtn->isChecked()) +- showDesktopNotify(tr("hotspot already close")); + m_switchBtn->setChecked(state); + m_uuid.clear(); + m_switchBtn->setCheckable(false); +@@ -446,10 +422,6 @@ void MobileHotspotWidget::initInterfaceInfo() + } else { + QMap<QString, bool>::Iterator iter = devMap.begin(); + while (iter != devMap.end()) { +- if (!iter.value()) { +- iter++; +- continue; +- } + QString interfaceName = iter.key(); + if (!(devCapMap[interfaceName] & 0x01)) { + m_interfaceComboBox->addItem(interfaceName); +@@ -476,8 +448,6 @@ void MobileHotspotWidget::getApInfo() + } + + if (m_interfaceComboBox->count() <= 0) { +- if(m_switchBtn->isChecked()) +- showDesktopNotify(tr("hotspot already close")); + m_switchBtn->setChecked(false); + setWidgetHidden(true); + qWarning() << LOG_HEAD << "getApInfo but interface is empty"; +@@ -510,14 +480,10 @@ void MobileHotspotWidget::getApInfo() + } + + if (apInfo.at(3) == "true") { +- if(!m_switchBtn->isChecked()) +- showDesktopNotify(tr("hotspot already open")); + m_switchBtn->setChecked(true); + setUiEnabled(true); + m_uuid = apInfo.at(4); + } else { +- if(m_switchBtn->isChecked()) +- showDesktopNotify(tr("hotspot already close")); + m_switchBtn->setChecked(false); + setUiEnabled(false); + m_uuid = apInfo.at(4); +@@ -541,54 +507,15 @@ void MobileHotspotWidget::setSwitchFrame() + + QHBoxLayout *switchLayout = new QHBoxLayout(m_switchFrame); + +- m_switchLabel = new QLabel(tr("Open mobile hotspot"), this); ++ m_switchLabel = new QLabel(tr("Open"), this); + m_switchLabel->setMinimumWidth(LABLE_MIN_WIDTH); + m_switchBtn = new KSwitchButton(this); +- m_statusLabel= new QLabel(this); +- m_statusLabel->hide(); + switchLayout->setContentsMargins(ITEM_MARGINS); + switchLayout->addWidget(m_switchLabel); + switchLayout->addStretch(); +- switchLayout->addWidget(m_statusLabel); +- switchLayout->addSpacing(4); + switchLayout->addWidget(m_switchBtn); + + m_switchFrame->setLayout(switchLayout); +- +- m_loadIcons.append(QIcon::fromTheme("ukui-loading-1-symbolic")); +- m_loadIcons.append(QIcon::fromTheme("ukui-loading-2-symbolic")); +- m_loadIcons.append(QIcon::fromTheme("ukui-loading-3-symbolic")); +- m_loadIcons.append(QIcon::fromTheme("ukui-loading-4-symbolic")); +- m_loadIcons.append(QIcon::fromTheme("ukui-loading-5-symbolic")); +- m_loadIcons.append(QIcon::fromTheme("ukui-loading-6-symbolic")); +- m_loadIcons.append(QIcon::fromTheme("ukui-loading-7-symbolic")); +- m_waitTimer = new QTimer(this); +- connect(m_waitTimer, &QTimer::timeout, this, &MobileHotspotWidget::updateLoadingIcon); +-} +- +-void MobileHotspotWidget::updateLoadingIcon() +-{ +- if (m_currentIconIndex > 6) { +- m_currentIconIndex = 0; +- } +- m_statusLabel->setPixmap(m_loadIcons.at(m_currentIconIndex).pixmap(16,16)); +- m_currentIconIndex ++; +-} +- +-void MobileHotspotWidget::startLoading() +-{ +- m_waitTimer->start(FRAME_SPEED); +- m_switchBtn->hide(); +- m_statusLabel->setFocus(); +- m_statusLabel->show(); +-} +- +-void MobileHotspotWidget::stopLoading() +-{ +- m_waitTimer->stop(); +- m_statusLabel->clearFocus(); +- m_statusLabel->hide(); +- m_switchBtn->show(); + } + + void MobileHotspotWidget::setApNameFrame() +@@ -622,8 +549,8 @@ void MobileHotspotWidget::setPasswordFrame() + m_passwordFrame->setMinimumSize(PASSWORD_FRAME_MIN_SIZE); + m_passwordFrame->setMaximumSize(PASSWORD_FRAME_MAX_SIZE); + +- m_pwdLabel = new FixLabel(tr("Network Password"), this); +- m_pwdLabel->setFixedWidth(LABLE_MIN_WIDTH); ++ m_pwdLabel = new QLabel(tr("Password"), this); ++ m_pwdLabel->setMinimumWidth(LABLE_MIN_WIDTH); + m_pwdNameLine = new KPasswordEdit(this); + m_pwdNameLine->setClearButtonEnabled(false);//禁用ClearBtn按钮X + m_pwdNameLine->setMinimumWidth(COMBOBOX_MIN_WIDTH); +@@ -636,6 +563,13 @@ void MobileHotspotWidget::setPasswordFrame() + m_pwdHintLabel->setPalette(hintTextColor); + m_pwdHintLabel->setText(tr("Contains at least 8 characters")); //至少包含8个字符 + ++ QWidget *pwdInputWidget = new QWidget(m_passwordFrame); ++ QVBoxLayout *pwdInputVLayout = new QVBoxLayout(pwdInputWidget); ++ pwdInputVLayout->setContentsMargins(CONTENTS_MARGINS); ++ pwdInputVLayout->setSpacing(0); ++ pwdInputVLayout->addWidget(m_pwdNameLine); ++ pwdInputVLayout->addWidget(m_pwdHintLabel); ++ + QGridLayout *pwdLayout = new QGridLayout(m_passwordFrame); + pwdLayout->setContentsMargins(PASSWORD_ITEM_MARGINS); + pwdLayout->setSpacing(0); +@@ -644,9 +578,6 @@ void MobileHotspotWidget::setPasswordFrame() + pwdLayout->addWidget(m_pwdHintLabel, 1, 1); + + m_passwordFrame->setLayout(pwdLayout); +- //init +- m_passwordFrame->setFixedHeight(PASSWORD_FRAME_FIX_HIGHT); +- m_pwdHintLabel->show(); + + m_pwdNameLine->installEventFilter(this); + } +@@ -661,8 +592,8 @@ void MobileHotspotWidget::setFreqBandFrame() + + QHBoxLayout *freqBandHLayout = new QHBoxLayout(m_freqBandFrame); + +- m_freqBandLabel = new FixLabel(this); +- m_freqBandLabel->setText(tr("Network Frequency band")); ++ m_freqBandLabel = new KLabel(this); ++ m_freqBandLabel->setText(tr("Frequency band")); + m_freqBandLabel->setFixedWidth(LABLE_MIN_WIDTH - 8); + m_freqBandComboBox = new QComboBox(this); + m_freqBandComboBox->setInsertPolicy(QComboBox::NoInsert); +@@ -686,7 +617,7 @@ void MobileHotspotWidget::setInterFaceFrame() + m_interfaceFrame->setMinimumSize(PASSWORD_FRAME_MIN_SIZE); + m_interfaceFrame->setMaximumSize(PASSWORD_FRAME_MAX_SIZE); + +- m_interfaceLabel = new FixLabel(tr("Shared NIC port"), this); ++ m_interfaceLabel = new QLabel(tr("Net card"), this); + m_interfaceLabel->setFixedWidth(LABLE_MIN_WIDTH); + m_interfaceComboBox = new QComboBox(this); + m_interfaceComboBox->setInsertPolicy(QComboBox::NoInsert); +@@ -701,7 +632,7 @@ void MobileHotspotWidget::setInterFaceFrame() + warnIcon->setContentsMargins(0,0,0,0); + warnIcon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(16,16)); + +- m_interfaceWarnLabel= new FixLabel(this); ++ m_interfaceWarnLabel= new KLabel(this); + m_interfaceWarnLabel->setFixedHeight(20); + + QPalette hintTextColor; +@@ -726,6 +657,7 @@ void MobileHotspotWidget::setInterFaceFrame() + + m_warnWidget->hide(); + } ++ + void MobileHotspotWidget::onActivateFailed(QString errorMessage) + { + if (errorMessage.indexOf("hotspot")) { +@@ -760,6 +692,7 @@ void MobileHotspotWidget::onDeviceNameChanged(QString oldName, QString newName, + m_interfaceName = newName; + } + } ++ + QTimer::singleShot(100, this, [=]() { + if (m_interfaceComboBox->currentText() == newName) { + updateBandCombox(); +@@ -770,16 +703,14 @@ void MobileHotspotWidget::onDeviceNameChanged(QString oldName, QString newName, + //热点断开 + void MobileHotspotWidget::onHotspotDeactivated(QString devName, QString ssid) + { +- stopLoading(); + if (!m_switchBtn->isChecked()) { + return; + } + if (devName == m_interfaceComboBox->currentText() && ssid == m_apNameLine->text()) { +- if(m_switchBtn->isChecked()) +- showDesktopNotify(tr("hotspot already close")); + m_switchBtn->setChecked(false); + m_uuid.clear(); + // setUiEnabled(true); ++ showDesktopNotify(tr("hotspot already close")); + } + } + +@@ -787,7 +718,6 @@ void MobileHotspotWidget::onHotspotDeactivated(QString devName, QString ssid) + void MobileHotspotWidget::onHotspotActivated(QString devName, QString ssid, QString uuid, QString activePath, QString settingPath) + { + qDebug() << LOG_HEAD << "onHotspotActivated" <<devName << ssid << uuid; +- stopLoading(); + if (m_switchBtn->isChecked()) { + return; + } +@@ -807,11 +737,10 @@ void MobileHotspotWidget::onHotspotActivated(QString devName, QString ssid, QStr + this->update(); + + if (devName == m_interfaceComboBox->currentText() && ssid == m_apNameLine->text()) { +- if(!m_switchBtn->isChecked()) +- showDesktopNotify(tr("hotspot already open")); + m_switchBtn->setChecked(true); + m_uuid = uuid; + // setUiEnabled(false); ++ showDesktopNotify(tr("hotspot already open")); + } else { + QStringList info; + if (!getApInfoBySsid(devName, ssid, info)) { +@@ -819,8 +748,7 @@ void MobileHotspotWidget::onHotspotActivated(QString devName, QString ssid, QStr + } + int index = m_interfaceComboBox->findText(devName); + if (index >= 0) { +- if(!m_switchBtn->isChecked()) +- showDesktopNotify(tr("hotspot already open")); ++ showDesktopNotify(tr("hotspot already open")); + m_apNameLine->setText(ssid); + m_interfaceComboBox->setCurrentIndex(index); + m_switchBtn->setChecked(true); +@@ -899,7 +827,6 @@ void MobileHotspotWidget::setWidgetHidden(bool isHidden) + onWirelessBtnChanged(state); + } + resetFrameSize(); +- + } + + void MobileHotspotWidget::updateBandCombox() +@@ -912,6 +839,7 @@ void MobileHotspotWidget::updateBandCombox() + setWidgetHidden(true); + return; + } ++ + m_isUserSelect = false; + + QMap<QString, int> devCapMap; +@@ -1071,7 +999,6 @@ void MobileHotspotWidget::initConnectDevPage() + m_connectDevPage = new ConnectdevPage(this); + m_Vlayout->addSpacing(32); + m_Vlayout->addWidget(m_connectDevPage); +- connect(m_switchBtn, &KSwitchButton::stateChanged, m_connectDevPage, &ConnectdevPage::refreshStalist); + } + + void MobileHotspotWidget::initBlackListPage() +@@ -1080,4 +1007,3 @@ void MobileHotspotWidget::initBlackListPage() + m_Vlayout->addSpacing(32); + m_Vlayout->addWidget(m_blacklistPage); + } +- +diff --git a/plugins/mobilehotspot/mobilehotspotwidget.h b/plugins/mobilehotspot/mobilehotspotwidget.h +index 6a8d6ac..b27d9ea 100644 +--- a/plugins/mobilehotspot/mobilehotspotwidget.h ++++ b/plugins/mobilehotspot/mobilehotspotwidget.h +@@ -39,14 +39,13 @@ + #include <QDBusMetaType> + #include <QScrollArea> + +-#include "titlelabel.h" + #include "kwidget.h" + #include "kswitchbutton.h" + #include "kpasswordedit.h" + #include "connectdevlistitem.h" + #include "blacklistpage.h" + #include "connectdevpage.h" +-#include "fixlabel.h" ++#include "klabel.h" + #include "ukcccommon.h" + + using namespace kdk; +@@ -69,13 +68,13 @@ private: + + KSwitchButton *m_switchBtn; + +- TitleLabel *m_hotspotTitleLabel; ++ KLabel *m_hotspotTitleLabel; + QLabel *m_switchLabel; + QLabel *m_apNameLabel; +- FixLabel *m_pwdLabel; ++ QLabel *m_pwdLabel; + QLabel *m_pwdHintLabel; +- FixLabel *m_freqBandLabel; +- FixLabel *m_interfaceLabel; ++ KLabel *m_freqBandLabel; ++ QLabel *m_interfaceLabel; + + QFrame *switchAndApNameLine; + QFrame *apNameAndPwdLine; +@@ -90,7 +89,7 @@ private: + QComboBox *m_freqBandComboBox; + QComboBox *m_interfaceComboBox; + +- FixLabel *m_interfaceWarnLabel; ++ KLabel *m_interfaceWarnLabel; + QWidget* m_warnWidget; + + QDBusInterface *m_interface = nullptr; +@@ -102,13 +101,6 @@ private: + QString m_uuid = ""; + QString m_hostName = ""; + +- +- QLabel *m_statusLabel; +- QTimer *m_waitTimer = nullptr; +- QList<QIcon> m_loadIcons; +- int m_currentIconIndex=0; +- void updateLoadingIcon(); +- + void resetFrameSize(); + void initUI(); + void initDbusConnect(); +@@ -152,7 +144,6 @@ private: + void initBlackListPage(); + + bool m_isUserSelect = true; //是否用户操作 +- + signals: + + private slots: +@@ -175,9 +166,6 @@ private slots: + void onPwdTextChanged(); + + void onInterfaceChanged(); +- +- void startLoading(); +- void stopLoading(); + }; + + #endif // MOBILEHOTSPOTWIDGET_H +diff --git a/plugins/netconnect/deviceframe.cpp b/plugins/netconnect/deviceframe.cpp +index 7535382..d89756d 100644 +--- a/plugins/netconnect/deviceframe.cpp ++++ b/plugins/netconnect/deviceframe.cpp +@@ -34,23 +34,23 @@ DeviceFrame::DeviceFrame(QString devName, QWidget *parent) : QFrame(parent) + + deviceLabel = new QLabel(this); + dropDownLabel = new DrownLabel(devName, this); +-// deviceSwitch = new KSwitchButton(this); ++ deviceSwitch = new KSwitchButton(this); + // deviceSwitch->installEventFilter(this); + + deviceLayout->addWidget(deviceLabel); + deviceLayout->addStretch(); +- deviceLayout->addWidget(dropDownLabel);/* +- deviceLayout->addWidget(deviceSwitch);*/ ++ deviceLayout->addWidget(dropDownLabel); ++ deviceLayout->addWidget(deviceSwitch); + } + + bool DeviceFrame::eventFilter(QObject *w,QEvent *e) + { +-// if (w == deviceSwitch) { +-// if (e->type() == QEvent::MouseButtonPress) { +-// emit deviceSwitchClicked(!deviceSwitch->isChecked()); +-// return true; +-// } +-// } ++ if (w == deviceSwitch) { ++ if (e->type() == QEvent::MouseButtonPress) { ++ emit deviceSwitchClicked(!deviceSwitch->isChecked()); ++ return true; ++ } ++ } + return QFrame::eventFilter(w, e); + } + +diff --git a/plugins/netconnect/lanitem.cpp b/plugins/netconnect/lanitem.cpp +index 753e4fe..0f94da2 100644 +--- a/plugins/netconnect/lanitem.cpp ++++ b/plugins/netconnect/lanitem.cpp +@@ -39,7 +39,7 @@ LanItem::LanItem(bool isAcitve, QWidget *parent) + mLanLyt->setSpacing(16); + iconLabel = new QLabel(this); + iconLabel->setProperty("useIconHighlightEffect", 0x2); +- titileLabel = new FixLabel(this); ++ titileLabel = new KLabel(this); + statusLabel = new QLabel(this); + statusLabel->setProperty("useIconHighlightEffect", 0x2); + statusLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); +@@ -79,6 +79,9 @@ LanItem::LanItem(bool isAcitve, QWidget *parent) + connect(waitTimer, &QTimer::timeout, this, &LanItem::updateIcon); + connect(m_connectAction, &QAction::triggered, this, &LanItem::onConnectTriggered); + connect(m_deleteAction, &QAction::triggered, this, &LanItem::onDeletetTriggered); ++ connect(m_moreMenu, &QMenu::aboutToHide, this, [=]() { ++ this->repaint(); ++ }); + m_moreMenu->installEventFilter(this); + } + +diff --git a/plugins/netconnect/lanitem.h b/plugins/netconnect/lanitem.h +index 4aabbe6..f66c49c 100644 +--- a/plugins/netconnect/lanitem.h ++++ b/plugins/netconnect/lanitem.h +@@ -32,10 +32,12 @@ + #include <QToolButton> + #include <QMenu> + #include <QEvent> +-#include "fixlabel.h" ++#include "klabel.h" + //#include "infobutton.h" + #include "../component/AddBtn/grayinfobutton.h" + ++using namespace kdk; ++ + class LanItem : public QPushButton + { + Q_OBJECT +@@ -45,7 +47,7 @@ public: + public: + QLabel * iconLabel = nullptr; + GrayInfoButton * infoLabel = nullptr; +- FixLabel * titileLabel = nullptr; ++ KLabel * titileLabel = nullptr; + QLabel * statusLabel = nullptr; + QToolButton* m_moreButton = nullptr; + QMenu* m_moreMenu = nullptr; +diff --git a/plugins/netconnect/netconnect.cpp b/plugins/netconnect/netconnect.cpp +index 258e57e..8da42ac 100644 +--- a/plugins/netconnect/netconnect.cpp ++++ b/plugins/netconnect/netconnect.cpp +@@ -35,6 +35,11 @@ + #define KYLIN_APP_MANAGER_NAME "com.kylin.AppManager" + #define KYLIN_APP_MANAGER_PATH "/com/kylin/AppManager" + #define KYLIN_APP_MANAGER_INTERFACE "com.kylin.AppManager" ++ ++#define SYSTEM_DBUS_SERVICE "com.kylin.network.qt.systemdbus" ++#define SYSTEM_DBUS_PATH "/" ++#define SYSTEM_DBUS_INTERFACE "com.kylin.network.interface" ++ + const QString KLanSymbolic = "network-wired-connected-symbolic"; + const QString NoNetSymbolic = "network-wired-disconnected-symbolic"; + +@@ -85,15 +90,32 @@ NetConnect::NetConnect() : mFirstLoad(true) { + + pluginName = tr("LAN"); + pluginType = NETWORK; ++ ++ m_interface = new QDBusInterface("com.kylin.network", ++ "/com/kylin/network", ++ "com.kylin.network", ++ QDBusConnection::sessionBus()); ++ if(!m_interface->isValid()) { ++ qWarning() << qPrintable(QDBusConnection::sessionBus().lastError().message()); ++ } ++ updatePluginShowSettings(); ++ connect(m_interface, SIGNAL(deviceStatusChanged()), this, SLOT(updatePluginShowSettings()),Qt::QueuedConnection); + } + +-NetConnect::~NetConnect() { +- if (!mFirstLoad) { +- delete ui; +- ui = nullptr; +- delete m_interface; +- delete m_switchGsettings; ++/*fortify扫描报错,需要显示删除一下*/ ++NetConnect::~NetConnect() ++{ ++ QMap<QString, ItemFrame *>::iterator iter1; ++ ++ for (iter1 = deviceFrameMap.begin(); iter1 != deviceFrameMap.end(); iter1++) ++ { ++ ItemFrame *temp= iter1.value(); ++ if(temp) ++ { ++ delete temp; ++ } + } ++ deviceFrameMap.clear(); + } + + QString NetConnect::plugini18nName() { +@@ -112,6 +134,7 @@ QWidget *NetConnect::pluginUi() { + pluginWidget = new QWidget; + pluginWidget->setAttribute(Qt::WA_DeleteOnClose); + ui->setupUi(pluginWidget); ++ + m_interface = new QDBusInterface("com.kylin.network", + "/com/kylin/network", + "com.kylin.network", +@@ -135,7 +158,54 @@ const QString NetConnect::name() const { + + bool NetConnect::isEnable() const + { +- return true; ++ //get isEnable ++ QDBusInterface dbus("com.kylin.network", "/com/kylin/network", ++ "com.kylin.network", ++ QDBusConnection::sessionBus()); ++ if (!dbus.isValid()) { ++ return false; ++ } ++ ++ QMap<QString,bool> map; ++ QDBusReply<QVariantMap> reply = dbus.call(QStringLiteral("getDeviceListAndEnabled"),0); ++ if(!reply.isValid()) ++ { ++ qWarning() << "[NetConnect]getWiredDeviceList error:" << reply.error().message(); ++ return false; ++ } ++ ++ QVariantMap::const_iterator item = reply.value().cbegin(); ++ while (item != reply.value().cend()) { ++ map.insert(item.key(), item.value().toBool()); ++ item ++; ++ } ++ ++ bool isEnabled = !map.isEmpty(); ++ ++ const QByteArray schema("org.ukui.control-center.plugins"); ++ if (QGSettings::isSchemaInstalled(schema)) { ++ return isEnabled; ++ } ++ ++ //get gsettings ++ QGSettings *showSettings; ++ QString path("/org/ukui/control-center/plugins/netconnect/"); ++ showSettings = new QGSettings(schema, path.toUtf8()); ++ ++ QVariant enabledState = showSettings->get("show"); ++ ++ //set gsettings ++ if (!enabledState.isValid() || enabledState.isNull()) { ++ qWarning() << "QGSettins get plugin show status error"; ++ } else { ++ if (enabledState.toBool() != isEnabled) { ++ showSettings->set("show", isEnabled); ++ } ++ } ++ delete showSettings; ++ showSettings = nullptr; ++ ++ return isEnabled; + } + + +@@ -172,28 +242,14 @@ bool NetConnect::eventFilter(QObject *w, QEvent *e) { + w->findChild<QWidget*>()->setStyleSheet("QWidget{background: palette(base);border-radius:4px;}"); + } + +-// if (w == wiredSwitch) { +-// if (e->type() == QMouseEvent::MouseButtonRelease) { +-// if (!wiredSwitch->isCheckable()) { +-// showDesktopNotify(tr("No ethernet device avaliable")); +-// } else { +-// UkccCommon::buriedSettings(QString("netconnect"), QString("Open"), QString("settings"),wiredSwitch->isChecked()?"false":"true"); +-// if (m_interface != nullptr && m_interface->isValid()) { +-// m_interface->call(QStringLiteral("setWiredSwitchEnable"), !wiredSwitch->isChecked()); +-// } +-// return true; +-// } +-// } +-// } +- + return QObject::eventFilter(w,e); + } + + void NetConnect::initComponent() { +-// wiredSwitch = new KSwitchButton(pluginWidget); +-// ui->openWIifLayout->addWidget(wiredSwitch); ++ wiredSwitch = new KSwitchButton(pluginWidget); ++ ui->openWIifLayout->addWidget(wiredSwitch); + ui->openWIifLayout->setContentsMargins(0,0,8,0); +- ui->openWifiFrame->hide(); ++// ui->openWifiFrame->hide(); + ui->detailLayOut->setContentsMargins(MAIN_LAYOUT_MARGINS); + ui->verticalLayout_3->setContentsMargins(NO_MARGINS); + ui->verticalLayout_3->setSpacing(8); +@@ -202,6 +258,24 @@ void NetConnect::initComponent() { + + // wiredSwitch->installEventFilter(this); + ++ m_pSysBusIntfs = new QDBusInterface(SYSTEM_DBUS_SERVICE, ++ SYSTEM_DBUS_PATH, ++ SYSTEM_DBUS_INTERFACE, ++ QDBusConnection::systemBus()); ++ ++ if (m_pSysBusIntfs->isValid()) { ++ setSwitchStatus(); ++ QDBusConnection::systemBus().connect(SYSTEM_DBUS_SERVICE, ++ SYSTEM_DBUS_PATH, ++ SYSTEM_DBUS_INTERFACE, ++ "switchChanged", ++ this, ++ SLOT(renewSwitchLayout(bool))); ++ } else { ++ wiredSwitch->blockSignals(true); ++ wiredSwitch->setChecked(true); ++ wiredSwitch->blockSignals(false); ++ } + // if (QGSettings::isSchemaInstalled(GSETTINGS_SCHEMA)) { + // m_switchGsettings = new QGSettings(GSETTINGS_SCHEMA); + +@@ -220,14 +294,14 @@ void NetConnect::initComponent() { + // } + + getDeviceStatusMap(deviceStatusMap); +-// if (deviceStatusMap.isEmpty()) { +-// qDebug() << "[Netconnect] no device exist when init, set switch disable"; +-// wiredSwitch->setChecked(false); +-// wiredSwitch->setCheckable(false); +-// } ++ if (deviceStatusMap.isEmpty()) { ++ qDebug() << "[Netconnect] no device exist when init, set switch disable"; ++ wiredSwitch->setChecked(false); ++ wiredSwitch->setCheckable(false); ++ } + initNet(); + +- if (/*!wiredSwitch->isChecked() || */deviceStatusMap.isEmpty() || !m_interface->isValid()) { ++ if (!wiredSwitch->isChecked() || deviceStatusMap.isEmpty() || !m_interface->isValid()) { + hideLayout(ui->availableLayout); + } + +@@ -251,6 +325,66 @@ void NetConnect::initComponent() { + UkccCommon::buriedSettings(QString("netconnect"), QString("Advanced settings"), QString("clicked")); + runExternalApp(); + }); ++ ++ connect(wiredSwitch, &KSwitchButton::clicked, this, &NetConnect::wiredSwitchSLot); ++} ++ ++void NetConnect::wiredSwitchSLot(bool checked) ++{ ++ if (!wiredSwitch->isCheckable()) { ++ showDesktopNotify(tr("No ethernet device avaliable")); ++ return; ++ } ++ UkccCommon::buriedSettings(QString("netconnect"), QString("Open"), QString("settings"),wiredSwitch->isChecked()?"false":"true"); ++ if (m_pSysBusIntfs == nullptr || !m_pSysBusIntfs->isValid()) ++ return; ++ ++ m_pSysBusIntfs->call(QStringLiteral("setSwitch"), checked); ++ if (checked) { ++ showLayout(ui->availableLayout); ++ return; ++ } ++ ++ hideLayout(ui->availableLayout); ++ ++ QMap<QString, ItemFrame *>::iterator iter1; ++ for (iter1 = deviceFrameMap.begin(); iter1 != deviceFrameMap.end(); iter1++) { ++ QMap<QString, LanItem *>::iterator iter2; ++ for (iter2 = iter1.value()->itemMap.begin(); ++ iter2 != iter1.value()->itemMap.end(); ++ iter2++) ++ { ++ if (iter2.value()->isAcitve) { ++ deActiveConnect(iter2.value()->uuid, iter1.value()->deviceFrame->dropDownLabel->m_devName, WIRED_TYPE); ++ } ++ } ++ } ++} ++ ++void NetConnect::renewSwitchLayout(bool enable) ++{ ++// wiredSwitch->blockSignals(true); ++ wiredSwitch->setChecked(enable); ++// wiredSwitch->blockSignals(false); ++ if (!enable) { ++ hideLayout(ui->availableLayout); ++ ++ QMap<QString, ItemFrame *>::iterator iter1; ++ for (iter1 = deviceFrameMap.begin(); iter1 != deviceFrameMap.end(); iter1++) { ++ ++ QMap<QString, LanItem *>::iterator iter2; ++ for (iter2 = iter1.value()->itemMap.begin(); ++ iter2 != iter1.value()->itemMap.end(); ++ iter2++) ++ { ++ if (iter2.value()->isAcitve) { ++ deActiveConnect(iter2.value()->uuid, iter1.value()->deviceFrame->dropDownLabel->m_devName, WIRED_TYPE); ++ } ++ } ++ } ++ } else { ++ showLayout(ui->availableLayout); ++ } + } + + //获取网卡列表 +@@ -318,6 +452,14 @@ void NetConnect::updateLanInfo(QString deviceName, QStringList lanInfo) + //总开关 + void NetConnect::setSwitchStatus() + { ++ QDBusReply <bool> reply = m_pSysBusIntfs->call("getSwitch"); ++ if (reply.isValid()) { ++ bool status = reply.value(); ++ renewSwitchLayout(status); ++ } else { ++ qWarning () << "switch init dbus reply invalid"; ++ } ++ + // if (QGSettings::isSchemaInstalled(GSETTINGS_SCHEMA)) { + // bool status = m_switchGsettings->get(WIRED_SWITCH).toBool(); + // wiredSwitch->blockSignals(true); +@@ -535,7 +677,7 @@ void NetConnect::addDeviceFrame(QString devName) + ItemFrame *itemFrame = new ItemFrame(devName, pluginWidget); + ui->availableLayout->addWidget(itemFrame); + itemFrame->deviceFrame->deviceLabel->setText(tr("card")+/*QString("%1").arg(count)+*/":"+devName); +-// itemFrame->deviceFrame->deviceSwitch->setChecked(enable); ++ itemFrame->deviceFrame->deviceSwitch->setChecked(enable); + if (enable) { + itemFrame->lanItemFrame->show(); + itemFrame->deviceFrame->dropDownLabel->show(); +@@ -551,26 +693,37 @@ void NetConnect::addDeviceFrame(QString devName) + // UkccCommon::buriedSettings(QString("netconnect"), "device open", QString("settings"), checked?"true":"fasle"); + // qDebug() << "[NetConnect]call setDeviceEnable" << devName << checked << __LINE__; + // m_interface->call(QStringLiteral("setDeviceEnable"), devName, checked); ++// if (m_pSysBusIntfs->isValid()) { ++// } + // qDebug() << "[NetConnect]call setDeviceEnable Respond" << __LINE__; + // }); + +-// connect(itemFrame->deviceFrame->deviceSwitch, &KSwitchButton::stateChanged, this, [=] (bool checked) { +- +-// if (checked) { +-// qDebug() << "[NetConnect]set " << devName << "status" << true; +-// itemFrame->lanItemFrame->show(); +-// itemFrame->deviceFrame->dropDownLabel->show(); +-// itemFrame->addLanWidget->show(); +-// itemFrame->deviceFrame->dropDownLabel->setDropDownStatus(true); +-// deviceStatusMap[devName] = true; +-// } else { +-// qDebug() << "[NetConnect]set " << devName << "status" << false; +-// itemFrame->lanItemFrame->hide(); +-// itemFrame->deviceFrame->dropDownLabel->hide(); +-// itemFrame->addLanWidget->hide(); +-// deviceStatusMap[devName] = false; +-// } +-// }); ++ connect(itemFrame->deviceFrame->deviceSwitch, &KSwitchButton::clicked, this, [=] (bool checked) { ++ if (checked) { ++ qDebug() << "[NetConnect]set " << devName << "status" << true; ++ itemFrame->lanItemFrame->show(); ++ itemFrame->deviceFrame->dropDownLabel->show(); ++ itemFrame->addLanWidget->show(); ++ itemFrame->deviceFrame->dropDownLabel->setDropDownStatus(true); ++ deviceStatusMap[devName] = true; ++ } else { ++ qDebug() << "[NetConnect]set " << devName << "status" << false; ++ itemFrame->lanItemFrame->hide(); ++ itemFrame->deviceFrame->dropDownLabel->hide(); ++ itemFrame->addLanWidget->hide(); ++ deviceStatusMap[devName] = false; ++ QMap<QString, LanItem *>::iterator iter; ++ for (iter = deviceFrameMap.value(devName)->itemMap.begin(); ++ iter != deviceFrameMap.value(devName)->itemMap.end(); ++ iter++) ++ { ++ if (iter.value()->isAcitve) { ++ deActiveConnect(iter.value()->uuid, devName, WIRED_TYPE); ++ } ++ } ++ } ++ m_pSysBusIntfs->call(QStringLiteral("setDeviceSwitch"), devName, checked); ++ }); + + connect(itemFrame->addLanWidget, &AddNetBtn::clicked, this, [=](){ + UkccCommon::buriedSettings(pluginName, "Add net", QString("clicked")); +@@ -646,22 +799,22 @@ void NetConnect::onDeviceStatusChanged() + initNetListFromDevice(addList.at(i)); + } + deviceStatusMap = map; +-// if (deviceStatusMap.isEmpty()) { +-// wiredSwitch->setChecked(false); +-// wiredSwitch->setCheckable(false); +-// } else { +-// wiredSwitch->setCheckable(true); +-// setSwitchStatus(); +-// } ++ if (deviceStatusMap.isEmpty()) { ++ wiredSwitch->setChecked(false); ++ wiredSwitch->setCheckable(false); ++ } else { ++ wiredSwitch->setCheckable(true); ++ setSwitchStatus(); ++ } + +-// QMap<QString, ItemFrame *>::iterator iter; +-// for (iter = deviceFrameMap.begin(); iter != deviceFrameMap.end(); iter++) { +-// if (deviceStatusMap.contains(iter.key())) { +-// if (iter.value()->deviceFrame->deviceSwitch->isChecked() != deviceStatusMap[iter.key()]) { +-// iter.value()->deviceFrame->deviceSwitch->setChecked(deviceStatusMap[iter.key()]); +-// } +-// } +-// } ++ QMap<QString, ItemFrame *>::iterator iter; ++ for (iter = deviceFrameMap.begin(); iter != deviceFrameMap.end(); iter++) { ++ if (deviceStatusMap.contains(iter.key())) { ++ if (iter.value()->deviceFrame->deviceSwitch->isChecked() != deviceStatusMap[iter.key()]) { ++ iter.value()->deviceFrame->deviceSwitch->setChecked(deviceStatusMap[iter.key()]); ++ } ++ } ++ } + } + + void NetConnect::onDeviceNameChanged(QString oldName, QString newName, int type) +@@ -991,3 +1144,8 @@ QMap<QString, QList<QStringList>> NetConnect::getWiredList() + } + return map; + } ++ ++void NetConnect::updatePluginShowSettings() ++{ ++ isEnable(); ++} +diff --git a/plugins/netconnect/netconnect.h b/plugins/netconnect/netconnect.h +index fa1e8e2..6afa5ab 100644 +--- a/plugins/netconnect/netconnect.h ++++ b/plugins/netconnect/netconnect.h +@@ -47,7 +47,7 @@ + + #include "interface.h" + #include "addbtn.h" +-#include "fixlabel.h" ++#include "klabel.h" + #include "hoverbtn.h" + #include "lanitem.h" + #include "deviceframe.h" +@@ -148,6 +148,7 @@ private: + QMap<QString, ItemFrame *> deviceFrameMap; + + QMap<QString, QList<QStringList>> getWiredList(); ++ QDBusInterface *m_pSysBusIntfs; + + private slots: + void updateLanInfo(QString deviceName, QStringList lanInfo); +@@ -159,6 +160,11 @@ private slots: + + void onDeviceStatusChanged(); + void onDeviceNameChanged(QString, QString, int); ++ ++ //更新控制面板插件Gsetting show ++ void updatePluginShowSettings(); ++ void renewSwitchLayout(bool enable); ++ void wiredSwitchSLot(bool checked); + }; + + Q_DECLARE_METATYPE(QList<QDBusObjectPath>); +diff --git a/plugins/proxy/aptproxydialog.cpp b/plugins/proxy/aptproxydialog.cpp +index e42b738..403c2df 100644 +--- a/plugins/proxy/aptproxydialog.cpp ++++ b/plugins/proxy/aptproxydialog.cpp +@@ -55,7 +55,7 @@ void AptProxyDialog::initUi() + mLyt_1->setContentsMargins(0, 0, 0, 0); + mLyt_1->setSpacing(8); + +- FixLabel *mSetHostLabel = new FixLabel(mHostFrame); ++ KLabel *mSetHostLabel = new KLabel(mHostFrame); + mSetHostLabel->setFixedSize(92, 36); + mSetHostLabel->setText(tr("Server Address")); + +diff --git a/plugins/proxy/aptproxydialog.h b/plugins/proxy/aptproxydialog.h +index 95d49f0..bdab757 100644 +--- a/plugins/proxy/aptproxydialog.h ++++ b/plugins/proxy/aptproxydialog.h +@@ -27,7 +27,9 @@ + #include <QLabel> + #include <QLineEdit> + #include <QDialog> +-#include "fixlabel.h" ++#include "klabel.h" ++ ++using namespace kdk; + + #define APT_PROXY_SCHEMA "org.ukui.control-center.apt.proxy" + #define APT_PROXY_ENABLED "enabled" +diff --git a/plugins/proxy/proxy.cpp b/plugins/proxy/proxy.cpp +index 8641546..5b13755 100644 +--- a/plugins/proxy/proxy.cpp ++++ b/plugins/proxy/proxy.cpp +@@ -183,7 +183,8 @@ void Proxy::initUi(QWidget *widget) + mProxyBtnGroup = new QButtonGroup(this); + mProxyBtnGroup->setExclusive (false); // 防止互斥 + +- mTitleLabel = new TitleLabel(widget); ++ mTitleLabel = new KLabel(widget); ++ mTitleLabel->setContentsMargins(16, 0, 0, 0); + + mProxyFrame = new QFrame(widget); + mProxyFrame->setMinimumSize(QSize(550, 0)); +@@ -378,7 +379,9 @@ void Proxy::initUi(QWidget *widget) + // setAppListFrameUi(widget); + + //APT代理模块 +- mAptProxyLabel = new TitleLabel(widget); ++ mAptProxyLabel = new KLabel(widget); ++ mAptProxyLabel->setContentsMargins(16, 0, 0, 0); ++ + mAPTFrame = new QFrame(widget); + mAPTFrame->setMinimumSize(QSize(550, 0)); + mAPTFrame->setMaximumSize(QSize(16777215, 16777215)); +diff --git a/plugins/proxy/proxy.h b/plugins/proxy/proxy.h +index 30d7437..add29cc 100644 +--- a/plugins/proxy/proxy.h ++++ b/plugins/proxy/proxy.h +@@ -46,7 +46,7 @@ + #include <QtDBus/QDBusMetaType> + + #include "interface.h" +-#include "titlelabel.h" ++#include "klabel.h" + #include "hoverwidget.h" + #include "applistwidget.h" + +@@ -157,9 +157,9 @@ private: + int pluginType; + QWidget * pluginWidget; + +- TitleLabel *mTitleLabel; +- TitleLabel *m_appProxyLabel; +- TitleLabel *mAptProxyLabel; ++ KLabel *mTitleLabel; ++ KLabel *m_appProxyLabel; ++ KLabel *mAptProxyLabel; + QLabel *mUrlLabel; + QLabel *mHTTPLabel; + QLabel *mHTTPPortLabel; +diff --git a/plugins/vpn/vpn.cpp b/plugins/vpn/vpn.cpp +index ccd2c12..5efd3e4 100644 +--- a/plugins/vpn/vpn.cpp ++++ b/plugins/vpn/vpn.cpp +@@ -114,7 +114,7 @@ QWidget *Vpn::pluginUi(){ + + const QString Vpn::name() const { + +- return QStringLiteral("Vpn"); ++ return QStringLiteral("VPN"); + } + + bool Vpn::isShowOnHomePage() const +diff --git a/plugins/vpn/vpnitem.cpp b/plugins/vpn/vpnitem.cpp +index 7b03a5c..5a27d55 100644 +--- a/plugins/vpn/vpnitem.cpp ++++ b/plugins/vpn/vpnitem.cpp +@@ -21,6 +21,7 @@ + #include <QPainter> + #include <QPainterPath> + #include <QApplication> ++#include "klabel.h" + #define FRAME_SPEED 150 + #define LIMIT_TIME 60*1000 + #define TOTAL_PAGE 8 +@@ -29,6 +30,8 @@ + #define THEME_QT_SCHEMA "org.ukui.style" + #define MODE_QT_KEY "style-name" + ++using namespace kdk; ++ + VpnItem::VpnItem(bool bAcitve, QWidget *parent) + : m_isAcitve(bAcitve), QPushButton(parent) + { +@@ -40,7 +43,7 @@ VpnItem::VpnItem(bool bAcitve, QWidget *parent) + mLanLyt->setSpacing(16); + m_iconLabel = new QLabel(this); + m_iconLabel->setProperty("useIconHighlightEffect", 0x2); +- m_titileLabel = new FixLabel(this); ++ m_titileLabel = new KLabel(this); + m_statusLabel = new QLabel(this); + m_statusLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + m_infoLabel = new GrayInfoButton(this); +diff --git a/plugins/vpn/vpnitem.h b/plugins/vpn/vpnitem.h +index bc48d95..3ff8030 100644 +--- a/plugins/vpn/vpnitem.h ++++ b/plugins/vpn/vpnitem.h +@@ -32,9 +32,11 @@ + #include <QToolButton> + #include <QMenu> + #include <QEvent> +-#include "fixlabel.h" ++#include "klabel.h" + #include "../component/AddBtn/grayinfobutton.h" + ++using namespace kdk; ++ + class VpnItem : public QPushButton + { + Q_OBJECT +@@ -43,7 +45,7 @@ public: + public: + QLabel * m_iconLabel = nullptr; + GrayInfoButton * m_infoLabel = nullptr; +- FixLabel * m_titileLabel = nullptr; ++ KLabel * m_titileLabel = nullptr; + QLabel * m_statusLabel = nullptr; + QToolButton* m_moreButton = nullptr; + QMenu* m_moreMenu = nullptr; +diff --git a/plugins/wlanconnect/wlanconnect.cpp b/plugins/wlanconnect/wlanconnect.cpp +index cd21d23..09f2bee 100644 +--- a/plugins/wlanconnect/wlanconnect.cpp ++++ b/plugins/wlanconnect/wlanconnect.cpp +@@ -143,6 +143,15 @@ WlanConnect::WlanConnect() : m_firstLoad(true) { + + pluginName = tr("WLAN"); + pluginType = NETWORK; ++ ++ m_interface = new QDBusInterface("com.kylin.network", "/com/kylin/network", ++ "com.kylin.network", ++ QDBusConnection::sessionBus()); ++ if(!m_interface->isValid()) { ++ qWarning() << qPrintable(QDBusConnection::sessionBus().lastError().message()); ++ } ++ updatePluginShowSettings(); ++ connect(m_interface, SIGNAL(wirelessDeviceStatusChanged()), this, SLOT(updatePluginShowSettings()), Qt::QueuedConnection); + } + + WlanConnect::~WlanConnect() +@@ -178,6 +187,7 @@ QWidget *WlanConnect::pluginUi() { + if(!m_interface->isValid()) { + qWarning() << qPrintable(QDBusConnection::sessionBus().lastError().message()); + } ++ + initSearchText(); + initComponent(); + } +@@ -191,7 +201,61 @@ const QString WlanConnect::name() const { + + bool WlanConnect::isEnable() const + { +- return true; ++ //get isEnable ++ QDBusInterface dbus("com.kylin.network", "/com/kylin/network", ++ "com.kylin.network", ++ QDBusConnection::sessionBus()); ++ if (!dbus.isValid()) { ++ return false; ++ } ++ QMap<QString,bool> map; ++ QDBusReply<QVariantMap> reply = dbus.call(QStringLiteral("getDeviceListAndEnabled"), 1); ++ if(!reply.isValid()) ++ { ++ qWarning() << "[NetConnect]getWiredDeviceList error:" << reply.error().message(); ++ return false; ++ } ++ ++ QVariantMap::const_iterator item = reply.value().cbegin(); ++ while (item != reply.value().cend()) { ++ map.insert(item.key(), item.value().toBool()); ++ item ++; ++ } ++ //筛选已托管(managed)网卡 ++ QStringList list; ++ QMap<QString, bool>::iterator iters; ++ for (iters = map.begin(); iters != map.end(); ++iters) { ++ if (iters.value() == true) { ++ list << iters.key(); ++ } ++ } ++ ++ bool isEnabled = !list.isEmpty(); ++ ++ const QByteArray schema("org.ukui.control-center.plugins"); ++ if (QGSettings::isSchemaInstalled(schema)) { ++ return isEnabled; ++ } ++ ++ //get gsettings ++ QGSettings *showSettings; ++ QString path("/org/ukui/control-center/plugins/wlanconnect/"); ++ showSettings = new QGSettings(schema, path.toUtf8()); ++ ++ QVariant enabledState = showSettings->get("show"); ++ ++ //set gsettings ++ if (!enabledState.isValid() || enabledState.isNull()) { ++ qWarning() << "QGSettins get plugin show status error"; ++ } else { ++ if (enabledState.toBool() != isEnabled) { ++ showSettings->set("show", isEnabled); ++ } ++ } ++ delete showSettings; ++ showSettings = nullptr; ++ ++ return isEnabled; + } + + +@@ -1153,3 +1217,8 @@ QMap<QString, QList<QStringList>> WlanConnect::getWirelessList() + } + return map; + } ++ ++void WlanConnect::updatePluginShowSettings() ++{ ++ isEnable(); ++} +diff --git a/plugins/wlanconnect/wlanconnect.h b/plugins/wlanconnect/wlanconnect.h +index 3772b89..5c316ae 100644 +--- a/plugins/wlanconnect/wlanconnect.h ++++ b/plugins/wlanconnect/wlanconnect.h +@@ -194,6 +194,7 @@ private slots: + + void reScan(); + +- ++ //更新控制面板插件Gsetting show ++ void updatePluginShowSettings(); + }; + #endif // WLANCONNECT_H +diff --git a/plugins/wlanconnect/wlanitem.cpp b/plugins/wlanconnect/wlanitem.cpp +index 9697f59..d6a0d0c 100644 +--- a/plugins/wlanconnect/wlanitem.cpp ++++ b/plugins/wlanconnect/wlanitem.cpp +@@ -41,7 +41,7 @@ WlanItem::WlanItem(bool bAcitve, bool isLock, QWidget *parent) + mLanLyt->setSpacing(16); + iconLabel = new QLabel(this); + iconLabel->setProperty("useIconHighlightEffect", 0x2); +- titileLabel = new FixLabel(this); ++ titileLabel = new KLabel(this); + statusLabel = new QLabel(this); + statusLabel->setProperty("useIconHighlightEffect", 0x2); + statusLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); +diff --git a/plugins/wlanconnect/wlanitem.h b/plugins/wlanconnect/wlanitem.h +index 2f9e471..383d777 100644 +--- a/plugins/wlanconnect/wlanitem.h ++++ b/plugins/wlanconnect/wlanitem.h +@@ -28,10 +28,13 @@ + #include <QDebug> + #include <QGSettings> + #include <QImage> +-#include "fixlabel.h" ++#include "klabel.h" + //#include "infobutton.h" + #include "../component/AddBtn/grayinfobutton.h" + ++using namespace kdk; ++ ++ + class WlanItem : public QPushButton + { + public: +@@ -40,7 +43,7 @@ public: + public: + QLabel * iconLabel = nullptr; + GrayInfoButton * infoLabel = nullptr; +- FixLabel * titileLabel = nullptr; ++ KLabel * titileLabel = nullptr; + QLabel * statusLabel = nullptr; + QString uuid = ""; + +diff --git a/src-vpn/frontend/list-items/vpnlistitem.cpp b/src-vpn/frontend/list-items/vpnlistitem.cpp +index 2cd3620..ce02cd1 100644 +--- a/src-vpn/frontend/list-items/vpnlistitem.cpp ++++ b/src-vpn/frontend/list-items/vpnlistitem.cpp +@@ -30,10 +30,6 @@ VpnListItem::VpnListItem(const KyConnectItem *vpnConnectItem, QWidget *parent):L + m_deviceResource = new KyNetworkDeviceResourse(this); + + connectItemCopy(vpnConnectItem); +- char *envStr = getenv("LANGUAGE"); +- if (strcmp(envStr, "ug_CN") == 0 || strcmp(envStr, "kk_KZ") == 0 || strcmp(envStr, "ky_KG") == 0) { +- this->setFixedWidth(390); +- } + + m_nameLabel->setText(m_vpnConnectItem.m_connectName); + m_netButton->setButtonIcon(QIcon::fromTheme("ukui-vpn-symbolic")); +diff --git a/src-vpn/frontend/single-pages/singlepage.cpp b/src-vpn/frontend/single-pages/singlepage.cpp +index 7025764..43a2960 100644 +--- a/src-vpn/frontend/single-pages/singlepage.cpp ++++ b/src-vpn/frontend/single-pages/singlepage.cpp +@@ -104,6 +104,7 @@ void SinglePage::initWindowProperties() + { + QPainterPath path; + auto rect = this->rect(); ++ path.addRoundedRect(rect, 12, 12); + path.addRect(rect); + KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); //背景模糊 + } +@@ -158,7 +159,7 @@ void SinglePage::paintEvent(QPaintEvent *event) { + QPainterPath rectPath; + + col.setAlphaF(m_transparency); +- rectPath.addRect(this->rect()); ++ rectPath.addRoundedRect(this->rect(),12,12); + + painter.setBrush(col); + painter.drawPath(rectPath); +diff --git a/src-vpn/frontend/single-pages/vpnpage.cpp b/src-vpn/frontend/single-pages/vpnpage.cpp +index c7e9e41..b332d7f 100644 +--- a/src-vpn/frontend/single-pages/vpnpage.cpp ++++ b/src-vpn/frontend/single-pages/vpnpage.cpp +@@ -141,16 +141,17 @@ void VpnPage::constructItemArea() + } + } + +- if (QGSettings::isSchemaInstalled(GSETTINGS_VPNICON_VISIBLE)) { +- QGSettings vpnGsettings(GSETTINGS_VPNICON_VISIBLE); +- if (vpnGsettings.keys().contains(QString(VISIBLE))) { +- if (!netList.isEmpty()) { +- vpnGsettings.set(VISIBLE, true); +- } else { +- vpnGsettings.set(VISIBLE, false); +- } +- } +- } ++// 默认不显示vpn图标,因为v11送测裁剪了vpn相关包 ++// if (QGSettings::isSchemaInstalled(GSETTINGS_VPNICON_VISIBLE)) { ++// QGSettings vpnGsettings(GSETTINGS_VPNICON_VISIBLE); ++// if (vpnGsettings.keys().contains(QString(VISIBLE))) { ++// if (!netList.isEmpty()) { ++// vpnGsettings.set(VISIBLE, true); ++// } else { ++// vpnGsettings.set(VISIBLE, false); ++// } ++// } ++// } + + resetListWidgetWidth(); + } +@@ -654,20 +655,14 @@ void VpnPage::showDetailPage(QString uuid) + void VpnPage::showUI() + { + //2209中窗管在hide界面时会刷新属性,需要重新设置无图标属性 +-// const KWindowInfo info(this->winId(), NET::WMState); +-// if (!info.hasState(NET::SkipTaskbar) || !info.hasState(NET::SkipPager)) { +-// KWindowSystem::setState(this->winId(), NET::SkipTaskbar | NET::SkipPager); +-// } ++ const KWindowInfo info(this->winId(), NET::WMState); ++ if (!info.hasState(NET::SkipTaskbar) || !info.hasState(NET::SkipPager)) { ++ KWindowSystem::setState(this->winId(), NET::SkipTaskbar | NET::SkipPager); ++ } + + resetPageHeight(); + + showNormal(); +- QWindow* window = this->windowHandle(); +- if (window) { +- //跳过任务栏和分页器的属性 +- kdk::WindowManager::setSkipSwitcher(window, true); +- kdk::WindowManager::setSkipTaskBar(window, true); +- } + raise(); + activateWindow(); + resetWindowPosition(); +@@ -684,20 +679,11 @@ void VpnPage::resetWindowPosition() + + QRect availableGeo = QGuiApplication::screenAt(QCursor::pos())->geometry(); + int x, y; +- char *envStr = getenv("LANGUAGE"); + switch(m_panelPosition){ + case PANEL_TOP: + //任务栏位于上方 +- /* 维吾尔语 ug_CN +- * 哈萨克语 kk_KZ +- * 柯尔克孜语 ky_KG */ +- if (strcmp(envStr, "ug_CN") == 0 || strcmp(envStr, "kk_KZ") == 0 || strcmp(envStr, "ky_KG") == 0) { +- x = MARGIN; +- y = availableGeo.y() + m_panelSize + MARGIN; +- } else { +- x = availableGeo.x() + availableGeo.width() - this->width() - MARGIN; +- y = availableGeo.y() + m_panelSize + MARGIN; +- } ++ x = availableGeo.x() + availableGeo.width() - this->width() - MARGIN; ++ y = availableGeo.y() + m_panelSize + MARGIN; + break; + //任务栏位于左边 + case PANEL_LEFT: +@@ -711,13 +697,8 @@ void VpnPage::resetWindowPosition() + break; + //任务栏位于下方 + default: +- if (strcmp(envStr, "ug_CN") == 0 || strcmp(envStr, "kk_KZ") == 0 || strcmp(envStr, "ky_KG") == 0) { +- x = MARGIN; +- y = availableGeo.y() + availableGeo.height() - m_panelSize - this->height() - MARGIN; +- } else { +- x = availableGeo.x() + availableGeo.width() - this->width() - MARGIN; +- y = availableGeo.y() + availableGeo.height() - m_panelSize - this->height() - MARGIN; +- } ++ x = availableGeo.x() + availableGeo.width() - this->width() - MARGIN; ++ y = availableGeo.y() + availableGeo.height() - m_panelSize - this->height() - MARGIN; + break; + } + kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x, y, this->width(), this->height())); +diff --git a/src-vpn/frontend/single-pages/vpnpage.h b/src-vpn/frontend/single-pages/vpnpage.h +index 9028c4b..a39f11c 100644 +--- a/src-vpn/frontend/single-pages/vpnpage.h ++++ b/src-vpn/frontend/single-pages/vpnpage.h +@@ -127,11 +127,12 @@ private: + QMap<QString, QListWidgetItem *> m_vpnItemMap; + QMap<QString, QListWidgetItem *> m_activeItemMap; + +- + //获取任务栏位置和大小 + QGSettings *m_panelGSettings = nullptr; + int m_panelPosition; + int m_panelSize; ++ QDBusInterface * m_positionInterface = nullptr; ++ + + + public Q_SLOTS: +diff --git a/src/backend/dbus-interface/kylinactiveconnectresource.cpp b/src/backend/dbus-interface/kylinactiveconnectresource.cpp +index efefec5..a02fd2e 100644 +--- a/src/backend/dbus-interface/kylinactiveconnectresource.cpp ++++ b/src/backend/dbus-interface/kylinactiveconnectresource.cpp +@@ -116,8 +116,10 @@ KyConnectItem *KyActiveConnectResourse::getActiveConnectionByUuid(QString connec + } + + QString ifaceUni = activeConnectPtr->devices().at(0); +- NetworkManager::Device:: Ptr devicePtr = +- m_networkResourceInstance->findDeviceUni(ifaceUni); ++ NetworkManager::Device::Ptr devicePtr = m_networkResourceInstance->findDeviceUni(ifaceUni); ++ if (devicePtr.isNull()) { ++ return nullptr; ++ } + activeConnectItem->m_ifaceName = devicePtr->interfaceName(); + activeConnectItem->m_itemType = activeConnectPtr->type(); + +@@ -138,8 +140,7 @@ KyConnectItem *KyActiveConnectResourse::getActiveConnectionByUuid(QString connec + QStringList interfaces = activeConnectPtr->devices(); + for (int index = 0; index < interfaces.size(); ++index) { + QString ifaceUni = interfaces.at(index); +- NetworkManager::Device:: Ptr devicePtr = +- m_networkResourceInstance->findDeviceUni(ifaceUni); ++ NetworkManager::Device::Ptr devicePtr = m_networkResourceInstance->findDeviceUni(ifaceUni); + if (devicePtr.isNull()) { + continue; + } +@@ -191,11 +192,9 @@ void KyActiveConnectResourse::getActiveConnectionList(QString deviceName, + QStringList interfaces = activeConnectPtr->devices(); + for (int index = 0; index < interfaces.size(); ++index) { + QString ifaceUni = interfaces.at(index); +- NetworkManager::Device:: Ptr devicePtr = +- m_networkResourceInstance->findDeviceUni(ifaceUni); +- if (devicePtr->interfaceName() == deviceName) { +- KyConnectItem *activeConnectItem = +- getActiveConnectionItem(activeConnectPtr); ++ NetworkManager::Device::Ptr devicePtr = m_networkResourceInstance->findDeviceUni(ifaceUni); ++ if (!devicePtr.isNull() && devicePtr->interfaceName() == deviceName) { ++ KyConnectItem *activeConnectItem = getActiveConnectionItem(activeConnectPtr); + if (nullptr != activeConnectItem) { + activeConnectItem->m_ifaceName = deviceName; + activeConnectItem->m_itemType = connectionType; +@@ -630,9 +629,10 @@ QString KyActiveConnectResourse::getDeviceOfActivateConnect(QString conUuid) + } + + QString ifaceUni = interfaces.at(0); +- NetworkManager::Device:: Ptr devicePtr = +- m_networkResourceInstance->findDeviceUni(ifaceUni); +- deviceName = devicePtr->interfaceName(); ++ NetworkManager::Device::Ptr devicePtr = m_networkResourceInstance->findDeviceUni(ifaceUni); ++ if (!devicePtr.isNull()) { ++ deviceName = devicePtr->interfaceName(); ++ } + + return deviceName; + } +@@ -654,8 +654,7 @@ bool KyActiveConnectResourse::connectionIsVirtual(QString uuid) + } + + QString ifaceUni = interfaces.at(0); +- NetworkManager::Device:: Ptr devicePtr = +- m_networkResourceInstance->findDeviceUni(ifaceUni); ++ NetworkManager::Device::Ptr devicePtr = m_networkResourceInstance->findDeviceUni(ifaceUni); + if (devicePtr.isNull()) { + return false; + } +diff --git a/src/backend/dbus-interface/kylinconnectresource.cpp b/src/backend/dbus-interface/kylinconnectresource.cpp +index a4e8b78..1ef014d 100644 +--- a/src/backend/dbus-interface/kylinconnectresource.cpp ++++ b/src/backend/dbus-interface/kylinconnectresource.cpp +@@ -143,11 +143,12 @@ bool KyConnectResourse::isActiveDevice(QString conUuid, QString devName) + QString ifaceUni = ""; + for (int index=0; index < interfaces.size(); index++) { + ifaceUni = interfaces.at(index); +- NetworkManager::Device:: Ptr devicePtr = +- m_networkResourceInstance->findDeviceUni(ifaceUni); +- deviceName = devicePtr->interfaceName(); +- if (deviceName == devName) { +- return true; ++ NetworkManager::Device::Ptr devicePtr = m_networkResourceInstance->findDeviceUni(ifaceUni); ++ if (!devicePtr.isNull()) { ++ deviceName = devicePtr->interfaceName(); ++ if (deviceName == devName) { ++ return true; ++ } + } + } + return false; +diff --git a/src/backend/dbus-interface/kywirelessconnectoperation.h b/src/backend/dbus-interface/kywirelessconnectoperation.h +index f23ea50..72bd236 100644 +--- a/src/backend/dbus-interface/kywirelessconnectoperation.h ++++ b/src/backend/dbus-interface/kywirelessconnectoperation.h +@@ -26,6 +26,7 @@ + #include "kyenterpricesettinginfo.h" + #include "kylinconnectoperation.h" + #include "kyenterpricesettinginfo.h" ++#include "../../common/common.h" + + #define KEY_802_11_WIRELESS "802-11-wireless" + #define KEY_BLACKLIST_HOSTNAME "blacklist-hostname" +@@ -36,22 +37,22 @@ const QString WIRELESS_SWITCH = "wirelessswitch"; + const QString WIFI_BAND_2_4GHZ = "2.4GHz"; + const QString WIFI_BAND_5GHZ = "5GHz"; + +-enum KySecuType { +- NONE = 0, +- WPA_AND_WPA2_PERSONAL, +- WPA_AND_WPA2_ENTERPRISE, +- WPA3_PERSONAL, +- WPA_AND_WPA3, +-}; +- +-enum KyKeyMgmt { +- Unknown = -1, +- Wep, Ieee8021x, +- WpaNone, +- WpaPsk, +- WpaEap, +- SAE +-}; ++// enum KySecuType { ++// NONE = 0, ++// WPA_AND_WPA2_PERSONAL, ++// WPA_AND_WPA2_ENTERPRISE, ++// WPA3_PERSONAL, ++// WPA_AND_WPA3, ++// }; ++ ++// enum KyKeyMgmt { ++// Unknown = -1, ++// Wep, Ieee8021x, ++// WpaNone, ++// WpaPsk, ++// WpaEap, ++// SAE ++// }; + + class KyWirelessConnectSetting : public KyConnectSetting + { +diff --git a/src/backend/dbus-interface/kywirelessnetitem.cpp b/src/backend/dbus-interface/kywirelessnetitem.cpp +index 1826cbf..4c305fc 100644 +--- a/src/backend/dbus-interface/kywirelessnetitem.cpp ++++ b/src/backend/dbus-interface/kywirelessnetitem.cpp +@@ -40,7 +40,7 @@ KyWirelessNetItem::KyWirelessNetItem(NetworkManager::WirelessNetwork::Ptr net) + m_connName = ""; + m_connDbusPath = ""; + m_secuType = ""; +- m_kySecuType = NONE; ++ m_kySecuType = KYLIN_NM::NONE; + m_device = ""; + m_channel = 0; + m_isMix = false; +@@ -185,7 +185,7 @@ void KyWirelessNetItem::setKySecuType(QString strSecuType) + } else if ( strSecuType.indexOf(WPA1) >= 0 || strSecuType.indexOf(WPA2) >= 0) { + m_kySecuType = WPA_AND_WPA2_PERSONAL; + } else { +- m_kySecuType = NONE; ++ m_kySecuType = KYLIN_NM::NONE; + } + } + +diff --git a/src/backend/dbus-interface/kywirelessnetresource.cpp b/src/backend/dbus-interface/kywirelessnetresource.cpp +index ad161dc..2f814ae 100644 +--- a/src/backend/dbus-interface/kywirelessnetresource.cpp ++++ b/src/backend/dbus-interface/kywirelessnetresource.cpp +@@ -217,8 +217,12 @@ QString KyWirelessNetResource::getActiveConnectSsidByDevice(QString deviceName) + } + + QString ifaceUni = interfaces.at(0); +- NetworkManager::Device:: Ptr devicePtr = +- m_networkResourceInstance->findDeviceUni(ifaceUni); ++ NetworkManager::Device::Ptr devicePtr = m_networkResourceInstance->findDeviceUni(ifaceUni); ++ ++ if (deviceName.isNull()) { ++ continue; ++ } ++ + if (deviceName != devicePtr->interfaceName()) { + continue; + } +@@ -292,9 +296,7 @@ QString KyWirelessNetResource::getDeviceIFace(NetworkManager::ActiveConnection:: + } + + QString ifaceUni = interfaces.at(0); +- NetworkManager::Device:: Ptr devicePtr = +- m_networkResourceInstance->findDeviceUni(ifaceUni); +- ++ NetworkManager::Device::Ptr devicePtr = m_networkResourceInstance->findDeviceUni(ifaceUni); + if (devicePtr.isNull()) { + return QString(); + } +@@ -334,10 +336,11 @@ void KyWirelessNetResource::getDeviceByUuid(const QString uuid, QString &deviceN + QStringList interfaces = activeConnectionPtr->devices(); + if (interfaces.size() > 0) { + QString ifaceUni = interfaces.at(0); +- NetworkManager::Device:: Ptr devicePtr = +- m_networkResourceInstance->findDeviceUni(ifaceUni); +- deviceName = devicePtr->interfaceName(); +- return; ++ NetworkManager::Device::Ptr devicePtr = m_networkResourceInstance->findDeviceUni(ifaceUni); ++ if (!devicePtr.isNull()) { ++ deviceName = devicePtr->interfaceName(); ++ return; ++ } + } else { + qDebug() << LOG_FLAG << "get device of active connection failed."; + } +diff --git a/src/backend/dbus.cpp b/src/backend/dbus.cpp +index be2012a..de0f3ac 100644 +--- a/src/backend/dbus.cpp ++++ b/src/backend/dbus.cpp +@@ -47,6 +47,12 @@ DbusAdaptor::DbusAdaptor(QString display, MainWindow *m, QObject *parent) + connectToMainwindow(); + } + ++DbusAdaptor::~DbusAdaptor() ++{ ++ if(mNetworkAdaptor) delete mNetworkAdaptor; ++ ++} ++ + void DbusAdaptor::onServiceOwnerChanged(const QString &service, const QString &oldOwner, const QString &newOwner) + { + if (newOwner.isEmpty()) { +@@ -64,7 +70,7 @@ void DbusAdaptor::onServiceOwnerChanged(const QString &service, const QString &o + + bool DbusAdaptor::registerService() + { +- new NetworkAdaptor(this); ++ mNetworkAdaptor=new NetworkAdaptor(this); + + QDBusConnection conn = QDBusConnection::sessionBus(); + auto reply = conn.interface()->registerService(QStringLiteral("com.kylin.network"), +@@ -241,8 +247,13 @@ QVariantMap DbusAdaptor::getDeviceListAndEnabled(int devType) + getDeviceEnableState(devType, map); + QVariantMap vMap; + QMap<QString, bool>::const_iterator item = map.cbegin(); ++ QString switchSettingFile = "/etc/kylin-nm/switch.conf"; ++ QSettings switchSetting(switchSettingFile, QSettings::IniFormat, this); + while (item != map.cend()) { +- vMap.insert(item.key(), QVariant::fromValue(item.value())); ++ if (switchSetting.contains(item.key())) ++ vMap.insert(item.key(), QVariant::fromValue(switchSetting.value(item.key()))); ++ else ++ vMap.insert(item.key(), QVariant::fromValue(item.value())); + item ++; + } + return vMap; +diff --git a/src/backend/dbus.h b/src/backend/dbus.h +index 87add6d..af4d9f7 100644 +--- a/src/backend/dbus.h ++++ b/src/backend/dbus.h +@@ -42,6 +42,7 @@ class DbusAdaptor: public QObject, protected QDBusContext + Q_CLASSINFO("D-Bus Interface", "com.kylin.network") + public: + explicit DbusAdaptor(QString display, MainWindow *m, QObject *parent = nullptr); ++ ~DbusAdaptor(); + + public: // PROPERTIES + public Q_SLOTS: // METHODS +@@ -139,7 +140,7 @@ private: + MainWindow *m_mainWindow; + QString m_display; + QDBusServiceWatcher *m_watcher = nullptr; +- ++ NetworkAdaptor* mNetworkAdaptor=nullptr; + QString checkDisplay(); + QString displayFromPid(uint pid); + void connectToMainwindow(); +diff --git a/src/backend/dbus_adaptor.cpp b/src/backend/dbus_adaptor.cpp +index b483672..23125af 100644 +--- a/src/backend/dbus_adaptor.cpp ++++ b/src/backend/dbus_adaptor.cpp +@@ -33,12 +33,6 @@ NetworkAdaptor::~NetworkAdaptor() + // destructor + } + +-void NetworkAdaptor::deleteConnect(int type, QString ssid) +-{ +- // handle method call com.kylin.network.deleteConnect +- QMetaObject::invokeMethod(parent(), "deleteConnect", Q_ARG(int, type), Q_ARG(QString, ssid)); +-} +- + void NetworkAdaptor::activateConnect(int type, const QString &devName, const QString &ssid) + { + // handle method call com.kylin.network.activateConnect +@@ -57,6 +51,12 @@ void NetworkAdaptor::deActivateConnect(int type, const QString &devName, const Q + QMetaObject::invokeMethod(parent(), "deActivateConnect", Q_ARG(int, type), Q_ARG(QString, devName), Q_ARG(QString, ssid)); + } + ++void NetworkAdaptor::deleteConnect(int type, const QString &ssid) ++{ ++ // handle method call com.kylin.network.deActivateConnect ++ QMetaObject::invokeMethod(parent(), "deleteConnect", Q_ARG(int, type), Q_ARG(QString, ssid)); ++} ++ + void NetworkAdaptor::deactiveWirelessAp(const QString &apName, const QString &uuid) + { + // handle method call com.kylin.network.deactiveWirelessAp +diff --git a/src/backend/dbus_adaptor.h b/src/backend/dbus_adaptor.h +index f457b85..eed1f4f 100644 +--- a/src/backend/dbus_adaptor.h ++++ b/src/backend/dbus_adaptor.h +@@ -144,6 +144,11 @@ class NetworkAdaptor: public QDBusAbstractAdaptor + " <arg direction=\"in\" type=\"s\" name=\"ssid\"/>\n" + " <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n" + " </method>\n" ++" <method name=\"deleteConnect\">\n" ++" <arg direction=\"in\" type=\"i\" name=\"type\"/>\n" ++" <arg direction=\"in\" type=\"s\" name=\"ssid\"/>\n" ++" <annotation value=\"true\" name=\"org.freedesktop.DBus.Method.NoReply\"/>\n" ++" </method>\n" + " <method name=\"deActivateConnect\">\n" + " <arg direction=\"in\" type=\"i\" name=\"type\"/>\n" + " <arg direction=\"in\" type=\"s\" name=\"devName\"/>\n" +@@ -215,10 +220,10 @@ public: + + public: // PROPERTIES + public Q_SLOTS: // METHODS +- Q_NOREPLY void deleteConnect(int type, QString ssid); + Q_NOREPLY void activateConnect(int type, const QString &devName, const QString &ssid); + void activeWirelessAp(const QString &apName, const QString &apPassword, const QString &band, const QString &apDevice); + Q_NOREPLY void deActivateConnect(int type, const QString &devName, const QString &ssid); ++ Q_NOREPLY void deleteConnect(int type, const QString &ssid); + void deactiveWirelessAp(const QString &apName, const QString &uuid); + QString getActiveConnectionPath(const QString &uuid); + QString getApConnectionPath(const QString &uuid); +diff --git a/src/backend/dbus_interface.h b/src/backend/dbus_interface.h +index ce2da86..f8a73c6 100644 +--- a/src/backend/dbus_interface.h ++++ b/src/backend/dbus_interface.h +@@ -36,12 +36,6 @@ public: + ~ComKylinNetworkInterface(); + + public Q_SLOTS: // METHODS +- inline Q_NOREPLY void deleteConnect(int type, const QString ssid) +- { +- QList<QVariant> argumentList; +- argumentList << QVariant::fromValue(type) << QVariant::fromValue(ssid); +- callWithArgumentList(QDBus::NoBlock, QStringLiteral("deleteConnect"), argumentList); +- } + inline Q_NOREPLY void activateConnect(int type, const QString &devName, const QString &ssid) + { + QList<QVariant> argumentList; +diff --git a/src/common/common.h b/src/common/common.h +new file mode 100644 +index 0000000..72f3251 +--- /dev/null ++++ b/src/common/common.h +@@ -0,0 +1,25 @@ ++#ifndef COMMON_H ++#define COMMON_H ++ ++namespace KYLIN_NM ++{ ++ enum KySecuType { ++ NONE = 0, ++ WPA_AND_WPA2_PERSONAL, ++ WPA_AND_WPA2_ENTERPRISE, ++ WPA3_PERSONAL, ++ WPA_AND_WPA3, ++ }; ++ ++ enum KyKeyMgmt { ++ Unknown = -1, ++ Wep, Ieee8021x, ++ WpaNone, ++ WpaPsk, ++ WpaEap, ++ SAE ++ }; ++ ++} ++using namespace KYLIN_NM; ++#endif // COMMON_H +diff --git a/src/common/common.pri b/src/common/common.pri +new file mode 100644 +index 0000000..ca632b2 +--- /dev/null ++++ b/src/common/common.pri +@@ -0,0 +1,11 @@ ++INCLUDEPATH += $$PWD ++ ++ ++HEADERS += \ ++ $$PWD/common.h \ ++ $$PWD/test.h ++ ++ ++SOURCES += ++ ++DISTFILES += +diff --git a/src/frontend/list-items/wlanlistitem.cpp b/src/frontend/list-items/wlanlistitem.cpp +index 8256559..d69d959 100644 +--- a/src/frontend/list-items/wlanlistitem.cpp ++++ b/src/frontend/list-items/wlanlistitem.cpp +@@ -166,10 +166,6 @@ void WlanListItem::onRightButtonClicked() + { + qDebug()<< LOG_FLAG <<"onRightButtonClicked"; + +- if (m_hoverButton->isVisible()) { +- m_hoverButton->hide(); +- } +- + if (!m_menu) { + return; + } +@@ -504,15 +500,15 @@ void WlanListItem::onNetButtonClicked() + + //获取有配置网络的安全类型 + KyKeyMgmt type = m_wirelessConnectOperation->getConnectKeyMgmt(m_wirelessNetItem.m_connectUuid); +- KySecuType kySecuType = NONE; ++ KySecuType kySecuType = KYLIN_NM::NONE; + if (type == WpaNone || type == Unknown) { +- kySecuType = NONE; ++ kySecuType = KYLIN_NM::NONE; + } else if (type == WpaPsk) { +- kySecuType = WPA_AND_WPA2_PERSONAL; ++ kySecuType = KYLIN_NM::WPA_AND_WPA2_PERSONAL; + } else if (type == SAE) { +- kySecuType = WPA3_PERSONAL; ++ kySecuType = KYLIN_NM::WPA3_PERSONAL; + } else if (type == WpaEap) { +- kySecuType = WPA_AND_WPA2_ENTERPRISE; ++ kySecuType = KYLIN_NM::WPA_AND_WPA2_ENTERPRISE; + } else { + qDebug() << "KeyMgmt not support now " << type; + } +diff --git a/src/frontend/mainwindow.cpp b/src/frontend/mainwindow.cpp +index 4139ca5..fbf7d26 100644 +--- a/src/frontend/mainwindow.cpp ++++ b/src/frontend/mainwindow.cpp +@@ -39,11 +39,9 @@ + #define MAINWINDOW_HEIGHT 476 + #define LAYOUT_MARGINS 0,0,0,0 + #define LOADING_TRAYICON_TIMER_MS 60 ++#define TABBAR_HEIGHT 30 + #define THEME_SCHAME "org.ukui.style" + #define COLOR_THEME "styleName" +-#define PANEL_SETTINGS "org.ukui.panel.settings" +-#define PANEL_SIZE_KEY "panelsize" +-#define PANEL_POSITION_KEY "panelposition" + + const QString v10Sp1 = "V10SP1"; + const QString intel = "V10SP1-edu"; +@@ -99,7 +97,6 @@ void MainWindow::showMainwindow() + /** + * 设置主界面跳过任务栏和分页器的属性,隐藏再次展示有可能辉冲刷掉该属性,需要展示时重新设置 + */ +-#if 0 + QString platform = QGuiApplication::platformName(); + if(!platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) + { +@@ -108,11 +105,13 @@ void MainWindow::showMainwindow() + KWindowSystem::setState(this->winId(), NET::SkipTaskbar | NET::SkipPager); + } + } +-#endif + + this->showByWaylandHelper(); + this->raise(); + this->activateWindow(); ++ kdk::WindowManager::setSkipTaskBar(this->windowHandle(),true); ++ kdk::WindowManager::setSkipSwitcher(this->windowHandle(),true); ++ + Q_EMIT this->mainWindowVisibleChanged(true); + #ifdef WITHKYSEC + if (!kysec_is_disabled() && kysec_get_3adm_status() && (getuid() || geteuid())){ +@@ -167,9 +166,9 @@ void MainWindow::firstlyStart() + initWindowProperties(); + initTransparency(); + registerTrayIcon(); +- initPanelGSettings(); + initUI(); + initDbusConnnect(); ++ initPanelGSettings(); + initWindowTheme(); + initTrayIcon(); + // initPlatform(); +@@ -189,6 +188,11 @@ void MainWindow::firstlyStart() + + //加载key ring + agent_init(); ++ ++ //单网卡显示 ++ setCentralWidgetPages(); ++ connect(m_lanWidget, &LanPage::deviceStatusChanged, this, &MainWindow::setCentralWidgetPages); ++ connect(m_wlanWidget, &LanPage::wirelessDeviceStatusChanged, this, &MainWindow::setCentralWidgetPages); + } + + /** +@@ -329,36 +333,6 @@ void MainWindow::paintWithTrans() + m_centralWidget->tabBar()->setPalette(tabPal); + } + +-/** +- * @brief MainWindow::initPanelGSettings 获取任务栏位置和大小 +- */ +-void MainWindow::initPanelGSettings() +-{ +- const QByteArray id(PANEL_SETTINGS); +- if (QGSettings::isSchemaInstalled(id)) { +- if (m_panelGSettings == nullptr) { +- m_panelGSettings = new QGSettings(id, QByteArray(), this); +- } +- if (m_panelGSettings->keys().contains(PANEL_POSITION_KEY)) { +- m_panelPosition = m_panelGSettings->get(PANEL_POSITION_KEY).toInt(); +- } +- if (m_panelGSettings->keys().contains(PANEL_SIZE_KEY)) { +- m_panelSize = m_panelGSettings->get(PANEL_SIZE_KEY).toInt(); +- } +- connect(m_panelGSettings, &QGSettings::changed, this, [&] (const QString &key) { +- if (key == PANEL_POSITION_KEY) { +- m_panelPosition = m_panelGSettings->get(PANEL_POSITION_KEY).toInt(); +- } +- if (key == PANEL_SIZE_KEY) { +- m_panelSize = m_panelGSettings->get(PANEL_SIZE_KEY).toInt(); +- } +- if (this->isVisible()) { +- resetWindowPosition(); +- } +- }); +- } +-} +- + /** + * @brief MainWindow::initUI 初始化窗口内控件 + */ +@@ -368,7 +342,7 @@ void MainWindow::initUI() + m_centralWidget = new QTabWidget(this); + this->setCentralWidget(m_centralWidget); + m_centralWidget->tabBar()->setFixedWidth(this->width()+1); +-// m_centralWidget->tabBar()->setProperty("setRadius", 12); ++ m_centralWidget->tabBar()->setProperty("setRadius", 12); + // m_centralWidget->tabBar()->setStyleSheet("QTabBar::tab{min-height:40px}"); + m_lanWidget = new LanPage(m_centralWidget); + m_wlanWidget = new WlanPage(m_centralWidget); +@@ -446,6 +420,7 @@ void MainWindow::initDbusConnnect() + { + connect(m_lanWidget, &LanPage::deviceStatusChanged, this, &MainWindow::deviceStatusChanged); + connect(m_lanWidget, &LanPage::deviceNameChanged, this, &MainWindow::deviceNameChanged); ++connect(m_lanWidget, &LanPage::activeConnNameChanged, this, &MainWindow::onRefreshTrayIconTooltip); + + connect(m_wlanWidget, &WlanPage::wirelessDeviceStatusChanged, this, &MainWindow::wirelessDeviceStatusChanged); + connect(m_wlanWidget, &WlanPage::deviceNameChanged, this, &MainWindow::deviceNameChanged); +@@ -518,13 +493,43 @@ void MainWindow::initDbusConnnect() + + } + ++void MainWindow::initPanelGSettings() { ++ const QByteArray id(PANEL_SETTINGS); ++ if (QGSettings::isSchemaInstalled(id)) { ++ if (m_panelGSettings == nullptr) { ++ m_panelGSettings = new QGSettings(id); ++ } ++ if (m_panelGSettings->keys().contains(PANEL_POSITION_KEY)) { ++ m_panelPosition = m_panelGSettings->get(PANEL_POSITION_KEY).toInt(); ++ } ++ if (m_panelGSettings->keys().contains(PANEL_SIZE_KEY)) { ++ m_panelSize = m_panelGSettings->get(PANEL_SIZE_KEY).toInt(); ++ } ++ connect(m_panelGSettings, &QGSettings::changed, this, [&] (const QString &key) { ++ bool changed = false; ++ if (key == PANEL_POSITION_KEY) { ++ changed = true; ++ m_panelPosition = m_panelGSettings->get(PANEL_POSITION_KEY).toInt(); ++ ++ } ++ if (key == PANEL_SIZE_KEY) { ++ changed = true; ++ m_panelSize = m_panelGSettings->get(PANEL_SIZE_KEY).toInt(); ++ } ++ if (changed) { ++ resetWindowPosition(); ++ } ++ }); ++ } ++} ++ + /** + * @brief MainWindow::resetWindowPosition 重新计算窗口位置 + */ + void MainWindow::resetWindowPosition() + { + if (m_isShowInCenter) { +- QRect availableGeometry = qApp->primaryScreen()->availableGeometry(); ++ QRect availableGeometry = QGuiApplication::screenAt(QCursor::pos())->geometry(); + QRect rect((availableGeometry.width() - this->width())/2, (availableGeometry.height() - this->height())/2, + this->width(), this->height()); + kdk::WindowManager::setGeometry(this->windowHandle(), rect); +@@ -536,59 +541,40 @@ void MainWindow::resetWindowPosition() + #define PANEL_TOP 1 + #define PANEL_LEFT 2 + #define PANEL_RIGHT 3 +-#define PANEL_Bottom 0 +-//#define PANEL_BOTTOM 4 ++#define PANEL_BOTTOM 0 + +- QRect availableGeo = QGuiApplication::screenAt(QCursor::pos())->geometry(); +- int x, y; ++ QScreen * qscreen = QGuiApplication::screenAt(QCursor::pos()); + ++ if (nullptr == qscreen) { ++ return; ++ } ++ ++ QRect availableGeo = qscreen->geometry(); ++ int x, y; + switch (m_panelPosition) + { + case PANEL_TOP: +- { +- char *envStr = getenv("LANGUAGE"); +- /* 维吾尔语 ug_CN +- * 哈萨克语 kk_KZ +- * 柯尔克孜语 ky_KG */ +- if (strcmp(envStr, "ug_CN") == 0 || strcmp(envStr, "kk_KZ") == 0 || strcmp(envStr, "ky_KG") == 0) { +- x = MARGIN; +- y = availableGeo.y() + m_panelSize + MARGIN; +- } +- else { +- x = availableGeo.x() + availableGeo.width() - this->width() - MARGIN; +- y = availableGeo.y() + m_panelSize + MARGIN; +- } +- +- } ++ x = availableGeo.x() + availableGeo.width() - this->width() - MARGIN; ++ y = availableGeo.y() + m_panelSize + MARGIN; + break; +- case PANEL_Bottom: +- { +- char *envStr = getenv("LANGUAGE"); +- if (strcmp(envStr, "ug_CN") == 0 || strcmp(envStr, "kk_KZ") == 0 || strcmp(envStr, "ky_KG") == 0) { +- x = MARGIN; +- y = availableGeo.y() + availableGeo.height() - m_panelSize - this->height() - MARGIN; +- } +- else { +- x = availableGeo.x() + availableGeo.width() - this->width() - MARGIN; +- y = availableGeo.y() + availableGeo.height() - m_panelSize - this->height() - MARGIN; +- } +- +- } ++ case PANEL_BOTTOM: ++ x = availableGeo.x() + availableGeo.width() - this->width() - MARGIN; ++ y = availableGeo.y() + availableGeo.height() - m_panelSize - this->height() - MARGIN; + break; + case PANEL_LEFT: +- { + x = availableGeo.x() + m_panelSize + MARGIN; + y = availableGeo.y() + availableGeo.height() - this->height() - MARGIN; +- } + break; + case PANEL_RIGHT: +- { + x = availableGeo.x() + availableGeo.width() - m_panelSize - this->width() - MARGIN; + y = availableGeo.y() + availableGeo.height() - this->height() - MARGIN; +- } ++ break; ++ default: ++ x = availableGeo.x() + availableGeo.width() - this->width() - MARGIN; ++ y = availableGeo.y() + availableGeo.height() - m_panelSize - this->height() - MARGIN; + break; + } +- ++ + kdk::WindowManager::setGeometry(this->windowHandle(), QRect(x, y, this->width(), this->height())); + qDebug() << " Position of ukui-panel is " << m_panelPosition << "; Position of mainwindow is " << this->geometry() << "." << Q_FUNC_INFO << __LINE__; + } +@@ -671,13 +657,6 @@ void MainWindow::showByWaylandHelper() + //去除窗管标题栏,传入参数为QWidget* + kdk::UkuiStyleHelper::self()->removeHeader(this); + this->show(); +- this->setFocus(); +- QWindow* window = this->windowHandle(); +- if (window) { +- //跳过任务栏和分页器的属性 +- kdk::WindowManager::setSkipSwitcher(window, true); +- kdk::WindowManager::setSkipTaskBar(window, true); +- } + resetWindowPosition(); + //设置窗体位置,传入参数为QWindow*,QRect + +@@ -966,8 +945,56 @@ void MainWindow::onRefreshTrayIconTooltip() + m_trayIcon->setToolTip(trayIconToolTip); + } + ++void MainWindow::setCentralWidgetPages() ++{ ++ bool isChanged = false; ++ if (m_isWiredUsable != m_lanWidget->isWiredDeviceUsable()) { ++ if (m_lanWidget->isWiredDeviceUsable()) { ++ m_centralWidget->insertTab(LANPAGE, m_lanWidget, ""); ++ m_isWiredUsable = true; ++ } else { ++ m_centralWidget->removeTab(LANPAGE); ++ m_isWiredUsable = false; ++ } ++ isChanged = true; ++ } ++ ++ if (m_isWirelessUsable != m_wlanWidget->isWirelessDeviceUsable()) { ++ if (m_wlanWidget->isWirelessDeviceUsable()) { ++ m_centralWidget->insertTab(WLANPAGE, m_wlanWidget, ""); ++ m_isWirelessUsable = true; ++ } else { ++ m_centralWidget->removeTab(WLANPAGE); ++ m_isWirelessUsable = false; ++ } ++ isChanged = true; ++ } ++ ++ if (!isChanged) { ++ return; ++ } ++ ++ if (m_isWiredUsable && m_isWirelessUsable) { ++ m_centralWidget->tabBar()->show(); ++ this->setFixedHeight(MAINWINDOW_HEIGHT); ++ resetWindowPosition(); ++ } else { ++ m_centralWidget->tabBar()->hide(); ++ this->setFixedHeight(MAINWINDOW_HEIGHT - TABBAR_HEIGHT); ++ resetWindowPosition(); ++ } ++ ++ if (m_trayIcon) { ++ m_trayIcon->setVisible(m_isWiredUsable || m_isWirelessUsable); ++ } ++} ++ + void MainWindow::onShowMainWindow(int type) + { ++ if (!m_trayIcon->isVisible()) { ++ qWarning() << "no valid network card, do not show kylin-nm mainwindow"; ++ return; ++ } + if (type == LANPAGE || type == WLANPAGE) { + m_centralWidget->setCurrentIndex(type); + +@@ -1170,9 +1197,6 @@ void MainWindow::showCreateWiredConnectWidget(const QString devName) + netDetail->show(); + KWindowSystem::raiseWindow(netDetail->winId()); + netDetail->centerToScreen(); +- kdk::WindowManager::setSkipSwitcher(netDetail->windowHandle(), true); +- kdk::WindowManager::setSkipTaskBar(netDetail->windowHandle(), true); +- kdk::WindowManager::setIconName(netDetail->windowHandle(), "kylin-network"); + } + + void MainWindow::showAddOtherWlanWidget(QString devName) +diff --git a/src/frontend/mainwindow.h b/src/frontend/mainwindow.h +index 336e190..598206c 100644 +--- a/src/frontend/mainwindow.h ++++ b/src/frontend/mainwindow.h +@@ -45,6 +45,10 @@ + #include <kysec/status.h> + #endif + ++#define PANEL_SETTINGS "org.ukui.panel.settings" ++#define PANEL_SIZE_KEY "panelsize" ++#define PANEL_POSITION_KEY "panelposition" ++ + enum IconActiveType { + NOT_CONNECTED = 0, + LAN_CONNECTED, +@@ -160,7 +164,6 @@ private: + void initWindowProperties(); + void initTransparency(); + void paintWithTrans(); +- void initPanelGSettings(); + void initUI(); + void initDbusConnnect(); + void registerTrayIcon(); +@@ -170,6 +173,7 @@ private: + void resetWindowTheme(); + void showControlCenter(); + void showByWaylandHelper(); ++ void initPanelGSettings(); + + void setCentralWidgetType(IconActiveType iconStatus); + void assembleTrayIconTooltip(QMap<QString, QString> &map, QString &tip); +@@ -177,9 +181,12 @@ private: + + double m_transparency=1.0; //透明度 + QGSettings * m_transGsettings; //透明度配置文件 ++ QGSettings * m_panelGSettings = nullptr; + int currentIconIndex=0; + QList<QIcon> loadIcons; + QTimer *iconTimer = nullptr; ++ int m_panelPosition = 0; ++ int m_panelSize = 46; + + //主窗口的主要构成控件 + QTabWidget * m_centralWidget = nullptr; +@@ -195,15 +202,9 @@ private: + //监听主题的Gsettings + QGSettings * m_styleGsettings = nullptr; + +- +- //获取任务栏位置和大小 +- QGSettings *m_panelGSettings = nullptr; +- int m_panelPosition; +- int m_panelSize; +- + //获取和重置窗口位置 + void resetWindowPosition(); +- //QDBusInterface * m_positionInterface = nullptr; ++ QDBusInterface * m_positionInterface = nullptr; + + //托盘图标,托盘图标右键菜单 + QSystemTrayIcon * m_trayIcon = nullptr; +@@ -228,6 +229,9 @@ private: + + QString m_display; + ++ bool m_isWiredUsable = true; ++ bool m_isWirelessUsable = true; ++ + public Q_SLOTS: + void onShowMainWindow(int type); + +@@ -254,6 +258,8 @@ private Q_SLOTS: + void onShowCreateWiredConnectWidgetSlot(QString display, QString devName); + //唤起加入其他无线网络界面 + void onShowAddOtherWlanWidgetSlot(QString display, QString devName); ++ //设置界面显示 单网卡/多网卡 ++ void setCentralWidgetPages(); + }; + + #endif // MAINWINDOW_H +diff --git a/src/frontend/netdetails/detailpage.cpp b/src/frontend/netdetails/detailpage.cpp +index 07b97a5..c1de767 100644 +--- a/src/frontend/netdetails/detailpage.cpp ++++ b/src/frontend/netdetails/detailpage.cpp +@@ -146,7 +146,7 @@ void DetailPage::newCopiedTip() + m_copiedTip->setTipType(Normal); + m_copiedTip->setContentsMargins(16, 14, 16, 14); + m_copiedTip->setFixedHeight(48); +- m_copiedTip->setWindowFlags(Qt::FramelessWindowHint); ++ m_copiedTip->setWindowFlag(Qt::FramelessWindowHint); + m_copiedTip->setAttribute(Qt::WA_TranslucentBackground, true); + m_copiedTip->setText(tr("Copied successfully!")); + } +diff --git a/src/frontend/netdetails/ipv4page.h b/src/frontend/netdetails/ipv4page.h +index 9645da1..0a1fa10 100644 +--- a/src/frontend/netdetails/ipv4page.h ++++ b/src/frontend/netdetails/ipv4page.h +@@ -52,8 +52,6 @@ public: + } + } + +- QString getNetMaskText(QString text); +- + bool checkIsChanged(const ConInfo info, KyConnectSetting &setting); + bool checkDnsSettingsIsChanged(); + +@@ -96,7 +94,7 @@ private: + void configSave(); + bool getTextEditState(QString text); + bool netMaskIsValide(QString text); +- ++ QString getNetMaskText(QString text); + bool checkConnectBtnIsEnabled(); + void initConflictHintLable(); + void initLoadingIcon(); +diff --git a/src/frontend/netdetails/netdetail.cpp b/src/frontend/netdetails/netdetail.cpp +index 7eae50f..ead31ea 100644 +--- a/src/frontend/netdetails/netdetail.cpp ++++ b/src/frontend/netdetails/netdetail.cpp +@@ -4,7 +4,7 @@ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3 of the License, or ++ * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, +@@ -192,7 +192,7 @@ NetDetail::NetDetail(QString interface, QString name, QString uuid, bool isActiv + isIpv4Ok = true; + isIpv6Ok = true; + isSecuOk = false; +- if (!m_uuid.isEmpty() || (m_uuid.isEmpty() && m_info.secType == NONE)) { ++ if (!m_uuid.isEmpty() || (m_uuid.isEmpty() && m_info.secType == KYLIN_NM::NONE)) { + isSecuOk = true; + } + +@@ -655,13 +655,13 @@ void NetDetail::getBaseInfo(ConInfo &conInfo) + if (!m_uuid.isEmpty()) { + KyKeyMgmt type = m_wirelessConnOpration->getConnectKeyMgmt(m_uuid); + if (type == WpaNone || type == Unknown) { +- conInfo.secType = NONE; ++ conInfo.secType = KYLIN_NM::NONE; + } else if (type == WpaPsk) { +- conInfo.secType = WPA_AND_WPA2_PERSONAL; ++ conInfo.secType = KYLIN_NM::WPA_AND_WPA2_PERSONAL; + } else if (type == SAE) { +- conInfo.secType = WPA3_PERSONAL; ++ conInfo.secType = KYLIN_NM::WPA3_PERSONAL; + } else if (type == WpaEap) { +- conInfo.secType = WPA_AND_WPA2_ENTERPRISE; ++ conInfo.secType = KYLIN_NM::WPA_AND_WPA2_ENTERPRISE; + } else { + qDebug() << "KeyMgmt not support now " << type; + } +@@ -715,33 +715,26 @@ void NetDetail::getStaticIpInfo(ConInfo &conInfo, bool bActived) + kyConnectResourse->getConnectionSetting(m_uuid,connetSetting); + connetSetting.dumpInfo(); + +- //conInfo.ipv4ConfigType = connetSetting.m_ipv4ConfigIpType; +- //conInfo.ipv6ConfigType = connetSetting.m_ipv6ConfigIpType; ++ conInfo.ipv4ConfigType = connetSetting.m_ipv4ConfigIpType; ++ conInfo.ipv6ConfigType = connetSetting.m_ipv6ConfigIpType; + conInfo.isAutoConnect = connetSetting.m_isAutoConnect; + conInfo.ipv4DnsList = connetSetting.m_ipv4Dns; + conInfo.ipv6DnsList = connetSetting.m_ipv6Dns; + +- //openkylin从第三方库读取有问题 改为ipv4/ipv6信息直接通过dbus获取 +- KyConnectItem* item = kyConnectResourse->getConnectionItemByUuidWithoutActivateChecking(m_uuid); +- if (item == nullptr) { +- conInfo.ipv4ConfigType = CONFIG_IP_DHCP; +- conInfo.ipv6ConfigType = CONFIG_IP_DHCP; +- } else { +- getIpv4Ipv6Info(item->m_connectPath, conInfo); +- } +-#if 0 + if (connetSetting.m_ipv4ConfigIpType == CONFIG_IP_MANUAL) { + if (connetSetting.m_ipv4Address.size() > 0) { + conInfo.strIPV4Address = connetSetting.m_ipv4Address.at(0).ip().toString(); + conInfo.strIPV4NetMask = connetSetting.m_ipv4Address.at(0).netmask().toString(); + conInfo.strIPV4GateWay = connetSetting.m_ipv4Address.at(0).gateway().toString(); + } ++ #if 0 + if (connetSetting.m_ipv4Dns.size() == 1) { + conInfo.strIPV4FirDns = connetSetting.m_ipv4Dns.at(0).toString(); + } else if (connetSetting.m_ipv4Dns.size() > 1) { + conInfo.strIPV4FirDns = connetSetting.m_ipv4Dns.at(0).toString(); + conInfo.strIPV4SecDns = connetSetting.m_ipv4Dns.at(1).toString(); + } ++ #endif + } + + if (connetSetting.m_ipv6ConfigIpType == CONFIG_IP_MANUAL) { +@@ -750,14 +743,16 @@ void NetDetail::getStaticIpInfo(ConInfo &conInfo, bool bActived) + conInfo.iIPV6Prefix = ipv6Page->getPerfixLength(connetSetting.m_ipv6Address.at(0).netmask().toString()); + conInfo.strIPV6GateWay = connetSetting.m_ipv6Address.at(0).gateway().toString(); + } ++#if 0 + if (connetSetting.m_ipv6Dns.size() == 1) { + conInfo.strIPV6FirDns = connetSetting.m_ipv6Dns.at(0).toString(); + } else if (connetSetting.m_ipv6Dns.size() > 1) { + conInfo.strIPV6FirDns = connetSetting.m_ipv6Dns.at(0).toString(); + conInfo.strIPV6SecDns = connetSetting.m_ipv6Dns.at(1).toString(); + } +- } + #endif ++ } ++ + if (!bActived) { + conInfo.strDynamicIpv4 = conInfo.strIPV4Address.isEmpty() ? tr("Auto") : conInfo.strIPV4Address; + conInfo.strDynamicIpv6 = conInfo.strIPV6Address.isEmpty() ? tr("Auto") : conInfo.strIPV6Address; +@@ -770,11 +765,11 @@ void NetDetail::initSecuData() + QString password(""); + int type = m_info.secType; + switch (type) { +- case NONE: ++ case KYLIN_NM::NONE: + break; +- case WPA_AND_WPA2_PERSONAL: +- case WPA3_PERSONAL: +- case WPA_AND_WPA3: ++ case KYLIN_NM::WPA_AND_WPA2_PERSONAL: ++ case KYLIN_NM::WPA3_PERSONAL: ++ case KYLIN_NM::WPA_AND_WPA3: + if (!m_uuid.isEmpty()) { + NetworkManager::Setting::SecretFlags flag; + if (m_wirelessConnOpration->getConnSecretFlags(m_uuid, flag)) { +@@ -786,7 +781,7 @@ void NetDetail::initSecuData() + m_info.strPassword = password; + securityPage->setPsk(password); + break; +- case WPA_AND_WPA2_ENTERPRISE: ++ case KYLIN_NM::WPA_AND_WPA2_ENTERPRISE: + if (!m_wirelessConnOpration->getEnterpiseEapMethod(m_uuid, m_info.enterpriseType)) { + qDebug() << m_name << "not enterprise wifi"; + } else if (m_info.enterpriseType == TLS) { +@@ -1182,21 +1177,21 @@ bool NetDetail::updateConnect() + + bool NetDetail::checkWirelessSecurity(KySecuType secuType) + { +- if (secuType == WPA_AND_WPA2_ENTERPRISE) { ++ if (secuType == KYLIN_NM::WPA_AND_WPA2_ENTERPRISE) { + if(m_info.strSecType.indexOf("802.1X") < 0) { + showDesktopNotify(tr("this wifi no support enterprise type"), "networkwrong"); + return false; + } + } else { +- if (secuType == NONE && m_info.strSecType != tr("None")) { ++ if (secuType == KYLIN_NM::NONE && m_info.strSecType != tr("None")) { + showDesktopNotify(tr("this wifi no support None type"), "networkwrong"); + return false; +- } else if (secuType == WPA_AND_WPA2_PERSONAL ++ } else if (secuType == KYLIN_NM::WPA_AND_WPA2_PERSONAL + && (m_info.strSecType.indexOf("WPA1") < 0 && + m_info.strSecType.indexOf("WPA2") < 0)) { + showDesktopNotify(tr("this wifi no support WPA2 type"), "networkwrong"); + return false; +- } else if (secuType == WPA3_PERSONAL && m_info.strSecType.indexOf("WPA3") < 0) { ++ } else if (secuType == KYLIN_NM::WPA3_PERSONAL && m_info.strSecType.indexOf("WPA3") < 0) { + showDesktopNotify(tr("this wifi no support WPA3 type"), "networkwrong"); + return false; + } +@@ -1342,132 +1337,3 @@ void ThreadObject::checkIpv6ConflictThread(const QString &ipv6Address) + + Q_EMIT ipv6IsConflict(isConflict); + } +- +-void NetDetail::getIpv4Ipv6Info(QString objPath, ConInfo &conInfo) +-{ +- QDBusInterface m_interface("org.freedesktop.NetworkManager", +- objPath, +- "org.freedesktop.NetworkManager.Settings.Connection", +- QDBusConnection::systemBus()); +- QDBusMessage result = m_interface.call("GetSettings"); +- +- if (result.arguments().isEmpty()) { return; } +- const QDBusArgument &dbusArg1st = result.arguments().at( 0 ).value<QDBusArgument>(); +- QMap<QString,QMap<QString,QVariant>> map; +- dbusArg1st >> map; +- +- for (QString key : map.keys() ) { +- QMap<QString,QVariant> innerMap = map.value(key); +- if (key == "ipv4") { +- for (QString innerKey : innerMap.keys()) { +- if (innerKey == "address-data") { +- //ipv4地址 ipv4子网掩码 +- QMap<QString,QVariant> ipv4Map = getAddressDataFromMap(innerMap, innerKey); +- if (!ipv4Map.isEmpty()) { +- conInfo.strIPV4Address = ipv4Map.value("address").toString(); +- conInfo.strIPV4NetMask = ipv4Page->getNetMaskText(ipv4Map.value("prefix").toString()); +- } +- } else if (innerKey == "method") { +- conInfo.ipv4ConfigType = getIpConfigTypeFromMap(innerMap, innerKey); +- +- } else if (innerKey == "dns") { +- conInfo.ipv4DnsList = getIpv4DnsFromMap(innerMap, innerKey); +- +- } else if (innerKey == "gateway") { +- conInfo.strIPV4GateWay = innerMap.value(innerKey).toString(); +- } +- } +- } +- if (key == "ipv6") { +- for (QString innerKey : innerMap.keys()) { +- if (innerKey == "address-data"){ +- QMap<QString,QVariant> ipv6Map = getAddressDataFromMap(innerMap, innerKey); +- if (!ipv6Map.isEmpty()) { +- conInfo.strIPV6Address = ipv6Map.value("address").toString(); +- conInfo.iIPV6Prefix = ipv6Map.value("prefix").toString().toInt(); +- } +- +- } else if (innerKey == "method") { +- conInfo.ipv6ConfigType = getIpConfigTypeFromMap(innerMap, innerKey); +- +- } else if (innerKey == "dns") { +- conInfo.ipv6DnsList = getIpv6DnsFromMap(innerMap, innerKey); +- +- } else if (innerKey == "gateway") { +- conInfo.strIPV6GateWay = innerMap.value(innerKey).toString(); +- } +- } +- } +- } +-} +- +-QMap<QString, QVariant> NetDetail::getAddressDataFromMap(QMap<QString, QVariant> &innerMap, QString innerKey) +-{ +- //get address-data: {'address', 'prefix'} +- const QDBusArgument &dbusArg2nd = innerMap.value(innerKey).value<QDBusArgument>(); +- QVector<QMap<QString,QVariant>> addressVector; +- +- dbusArg2nd.beginArray(); +- while (!dbusArg2nd.atEnd()) { +- QMap<QString,QVariant> tempMap; +- dbusArg2nd >> tempMap;// append map to a vector here if you want to keep it +- addressVector.append(tempMap); +- } +- dbusArg2nd.endArray(); +- +- return addressVector.size() >= 1 ? addressVector.at(0) : QMap<QString, QVariant>(); +-} +- +-KyIpConfigType NetDetail::getIpConfigTypeFromMap(QMap<QString, QVariant> &innerMap, QString innerKey) +-{ +- // get 'method' +- QString strMethod = innerMap.value(innerKey).toString(); +- if (strMethod == "auto") { +- return CONFIG_IP_DHCP; +- } else if (strMethod == "manual") { +- return CONFIG_IP_MANUAL; +- } else { +- //TODO: match other types +- return CONFIG_IP_DHCP; +- } +-} +- +-QList<QHostAddress> NetDetail::getIpv4DnsFromMap(QMap<QString, QVariant> &innerMap, QString innerKey) +-{ +- // get ipv4 'dns' +- const QDBusArgument &dbusArg2nd = innerMap.value(innerKey).value<QDBusArgument>(); +- QList<QHostAddress> addressVector; +- +- dbusArg2nd.beginArray(); +- while (!dbusArg2nd.atEnd()) { +- uint tmpVar; +- dbusArg2nd >> tmpVar; +- QString dnsi(inet_ntoa(*(struct in_addr *)&tmpVar)); +- addressVector.append(QHostAddress(tmpVar)); +- } +- dbusArg2nd.endArray(); +- +- return addressVector; +-} +- +-QList<QHostAddress> NetDetail::getIpv6DnsFromMap(QMap<QString, QVariant> &innerMap, QString innerKey) +-{ +- // get ipv6 'dns' +- const QDBusArgument &dbusArg2nd = innerMap.value(innerKey).value<QDBusArgument>(); +- QList<QHostAddress> addressVector; +- +- dbusArg2nd.beginArray(); +- while (!dbusArg2nd.atEnd()) { +- QByteArray temArray; +- quint8 tmpVar[16]; +- +- dbusArg2nd >> temArray; +- for (int i = 0; i< 16; ++i) { +- tmpVar[i] = temArray[i]; +- } +- addressVector.append(QHostAddress(tmpVar)); +- } +- dbusArg2nd.endArray(); +- +- return addressVector; +-} +diff --git a/src/frontend/netdetails/netdetail.h b/src/frontend/netdetails/netdetail.h +index aebaa21..62877b9 100644 +--- a/src/frontend/netdetails/netdetail.h ++++ b/src/frontend/netdetails/netdetail.h +@@ -52,7 +52,6 @@ + #include "ktabbar.h" + #include "networkmodeconfig.h" + +-#include <arpa/inet.h> + using namespace kdk; + + #define TAB_WIDTH 60 +@@ -142,16 +141,9 @@ private: + void showDesktopNotify(const QString &message, QString soundName); + + void setNetdetailSomeEnable(bool on); +- + void startObjectThread(); + void setNetTabToolTip(); + +- void getIpv4Ipv6Info(QString objPath, ConInfo &conInfo); +- QMap<QString, QVariant> getAddressDataFromMap(QMap<QString,QVariant> &innerMap, QString innerKey); +- KyIpConfigType getIpConfigTypeFromMap(QMap<QString,QVariant> &innerMap, QString innerKey); +- QList<QHostAddress> getIpv4DnsFromMap(QMap<QString,QVariant> &innerMap, QString innerKey); +- QList<QHostAddress> getIpv6DnsFromMap(QMap<QString,QVariant> &innerMap, QString innerKey); +- + private: + KyNetworkDeviceResourse *m_netDeviceResource = nullptr; + KyConnectOperation* m_connectOperation = nullptr; +diff --git a/src/frontend/netdetails/securitypage.cpp b/src/frontend/netdetails/securitypage.cpp +index 1d700c6..b40052c 100644 +--- a/src/frontend/netdetails/securitypage.cpp ++++ b/src/frontend/netdetails/securitypage.cpp +@@ -238,10 +238,10 @@ void SecurityPage::initUI() + userNameEdit->setPlaceholderText(tr("Required")); + userPwdEdit->setPlaceholderText(hintRequired); + +- secuTypeCombox->addItem(tr("None"),NONE); +- secuTypeCombox->addItem(tr("WPA&WPA2 Personal"),WPA_AND_WPA2_PERSONAL); +- secuTypeCombox->addItem(tr("WPA&WPA2 Enterprise"), WPA_AND_WPA2_ENTERPRISE); +- secuTypeCombox->addItem(tr("WPA3 Personal"), WPA3_PERSONAL); ++ secuTypeCombox->addItem(tr("None"),KYLIN_NM::NONE); ++ secuTypeCombox->addItem(tr("WPA&WPA2 Personal"),KYLIN_NM::WPA_AND_WPA2_PERSONAL); ++ secuTypeCombox->addItem(tr("WPA&WPA2 Enterprise"), KYLIN_NM::WPA_AND_WPA2_ENTERPRISE); ++ secuTypeCombox->addItem(tr("WPA3 Personal"), KYLIN_NM::WPA3_PERSONAL); + + eapTypeCombox->addItem("TLS", TLS); + eapTypeCombox->addItem("PEAP", PEAP); +@@ -605,9 +605,9 @@ bool SecurityPage::checkIsChanged(const ConInfo info) + if (info.secType != secuTypeCombox->currentData().toInt()) { + return true; + } else { +- if (info.secType == NONE) { ++ if (info.secType == KYLIN_NM::NONE) { + return false; +- } else if (info.secType == WPA_AND_WPA2_PERSONAL || info.secType == WPA3_PERSONAL) { ++ } else if (info.secType == KYLIN_NM::WPA_AND_WPA2_PERSONAL || info.secType == KYLIN_NM::WPA3_PERSONAL) { + return !(info.strPassword == pwdEdit->text()); + } else { + if (info.enterpriseType != eapTypeCombox->currentData().toInt()) { +@@ -964,17 +964,17 @@ KyEapMethodFastInfo SecurityPage::assembleFastInfo() + void SecurityPage::updateSecurityChange(KyWirelessConnectSetting &setting) + { + qDebug() << "secuTypeCombox->currentData()" << secuTypeCombox->currentData().toInt() << pwdEdit->text(); +- if (secuTypeCombox->currentData().toInt() == NONE) { ++ if (secuTypeCombox->currentData().toInt() == KYLIN_NM::NONE) { + setting.m_psk = ""; + } else { + setting.m_psk = pwdEdit->text(); + } + +- if (secuTypeCombox->currentData().toInt() == NONE) { ++ if (secuTypeCombox->currentData().toInt() == KYLIN_NM::NONE) { + setting.m_type = WpaNone; +- } else if (secuTypeCombox->currentData().toInt() == WPA_AND_WPA2_PERSONAL) { ++ } else if (secuTypeCombox->currentData().toInt() == KYLIN_NM::WPA_AND_WPA2_PERSONAL) { + setting.m_type = WpaPsk; +- } else if (secuTypeCombox->currentData().toInt() == WPA3_PERSONAL) { ++ } else if (secuTypeCombox->currentData().toInt() == KYLIN_NM::WPA3_PERSONAL) { + setting.m_type = SAE; + } + setting.isAutoConnect = m_rememberCheckBox->isChecked(); +@@ -983,14 +983,14 @@ void SecurityPage::updateSecurityChange(KyWirelessConnectSetting &setting) + bool SecurityPage::checkConnectBtnIsEnabled() + { + int index = secuTypeCombox->currentData().toInt(); +- if (index == NONE) { ++ if (index == KYLIN_NM::NONE) { + +- } else if (index == WPA_AND_WPA2_PERSONAL || index == WPA3_PERSONAL) { ++ } else if (index == KYLIN_NM::WPA_AND_WPA2_PERSONAL || index == KYLIN_NM::WPA3_PERSONAL) { + if (pwdEdit->text().isEmpty() || pwdEdit->text().length() < 8 ) { + qDebug() << "password is empty or length < 8"; + return false; + } +- } else if (index == WPA_AND_WPA2_ENTERPRISE) { ++ } else if (index == KYLIN_NM::WPA_AND_WPA2_ENTERPRISE) { + int type = eapTypeCombox->currentData().toInt(); + if (type == TLS) { + if (identityEdit->text().isEmpty()) { +@@ -1048,19 +1048,19 @@ void SecurityPage::setEnableOfSaveBtn() + void SecurityPage::onSecuTypeComboxIndexChanged() + { + int index = secuTypeCombox->currentData().toInt(); +- if (index == WPA_AND_WPA2_PERSONAL) { ++ if (index == KYLIN_NM::WPA_AND_WPA2_PERSONAL) { + showPsk(); +- Q_EMIT this->secuTypeChanged(WPA_AND_WPA2_PERSONAL); ++ Q_EMIT this->secuTypeChanged(KYLIN_NM::WPA_AND_WPA2_PERSONAL); + } +- else if (index == WPA3_PERSONAL) { ++ else if (index == KYLIN_NM::WPA3_PERSONAL) { + showPsk(); +- Q_EMIT this->secuTypeChanged(WPA3_PERSONAL); +- } else if (index == WPA_AND_WPA2_ENTERPRISE) { ++ Q_EMIT this->secuTypeChanged(KYLIN_NM::WPA3_PERSONAL); ++ } else if (index == KYLIN_NM::WPA_AND_WPA2_ENTERPRISE) { + onEapTypeComboxIndexChanged(); +- Q_EMIT this->secuTypeChanged(WPA_AND_WPA2_ENTERPRISE); +- } else if (index == NONE) { ++ Q_EMIT this->secuTypeChanged(KYLIN_NM::WPA_AND_WPA2_ENTERPRISE); ++ } else if (index == KYLIN_NM::NONE) { + showNone(); +- Q_EMIT this->secuTypeChanged(NONE); ++ Q_EMIT this->secuTypeChanged(KYLIN_NM::NONE); + } + } + +@@ -1126,7 +1126,8 @@ void SecurityPage::onPacBoxClicked() + + void SecurityPage::onCaCertPathComboxIndexChanged(QString str) + { +- if (str.contains("Choose from file...") || str.contains("从文件选择...")) ++ Q_UNUSED(str) ++ if (caCertPathCombox->currentIndex() == 1) + { + QString fileName = QFileDialog::getOpenFileName(this, tr("Choose a CA certificate"), "recent:///", + tr("CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx)")); +@@ -1149,7 +1150,8 @@ void SecurityPage::onCaCertPathComboxIndexChanged(QString str) + + void SecurityPage::onClientCertPathComboxIndexChanged(QString str) + { +- if (str.contains("Choose from file...") || str.contains("从文件选择...")) ++ Q_UNUSED(str) ++ if (clientCertPathCombox->currentIndex() == 1) + { + QString fileName = QFileDialog::getOpenFileName(this, tr("Choose a CA certificate"), "recent:///", + tr("CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx)")); +@@ -1171,7 +1173,8 @@ void SecurityPage::onClientCertPathComboxIndexChanged(QString str) + + void SecurityPage::onClientPrivateKeyComboxIndexChanged(QString str) + { +- if (str.contains("Choose from file...") || str.contains("从文件选择...")) ++ Q_UNUSED(str) ++ if (clientPrivateKeyCombox->currentIndex() == 1) + { + QString fileName = QFileDialog::getOpenFileName(this, tr("Choose a CA certificate"), "recent:///", + tr("CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx)")); +diff --git a/src/frontend/tab-pages/lanpage.cpp b/src/frontend/tab-pages/lanpage.cpp +index 7aa7104..0b2ab8a 100644 +--- a/src/frontend/tab-pages/lanpage.cpp ++++ b/src/frontend/tab-pages/lanpage.cpp +@@ -19,6 +19,7 @@ + */ + #include "lanpage.h" + #include "kwindowsystem.h" ++#include "windowmanager/windowmanager.h" + #include "kwindowsystem_export.h" + #include <QDebug> + #include <QScrollBar> +@@ -33,9 +34,12 @@ + #define TRANSPARENT_COLOR QColor(0,0,0,0) + #define ITEM_HEIGHT 48 + ++#define SYSTEM_DBUS_SERVICE "com.kylin.network.qt.systemdbus" ++#define SYSTEM_DBUS_PATH "/" ++#define SYSTEM_DBUS_INTERFACE "com.kylin.network.interface" ++ + #define LOG_FLAG "[LanPage]" +-#include "windowmanager/windowmanager.h" +-using namespace kdk; ++ + const QString EMPTY_CONNECT_UUID = "emptyconnect"; + + const QString WIRED_SWITCH = "wiredswitch"; +@@ -49,7 +53,7 @@ LanPage::LanPage(QWidget *parent) : TabPage(parent) + + initUI(); + initLanDevice(); +-// initNetSwitch(); ++ initNetSwitch(); + initLanDeviceState(); + + initDeviceCombox(); +@@ -78,12 +82,41 @@ LanPage::LanPage(QWidget *parent) : TabPage(parent) + + connect(m_wiredConnectOperation, &KyWiredConnectOperation::activateConnectionError, this, &LanPage::activateFailed); + connect(m_wiredConnectOperation, &KyWiredConnectOperation::deactivateConnectionError, this, &LanPage::deactivateFailed); +- connect(m_wiredConnectOperation, &KyWiredConnectOperation::wiredEnabledChanged, this, &LanPage::onWiredEnabledChanged); +- m_netSwitch->hide(); +-// connect(m_netSwitch, &KSwitchButton::clicked, this, [=](bool checked) { +-// m_netSwitch->setChecked(!checked); ++ connect(m_wiredConnectOperation, &KyWiredConnectOperation::wiredEnabledChanged, this, &LanPage::onWiredEnabledChanged);\ ++ connect(m_netSwitch, &KSwitchButton::clicked, this, [=](bool checked) { ++ if (!m_pSysBusIntfs->isValid()) ++ { ++ m_pSysBusIntfs = new QDBusInterface(SYSTEM_DBUS_SERVICE, ++ SYSTEM_DBUS_PATH, ++ SYSTEM_DBUS_INTERFACE, ++ QDBusConnection::systemBus()); ++ ++ if (m_devList.count() == 0 || !m_pSysBusIntfs->isValid()) { ++ this->showDesktopNotify(tr("No ethernet device avaliable"), "networkwrong"); ++ m_netSwitch->setChecked(false); ++ m_netSwitch->setCheckable(false); ++ return; ++ } ++ } ++ ++ m_pSysBusIntfs->call("setSwitch", checked); ++ m_netSwitch->setChecked(checked); ++ if (!checked && !m_activeConnectionMap.contains(EMPTY_CONNECT_UUID)) ++ { ++ QStringList keys = m_activeConnectionMap.keys(); ++ for(int i = 0; i < keys.count(); i++) ++ { ++ QListWidgetItem *p_listWidgetItem = m_activeConnectionMap.value(keys.at(i)); ++ LanListItem *p_lanItem = (LanListItem *)m_activatedLanListWidget->itemWidget(p_listWidgetItem); ++ m_wiredConnectOperation->deactivateConnection(p_lanItem->getConnectionName(), keys.at(i)); ++ } ++ } ++ ++ initLanDeviceState(); ++ initDeviceCombox(); ++ initLanArea(); + // m_wiredConnectOperation->setWiredEnabled(checked); +-// }); ++ }); + m_lanPagePtrMap.clear(); + } + +@@ -180,26 +213,54 @@ void LanPage::initNetSwitch() + // qDebug() << "[wiredSwitch]:init state:" << wiredEnable; + + // m_netSwitch->setChecked(wiredEnable); ++ m_pSysBusIntfs = new QDBusInterface(SYSTEM_DBUS_SERVICE, ++ SYSTEM_DBUS_PATH, ++ SYSTEM_DBUS_INTERFACE, ++ QDBusConnection::systemBus()); ++ ++ if (m_devList.count() == 0 || !m_pSysBusIntfs->isValid()) { ++ this->showDesktopNotify(tr("No ethernet device avaliable"), "networkwrong"); ++ m_netSwitch->setChecked(false); ++ m_netSwitch->setCheckable(false); ++ return; ++ } ++ QDBusConnection::systemBus().connect(SYSTEM_DBUS_SERVICE, ++ SYSTEM_DBUS_PATH, ++ SYSTEM_DBUS_INTERFACE, ++ "switchChanged", ++ this, ++ SLOT(onSwithChanged(bool))); ++ ++ QDBusReply <bool> reply = m_pSysBusIntfs->call("getSwitch"); ++ if (reply.isValid()) { ++ bool enabled = reply.value(); ++ m_netSwitch->setChecked(enabled); ++ } else { ++ qWarning () << "switch init dbus reply invalid"; ++ m_netSwitch->setChecked(false); ++ } + } + +-void LanPage::onSwithGsettingsChanged(const QString &key) ++void LanPage::onSwithChanged(bool enable) + { +-// if (key == WIRED_SWITCH) { +- +-// bool wiredSwitch = m_switchGsettings->get(WIRED_SWITCH).toBool(); +-// qDebug()<<"[LanPage] SwitchButton statue changed to:" << wiredSwitch << m_netSwitch->isChecked(); +- +-// if (wiredSwitch != m_wiredConnectOperation->getWiredEnabled()) { +-// m_wiredConnectOperation->setWiredEnabled(wiredSwitch); +-// return; +-// } +- +-// m_netSwitch->setChecked(wiredSwitch); ++ qDebug()<<"[LanPage] SwitchButton statue changed to:" << enable << m_netSwitch->isChecked(); ++ if (m_netSwitch->isChecked() == enable) ++ return; ++ m_netSwitch->setChecked(enable); ++ if (!enable && !m_activeConnectionMap.contains(EMPTY_CONNECT_UUID)) ++ { ++ QStringList keys = m_activeConnectionMap.keys(); ++ for(int i = 0; i = keys.count(); i++) ++ { ++ QListWidgetItem *p_listWidgetItem = m_activeConnectionMap.value(keys.at(i)); ++ LanListItem *p_lanItem = (LanListItem *)m_activatedLanListWidget->itemWidget(p_listWidgetItem); ++ m_wiredConnectOperation->deactivateConnection(p_lanItem->getConnectionName(), keys.at(i)); ++ } ++ } + +-// initLanDeviceState(); +-// initDeviceCombox(); +-// initLanArea(); +-// } ++ initLanDeviceState(); ++ initDeviceCombox(); ++ initLanArea(); + } + + void LanPage::getEnabledDevice(QStringList &enableDeviceList) +@@ -397,7 +458,7 @@ void LanPage::constructConnectionArea() + + void LanPage::initLanArea() + { +- if (/*!m_netSwitch->isChecked() || */m_currentDeviceName.isEmpty()) { ++ if (!m_netSwitch->isChecked() || m_currentDeviceName.isEmpty()) { + m_activatedNetDivider->hide(); + m_activatedNetFrame->hide(); + +@@ -411,11 +472,13 @@ void LanPage::initLanArea() + constructConnectionArea(); + } + ++/* 冗余代码,版本差异造成切换网卡时stop了速度显示的定时器 + if (!m_activeConnectionMap.isEmpty() && !m_activeConnectionMap.contains(EMPTY_CONNECT_UUID) && !setNetSpeed->isActive()) { + setNetSpeed->start(); + } else { + setNetSpeed->stop(); + } ++*/ + } + + bool LanPage::removeConnectionItem(QMap<QString, QListWidgetItem *> &connectMap, +@@ -545,11 +608,11 @@ void LanPage::onDeviceAdd(QString deviceName, NetworkManager::Device::Type devic + return; + } + +-// if (m_devList.count() == 0) {// 有线网卡从无到有,打开开关 +-// bool wiredSwitch = m_switchGsettings->get(WIRED_SWITCH).toBool(); +-// m_netSwitch->setCheckable(true); +-// m_netSwitch->setChecked(wiredSwitch); +-// } ++ if (m_devList.count() == 0) {// 有线网卡从无到有,打开开关 ++ bool wiredSwitch = m_switchGsettings->get(WIRED_SWITCH).toBool(); ++ m_netSwitch->setCheckable(true); ++ m_netSwitch->setChecked(wiredSwitch); ++ } + + qDebug() << "[LanPage] Begin add device:" << deviceName; + +@@ -636,11 +699,11 @@ void LanPage::onDeviceRemove(QString deviceName) + qDebug() << "[LanPage] deviceRemove:" << deviceName; + + m_devList.removeOne(deviceName); +-// if (m_devList.count() == 0) { +-// m_netSwitch->setChecked(false); +-// m_netSwitch->setCheckable(false); +-// qDebug() << "[wiredSwitch]set not enable after device remove"; +-// } ++ if (m_devList.count() == 0) { ++ m_netSwitch->setChecked(false); ++ m_netSwitch->setCheckable(false); ++ qDebug() << "[wiredSwitch]set not enable after device remove"; ++ } + + QString nowDevice = m_currentDeviceName; + deleteDeviceFromCombox(deviceName); +@@ -786,7 +849,7 @@ void LanPage::initUI() + m_inactivatedLanListWidget->setPalette(pal); + + m_settingsLabel->installEventFilter(this); +-// m_netSwitch->installEventFilter(this); ++ m_netSwitch->installEventFilter(this); + m_activatedLanListWidget->installEventFilter(this); + m_inactivatedLanListWidget->installEventFilter(this); + +@@ -1123,6 +1186,7 @@ void LanPage::updateActiveConnectionProperty(KyConnectItem *p_connectItem) + } else { + if (p_lanItem->getConnectionName() != p_connectItem->m_connectName) { + p_lanItem->updateConnectionName(p_connectItem->m_connectName); ++ Q_EMIT activeConnNameChanged(); + } + + if (p_lanItem->getConnectionName() != p_connectItem->m_connectPath) { +@@ -1192,7 +1256,7 @@ bool LanPage::eventFilter(QObject *watched, QEvent *event) + if (event->type() == QEvent::MouseButtonRelease) { + onShowControlCenter(); + } +- }/* else if(watched == m_netSwitch){ ++ } else if(watched == m_netSwitch){ + if (event->type() == QEvent::MouseButtonRelease) { + qDebug()<<"[LanPage] On lan switch button clicked! Status:" <<m_netSwitch->isChecked() + <<"devices count:"<<m_devList.count(); +@@ -1204,7 +1268,7 @@ bool LanPage::eventFilter(QObject *watched, QEvent *event) + } + } + +- }*/ else if (watched == m_activatedLanListWidget) { ++ } else if (watched == m_activatedLanListWidget) { + //去掉无右键菜单显示时的选中效果 + if (event->type() == QEvent::FocusIn) { + if (m_activatedLanListWidget->currentItem() != nullptr) { +@@ -1289,9 +1353,8 @@ void LanPage::showDetailPage(QString devName, QString uuid) + netDetail->show(); + KWindowSystem::raiseWindow(netDetail->winId()); + netDetail->centerToScreen(); +- kdk::WindowManager::setSkipSwitcher(netDetail->windowHandle(), true); +- kdk::WindowManager::setSkipTaskBar(netDetail->windowHandle(), true); +- kdk::WindowManager::setIconName(netDetail->windowHandle(), "kylin-network"); ++ kdk::WindowManager::setSkipTaskBar(netDetail->windowHandle(),true); ++ kdk::WindowManager::setSkipSwitcher(netDetail->windowHandle(),true); + + connect(netDetail, &NetDetail::detailPageClose, [&](QString deviceName, QString lanName, QString lanUuid){ + if (lanUuid.isEmpty()) { +diff --git a/src/frontend/tab-pages/lanpage.h b/src/frontend/tab-pages/lanpage.h +index 8ab8bac..14057df 100644 +--- a/src/frontend/tab-pages/lanpage.h ++++ b/src/frontend/tab-pages/lanpage.h +@@ -53,6 +53,10 @@ public: + bool lanIsConnected(); + void getWiredDeviceConnectState(QMap<QString, QString> &map); + ++ bool isWiredDeviceUsable() { ++ return !m_devList.isEmpty(); ++ } ++ + protected: + bool eventFilter(QObject *watched, QEvent *event); + +@@ -112,6 +116,8 @@ Q_SIGNALS: + + void showLanRate(QListWidget *widget, QMap<QString, QListWidgetItem *> &map, QString dev, bool isLan); + ++ void activeConnNameChanged(); ++ + private Q_SLOTS: + void onConnectionStateChange(QString uuid, NetworkManager::ActiveConnection::State state, + NetworkManager::ActiveConnection::Reason reason); +@@ -120,7 +126,7 @@ private Q_SLOTS: + void onRemoveConnection(QString path); + void onUpdateConnection(QString uuid); + +- void onSwithGsettingsChanged(const QString &key); ++ void onSwithChanged(bool enable); + + void onDeviceAdd(QString deviceName, NetworkManager::Device::Type deviceType); + void onDeviceRemove(QString deviceName); +@@ -151,9 +157,11 @@ private: + QStringList m_devList; + QStringList m_enableDeviceList; + QStringList m_disableDeviceList; ++ QStringList m_devSwitchList; + + QGSettings *m_switchGsettings = nullptr; + QMap<QString, NetDetail*> m_lanPagePtrMap; ++ QDBusInterface *m_pSysBusIntfs; + }; + + #endif // LANPAGE_H +diff --git a/src/frontend/tab-pages/wlanpage.cpp b/src/frontend/tab-pages/wlanpage.cpp +index 07a88c1..0ae9fb4 100644 +--- a/src/frontend/tab-pages/wlanpage.cpp ++++ b/src/frontend/tab-pages/wlanpage.cpp +@@ -21,6 +21,7 @@ + #include "kywirelessnetitem.h" + #include "kwindowsystem.h" + #include "kwindowsystem_export.h" ++#include "windowmanager/windowmanager.h" + #include <QEvent> + #include <QDateTime> + #include <QDebug> +@@ -1651,9 +1652,8 @@ void WlanPage::showDetailPage(QString devName, QString ssid) + netDetail->show(); + KWindowSystem::raiseWindow(netDetail->winId()); + netDetail->centerToScreen(); +- kdk::WindowManager::setSkipSwitcher(netDetail->windowHandle(), true); +- kdk::WindowManager::setSkipTaskBar(netDetail->windowHandle(), true); +- kdk::WindowManager::setIconName(netDetail->windowHandle(), "kylin-network"); ++ kdk::WindowManager::setSkipTaskBar(netDetail->windowHandle(),true); ++ kdk::WindowManager::setSkipSwitcher(netDetail->windowHandle(),true); + + return; + } +diff --git a/src/frontend/tab-pages/wlanpage.h b/src/frontend/tab-pages/wlanpage.h +index b7015a2..bdc43ea 100644 +--- a/src/frontend/tab-pages/wlanpage.h ++++ b/src/frontend/tab-pages/wlanpage.h +@@ -88,6 +88,10 @@ public: + return m_currentDevice; + } + ++ bool isWirelessDeviceUsable() { ++ return !m_devList.isEmpty(); ++ } ++ + Q_SIGNALS: + void oneItemExpanded(const QString &ssid); + void wlanAdd(QString devName, QStringList info); +diff --git a/src/frontend/tools/infobutton.cpp b/src/frontend/tools/infobutton.cpp +index 9738e24..3c1902c 100644 +--- a/src/frontend/tools/infobutton.cpp ++++ b/src/frontend/tools/infobutton.cpp +@@ -62,9 +62,6 @@ InfoButton::InfoButton(QWidget *parent) : QPushButton(parent) + void InfoButton::initUI() + { + this->setFixedSize(BUTTON_SIZE); +- this->setIcon(QIcon::fromTheme("preferences-system-details-symbolic")); +- this->setProperty("useButtonPalette", true); +- this->setFlat(true); + m_backgroundColor = BACKGROUND_COLOR; + m_foregroundColor = FOREGROUND_COLOR_NORMAL; + } +@@ -92,6 +89,36 @@ void InfoButton::onPaletteChanged() + this->repaint(); + } + ++void InfoButton::paintEvent(QPaintEvent *event) ++{ ++ QPalette pal = this->palette(); ++ pal.setColor(QPalette::Base, m_backgroundColor); ++ pal.setColor(QPalette::Text, m_foregroundColor); ++ ++ QPainterPath cPath; ++ cPath.addRect(0, 0, ICON_SIZE); ++ cPath.addEllipse(0, 0, ICON_SIZE); ++ ++ QPainterPath outerPath; ++ outerPath.addEllipse(OUTER_PATH); ++ ++ QPainterPath innerPath; ++ innerPath.addEllipse(INNER_PATH); ++ outerPath -= innerPath; ++ ++ QPainter painter(this); ++ painter.setRenderHint(QPainter:: Antialiasing, true); //设置渲染,启动反锯齿 ++ painter.setPen(Qt::NoPen); ++ ++ painter.setBrush(pal.color(QPalette::Base)); ++ painter.drawPath(cPath); ++ ++ painter.fillPath(outerPath, pal.color(QPalette::Text)); ++ painter.setPen(m_foregroundColor); ++ QFont font("Noto Sans CJK SC", 11, QFont::Normal, false); ++ painter.setFont(font); ++ painter.drawText(TEXT_POS, "i"); ++} + + void InfoButton::enterEvent(QEvent *event) + { +diff --git a/src/frontend/tools/infobutton.h b/src/frontend/tools/infobutton.h +index a9843da..308d70a 100644 +--- a/src/frontend/tools/infobutton.h ++++ b/src/frontend/tools/infobutton.h +@@ -30,6 +30,7 @@ public: + ~InfoButton() = default; + + protected: ++ void paintEvent(QPaintEvent *event); + void enterEvent(QEvent *event); + void leaveEvent(QEvent *event); + void mousePressEvent(QMouseEvent *event); +diff --git a/src/src.pro b/src/src.pro +index 3da9bcc..583fc69 100644 +--- a/src/src.pro ++++ b/src/src.pro +@@ -60,6 +60,7 @@ QMAKE_LFLAGS *= $(shell dpkg-buildflags --get LDFLAGS) + include(singleapplication/qt-single-application.pri) + include(backend/backend.pri) + include(frontend/frontend.pri) ++include(common/common.pri) + + RESOURCES += \ + ../nmqrc.qrc +diff --git a/sys-dbus-register/kynmsystemdbus.cpp b/sys-dbus-register/kynmsystemdbus.cpp +index 1057f1e..235ddf6 100644 +--- a/sys-dbus-register/kynmsystemdbus.cpp ++++ b/sys-dbus-register/kynmsystemdbus.cpp +@@ -24,7 +24,10 @@ + + KynmSystemDbus::KynmSystemDbus(QObject *parent) : QObject(parent) + { +- ++ QString switchSettingFile = "/etc/kylin-nm/switch.conf"; ++ switchSetting = new QSettings(switchSettingFile, QSettings::IniFormat, this); ++ if (!switchSetting->contains("switch")) ++ switchSetting->setValue("switch", false); + } + + KynmSystemDbus::~KynmSystemDbus() +@@ -73,3 +76,20 @@ bool KynmSystemDbus::checkIpv6IsConflict(const QString devName, const QString ip + + return isConflict; + } ++ ++void KynmSystemDbus::setSwitch(bool enable) ++{ ++ switchSetting->setValue("switch", enable); ++ Q_EMIT switchChanged(enable); ++} ++ ++void KynmSystemDbus::setDeviceSwitch(QString devName, bool enable) ++{ ++ switchSetting->setValue(devName, enable); ++ Q_EMIT devSwitchChanged(devName, enable); ++} ++ ++bool KynmSystemDbus::getSwitch() ++{ ++ return switchSetting->value("switch").toBool(); ++} +diff --git a/sys-dbus-register/kynmsystemdbus.h b/sys-dbus-register/kynmsystemdbus.h +index d786bdd..32f49b4 100644 +--- a/sys-dbus-register/kynmsystemdbus.h ++++ b/sys-dbus-register/kynmsystemdbus.h +@@ -20,6 +20,7 @@ + #define KYNMSYSTEMDBUS_H + + #include <QObject> ++#include <QSettings> + + class KynmSystemDbus : public QObject + { +@@ -33,6 +34,14 @@ public: + public Q_SLOTS: + Q_SCRIPTABLE bool checkIpv4IsConflict(const QString devName, const QString ipv4Address, QStringList macList); + Q_SCRIPTABLE bool checkIpv6IsConflict(const QString devName, const QString ipv6Address); ++ Q_SCRIPTABLE bool getSwitch(); ++ Q_SCRIPTABLE void setSwitch(bool enable); ++ Q_SCRIPTABLE void setDeviceSwitch(QString devName, bool enable); ++Q_SIGNALS: ++ Q_SCRIPTABLE void switchChanged(bool enbale); ++ Q_SCRIPTABLE void devSwitchChanged(QString devName, bool enbale); ++private: ++ QSettings *switchSetting; + }; + + #endif // KYNMSYSTEMDBUS_H diff -Nru kylin-nm-4.10.0.0/debian/patches/0067-Added-translation-using-Weblate-Arabic.patch kylin-nm-4.10.0.0/debian/patches/0067-Added-translation-using-Weblate-Arabic.patch --- kylin-nm-4.10.0.0/debian/patches/0067-Added-translation-using-Weblate-Arabic.patch 1970-01-01 08:00:00.000000000 +0800 +++ kylin-nm-4.10.0.0/debian/patches/0067-Added-translation-using-Weblate-Arabic.patch 2025-02-28 15:53:07.000000000 +0800 @@ -0,0 +1,1655 @@ +From: KevinDuan <duankaiwen@kylinos.cn> +Date: Mon, 17 Feb 2025 09:34:06 +0800 +Subject: Added translation using Weblate (Arabic) + +--- + src/translations/kylin-nm_ar.ts | 1640 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 1640 insertions(+) + create mode 100644 src/translations/kylin-nm_ar.ts + +diff --git a/src/translations/kylin-nm_ar.ts b/src/translations/kylin-nm_ar.ts +new file mode 100644 +index 0000000..b7c8523 +--- /dev/null ++++ b/src/translations/kylin-nm_ar.ts +@@ -0,0 +1,1640 @@ ++<?xml version="1.0" encoding="utf-8"?> ++<!DOCTYPE TS> ++<TS version="2.1" language="ar" sourcelanguage="en"> ++<context> ++ <name>ConfForm</name> ++ <message> ++ <source>Manual</source> ++ <translation type="obsolete">手动</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>kylin-nm</source> ++ <translation type="obsolete">网络工具</translation> ++ </message> ++ <message> ++ <source>kylin network applet desktop message</source> ++ <translation type="obsolete">网络提示消息</translation> ++ </message> ++ <message> ++ <source>Will check the IP address conflict</source> ++ <translation type="vanished">正在检测ip地址冲突</translation> ++ </message> ++ <message> ++ <source>IPv4 address conflict, Please change IP</source> ++ <translation type="vanished">ip地址冲突,请更改ip</translation> ++ </message> ++ <message> ++ <source>IPv6 address conflict, Please change IP</source> ++ <translation type="obsolete">ip地址冲突,请更改ip {6 ?}</translation> ++ </message> ++</context> ++<context> ++ <name>ConfigPage</name> ++ <message> ++ <location filename="../frontend/netdetails/configpage.cpp" line="60"/> ++ <source>Network profile type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/configpage.cpp" line="63"/> ++ <source>Public(recommended) Devices on the network cannot discover this computer. Generally, it is suitable for networks in public places, such as airports or coffee shops, etc.</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/configpage.cpp" line="67"/> ++ <source>Private Devices on the network can discover this computer. Generally applicable to a network at home or work where you know and trust the individuals and devices on the network.</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/configpage.cpp" line="71"/> ++ <source>Config firewall and security settings</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>ConnectivityPage</name> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="25"/> ++ <source>Network connectivity detection</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="55"/> ++ <source>If access to the Internet is restricted, please switch the network IP connectivity detection method and try again.</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="61"/> ++ <source>Public network (default)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="63"/> ++ <source>Local area network (intranet)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="74"/> ++ <source>Confirm</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="161"/> ++ <source>The network is connected and can access the Internet normally.</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="166"/> ++ <source>The network is connected and access to the Internet is restricted.</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="177"/> ++ <source>Please enter the local area network (intranet) detection address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="196"/> ++ <source>Format error</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>CopyButton</name> ++ <message> ++ <source>Copied successfully</source> ++ <translation type="vanished">复制成功</translation> ++ </message> ++ <message> ++ <source>Copied successfully!</source> ++ <translation type="vanished">复制成功!</translation> ++ </message> ++ <message> ++ <source>Copy all</source> ++ <translation type="vanished">复制全部</translation> ++ </message> ++</context> ++<context> ++ <name>CreatNetPage</name> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="97"/> ++ <source>Connection Name</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="98"/> ++ <source>IPv4Config</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="99"/> ++ <source>Address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="100"/> ++ <source>Netmask</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="101"/> ++ <source>Default Gateway</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="327"/> ++ <source>Address conflict</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Prefs DNS</source> ++ <translation type="vanished">首选 DNS</translation> ++ </message> ++ <message> ++ <source>Alternative DNS</source> ++ <translation type="vanished">备选 DNS</translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="120"/> ++ <source>Auto(DHCP)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="121"/> ++ <source>Manual</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="189"/> ++ <source>Invalid address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="207"/> ++ <source>Invalid subnet mask</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="227"/> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="228"/> ++ <source>Required</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>DetailPage</name> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="303"/> ++ <source>Auto Connection</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="257"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="356"/> ++ <source>SSID:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="151"/> ++ <source>Copied successfully!</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="228"/> ++ <source>Copy all</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="248"/> ++ <source>Please input SSID:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="261"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="357"/> ++ <source>Protocol:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="265"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="358"/> ++ <source>Security Type:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="269"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="359"/> ++ <source>Hz:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="273"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="360"/> ++ <source>Chan:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="277"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="361"/> ++ <source>BandWidth:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="293"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="364"/> ++ <source>IPv6:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="281"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="362"/> ++ <source>IPv4:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="287"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="363"/> ++ <source>IPv4 DNS:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="297"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="365"/> ++ <source>Mac:</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifi</name> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiEapFast</name> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiEapLeap</name> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiEapPeap</name> ++ <message> ++ <source>Domain</source> ++ <translation type="obsolete">域</translation> ++ </message> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiEapPwd</name> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiEapTTLS</name> ++ <message> ++ <source>Domain</source> ++ <translation type="obsolete">域</translation> ++ </message> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiEapTls</name> ++ <message> ++ <source>Identity</source> ++ <translation type="obsolete">匿名身份</translation> ++ </message> ++ <message> ++ <source>Domain</source> ++ <translation type="obsolete">域</translation> ++ </message> ++ <message> ++ <source>User certificate</source> ++ <translation type="obsolete">用户证书</translation> ++ </message> ++ <message> ++ <source>User private key</source> ++ <translation type="obsolete">用户私钥</translation> ++ </message> ++ <message> ++ <source>User key password</source> ++ <translation type="obsolete">用户密钥密码</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiLeap</name> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiWep</name> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiWpa</name> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DnsSettingWidget</name> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="34"/> ++ <source>DNS Server Advanced Settings</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="37"/> ++ <source>Tactic</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="40"/> ++ <source>Timeout</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="43"/> ++ <source>Retry Count</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="46"/> ++ <source>order</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="47"/> ++ <source>rotate</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="48"/> ++ <source>concurrency</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="53"/> ++ <source> s</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="59"/> ++ <source> times</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="70"/> ++ <source>Close</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="73"/> ++ <source>Cancel</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="76"/> ++ <source>Confirm</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>EnterpriseWlanDialog</name> ++ <message> ++ <source>Connect Enterprise WLAN</source> ++ <translation type="vanished">连接企业网</translation> ++ </message> ++ <message> ++ <source>Close</source> ++ <translation type="vanished">关闭</translation> ++ </message> ++ <message> ++ <location filename="../frontend/enterprise-wlan/enterprisewlandialog.cpp" line="117"/> ++ <source>Wi-Fi network requires authentication</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/enterprise-wlan/enterprisewlandialog.cpp" line="122"/> ++ <source>Access to Wi-Fi network "</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/enterprise-wlan/enterprisewlandialog.cpp" line="124"/> ++ <source>" requires a password or encryption key.</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/enterprise-wlan/enterprisewlandialog.cpp" line="155"/> ++ <source>Cancel</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/enterprise-wlan/enterprisewlandialog.cpp" line="156"/> ++ <source>Connect</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>FirewallDialog</name> ++ <message> ++ <source>Allow your computer to be discovered by other computers and devices on this network?</source> ++ <translation type="vanished">是否允许你的电脑被此网络上的其他电脑和设备发现?</translation> ++ </message> ++ <message> ++ <source>It is recommended that you enable this feature on your home and work networks rather than public networks.</source> ++ <translation type="vanished">建议你在家庭和工作网络上而非公共网络上启用此功能。</translation> ++ </message> ++ <message> ++ <source>Yse</source> ++ <translation type="vanished">是</translation> ++ </message> ++ <message> ++ <source>No</source> ++ <translation type="vanished">否</translation> ++ </message> ++ <message> ++ <location filename="../frontend/networkmode/firewalldialog.cpp" line="89"/> ++ <source>Allow other devices on this network to discover this computer?</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/networkmode/firewalldialog.cpp" line="91"/> ++ <source>It is not recommended to enable this feature on public networks</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/networkmode/firewalldialog.cpp" line="93"/> ++ <source>Not allowed (recommended)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/networkmode/firewalldialog.cpp" line="94"/> ++ <source>Allowed</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>Ipv4Page</name> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="66"/> ++ <source>IPv4Config</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="67"/> ++ <source>Address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="68"/> ++ <source>Netmask</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="69"/> ++ <source>Default Gateway</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Prefs DNS</source> ++ <translation type="vanished">首选 DNS</translation> ++ </message> ++ <message> ++ <source>Alternative DNS</source> ++ <translation type="vanished">备选 DNS</translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="117"/> ++ <source>Auto(DHCP)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="118"/> ++ <source>Manual</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="264"/> ++ <source>Invalid address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="273"/> ++ <source>Invalid subnet mask</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="298"/> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="299"/> ++ <source>Required</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="367"/> ++ <source>Address conflict</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>Ipv6Page</name> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="133"/> ++ <source>IPv6Config</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="134"/> ++ <source>Address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="135"/> ++ <source>Subnet prefix Length</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="136"/> ++ <source>Default Gateway</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Prefs DNS</source> ++ <translation type="vanished">首选 DNS</translation> ++ </message> ++ <message> ++ <source>Alternative DNS</source> ++ <translation type="vanished">备选 DNS</translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="180"/> ++ <source>Auto(DHCP)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="181"/> ++ <source>Manual</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="231"/> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="232"/> ++ <source>Required</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="251"/> ++ <source>Invalid address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="260"/> ++ <source>Invalid gateway</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="299"/> ++ <source>Address conflict</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>JoinHiddenWiFiPage</name> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="140"/> ++ <source>Please enter the network information</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="145"/> ++ <source>Network name(SSID)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Remember the Network</source> ++ <translation type="vanished">记住该网络</translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="146"/> ++ <source>Show Network List</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="147"/> ++ <source>Cancel</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="148"/> ++ <source>Join</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="153"/> ++ <source>Required</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="155"/> ++ <source>Find and Join WLAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>LanListItem</name> ++ <message> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="67"/> ++ <source>Not connected</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="124"/> ++ <source>Wired Device not carried</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="144"/> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="161"/> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="259"/> ++ <source>Disconnect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="146"/> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="159"/> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="263"/> ++ <source>Connect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="150"/> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="166"/> ++ <source>Property</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="151"/> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="168"/> ++ <source>Delete</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>LanPage</name> ++ <message> ++ <source>No ethernet device avaliable</source> ++ <translation type="vanished">未检测到有线设备</translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="751"/> ++ <source>LAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="67"/> ++ <source>conflict, unable to connect to the network normally!</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="753"/> ++ <source>Activated LAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="763"/> ++ <source>Inactivated LAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>LAN Disconnected Successfully</source> ++ <translation type="vanished">有线网络已断开</translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="1244"/> ++ <source>Wired Device not carried</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>LAN Connected Successfully</source> ++ <translation type="vanished">有线网络已连接</translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="1348"/> ++ <source>Connected: </source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="1342"/> ++ <source>Not Connected</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/> ++ <source>(Limited)</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>ListItem</name> ++ <message> ++ <location filename="../frontend/list-items/listitem.cpp" line="178"/> ++ <source>Kylin NM</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/listitem.cpp" line="181"/> ++ <source>kylin network applet desktop message</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>MainWindow</name> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="229"/> ++ <location filename="../frontend/mainwindow.cpp" line="260"/> ++ <source>kylin-nm</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="353"/> ++ <source>LAN</source> ++ <translatorcomment>有线网络</translatorcomment> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="355"/> ++ <source>WLAN</source> ++ <translatorcomment>无线局域网</translatorcomment> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Show MainWindow</source> ++ <translation type="vanished">打开网络工具</translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="384"/> ++ <source>Settings</source> ++ <translatorcomment>设置网络项</translatorcomment> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="385"/> ++ <source>Network Connectivity Detection</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="662"/> ++ <location filename="../frontend/mainwindow.cpp" line="915"/> ++ <source>Network tool</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="676"/> ++ <source>Network Card</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="898"/> ++ <source>Not connected to the network</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>MultipleDnsWidget</name> ++ <message> ++ <location filename="../frontend/netdetails/multiplednswidget.cpp" line="57"/> ++ <source>DNS server(Drag to sort)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/multiplednswidget.cpp" line="64"/> ++ <source>Click "+" to configure DNS</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/multiplednswidget.cpp" line="101"/> ++ <source>Settings</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>NetDetail</name> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="80"/> ++ <source>Kylin NM</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="83"/> ++ <source>kylin network desktop message</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="381"/> ++ <source>Detail</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="382"/> ++ <source>IPv4</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="383"/> ++ <source>IPv6</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="385"/> ++ <source>Security</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Close</source> ++ <translation type="vanished">关闭</translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="387"/> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="394"/> ++ <source>Config</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="406"/> ++ <source>Confirm</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="409"/> ++ <source>Cancel</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="467"/> ++ <source>Forget this network</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="469"/> ++ <source>Delete this network</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="448"/> ++ <source>Add LAN Connect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="453"/> ++ <source>Connect Hidden WLAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="633"/> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="645"/> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="1186"/> ++ <source>None</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="757"/> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="758"/> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="759"/> ++ <source>Auto</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="900"/> ++ <source>start check ipv4 address conflict</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="917"/> ++ <source>start check ipv6 address conflict</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>ipv4 address conflict!</source> ++ <translation type="vanished">ipv4地址冲突!</translation> ++ </message> ++ <message> ++ <source>ipv6 address conflict!</source> ++ <translation type="vanished">ipv6地址冲突!</translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="1182"/> ++ <source>this wifi no support enterprise type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="1187"/> ++ <source>this wifi no support None type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="1192"/> ++ <source>this wifi no support WPA2 type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="1195"/> ++ <source>this wifi no support WPA3 type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>SSID:</source> ++ <translation type="obsolete">SSID:</translation> ++ </message> ++ <message> ++ <source>Protocol:</source> ++ <translation type="obsolete">协议:</translation> ++ </message> ++ <message> ++ <source>Hz:</source> ++ <translation type="obsolete">网络频带:</translation> ++ </message> ++ <message> ++ <source>Chan:</source> ++ <translation type="obsolete">网络通道:</translation> ++ </message> ++ <message> ++ <source>BandWidth:</source> ++ <translation type="obsolete">带宽:</translation> ++ </message> ++ <message> ++ <source>IPv4:</source> ++ <translation type="obsolete">IPv4地址:</translation> ++ </message> ++ <message> ++ <source>IPv4 DNS:</source> ++ <translation type="obsolete">IPv4 DNS服务器:</translation> ++ </message> ++ <message> ++ <source>IPv6:</source> ++ <translation type="obsolete">本地链接IPv6地址:</translation> ++ </message> ++ <message> ++ <source>Mac:</source> ++ <translation type="obsolete">物理地址:</translation> ++ </message> ++</context> ++<context> ++ <name>OldMainWindow</name> ++ <message> ++ <source>kylin-nm</source> ++ <translation type="obsolete">网络工具</translation> ++ </message> ++ <message> ++ <source>Show MainWindow</source> ++ <translation type="obsolete">打开网络工具</translation> ++ </message> ++ <message> ++ <source>Not connected</source> ++ <translation type="obsolete">未连接</translation> ++ </message> ++</context> ++<context> ++ <name>OneConnForm</name> ++ <message> ++ <location filename="../frontend/list-items/oneconnform.ui" line="14"/> ++ <source>Form</source> ++ <translation></translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>Disconnect</source> ++ <translation type="obsolete">断开</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Forget</source> ++ <translation type="obsolete">忘记此网络</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>OneLancForm</name> ++ <message> ++ <location filename="../frontend/list-items/onelancform.ui" line="14"/> ++ <source>Form</source> ++ <translation></translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>Disconnect</source> ++ <translation type="obsolete">断开</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Not connected</source> ++ <translation type="obsolete">未连接</translation> ++ </message> ++</context> ++<context> ++ <name>SecurityPage</name> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="107"/> ++ <source>Remember the Network</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="215"/> ++ <source>Security</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="216"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="236"/> ++ <source>Password</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="220"/> ++ <source>EAP type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="222"/> ++ <source>Identity</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="223"/> ++ <source>Domain</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="224"/> ++ <source>CA certficate</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="225"/> ++ <source>no need for CA certificate</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="226"/> ++ <source>User certificate</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="227"/> ++ <source>User private key</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="228"/> ++ <source>User key password</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="229"/> ++ <source>Password options</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="230"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="238"/> ++ <location filename="../frontend/netdetails/securitypage.h" line="125"/> ++ <source>Required</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="234"/> ++ <source>Ineer authentication</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="235"/> ++ <source>Username</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="237"/> ++ <source>Ask pwd each query</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="241"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="254"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="257"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="260"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="280"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="360"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="503"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1029"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1110"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1141"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1163"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1186"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1241"/> ++ <source>None</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="242"/> ++ <source>WPA&WPA2 Personal</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="243"/> ++ <source>WPA&WPA2 Enterprise</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="244"/> ++ <source>WPA3 Personal</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="255"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="258"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="261"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="281"/> ++ <source>Choose from file...</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="264"/> ++ <source>Store passwords only for this user</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="264"/> ++ <source>Store password only for this user</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="266"/> ++ <source>Store passwords for all users</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="266"/> ++ <source>Store password for all users</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="268"/> ++ <source>Ask this password every time</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="268"/> ++ <source>Ask password every time</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1131"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1154"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1176"/> ++ <source>Choose a CA certificate</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1132"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1155"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1177"/> ++ <source>CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="273"/> ++ <source>PAC provisioning</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="274"/> ++ <source>Allow automatic PAC provisioning</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="275"/> ++ <source>PAC file</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="276"/> ++ <source>Anonymous</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="277"/> ++ <source>Authenticated</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="278"/> ++ <source>Both</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1231"/> ++ <source>Choose a PAC file</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1232"/> ++ <source>PAC Files (*.pac)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.h" line="126"/> ++ <source> </source> ++ <translation></translation> ++ </message> ++</context> ++<context> ++ <name>TabPage</name> ++ <message> ++ <location filename="../frontend/tab-pages/tabpage.cpp" line="72"/> ++ <source>Current Device</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/tabpage.cpp" line="79"/> ++ <source>Devices Closed!</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/tabpage.cpp" line="136"/> ++ <source>Settings</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/tabpage.cpp" line="329"/> ++ <source>Kylin NM</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/tabpage.cpp" line="332"/> ++ <source>kylin network applet desktop message</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>VpnPage</name> ++ <message> ++ <source>Wired Device not carried</source> ++ <translation type="obsolete">未插入网线</translation> ++ </message> ++</context> ++<context> ++ <name>WlanListItem</name> ++ <message> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="71"/> ++ <source>Not connected</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="176"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="202"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="648"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="667"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="677"/> ++ <source>Disconnect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="178"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="206"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="315"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="658"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="675"/> ++ <source>Connect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="186"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="682"/> ++ <source>Forget</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="185"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="687"/> ++ <source>Property</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="336"/> ++ <source>Auto Connect</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>WlanMoreItem</name> ++ <message> ++ <source>More...</source> ++ <translation type="vanished">更多...</translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/wlanmoreitem.cpp" line="28"/> ++ <source>Add Others...</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>WlanPage</name> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="132"/> ++ <source>WLAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="108"/> ++ <source>No wireless network card detected</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="134"/> ++ <source>Activated WLAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="145"/> ++ <source>Other WLAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>More...</source> ++ <translation type="vanished">更多...</translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="972"/> ++ <source>WLAN Connected Successfully</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="968"/> ++ <source>WLAN Disconnected Successfully</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="1741"/> ++ <source>Connected: </source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="1743"/> ++ <source>Not Connected</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>(Limited)</source> ++ <translation type="vanished">(网络受限)</translation> ++ </message> ++</context> ++<context> ++ <name>WpaWifiDialog</name> ++ <message> ++ <source>EAP type</source> ++ <translation type="obsolete">EAP方法</translation> ++ </message> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Ask pwd each query</source> ++ <translation type="obsolete">每次询问密码</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++ <message> ++ <source>Choose from file...</source> ++ <translation type="obsolete">从文件选择...</translation> ++ </message> ++ <message> ++ <source>Choose a CA certificate</source> ++ <translation type="obsolete">选择一个CA证书</translation> ++ </message> ++ <message> ++ <source>CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx)</source> ++ <translation type="obsolete">CA 证书 (*.pem *.der *.p12 *.crt *.cer *.pfx)</translation> ++ </message> ++ <message> ++ <source>Identity</source> ++ <translation type="obsolete">匿名身份</translation> ++ </message> ++ <message> ++ <source>Domain</source> ++ <translation type="obsolete">域</translation> ++ </message> ++ <message> ++ <source>no need for CA certificate</source> ++ <translation type="obsolete">不需要CA证书</translation> ++ </message> ++</context> ++<context> ++ <name>main</name> ++ <message> ++ <location filename="../main.cpp" line="123"/> ++ <source>kylinnm</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../main.cpp" line="127"/> ++ <source>show kylin-nm wifi page</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../main.cpp" line="128"/> ++ <source>show kylin-nm lan page</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++</TS> diff -Nru kylin-nm-4.10.0.0/debian/patches/0068-Added-translation-using-Weblate-Arabic.patch kylin-nm-4.10.0.0/debian/patches/0068-Added-translation-using-Weblate-Arabic.patch --- kylin-nm-4.10.0.0/debian/patches/0068-Added-translation-using-Weblate-Arabic.patch 1970-01-01 08:00:00.000000000 +0800 +++ kylin-nm-4.10.0.0/debian/patches/0068-Added-translation-using-Weblate-Arabic.patch 2025-02-28 15:53:07.000000000 +0800 @@ -0,0 +1,171 @@ +From: KevinDuan <duankaiwen@kylinos.cn> +Date: Mon, 17 Feb 2025 09:37:06 +0800 +Subject: Added translation using Weblate (Arabic) + +--- + plugins/mobilehotspot/translations/ar.ts | 156 +++++++++++++++++++++++++++++++ + 1 file changed, 156 insertions(+) + create mode 100644 plugins/mobilehotspot/translations/ar.ts + +diff --git a/plugins/mobilehotspot/translations/ar.ts b/plugins/mobilehotspot/translations/ar.ts +new file mode 100644 +index 0000000..60bdf06 +--- /dev/null ++++ b/plugins/mobilehotspot/translations/ar.ts +@@ -0,0 +1,156 @@ ++<?xml version="1.0" encoding="utf-8"?> ++<!DOCTYPE TS> ++<TS version="2.1" language="ar"> ++<context> ++ <name>BlacklistItem</name> ++ <message> ++ <location filename="../blacklistitem.cpp" line="50"/> ++ <source>Remove</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>BlacklistPage</name> ++ <message> ++ <location filename="../blacklistpage.cpp" line="47"/> ++ <source>Blacklist</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>ConnectDevListItem</name> ++ <message> ++ <location filename="../connectdevlistitem.cpp" line="50"/> ++ <source>drag into blacklist</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>ConnectdevPage</name> ++ <message> ++ <location filename="../connectdevpage.cpp" line="48"/> ++ <source>Connect device</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>MobileHotspot</name> ++ <message> ++ <location filename="../mobilehotspot.cpp" line="35"/> ++ <source>MobileHotspot</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspot.cpp" line="101"/> ++ <source>mobilehotspot</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/mobilehotspot/mobilehotspot</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../mobilehotspot.cpp" line="103"/> ++ <source>mobilehotspot open</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/mobilehotspot/mobilehotspot open</extra-contents_path> ++ </message> ++</context> ++<context> ++ <name>MobileHotspotWidget</name> ++ <message> ++ <source>ukui control center</source> ++ <translation type="vanished">控制面板</translation> ++ </message> ++ <message> ++ <source>ukui control center desktop message</source> ++ <translation type="vanished">控制面板桌面通知</translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="159"/> ++ <source>wirless switch is close or no wireless device</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>start to close hotspot</source> ++ <translation type="vanished">开始关闭热点</translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="180"/> ++ <source>hotpots name or device is invalid</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>can not create hotspot with password length less than eight!</source> ++ <translation type="vanished">不能创建密码长度小于八位的热点!</translation> ++ </message> ++ <message> ++ <source>start to open hotspot </source> ++ <translation type="vanished">开始创建热点</translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="563"/> ++ <source>Contains at least 8 characters</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="233"/> ++ <source>Hotspot</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="64"/> ++ <source>Settings</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="67"/> ++ <source>Settings desktop message</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="337"/> ++ <source>use </source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="338"/> ++ <source> share network, will interrupt local wireless connection</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="354"/> ++ <location filename="../mobilehotspotwidget.cpp" line="712"/> ++ <source>hotspot already close</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="509"/> ++ <source>Open</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="530"/> ++ <source>Wi-Fi Name</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="551"/> ++ <source>Password</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="595"/> ++ <source>Frequency band</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="619"/> ++ <source>Net card</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="742"/> ++ <location filename="../mobilehotspotwidget.cpp" line="750"/> ++ <source>hotspot already open</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++</TS> diff -Nru kylin-nm-4.10.0.0/debian/patches/0069-Added-translation-using-Weblate-Arabic.patch kylin-nm-4.10.0.0/debian/patches/0069-Added-translation-using-Weblate-Arabic.patch --- kylin-nm-4.10.0.0/debian/patches/0069-Added-translation-using-Weblate-Arabic.patch 1970-01-01 08:00:00.000000000 +0800 +++ kylin-nm-4.10.0.0/debian/patches/0069-Added-translation-using-Weblate-Arabic.patch 2025-02-28 15:53:07.000000000 +0800 @@ -0,0 +1,125 @@ +From: KevinDuan <duankaiwen@kylinos.cn> +Date: Mon, 17 Feb 2025 09:37:10 +0800 +Subject: Added translation using Weblate (Arabic) + +--- + plugins/netconnect/translations/ar.ts | 110 ++++++++++++++++++++++++++++++++++ + 1 file changed, 110 insertions(+) + create mode 100644 plugins/netconnect/translations/ar.ts + +diff --git a/plugins/netconnect/translations/ar.ts b/plugins/netconnect/translations/ar.ts +new file mode 100644 +index 0000000..18beb11 +--- /dev/null ++++ b/plugins/netconnect/translations/ar.ts +@@ -0,0 +1,110 @@ ++<?xml version="1.0" encoding="utf-8"?> ++<!DOCTYPE TS> ++<TS version="2.1" language="ar"> ++<context> ++ <name>AddNetBtn</name> ++ <message> ++ <location filename="../../component/AddBtn/addnetbtn.cpp" line="44"/> ++ <source>Add Others</source> ++ <translation></translation> ++ </message> ++ <message> ++ <location filename="../../component/AddBtn/addnetbtn.cpp" line="48"/> ++ <source>Add WiredNetork</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>LanItem</name> ++ <message> ++ <location filename="../lanitem.cpp" line="57"/> ++ <source>Delete</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../lanitem.cpp" line="118"/> ++ <location filename="../lanitem.cpp" line="131"/> ++ <source>Disconnect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../lanitem.cpp" line="120"/> ++ <location filename="../lanitem.cpp" line="129"/> ++ <source>Connect</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>NetConnect</name> ++ <message> ++ <location filename="../netconnect.ui" line="50"/> ++ <source>Wired Network</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../netconnect.ui" line="112"/> ++ <location filename="../netconnect.cpp" line="220"/> ++ <source>open</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/netconnect/open</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../netconnect.ui" line="198"/> ++ <location filename="../netconnect.cpp" line="217"/> ++ <source>Advanced settings</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/netconnect/Advanced settings"</extra-contents_path> ++ </message> ++ <message> ++ <source>ukui control center</source> ++ <translation type="vanished">控制面板</translation> ++ </message> ++ <message> ++ <source>ukui control center desktop message</source> ++ <translation type="vanished">控制面板桌面通知</translation> ++ </message> ++ <message> ++ <source>WiredConnect</source> ++ <translation type="vanished">有线网络</translation> ++ </message> ++ <message> ++ <location filename="../netconnect.cpp" line="66"/> ++ <source>Settings</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../netconnect.cpp" line="69"/> ++ <source>Settings desktop message</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../netconnect.cpp" line="86"/> ++ <location filename="../netconnect.cpp" line="218"/> ++ <location filename="../netconnect.cpp" line="221"/> ++ <source>LAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>No ethernet device avaliable</source> ++ <translation type="vanished">未检测到有线设备</translation> ++ </message> ++ <message> ++ <location filename="../netconnect.cpp" line="513"/> ++ <location filename="../netconnect.cpp" line="966"/> ++ <source>connected</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../netconnect.cpp" line="515"/> ++ <location filename="../netconnect.cpp" line="818"/> ++ <location filename="../netconnect.cpp" line="976"/> ++ <source>not connected</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../netconnect.cpp" line="595"/> ++ <source>card</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++</TS> diff -Nru kylin-nm-4.10.0.0/debian/patches/0070-Added-translation-using-Weblate-Arabic.patch kylin-nm-4.10.0.0/debian/patches/0070-Added-translation-using-Weblate-Arabic.patch --- kylin-nm-4.10.0.0/debian/patches/0070-Added-translation-using-Weblate-Arabic.patch 1970-01-01 08:00:00.000000000 +0800 +++ kylin-nm-4.10.0.0/debian/patches/0070-Added-translation-using-Weblate-Arabic.patch 2025-02-28 15:53:07.000000000 +0800 @@ -0,0 +1,327 @@ +From: KevinDuan <duankaiwen@kylinos.cn> +Date: Mon, 17 Feb 2025 09:37:15 +0800 +Subject: Added translation using Weblate (Arabic) + +--- + plugins/proxy/translations/ar.ts | 220 +++++++++++++++++++++++++++++++++++++++ + plugins/vpn/translations/ar.ts | 84 +++++++++++++++ + 2 files changed, 304 insertions(+) + create mode 100644 plugins/proxy/translations/ar.ts + create mode 100644 plugins/vpn/translations/ar.ts + +diff --git a/plugins/proxy/translations/ar.ts b/plugins/proxy/translations/ar.ts +new file mode 100644 +index 0000000..25ccaf1 +--- /dev/null ++++ b/plugins/proxy/translations/ar.ts +@@ -0,0 +1,220 @@ ++<?xml version="1.0" encoding="utf-8"?> ++<!DOCTYPE TS> ++<TS version="2.1" language="ar"> ++<context> ++ <name>AptProxyDialog</name> ++ <message> ++ <location filename="../aptproxydialog.cpp" line="43"/> ++ <source>Set APT Proxy</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../aptproxydialog.cpp" line="60"/> ++ <source>Server Address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../aptproxydialog.cpp" line="78"/> ++ <source>Port</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../aptproxydialog.cpp" line="99"/> ++ <source>Cancel</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../aptproxydialog.cpp" line="103"/> ++ <source>Confirm</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>Proxy</name> ++ <message> ++ <location filename="../proxy.cpp" line="63"/> ++ <source>Proxy</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="201"/> ++ <source>Start using</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="214"/> ++ <source>Proxy mode</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="218"/> ++ <source>Auto</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="221"/> ++ <source>Manual</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Application Proxy</source> ++ <translation type="vanished">应用代理</translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="459"/> ++ <source>System Proxy</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="461"/> ++ <source>Auto url</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/Auto url</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="463"/> ++ <source>Http Proxy</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/Http Proxy</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="465"/> ++ <source>Https Proxy</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/Https Proxy</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="467"/> ++ <source>Ftp Proxy</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/Ftp Proxy</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="469"/> ++ <source>Socks Proxy</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/Socks Proxy</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="470"/> ++ <location filename="../proxy.cpp" line="471"/> ++ <location filename="../proxy.cpp" line="472"/> ++ <location filename="../proxy.cpp" line="473"/> ++ <location filename="../proxy.cpp" line="1122"/> ++ <source>Port</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="474"/> ++ <source>List of ignored hosts. more than one entry, please separate with english semicolon(;)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="477"/> ++ <source>App Proxy</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/App Proxy</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="480"/> ++ <source>APT Proxy</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/APT Proxy</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="481"/> ++ <location filename="../proxy.cpp" line="1059"/> ++ <source>Open</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="482"/> ++ <source>Server Address : </source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="483"/> ++ <source>Port : </source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="484"/> ++ <source>Edit</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="586"/> ++ <source>The APT proxy has been turned off and needs to be restarted to take effect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="587"/> ++ <location filename="../proxy.cpp" line="824"/> ++ <source>Reboot Later</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="588"/> ++ <location filename="../proxy.cpp" line="825"/> ++ <source>Reboot Now</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="823"/> ++ <source>The system needs to be restarted to set the APT proxy, whether to reboot</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1071"/> ++ <source>Proxy type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1088"/> ++ <source>IP address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1094"/> ++ <location filename="../proxy.cpp" line="1125"/> ++ <source>Required</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1115"/> ++ <source>Invalid IP Address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1136"/> ++ <source>Username</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1139"/> ++ <location filename="../proxy.cpp" line="1153"/> ++ <source>Optional</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1149"/> ++ <source>Password</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1172"/> ++ <source>Cancel</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1173"/> ++ <source>Save</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1245"/> ++ <source>The following applications are allowed to use this configuration:</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++</TS> +diff --git a/plugins/vpn/translations/ar.ts b/plugins/vpn/translations/ar.ts +new file mode 100644 +index 0000000..fc0cbd4 +--- /dev/null ++++ b/plugins/vpn/translations/ar.ts +@@ -0,0 +1,84 @@ ++<?xml version="1.0" encoding="utf-8"?> ++<!DOCTYPE TS> ++<TS version="2.1" language="ar" sourcelanguage="en"> ++<context> ++ <name>AddNetBtn</name> ++ <message> ++ <location filename="../../component/AddBtn/addnetbtn.cpp" line="44"/> ++ <source>Add Others</source> ++ <translation></translation> ++ </message> ++ <message> ++ <location filename="../../component/AddBtn/addnetbtn.cpp" line="48"/> ++ <source>Add WiredNetork</source> ++ <translation></translation> ++ </message> ++</context> ++<context> ++ <name>ItemFrame</name> ++ <message> ++ <location filename="../itemframe.cpp" line="38"/> ++ <source>Add VPN</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>Vpn</name> ++ <message> ++ <location filename="../vpn.ui" line="53"/> ++ <location filename="../vpn.cpp" line="68"/> ++ <source>VPN</source> ++ <translation></translation> ++ </message> ++ <message> ++ <location filename="../vpn.ui" line="68"/> ++ <source>import</source> ++ <translation></translation> ++ </message> ++ <message> ++ <location filename="../vpn.cpp" line="157"/> ++ <location filename="../vpn.cpp" line="284"/> ++ <source>Show on Taskbar</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Vpn/Show on Taskbar</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../vpn.cpp" line="286"/> ++ <source>Add VPN</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Vpn/Add VPN</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../vpn.cpp" line="372"/> ++ <location filename="../vpn.cpp" line="479"/> ++ <source>connected</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../vpn.cpp" line="374"/> ++ <location filename="../vpn.cpp" line="489"/> ++ <source>not connected</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>VpnItem</name> ++ <message> ++ <location filename="../vpnitem.cpp" line="55"/> ++ <source>Delete</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../vpnitem.cpp" line="107"/> ++ <location filename="../vpnitem.cpp" line="120"/> ++ <source>Disconnect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../vpnitem.cpp" line="109"/> ++ <location filename="../vpnitem.cpp" line="118"/> ++ <source>Connect</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++</TS> diff -Nru kylin-nm-4.10.0.0/debian/patches/0071-Added-translation-using-Weblate-Vietnamese.patch kylin-nm-4.10.0.0/debian/patches/0071-Added-translation-using-Weblate-Vietnamese.patch --- kylin-nm-4.10.0.0/debian/patches/0071-Added-translation-using-Weblate-Vietnamese.patch 1970-01-01 08:00:00.000000000 +0800 +++ kylin-nm-4.10.0.0/debian/patches/0071-Added-translation-using-Weblate-Vietnamese.patch 2025-02-28 15:53:07.000000000 +0800 @@ -0,0 +1,1655 @@ +From: KevinDuan <duankaiwen@kylinos.cn> +Date: Mon, 17 Feb 2025 14:59:21 +0800 +Subject: Added translation using Weblate (Vietnamese) + +--- + src/translations/kylin-nm_vi.ts | 1640 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 1640 insertions(+) + create mode 100644 src/translations/kylin-nm_vi.ts + +diff --git a/src/translations/kylin-nm_vi.ts b/src/translations/kylin-nm_vi.ts +new file mode 100644 +index 0000000..f9a5473 +--- /dev/null ++++ b/src/translations/kylin-nm_vi.ts +@@ -0,0 +1,1640 @@ ++<?xml version="1.0" encoding="utf-8"?> ++<!DOCTYPE TS> ++<TS version="2.1" language="vi" sourcelanguage="en"> ++<context> ++ <name>ConfForm</name> ++ <message> ++ <source>Manual</source> ++ <translation type="obsolete">手动</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>kylin-nm</source> ++ <translation type="obsolete">网络工具</translation> ++ </message> ++ <message> ++ <source>kylin network applet desktop message</source> ++ <translation type="obsolete">网络提示消息</translation> ++ </message> ++ <message> ++ <source>Will check the IP address conflict</source> ++ <translation type="vanished">正在检测ip地址冲突</translation> ++ </message> ++ <message> ++ <source>IPv4 address conflict, Please change IP</source> ++ <translation type="vanished">ip地址冲突,请更改ip</translation> ++ </message> ++ <message> ++ <source>IPv6 address conflict, Please change IP</source> ++ <translation type="obsolete">ip地址冲突,请更改ip {6 ?}</translation> ++ </message> ++</context> ++<context> ++ <name>ConfigPage</name> ++ <message> ++ <location filename="../frontend/netdetails/configpage.cpp" line="60"/> ++ <source>Network profile type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/configpage.cpp" line="63"/> ++ <source>Public(recommended) Devices on the network cannot discover this computer. Generally, it is suitable for networks in public places, such as airports or coffee shops, etc.</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/configpage.cpp" line="67"/> ++ <source>Private Devices on the network can discover this computer. Generally applicable to a network at home or work where you know and trust the individuals and devices on the network.</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/configpage.cpp" line="71"/> ++ <source>Config firewall and security settings</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>ConnectivityPage</name> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="25"/> ++ <source>Network connectivity detection</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="55"/> ++ <source>If access to the Internet is restricted, please switch the network IP connectivity detection method and try again.</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="61"/> ++ <source>Public network (default)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="63"/> ++ <source>Local area network (intranet)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="74"/> ++ <source>Confirm</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="161"/> ++ <source>The network is connected and can access the Internet normally.</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="166"/> ++ <source>The network is connected and access to the Internet is restricted.</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="177"/> ++ <source>Please enter the local area network (intranet) detection address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/connectivity/connectivitypage.cpp" line="196"/> ++ <source>Format error</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>CopyButton</name> ++ <message> ++ <source>Copied successfully</source> ++ <translation type="vanished">复制成功</translation> ++ </message> ++ <message> ++ <source>Copied successfully!</source> ++ <translation type="vanished">复制成功!</translation> ++ </message> ++ <message> ++ <source>Copy all</source> ++ <translation type="vanished">复制全部</translation> ++ </message> ++</context> ++<context> ++ <name>CreatNetPage</name> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="97"/> ++ <source>Connection Name</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="98"/> ++ <source>IPv4Config</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="99"/> ++ <source>Address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="100"/> ++ <source>Netmask</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="101"/> ++ <source>Default Gateway</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="327"/> ++ <source>Address conflict</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Prefs DNS</source> ++ <translation type="vanished">首选 DNS</translation> ++ </message> ++ <message> ++ <source>Alternative DNS</source> ++ <translation type="vanished">备选 DNS</translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="120"/> ++ <source>Auto(DHCP)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="121"/> ++ <source>Manual</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="189"/> ++ <source>Invalid address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="207"/> ++ <source>Invalid subnet mask</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="227"/> ++ <location filename="../frontend/netdetails/creatnetpage.cpp" line="228"/> ++ <source>Required</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>DetailPage</name> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="303"/> ++ <source>Auto Connection</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="257"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="356"/> ++ <source>SSID:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="151"/> ++ <source>Copied successfully!</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="228"/> ++ <source>Copy all</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="248"/> ++ <source>Please input SSID:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="261"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="357"/> ++ <source>Protocol:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="265"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="358"/> ++ <source>Security Type:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="269"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="359"/> ++ <source>Hz:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="273"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="360"/> ++ <source>Chan:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="277"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="361"/> ++ <source>BandWidth:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="293"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="364"/> ++ <source>IPv6:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="281"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="362"/> ++ <source>IPv4:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="287"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="363"/> ++ <source>IPv4 DNS:</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="297"/> ++ <location filename="../frontend/netdetails/detailpage.cpp" line="365"/> ++ <source>Mac:</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifi</name> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiEapFast</name> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiEapLeap</name> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiEapPeap</name> ++ <message> ++ <source>Domain</source> ++ <translation type="obsolete">域</translation> ++ </message> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiEapPwd</name> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiEapTTLS</name> ++ <message> ++ <source>Domain</source> ++ <translation type="obsolete">域</translation> ++ </message> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiEapTls</name> ++ <message> ++ <source>Identity</source> ++ <translation type="obsolete">匿名身份</translation> ++ </message> ++ <message> ++ <source>Domain</source> ++ <translation type="obsolete">域</translation> ++ </message> ++ <message> ++ <source>User certificate</source> ++ <translation type="obsolete">用户证书</translation> ++ </message> ++ <message> ++ <source>User private key</source> ++ <translation type="obsolete">用户私钥</translation> ++ </message> ++ <message> ++ <source>User key password</source> ++ <translation type="obsolete">用户密钥密码</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiLeap</name> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiWep</name> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DlgHideWifiWpa</name> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>DnsSettingWidget</name> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="34"/> ++ <source>DNS Server Advanced Settings</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="37"/> ++ <source>Tactic</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="40"/> ++ <source>Timeout</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="43"/> ++ <source>Retry Count</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="46"/> ++ <source>order</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="47"/> ++ <source>rotate</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="48"/> ++ <source>concurrency</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="53"/> ++ <source> s</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="59"/> ++ <source> times</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="70"/> ++ <source>Close</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="73"/> ++ <source>Cancel</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/dnssettingwidget.cpp" line="76"/> ++ <source>Confirm</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>EnterpriseWlanDialog</name> ++ <message> ++ <source>Connect Enterprise WLAN</source> ++ <translation type="vanished">连接企业网</translation> ++ </message> ++ <message> ++ <source>Close</source> ++ <translation type="vanished">关闭</translation> ++ </message> ++ <message> ++ <location filename="../frontend/enterprise-wlan/enterprisewlandialog.cpp" line="117"/> ++ <source>Wi-Fi network requires authentication</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/enterprise-wlan/enterprisewlandialog.cpp" line="122"/> ++ <source>Access to Wi-Fi network "</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/enterprise-wlan/enterprisewlandialog.cpp" line="124"/> ++ <source>" requires a password or encryption key.</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/enterprise-wlan/enterprisewlandialog.cpp" line="155"/> ++ <source>Cancel</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/enterprise-wlan/enterprisewlandialog.cpp" line="156"/> ++ <source>Connect</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>FirewallDialog</name> ++ <message> ++ <source>Allow your computer to be discovered by other computers and devices on this network?</source> ++ <translation type="vanished">是否允许你的电脑被此网络上的其他电脑和设备发现?</translation> ++ </message> ++ <message> ++ <source>It is recommended that you enable this feature on your home and work networks rather than public networks.</source> ++ <translation type="vanished">建议你在家庭和工作网络上而非公共网络上启用此功能。</translation> ++ </message> ++ <message> ++ <source>Yse</source> ++ <translation type="vanished">是</translation> ++ </message> ++ <message> ++ <source>No</source> ++ <translation type="vanished">否</translation> ++ </message> ++ <message> ++ <location filename="../frontend/networkmode/firewalldialog.cpp" line="89"/> ++ <source>Allow other devices on this network to discover this computer?</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/networkmode/firewalldialog.cpp" line="91"/> ++ <source>It is not recommended to enable this feature on public networks</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/networkmode/firewalldialog.cpp" line="93"/> ++ <source>Not allowed (recommended)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/networkmode/firewalldialog.cpp" line="94"/> ++ <source>Allowed</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>Ipv4Page</name> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="66"/> ++ <source>IPv4Config</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="67"/> ++ <source>Address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="68"/> ++ <source>Netmask</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="69"/> ++ <source>Default Gateway</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Prefs DNS</source> ++ <translation type="vanished">首选 DNS</translation> ++ </message> ++ <message> ++ <source>Alternative DNS</source> ++ <translation type="vanished">备选 DNS</translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="117"/> ++ <source>Auto(DHCP)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="118"/> ++ <source>Manual</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="264"/> ++ <source>Invalid address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="273"/> ++ <source>Invalid subnet mask</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="298"/> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="299"/> ++ <source>Required</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv4page.cpp" line="367"/> ++ <source>Address conflict</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>Ipv6Page</name> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="133"/> ++ <source>IPv6Config</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="134"/> ++ <source>Address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="135"/> ++ <source>Subnet prefix Length</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="136"/> ++ <source>Default Gateway</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Prefs DNS</source> ++ <translation type="vanished">首选 DNS</translation> ++ </message> ++ <message> ++ <source>Alternative DNS</source> ++ <translation type="vanished">备选 DNS</translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="180"/> ++ <source>Auto(DHCP)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="181"/> ++ <source>Manual</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="231"/> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="232"/> ++ <source>Required</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="251"/> ++ <source>Invalid address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="260"/> ++ <source>Invalid gateway</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/ipv6page.cpp" line="299"/> ++ <source>Address conflict</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>JoinHiddenWiFiPage</name> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="140"/> ++ <source>Please enter the network information</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="145"/> ++ <source>Network name(SSID)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Remember the Network</source> ++ <translation type="vanished">记住该网络</translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="146"/> ++ <source>Show Network List</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="147"/> ++ <source>Cancel</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="148"/> ++ <source>Join</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="153"/> ++ <source>Required</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/joinhiddenwifipage.cpp" line="155"/> ++ <source>Find and Join WLAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>LanListItem</name> ++ <message> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="67"/> ++ <source>Not connected</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="124"/> ++ <source>Wired Device not carried</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="144"/> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="161"/> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="259"/> ++ <source>Disconnect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="146"/> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="159"/> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="263"/> ++ <source>Connect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="150"/> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="166"/> ++ <source>Property</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="151"/> ++ <location filename="../frontend/list-items/lanlistitem.cpp" line="168"/> ++ <source>Delete</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>LanPage</name> ++ <message> ++ <source>No ethernet device avaliable</source> ++ <translation type="vanished">未检测到有线设备</translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="751"/> ++ <source>LAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="67"/> ++ <source>conflict, unable to connect to the network normally!</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="753"/> ++ <source>Activated LAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="763"/> ++ <source>Inactivated LAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>LAN Disconnected Successfully</source> ++ <translation type="vanished">有线网络已断开</translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="1244"/> ++ <source>Wired Device not carried</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>LAN Connected Successfully</source> ++ <translation type="vanished">有线网络已连接</translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="1348"/> ++ <source>Connected: </source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="1342"/> ++ <source>Not Connected</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/lanpage.cpp" line="1340"/> ++ <source>(Limited)</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>ListItem</name> ++ <message> ++ <location filename="../frontend/list-items/listitem.cpp" line="178"/> ++ <source>Kylin NM</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/listitem.cpp" line="181"/> ++ <source>kylin network applet desktop message</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>MainWindow</name> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="229"/> ++ <location filename="../frontend/mainwindow.cpp" line="260"/> ++ <source>kylin-nm</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="353"/> ++ <source>LAN</source> ++ <translatorcomment>有线网络</translatorcomment> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="355"/> ++ <source>WLAN</source> ++ <translatorcomment>无线局域网</translatorcomment> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Show MainWindow</source> ++ <translation type="vanished">打开网络工具</translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="384"/> ++ <source>Settings</source> ++ <translatorcomment>设置网络项</translatorcomment> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="385"/> ++ <source>Network Connectivity Detection</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="662"/> ++ <location filename="../frontend/mainwindow.cpp" line="915"/> ++ <source>Network tool</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="676"/> ++ <source>Network Card</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/mainwindow.cpp" line="898"/> ++ <source>Not connected to the network</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>MultipleDnsWidget</name> ++ <message> ++ <location filename="../frontend/netdetails/multiplednswidget.cpp" line="57"/> ++ <source>DNS server(Drag to sort)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/multiplednswidget.cpp" line="64"/> ++ <source>Click "+" to configure DNS</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/multiplednswidget.cpp" line="101"/> ++ <source>Settings</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>NetDetail</name> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="80"/> ++ <source>Kylin NM</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="83"/> ++ <source>kylin network desktop message</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="381"/> ++ <source>Detail</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="382"/> ++ <source>IPv4</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="383"/> ++ <source>IPv6</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="385"/> ++ <source>Security</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Close</source> ++ <translation type="vanished">关闭</translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="387"/> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="394"/> ++ <source>Config</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="406"/> ++ <source>Confirm</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="409"/> ++ <source>Cancel</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="467"/> ++ <source>Forget this network</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="469"/> ++ <source>Delete this network</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="448"/> ++ <source>Add LAN Connect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="453"/> ++ <source>Connect Hidden WLAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="633"/> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="645"/> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="1186"/> ++ <source>None</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="757"/> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="758"/> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="759"/> ++ <source>Auto</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="900"/> ++ <source>start check ipv4 address conflict</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="917"/> ++ <source>start check ipv6 address conflict</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>ipv4 address conflict!</source> ++ <translation type="vanished">ipv4地址冲突!</translation> ++ </message> ++ <message> ++ <source>ipv6 address conflict!</source> ++ <translation type="vanished">ipv6地址冲突!</translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="1182"/> ++ <source>this wifi no support enterprise type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="1187"/> ++ <source>this wifi no support None type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="1192"/> ++ <source>this wifi no support WPA2 type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/netdetail.cpp" line="1195"/> ++ <source>this wifi no support WPA3 type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>SSID:</source> ++ <translation type="obsolete">SSID:</translation> ++ </message> ++ <message> ++ <source>Protocol:</source> ++ <translation type="obsolete">协议:</translation> ++ </message> ++ <message> ++ <source>Hz:</source> ++ <translation type="obsolete">网络频带:</translation> ++ </message> ++ <message> ++ <source>Chan:</source> ++ <translation type="obsolete">网络通道:</translation> ++ </message> ++ <message> ++ <source>BandWidth:</source> ++ <translation type="obsolete">带宽:</translation> ++ </message> ++ <message> ++ <source>IPv4:</source> ++ <translation type="obsolete">IPv4地址:</translation> ++ </message> ++ <message> ++ <source>IPv4 DNS:</source> ++ <translation type="obsolete">IPv4 DNS服务器:</translation> ++ </message> ++ <message> ++ <source>IPv6:</source> ++ <translation type="obsolete">本地链接IPv6地址:</translation> ++ </message> ++ <message> ++ <source>Mac:</source> ++ <translation type="obsolete">物理地址:</translation> ++ </message> ++</context> ++<context> ++ <name>OldMainWindow</name> ++ <message> ++ <source>kylin-nm</source> ++ <translation type="obsolete">网络工具</translation> ++ </message> ++ <message> ++ <source>Show MainWindow</source> ++ <translation type="obsolete">打开网络工具</translation> ++ </message> ++ <message> ++ <source>Not connected</source> ++ <translation type="obsolete">未连接</translation> ++ </message> ++</context> ++<context> ++ <name>OneConnForm</name> ++ <message> ++ <location filename="../frontend/list-items/oneconnform.ui" line="14"/> ++ <source>Form</source> ++ <translation></translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>Disconnect</source> ++ <translation type="obsolete">断开</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Forget</source> ++ <translation type="obsolete">忘记此网络</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++</context> ++<context> ++ <name>OneLancForm</name> ++ <message> ++ <location filename="../frontend/list-items/onelancform.ui" line="14"/> ++ <source>Form</source> ++ <translation></translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>Disconnect</source> ++ <translation type="obsolete">断开</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Not connected</source> ++ <translation type="obsolete">未连接</translation> ++ </message> ++</context> ++<context> ++ <name>SecurityPage</name> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="107"/> ++ <source>Remember the Network</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="215"/> ++ <source>Security</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="216"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="236"/> ++ <source>Password</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="220"/> ++ <source>EAP type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="222"/> ++ <source>Identity</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="223"/> ++ <source>Domain</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="224"/> ++ <source>CA certficate</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="225"/> ++ <source>no need for CA certificate</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="226"/> ++ <source>User certificate</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="227"/> ++ <source>User private key</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="228"/> ++ <source>User key password</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="229"/> ++ <source>Password options</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="230"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="238"/> ++ <location filename="../frontend/netdetails/securitypage.h" line="125"/> ++ <source>Required</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="234"/> ++ <source>Ineer authentication</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="235"/> ++ <source>Username</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="237"/> ++ <source>Ask pwd each query</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="241"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="254"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="257"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="260"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="280"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="360"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="503"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1029"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1110"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1141"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1163"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1186"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1241"/> ++ <source>None</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="242"/> ++ <source>WPA&WPA2 Personal</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="243"/> ++ <source>WPA&WPA2 Enterprise</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="244"/> ++ <source>WPA3 Personal</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="255"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="258"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="261"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="281"/> ++ <source>Choose from file...</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="264"/> ++ <source>Store passwords only for this user</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="264"/> ++ <source>Store password only for this user</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="266"/> ++ <source>Store passwords for all users</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="266"/> ++ <source>Store password for all users</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="268"/> ++ <source>Ask this password every time</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="268"/> ++ <source>Ask password every time</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1131"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1154"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1176"/> ++ <source>Choose a CA certificate</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1132"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1155"/> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1177"/> ++ <source>CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="273"/> ++ <source>PAC provisioning</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="274"/> ++ <source>Allow automatic PAC provisioning</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="275"/> ++ <source>PAC file</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="276"/> ++ <source>Anonymous</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="277"/> ++ <source>Authenticated</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="278"/> ++ <source>Both</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1231"/> ++ <source>Choose a PAC file</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.cpp" line="1232"/> ++ <source>PAC Files (*.pac)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/netdetails/securitypage.h" line="126"/> ++ <source> </source> ++ <translation></translation> ++ </message> ++</context> ++<context> ++ <name>TabPage</name> ++ <message> ++ <location filename="../frontend/tab-pages/tabpage.cpp" line="72"/> ++ <source>Current Device</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/tabpage.cpp" line="79"/> ++ <source>Devices Closed!</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/tabpage.cpp" line="136"/> ++ <source>Settings</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/tabpage.cpp" line="329"/> ++ <source>Kylin NM</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/tabpage.cpp" line="332"/> ++ <source>kylin network applet desktop message</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>VpnPage</name> ++ <message> ++ <source>Wired Device not carried</source> ++ <translation type="obsolete">未插入网线</translation> ++ </message> ++</context> ++<context> ++ <name>WlanListItem</name> ++ <message> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="71"/> ++ <source>Not connected</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="176"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="202"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="648"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="667"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="677"/> ++ <source>Disconnect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="178"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="206"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="315"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="658"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="675"/> ++ <source>Connect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="186"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="682"/> ++ <source>Forget</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="185"/> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="687"/> ++ <source>Property</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/wlanlistitem.cpp" line="336"/> ++ <source>Auto Connect</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>WlanMoreItem</name> ++ <message> ++ <source>More...</source> ++ <translation type="vanished">更多...</translation> ++ </message> ++ <message> ++ <location filename="../frontend/list-items/wlanmoreitem.cpp" line="28"/> ++ <source>Add Others...</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>WlanPage</name> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="132"/> ++ <source>WLAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="108"/> ++ <source>No wireless network card detected</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="134"/> ++ <source>Activated WLAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="145"/> ++ <source>Other WLAN</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>More...</source> ++ <translation type="vanished">更多...</translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="972"/> ++ <source>WLAN Connected Successfully</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="968"/> ++ <source>WLAN Disconnected Successfully</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="1741"/> ++ <source>Connected: </source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../frontend/tab-pages/wlanpage.cpp" line="1743"/> ++ <source>Not Connected</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>(Limited)</source> ++ <translation type="vanished">(网络受限)</translation> ++ </message> ++</context> ++<context> ++ <name>WpaWifiDialog</name> ++ <message> ++ <source>EAP type</source> ++ <translation type="obsolete">EAP方法</translation> ++ </message> ++ <message> ++ <source>Username</source> ++ <translation type="obsolete">用户名</translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="obsolete">密钥</translation> ++ </message> ++ <message> ++ <source>Ask pwd each query</source> ++ <translation type="obsolete">每次询问密码</translation> ++ </message> ++ <message> ++ <source>Cancel</source> ++ <translation type="obsolete">取消</translation> ++ </message> ++ <message> ++ <source>Connect</source> ++ <translation type="obsolete">连接</translation> ++ </message> ++ <message> ++ <source>None</source> ++ <translation type="obsolete">无</translation> ++ </message> ++ <message> ++ <source>Choose from file...</source> ++ <translation type="obsolete">从文件选择...</translation> ++ </message> ++ <message> ++ <source>Choose a CA certificate</source> ++ <translation type="obsolete">选择一个CA证书</translation> ++ </message> ++ <message> ++ <source>CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx)</source> ++ <translation type="obsolete">CA 证书 (*.pem *.der *.p12 *.crt *.cer *.pfx)</translation> ++ </message> ++ <message> ++ <source>Identity</source> ++ <translation type="obsolete">匿名身份</translation> ++ </message> ++ <message> ++ <source>Domain</source> ++ <translation type="obsolete">域</translation> ++ </message> ++ <message> ++ <source>no need for CA certificate</source> ++ <translation type="obsolete">不需要CA证书</translation> ++ </message> ++</context> ++<context> ++ <name>main</name> ++ <message> ++ <location filename="../main.cpp" line="123"/> ++ <source>kylinnm</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../main.cpp" line="127"/> ++ <source>show kylin-nm wifi page</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../main.cpp" line="128"/> ++ <source>show kylin-nm lan page</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++</TS> diff -Nru kylin-nm-4.10.0.0/debian/patches/0072-Added-translation-using-Weblate-Vietnamese.patch kylin-nm-4.10.0.0/debian/patches/0072-Added-translation-using-Weblate-Vietnamese.patch --- kylin-nm-4.10.0.0/debian/patches/0072-Added-translation-using-Weblate-Vietnamese.patch 1970-01-01 08:00:00.000000000 +0800 +++ kylin-nm-4.10.0.0/debian/patches/0072-Added-translation-using-Weblate-Vietnamese.patch 2025-02-28 15:53:07.000000000 +0800 @@ -0,0 +1,462 @@ +From: KevinDuan <duankaiwen@kylinos.cn> +Date: Mon, 17 Feb 2025 15:02:47 +0800 +Subject: Added translation using Weblate (Vietnamese) + +--- + plugins/mobilehotspot/translations/vi.ts | 219 ++++++++++++++++++++++++++++++ + plugins/proxy/translations/vi.ts | 220 +++++++++++++++++++++++++++++++ + 2 files changed, 439 insertions(+) + create mode 100644 plugins/mobilehotspot/translations/vi.ts + create mode 100644 plugins/proxy/translations/vi.ts + +diff --git a/plugins/mobilehotspot/translations/vi.ts b/plugins/mobilehotspot/translations/vi.ts +new file mode 100644 +index 0000000..8652693 +--- /dev/null ++++ b/plugins/mobilehotspot/translations/vi.ts +@@ -0,0 +1,219 @@ ++<?xml version="1.0" encoding="utf-8"?> ++<!DOCTYPE TS> ++<TS version="2.1" language="vi"> ++<context> ++ <name>BlacklistItem</name> ++ <message> ++ <location filename="../blacklistitem.cpp" line="50"/> ++ <source>Remove</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>BlacklistPage</name> ++ <message> ++ <location filename="../blacklistpage.cpp" line="47"/> ++ <source>Blacklist</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>ConnectDevListItem</name> ++ <message> ++ <location filename="../connectdevlistitem.cpp" line="50"/> ++ <source>drag into blacklist</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>ConnectdevPage</name> ++ <message> ++ <location filename="../connectdevpage.cpp" line="48"/> ++ <source>Connect device</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>MobileHotspot</name> ++ <message> ++ <location filename="../mobilehotspot.cpp" line="35"/> ++ <source>MobileHotspot</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspot.cpp" line="101"/> ++ <source>Mobile Hotspot</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/mobilehotspot/Mobile Hotspot</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../mobilehotspot.cpp" line="103"/> ++ <source>Open mobile hotspot</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/mobilehotspot/Open mobile hotspot</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../mobilehotspot.cpp" line="105"/> ++ <source>Wi-Fi Name</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/mobilehotspot/Wi-Fi Name</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../mobilehotspot.cpp" line="107"/> ++ <source>Network Password</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/mobilehotspot/Network Password</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../mobilehotspot.cpp" line="109"/> ++ <source>Network Frequency band</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/mobilehotspot/Network Frequency band</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../mobilehotspot.cpp" line="111"/> ++ <source>Shared NIC port</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/mobilehotspot/Shared NIC port</extra-contents_path> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="vanished">网络密码</translation> ++ <extra-contents_path>/mobilehotspot/Password</extra-contents_path> ++ </message> ++ <message> ++ <source>Frequency band</source> ++ <translation type="vanished">网络频带</translation> ++ <extra-contents_path>/mobilehotspot/Frequency band</extra-contents_path> ++ </message> ++ <message> ++ <source>Net card</source> ++ <translation type="vanished">共享网卡端口</translation> ++ <extra-contents_path>/mobilehotspot/Net card</extra-contents_path> ++ </message> ++ <message> ++ <source>mobilehotspot</source> ++ <translation type="vanished">移动热点</translation> ++ </message> ++</context> ++<context> ++ <name>MobileHotspotWidget</name> ++ <message> ++ <source>ukui control center</source> ++ <translation type="vanished">控制面板</translation> ++ </message> ++ <message> ++ <source>ukui control center desktop message</source> ++ <translation type="vanished">控制面板桌面通知</translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="157"/> ++ <source>wirless switch is close or no wireless device</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>start to close hotspot</source> ++ <translation type="vanished">开始关闭热点</translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="178"/> ++ <source>hotpots name or device is invalid</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>can not create hotspot with password length less than eight!</source> ++ <translation type="vanished">不能创建密码长度小于八位的热点!</translation> ++ </message> ++ <message> ++ <source>start to open hotspot </source> ++ <translation type="vanished">开始创建热点</translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="637"/> ++ <source>Contains at least 8 characters</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="232"/> ++ <source>Hotspot</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="62"/> ++ <source>Settings</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="65"/> ++ <source>Settings desktop message</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="358"/> ++ <source>use </source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="359"/> ++ <source> share network, will interrupt local wireless connection</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="376"/> ++ <location filename="../mobilehotspotwidget.cpp" line="396"/> ++ <location filename="../mobilehotspotwidget.cpp" line="480"/> ++ <location filename="../mobilehotspotwidget.cpp" line="520"/> ++ <location filename="../mobilehotspotwidget.cpp" line="779"/> ++ <source>hotspot already close</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="544"/> ++ <source>Open mobile hotspot</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="625"/> ++ <source>Network Password</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="665"/> ++ <source>Network Frequency band</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="689"/> ++ <source>Shared NIC port</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Open</source> ++ <translation type="vanished">开启</translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="604"/> ++ <source>Wi-Fi Name</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Password</source> ++ <translation type="vanished">网络密码</translation> ++ </message> ++ <message> ++ <source>Frequency band</source> ++ <translation type="vanished">网络频带</translation> ++ </message> ++ <message> ++ <source>Net card</source> ++ <translation type="vanished">共享网卡端口</translation> ++ </message> ++ <message> ++ <location filename="../mobilehotspotwidget.cpp" line="514"/> ++ <location filename="../mobilehotspotwidget.cpp" line="811"/> ++ <location filename="../mobilehotspotwidget.cpp" line="823"/> ++ <source>hotspot already open</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++</TS> +diff --git a/plugins/proxy/translations/vi.ts b/plugins/proxy/translations/vi.ts +new file mode 100644 +index 0000000..a410484 +--- /dev/null ++++ b/plugins/proxy/translations/vi.ts +@@ -0,0 +1,220 @@ ++<?xml version="1.0" encoding="utf-8"?> ++<!DOCTYPE TS> ++<TS version="2.1" language="vi"> ++<context> ++ <name>AptProxyDialog</name> ++ <message> ++ <location filename="../aptproxydialog.cpp" line="43"/> ++ <source>Set APT Proxy</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../aptproxydialog.cpp" line="60"/> ++ <source>Server Address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../aptproxydialog.cpp" line="78"/> ++ <source>Port</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../aptproxydialog.cpp" line="99"/> ++ <source>Cancel</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../aptproxydialog.cpp" line="103"/> ++ <source>Confirm</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++<context> ++ <name>Proxy</name> ++ <message> ++ <location filename="../proxy.cpp" line="63"/> ++ <source>Proxy</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="201"/> ++ <source>Start using</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="214"/> ++ <source>Proxy mode</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="218"/> ++ <source>Auto</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="221"/> ++ <source>Manual</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <source>Application Proxy</source> ++ <translation type="vanished">应用代理</translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="459"/> ++ <source>System Proxy</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="461"/> ++ <source>Auto url</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/Auto url</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="463"/> ++ <source>Http Proxy</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/Http Proxy</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="465"/> ++ <source>Https Proxy</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/Https Proxy</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="467"/> ++ <source>Ftp Proxy</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/Ftp Proxy</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="469"/> ++ <source>Socks Proxy</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/Socks Proxy</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="470"/> ++ <location filename="../proxy.cpp" line="471"/> ++ <location filename="../proxy.cpp" line="472"/> ++ <location filename="../proxy.cpp" line="473"/> ++ <location filename="../proxy.cpp" line="1122"/> ++ <source>Port</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="474"/> ++ <source>List of ignored hosts. more than one entry, please separate with english semicolon(;)</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="477"/> ++ <source>App Proxy</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/App Proxy</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="480"/> ++ <source>APT Proxy</source> ++ <translation type="unfinished"></translation> ++ <extra-contents_path>/Proxy/APT Proxy</extra-contents_path> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="481"/> ++ <location filename="../proxy.cpp" line="1059"/> ++ <source>Open</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="482"/> ++ <source>Server Address : </source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="483"/> ++ <source>Port : </source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="484"/> ++ <source>Edit</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="586"/> ++ <source>The APT proxy has been turned off and needs to be restarted to take effect</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="587"/> ++ <location filename="../proxy.cpp" line="824"/> ++ <source>Reboot Later</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="588"/> ++ <location filename="../proxy.cpp" line="825"/> ++ <source>Reboot Now</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="823"/> ++ <source>The system needs to be restarted to set the APT proxy, whether to reboot</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1071"/> ++ <source>Proxy type</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1088"/> ++ <source>IP address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1094"/> ++ <location filename="../proxy.cpp" line="1125"/> ++ <source>Required</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1115"/> ++ <source>Invalid IP Address</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1136"/> ++ <source>Username</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1139"/> ++ <location filename="../proxy.cpp" line="1153"/> ++ <source>Optional</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1149"/> ++ <source>Password</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1172"/> ++ <source>Cancel</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1173"/> ++ <source>Save</source> ++ <translation type="unfinished"></translation> ++ </message> ++ <message> ++ <location filename="../proxy.cpp" line="1245"/> ++ <source>The following applications are allowed to use this configuration:</source> ++ <translation type="unfinished"></translation> ++ </message> ++</context> ++</TS> diff -Nru kylin-nm-4.10.0.0/debian/patches/0073-98-fix-all-v11.patch kylin-nm-4.10.0.0/debian/patches/0073-98-fix-all-v11.patch --- kylin-nm-4.10.0.0/debian/patches/0073-98-fix-all-v11.patch 1970-01-01 08:00:00.000000000 +0800 +++ kylin-nm-4.10.0.0/debian/patches/0073-98-fix-all-v11.patch 2025-02-28 15:53:07.000000000 +0800 @@ -0,0 +1,662 @@ +From: =?utf-8?b?5p2O5Lqr?= <lixiang1@kylinos.cn> +Date: Thu, 27 Feb 2025 06:55:05 +0000 +Subject: =?utf-8?b?ITk4IGZpeChhbGwpOiB2MTHku6PnoIHlkIzmupDlkIzmraUgTWVyZ2Ug?= + =?utf-8?b?cHVsbCByZXF1ZXN0ICE5OCBmcm9tIOadjuS6qy9vcGVua3lsaW4vbmlsZQ==?= + +--- + src-vpn/frontend/single-pages/vpnpage.cpp | 9 +- + src/backend/dbus-interface/kylinagent.c | 4 +- + src/backend/dbus-interface/kylinvpnrequest.c | 2 +- + src/backend/dbus-interface/nm-macros-internal.h | 20 ++-- + src/backend/utils.cpp | 8 +- + src/frontend/list-items/wlanlistitem.cpp | 2 +- + src/frontend/mainwindow.cpp | 77 +++++++------ + src/frontend/netdetails/securitypage.cpp | 2 +- + src/frontend/tab-pages/lanpage.cpp | 145 +++++++++++++++++++++++- + src/frontend/tab-pages/lanpage.h | 15 +++ + src/frontend/tab-pages/tabpage.cpp | 8 +- + sys-dbus-register/kyarping/kylinipv4arping.cpp | 4 +- + sys-dbus-register/kyarping/kylinipv6arping.cpp | 12 +- + sys-dbus-register/kynmsystemdbus.cpp | 2 +- + 14 files changed, 241 insertions(+), 69 deletions(-) + +diff --git a/src-vpn/frontend/single-pages/vpnpage.cpp b/src-vpn/frontend/single-pages/vpnpage.cpp +index b332d7f..1cc7c71 100644 +--- a/src-vpn/frontend/single-pages/vpnpage.cpp ++++ b/src-vpn/frontend/single-pages/vpnpage.cpp +@@ -666,7 +666,8 @@ void VpnPage::showUI() + raise(); + activateWindow(); + resetWindowPosition(); +- return; ++ kdk::WindowManager::setSkipTaskBar(this->windowHandle(),true); ++ kdk::WindowManager::setSkipSwitcher(this->windowHandle(),true); + } + + void VpnPage::resetWindowPosition() +@@ -678,6 +679,12 @@ void VpnPage::resetWindowPosition() + //#define PANEL_BOTTOM 4 + + QRect availableGeo = QGuiApplication::screenAt(QCursor::pos())->geometry(); ++ QString currentScreen = WindowManager::currentOutputName(); ++ for (auto screen : QApplication::screens()) { ++ if (screen && screen->name() == currentScreen) { ++ availableGeo = screen->geometry(); ++ } ++ } + int x, y; + switch(m_panelPosition){ + case PANEL_TOP: +diff --git a/src/backend/dbus-interface/kylinagent.c b/src/backend/dbus-interface/kylinagent.c +index 393d9fc..55599f9 100644 +--- a/src/backend/dbus-interface/kylinagent.c ++++ b/src/backend/dbus-interface/kylinagent.c +@@ -600,7 +600,7 @@ vpn_secret_iter_cb (const char *key, const char *secret, gpointer user_data) + const char *service_name, *id; + char *display_name; + +- if (secret && strlen (secret)) { ++ if (secret && strnlen (secret, sizeof(secret))) { + setting = nm_connection_get_setting (r->connection, NM_TYPE_SETTING_VPN); + g_assert (setting); + service_name = nm_setting_vpn_get_service_type (NM_SETTING_VPN (setting)); +@@ -643,7 +643,7 @@ write_one_secret_to_keyring (NMSetting *setting, + return; + g_return_if_fail (type == G_TYPE_STRING); + secret = g_value_get_string (value); +- if (secret && strlen (secret)) ++ if (secret && strnlen (secret, sizeof(secret))) + save_one_secret (r, setting, key, secret, NULL); + } + } +diff --git a/src/backend/dbus-interface/kylinvpnrequest.c b/src/backend/dbus-interface/kylinvpnrequest.c +index c294bd6..859d1cb 100644 +--- a/src/backend/dbus-interface/kylinvpnrequest.c ++++ b/src/backend/dbus-interface/kylinvpnrequest.c +@@ -65,7 +65,7 @@ _nm_utils_ascii_str_to_bool (const char *str, + if (!str[0]) + return default_value; + +- len = strlen (str); ++ len = strnlen (str, sizeof(str)); + if (g_ascii_isspace (str[len - 1])) { + s = g_strdup (str); + g_strchomp (s); +diff --git a/src/backend/dbus-interface/nm-macros-internal.h b/src/backend/dbus-interface/nm-macros-internal.h +index fb76caf..edc426d 100644 +--- a/src/backend/dbus-interface/nm-macros-internal.h ++++ b/src/backend/dbus-interface/nm-macros-internal.h +@@ -260,7 +260,7 @@ NM_G_ERROR_MSG (GError *error) + /*****************************************************************************/ + + /* macro to return strlen() of a compile time string. */ +-#define NM_STRLEN(str) ( sizeof ("" str) - 1 ) ++#define NM_qstrlen(str) ( sizeof ("" str) - 1 ) + + /* returns the length of a NULL terminated array of pointers, + * like g_strv_length() does. The difference is: +@@ -993,7 +993,7 @@ nm_strstrip_avoid_copy (const char *str, char **str_free) + return NULL; + + str = nm_str_skip_leading_spaces (str); +- l = strlen (str); ++ l = strnlen (str, sizeof(strnlen)); + if ( l == 0 + || !g_ascii_isspace (str[l - 1])) + return str; +@@ -1141,14 +1141,14 @@ nm_decode_version (guint version, guint *major, guint *minor, guint *micro) + (_str \ + ? ({ \ + const gsize _trunc_at = (trunc_at); \ +- const gsize _strlen_trunc = NM_MIN (strlen (_str), _trunc_at); \ ++ const gsize _qstrlen_trunc = NM_MIN (qstrlen (_str), _trunc_at); \ + char *_buf; \ + \ +- _buf = g_alloca (_strlen_trunc + 3); \ ++ _buf = g_alloca (_qstrlen_trunc + 3); \ + _buf[0] = '"'; \ +- memcpy (&_buf[1], _str, _strlen_trunc); \ +- _buf[_strlen_trunc + 1] = _str[_strlen_trunc] ? '^' : '"'; \ +- _buf[_strlen_trunc + 2] = '\0'; \ ++ memcpy (&_buf[1], _str, _qstrlen_trunc); \ ++ _buf[_qstrlen_trunc + 1] = _str[_qstrlen_trunc] ? '^' : '"'; \ ++ _buf[_qstrlen_trunc + 2] = '\0'; \ + _buf; \ + }) \ + : "(null)"); \ +@@ -1190,12 +1190,12 @@ nm_decode_version (guint version, guint *major, guint *minor, guint *micro) + ({ \ + const char *const _name = (name); \ + char **const _p_val_to_free = (p_val_to_free); \ +- const gsize _name_len = strlen (_name); \ ++ const gsize _name_len = strnlen (_name, sizeof(_name)); \ + char *_buf2; \ + \ + nm_assert (_p_val_to_free && !*_p_val_to_free); \ +- if (NM_STRLEN (format) + _name_len < 200) \ +- _buf2 = nm_sprintf_bufa (NM_STRLEN (format) + _name_len, format, _name); \ ++ if (NM_qstrlen (format) + _name_len < 200) \ ++ _buf2 = nm_sprintf_bufa (NM_qstrlen (format) + _name_len, format, _name); \ + else { \ + _buf2 = g_strdup_printf (format, _name); \ + *_p_val_to_free = _buf2; \ +diff --git a/src/backend/utils.cpp b/src/backend/utils.cpp +index 8c2959b..525168e 100644 +--- a/src/backend/utils.cpp ++++ b/src/backend/utils.cpp +@@ -126,12 +126,12 @@ int NetworkSpeed::getCurrentDownloadRates(char *netname, long *save_rate, long * + // qDebug()<<"No eth0 keyword to find!"; + continue; + } else { +- match = match + strlen(netname) + strlen(":"); //地址偏移到冒号 ++ match = match + qstrlen(netname) + qstrlen(":"); //地址偏移到冒号 + sscanf(match,"%ld ",save_rate); + memset(tmp_value,0,sizeof(tmp_value)); + sscanf(match,"%s ",tmp_value); +- match = match + strlen(tmp_value); +- for (size_t i=0;i<strlen(buffer);i++) { ++ match = match + qstrlen(tmp_value); ++ for (size_t i=0;i<qstrlen(buffer);i++) { + if (0x20 == *match) { + match ++; + } else { +@@ -140,7 +140,7 @@ int NetworkSpeed::getCurrentDownloadRates(char *netname, long *save_rate, long * + } + memset(tmp_value,0,sizeof(tmp_value)); + sscanf(match,"%s ",tmp_value); +- match = match + strlen(tmp_value); ++ match = match + qstrlen(tmp_value); + counter ++; + } + } +diff --git a/src/frontend/list-items/wlanlistitem.cpp b/src/frontend/list-items/wlanlistitem.cpp +index d69d959..7d2b4b8 100644 +--- a/src/frontend/list-items/wlanlistitem.cpp ++++ b/src/frontend/list-items/wlanlistitem.cpp +@@ -299,7 +299,7 @@ void WlanListItem::initWlanUI() + // m_pwdLineEdit->setAttribute(Qt::WA_InputMethodEnabled, false); + // m_pwdLineEdit->setContextMenuPolicy(Qt::NoContextMenu); + +- QRegExp rx("^[A-Za-z0-9`~!@#$%^&*()_-+=<>,.\\\/]+$"); ++ QRegExp rx("^[\\x20-\\x7E]+$"); + QRegExpValidator *latitude = new QRegExpValidator(rx, this); + m_pwdLineEdit->setValidator(latitude); + +diff --git a/src/frontend/mainwindow.cpp b/src/frontend/mainwindow.cpp +index fbf7d26..908ba97 100644 +--- a/src/frontend/mainwindow.cpp ++++ b/src/frontend/mainwindow.cpp +@@ -392,6 +392,7 @@ void MainWindow::initTrayIcon() + m_showConnectivityPageAction->setIcon(QIcon::fromTheme("gnome-netstatus-txrx")); + // m_trayIconMenu->addAction(m_showMainwindowAction); + m_trayIconMenu->addAction(m_showSettingsAction); ++ m_trayIconMenu->addAction(m_showConnectivityPageAction); + m_trayIcon->setContextMenu(m_trayIconMenu); + iconStatus = IconActiveType::LAN_CONNECTED; + onRefreshTrayIcon(); +@@ -399,19 +400,19 @@ void MainWindow::initTrayIcon() + connect(m_trayIcon, &QSystemTrayIcon::activated, this, &MainWindow::onTrayIconActivated); + // connect(m_showMainwindowAction, &QAction::triggered, this, &MainWindow::onShowMainwindowActionTriggled); + connect(m_showSettingsAction, &QAction::triggered, this, &MainWindow::onShowSettingsActionTriggled); +-// connect(m_showConnectivityPageAction, &QAction::triggered, [=]() { +-// if (m_connectivityPage != nullptr) { +-// KWindowSystem::activateWindow(m_connectivityPage->winId()); +-// KWindowSystem::raiseWindow(m_connectivityPage->winId()); +-// return; +-// } +-// QString uri = getConnectivityCheckSpareUriByGDbus(); +-// m_connectivityPage = new ConnectivityPage(uri, this); +-// connect(m_connectivityPage, &ConnectivityPage::pageClose, [&](){ +-// m_connectivityPage = nullptr; +-// }); +-// m_connectivityPage->show(); +-// }); ++ connect(m_showConnectivityPageAction, &QAction::triggered, [=]() { ++ if (m_connectivityPage != nullptr) { ++ KWindowSystem::activateWindow(m_connectivityPage->winId()); ++ KWindowSystem::raiseWindow(m_connectivityPage->winId()); ++ return; ++ } ++ QString uri = getConnectivityCheckSpareUriByGDbus(); ++ m_connectivityPage = new ConnectivityPage(uri, this); ++ connect(m_connectivityPage, &ConnectivityPage::pageClose, [&](){ ++ m_connectivityPage = nullptr; ++ }); ++ m_connectivityPage->show(); ++ }); + + m_trayIcon->show(); + } +@@ -550,6 +551,12 @@ void MainWindow::resetWindowPosition() + } + + QRect availableGeo = qscreen->geometry(); ++ QString currentScreen = WindowManager::currentOutputName(); ++ for (auto screen : QApplication::screens()) { ++ if (screen && screen->name() == currentScreen) { ++ availableGeo = screen->geometry(); ++ } ++ } + int x, y; + switch (m_panelPosition) + { +@@ -828,34 +835,34 @@ void MainWindow::onRefreshTrayIcon() + } + } + +-// if(!getConnectivityCheckSpareUriByGDbus().isEmpty()) { +-// if (iconStatus == IconActiveType::LAN_CONNECTED) { +-// m_trayIcon->setIcon(QIcon::fromTheme("network-intranet-symbolic")); +-// } else if (iconStatus == IconActiveType::WLAN_CONNECTED) { +-// if (signalStrength > MW_EXCELLENT_SIGNAL){ +-// m_trayIcon->setIcon(QIcon::fromTheme(EXCELLENT_SIGNAL_INTRANET_ICON)); +-// } else if (signalStrength > MW_GOOD_SIGNAL) { +-// m_trayIcon->setIcon(QIcon::fromTheme(GOOD_SIGNAL_INTRANET_ICON)); +-// } else if (signalStrength > MW_OK_SIGNAL) { +-// m_trayIcon->setIcon(QIcon::fromTheme(OK_SIGNAL_INTRANET_ICON)); +-// } else if (signalStrength > MW_LOW_SIGNAL) { +-// m_trayIcon->setIcon(QIcon::fromTheme(LOW_SIGNAL_INTRANET_ICON)); +-// } else { +-// m_trayIcon->setIcon(QIcon::fromTheme(NONE_SIGNAL_INTRANET_ICON)); +-// } +-// } +-// } ++ if(!getConnectivityCheckSpareUriByGDbus().isEmpty()) { ++ if (iconStatus == IconActiveType::LAN_CONNECTED) { ++ m_trayIcon->setIcon(QIcon::fromTheme("network-intranet-symbolic")); ++ } else if (iconStatus == IconActiveType::WLAN_CONNECTED) { ++ if (signalStrength > MW_EXCELLENT_SIGNAL){ ++ m_trayIcon->setIcon(QIcon::fromTheme(EXCELLENT_SIGNAL_INTRANET_ICON)); ++ } else if (signalStrength > MW_GOOD_SIGNAL) { ++ m_trayIcon->setIcon(QIcon::fromTheme(GOOD_SIGNAL_INTRANET_ICON)); ++ } else if (signalStrength > MW_OK_SIGNAL) { ++ m_trayIcon->setIcon(QIcon::fromTheme(OK_SIGNAL_INTRANET_ICON)); ++ } else if (signalStrength > MW_LOW_SIGNAL) { ++ m_trayIcon->setIcon(QIcon::fromTheme(LOW_SIGNAL_INTRANET_ICON)); ++ } else { ++ m_trayIcon->setIcon(QIcon::fromTheme(NONE_SIGNAL_INTRANET_ICON)); ++ } ++ } ++ } + + if (signalStrength == -1) { + m_trayIcon->setIcon(QIcon::fromTheme("network-wired-disconnected-symbolic")); + } + onRefreshTrayIconTooltip(); + +-// if (iconStatus > IconActiveType::NOT_CONNECTED) { +-// m_trayIconMenu->addAction(m_showConnectivityPageAction); +-// } else { +-// m_trayIconMenu->removeAction(m_showConnectivityPageAction); +-// } ++ if (iconStatus > IconActiveType::NOT_CONNECTED) { ++ m_trayIconMenu->addAction(m_showConnectivityPageAction); ++ } else { ++ m_trayIconMenu->removeAction(m_showConnectivityPageAction); ++ } + } + + void MainWindow::onSetTrayIconLoading() +diff --git a/src/frontend/netdetails/securitypage.cpp b/src/frontend/netdetails/securitypage.cpp +index b40052c..61e27fc 100644 +--- a/src/frontend/netdetails/securitypage.cpp ++++ b/src/frontend/netdetails/securitypage.cpp +@@ -285,7 +285,7 @@ void SecurityPage::initUI() + clientPrivateKeyPwdEdit->setClearButtonEnabled(false); + userPwdEdit->setClearButtonEnabled(false); + +- QRegExp rx("^[A-Za-z0-9`~!@#$%^&*()_-+=<>,.\\\/]+$"); ++ QRegExp rx("^[\\x20-\\x7E]+$"); + QRegExpValidator *latitude = new QRegExpValidator(rx, this); + pwdEdit->setValidator(latitude); + clientPrivateKeyPwdEdit->setValidator(latitude); +diff --git a/src/frontend/tab-pages/lanpage.cpp b/src/frontend/tab-pages/lanpage.cpp +index 0b2ab8a..94053f9 100644 +--- a/src/frontend/tab-pages/lanpage.cpp ++++ b/src/frontend/tab-pages/lanpage.cpp +@@ -34,6 +34,16 @@ + #define TRANSPARENT_COLOR QColor(0,0,0,0) + #define ITEM_HEIGHT 48 + ++#define MARGIN 8 ++#define PANEL_TOP 1 ++#define PANEL_LEFT 2 ++#define PANEL_RIGHT 3 ++#define PANEL_BOTTOM 0 ++ ++#define PANEL_SETTINGS "org.ukui.panel.settings" ++#define PANEL_SIZE_KEY "panelsize" ++#define PANEL_POSITION_KEY "panelposition" ++ + #define SYSTEM_DBUS_SERVICE "com.kylin.network.qt.systemdbus" + #define SYSTEM_DBUS_PATH "/" + #define SYSTEM_DBUS_INTERFACE "com.kylin.network.interface" +@@ -50,11 +60,13 @@ LanPage::LanPage(QWidget *parent) : TabPage(parent) + m_connectResourse = new KyConnectResourse(this); + m_deviceResource = new KyNetworkDeviceResourse(this); + m_wiredConnectOperation = new KyWiredConnectOperation(this); ++ m_pNetTip = new KBallonTip(); + + initUI(); + initLanDevice(); + initNetSwitch(); + initLanDeviceState(); ++ initPanelGSettings(); + + initDeviceCombox(); + initLanArea(); +@@ -79,6 +91,7 @@ LanPage::LanPage(QWidget *parent) : TabPage(parent) + connect(m_deviceResource, &KyNetworkDeviceResourse::carrierChanage, this, &LanPage::onDeviceCarriered); + connect(m_deviceResource, &KyNetworkDeviceResourse::deviceActiveChanage, this, &LanPage::onDeviceActiveChanage); + connect(m_deviceResource, &KyNetworkDeviceResourse::deviceManagedChange, this, &LanPage::onDeviceManagedChange); ++ connect(m_deviceResource, &KyNetworkDeviceResourse::stateChanged, this, &LanPage::onLanStateChanged); + + connect(m_wiredConnectOperation, &KyWiredConnectOperation::activateConnectionError, this, &LanPage::activateFailed); + connect(m_wiredConnectOperation, &KyWiredConnectOperation::deactivateConnectionError, this, &LanPage::deactivateFailed); +@@ -122,7 +135,10 @@ LanPage::LanPage(QWidget *parent) : TabPage(parent) + + LanPage::~LanPage() + { +- ++ if (m_pNetTip != nullptr) { ++ delete m_pNetTip; ++ m_pNetTip = nullptr; ++ } + } + + void LanPage::initLanDevice() +@@ -241,6 +257,31 @@ void LanPage::initNetSwitch() + } + } + ++void LanPage::initPanelGSettings() ++{ ++ const QByteArray id(PANEL_SETTINGS); ++ if (QGSettings::isSchemaInstalled(id)) { ++ if (m_panelGSettings == nullptr) { ++ m_panelGSettings = new QGSettings(id); ++ } ++ if (m_panelGSettings->keys().contains(PANEL_POSITION_KEY)) { ++ m_panelPosition = m_panelGSettings->get(PANEL_POSITION_KEY).toInt(); ++ } ++ if (m_panelGSettings->keys().contains(PANEL_SIZE_KEY)) { ++ m_panelSize = m_panelGSettings->get(PANEL_SIZE_KEY).toInt(); ++ } ++ connect(m_panelGSettings, &QGSettings::changed, this, [&] (const QString &key) { ++ if (key == PANEL_POSITION_KEY) { ++ m_panelPosition = m_panelGSettings->get(PANEL_POSITION_KEY).toInt(); ++ ++ } ++ if (key == PANEL_SIZE_KEY) { ++ m_panelSize = m_panelGSettings->get(PANEL_SIZE_KEY).toInt(); ++ } ++ }); ++ } ++} ++ + void LanPage::onSwithChanged(bool enable) + { + qDebug()<<"[LanPage] SwitchButton statue changed to:" << enable << m_netSwitch->isChecked(); +@@ -792,6 +833,7 @@ void LanPage::onDeviceManagedChange(QString deviceName, bool managed) + initLanDeviceState(); + initDeviceCombox(); + initLanArea(); ++ m_showedNetTipFlag = false; + Q_EMIT deviceStatusChanged(); + } + +@@ -1430,3 +1472,104 @@ void LanPage::showRate() + onSetNetSpeed(m_activatedLanListWidget, m_activeConnectionMap.contains(EMPTY_SSID), m_currentDeviceName); + }); + } ++ ++void LanPage::onLanStateChanged(NetworkManager::Device::State newstate, ++ NetworkManager::Device::State oldstate, ++ NetworkManager::Device::StateChangeReason reason) ++{ ++ if (newstate == NetworkManager::Device::Failed ++ && reason == NetworkManager::Device::StateChangeReason::ConfigUnavailableReason) ++ { ++ if (!m_showedNetTipFlag) ++ { ++ showBallonTip(); ++ m_showedNetTipFlag = true; ++ } ++ } ++} ++ ++void LanPage::onShowKylinNetworkCheck() ++{ ++ QProcess process; ++ process.startDetached("kylin-os-manager --diagnosis --mode=Network"); ++} ++ ++void LanPage::showBallonTip() ++{ ++ QString warnInfo = tr("No internet access. Please click Network Check to specific reason."); ++ ++ if (m_pNetTip != nullptr) { ++ delete m_pNetTip; ++ m_pNetTip = nullptr; ++ } ++ m_pNetTip = new KBallonTip(); ++ QPushButton *btn = new QPushButton(m_pNetTip); ++ btn->setText(tr("Network Check")); ++ connect(btn, &QPushButton::clicked, m_pNetTip, [=]{ ++ m_pNetTip->close(); ++ onShowKylinNetworkCheck(); ++ }); ++ ++ m_pNetTip->setAttribute(Qt::WA_TranslucentBackground, true); ++ m_pNetTip->setTipType(TipType::Warning); ++ m_pNetTip->hBoxLayout()->setContentsMargins(16, 6, 10, 6); ++ m_pNetTip->hBoxLayout()->setSpacing(4); ++ m_pNetTip->hBoxLayout()->addSpacing(4); ++ m_pNetTip->hBoxLayout()->addWidget(btn); ++ m_pNetTip->setTipTime(9 * 1000); ++ m_pNetTip->setText(warnInfo); ++ ++ QPalette pal = m_pNetTip->palette(); ++ pal.setColor(QPalette::Window, this->palette().window().color()); ++ pal.setColor(QPalette::WindowText, this->palette().windowText().color()); ++ m_pNetTip->setPalette(pal); ++ ++ QPalette btnPal = btn->palette(); ++ btnPal.setColor(QPalette::Text, this->palette().text().color()); ++ btnPal.setColor(QPalette::Button, this->palette().button().color()); ++ btn->setPalette(btnPal); ++ ++ m_pNetTip->adjustSize(); ++ KWindowSystem::setState(m_pNetTip->winId(), NET::SkipTaskbar | NET::SkipPager | NET::SkipSwitcher); ++ QRect rect = caculatePositionWithPanel(m_pNetTip->width() - 8, m_pNetTip->height() - 4); ++ m_pNetTip->setGeometry(rect); ++ m_pNetTip->showInfo(); ++} ++ ++QRect LanPage::caculatePositionWithPanel(const int windowWidth, const int windowHeight) ++{ ++ int x,y; ++ QScreen * qscreen = QGuiApplication::screenAt(QCursor::pos()); ++ QRect availableGeo = qscreen->geometry(); ++ QString currentScreen = WindowManager::currentOutputName(); ++ for (auto screen : QApplication::screens()) { ++ if (screen && screen->name() == currentScreen) { ++ availableGeo = screen->geometry(); ++ } ++ } ++ switch (m_panelPosition) ++ { ++ case PANEL_TOP: ++ x = availableGeo.x() + availableGeo.width() - windowWidth - MARGIN; ++ y = availableGeo.y() + m_panelSize + MARGIN; ++ break; ++ case PANEL_BOTTOM: ++ x = availableGeo.x() + availableGeo.width() - windowWidth - MARGIN; ++ y = availableGeo.y() + availableGeo.height() - m_panelSize - windowHeight - MARGIN; ++ break; ++ case PANEL_LEFT: ++ x = availableGeo.x() + m_panelSize + MARGIN; ++ y = availableGeo.y() + availableGeo.height() - windowHeight - MARGIN; ++ break; ++ case PANEL_RIGHT: ++ x = availableGeo.x() + availableGeo.width() - m_panelSize - windowWidth - MARGIN; ++ y = availableGeo.y() + availableGeo.height() - windowHeight - MARGIN; ++ break; ++ default: ++ x = availableGeo.x() + availableGeo.width() - windowWidth - MARGIN; ++ y = availableGeo.y() + availableGeo.height() - m_panelSize - windowHeight - MARGIN; ++ break; ++ } ++ ++ return QRect(x, y, windowWidth, windowHeight); ++} +diff --git a/src/frontend/tab-pages/lanpage.h b/src/frontend/tab-pages/lanpage.h +index 14057df..fac67ff 100644 +--- a/src/frontend/tab-pages/lanpage.h ++++ b/src/frontend/tab-pages/lanpage.h +@@ -28,6 +28,8 @@ + #include <QListWidget> + #include <QMap> + #include <QGSettings> ++#include <QApplication> ++#include <QScreen> + + #include "list-items/listitem.h" + #include "list-items/lanlistitem.h" +@@ -66,6 +68,7 @@ private: + void initLanArea(); + void initNetSwitch(); + void initLanDeviceState(); ++ void initPanelGSettings(); + + void initDeviceCombox(); + void updateDeviceCombox(QString oldDeviceName, QString newDeviceName); +@@ -105,6 +108,12 @@ private: + + void updateCurrentDevice(QString deviceName); + void showRate(); ++ void onShowKylinNetworkCheck(); ++ void showBallonTip(); ++ QRect caculatePositionWithPanel(const int windowWidth, const int windowHeight); ++ void onLanStateChanged(NetworkManager::Device::State newstate, ++ NetworkManager::Device::State oldstate, ++ NetworkManager::Device::StateChangeReason reason); + + Q_SIGNALS: + void lanAdd(QString devName, QStringList info); +@@ -159,9 +168,15 @@ private: + QStringList m_disableDeviceList; + QStringList m_devSwitchList; + ++ QGSettings *m_panelGSettings = nullptr; + QGSettings *m_switchGsettings = nullptr; + QMap<QString, NetDetail*> m_lanPagePtrMap; + QDBusInterface *m_pSysBusIntfs; ++ ++ KBallonTip *m_pNetTip; ++ int m_panelPosition; ++ int m_panelSize; ++ bool m_showedNetTipFlag = false; + }; + + #endif // LANPAGE_H +diff --git a/src/frontend/tab-pages/tabpage.cpp b/src/frontend/tab-pages/tabpage.cpp +index 4644d39..1e87de2 100644 +--- a/src/frontend/tab-pages/tabpage.cpp ++++ b/src/frontend/tab-pages/tabpage.cpp +@@ -209,12 +209,12 @@ int TabPage::getCurrentLoadRate(QString dev, long *save_rate, long *tx_rate) + // qDebug()<<"No eth0 keyword to find!"; + continue; + } else { +- match = match + strlen(device) + strlen(":"); //地址偏移到冒号 ++ match = match + qstrlen(device) + qstrlen(":"); //地址偏移到冒号 + sscanf(match, "%ld ", save_rate); + memset(tmp_value, 0, sizeof(tmp_value)); + sscanf(match, "%s ", tmp_value); +- match = match + strlen(tmp_value); +- for (size_t i=0; i<strlen(buffer); ++i) { ++ match = match + qstrlen(tmp_value); ++ for (size_t i=0; i<qstrlen(buffer); ++i) { + if (0x20 == *match) { + match ++; + } else { +@@ -223,7 +223,7 @@ int TabPage::getCurrentLoadRate(QString dev, long *save_rate, long *tx_rate) + } + memset(tmp_value, 0, sizeof(tmp_value)); + sscanf(match, "%s ", tmp_value); +- match = match + strlen(tmp_value); ++ match = match + qstrlen(tmp_value); + counter ++; + } + } +diff --git a/sys-dbus-register/kyarping/kylinipv4arping.cpp b/sys-dbus-register/kyarping/kylinipv4arping.cpp +index 2cbdefb..eaa5241 100644 +--- a/sys-dbus-register/kyarping/kylinipv4arping.cpp ++++ b/sys-dbus-register/kyarping/kylinipv4arping.cpp +@@ -75,9 +75,9 @@ void KyIpv4Arping::saveMacAddress(const uint8_t *ptr, size_t len) + char macAddress[64] = {0}; + + for (index = 0; index < len; index++) { +- snprintf(&macAddress[strlen(macAddress)], sizeof(macAddress) - strlen(macAddress), "%02X", ptr[index]); ++ snprintf(&macAddress[qstrlen(macAddress)], sizeof(macAddress) - qstrlen(macAddress), "%02X", ptr[index]); + if (index != len - 1) { +- snprintf(&macAddress[strlen(macAddress)], sizeof(macAddress) - strlen(macAddress), "%s", ":"); ++ snprintf(&macAddress[qstrlen(macAddress)], sizeof(macAddress) - qstrlen(macAddress), "%s", ":"); + } + } + +diff --git a/sys-dbus-register/kyarping/kylinipv6arping.cpp b/sys-dbus-register/kyarping/kylinipv6arping.cpp +index a6969a6..40f63b2 100644 +--- a/sys-dbus-register/kyarping/kylinipv6arping.cpp ++++ b/sys-dbus-register/kyarping/kylinipv6arping.cpp +@@ -62,11 +62,11 @@ int KyIpv6Arping::getLocalMacAddress(const char *ifname, unsigned char *addr) + struct ifreq req; + memset (&req, 0, sizeof (req)); + +- if (((unsigned)strlen (ifname)) >= (unsigned)IFNAMSIZ) { ++ if (((unsigned)qstrlen (ifname)) >= (unsigned)IFNAMSIZ) { + return -1; /* buffer overflow = local root */ + } + +- strcpy (req.ifr_name, ifname); ++ strncpy (req.ifr_name, ifname, qstrlen (ifname)); + + int fd = socket (AF_INET6, SOCK_DGRAM, 0); + if (fd == -1) { +@@ -158,9 +158,9 @@ void KyIpv6Arping::saveMacAddress (const uint8_t *ptr, size_t len) + char macAddress[64] = {0}; + + for (index = 0; index < len; index++) { +- snprintf(&macAddress[strlen(macAddress)], sizeof(macAddress) - strlen(macAddress), "%02X", ptr[index]); ++ snprintf(&macAddress[qstrlen(macAddress)], sizeof(macAddress) - qstrlen(macAddress), "%02X", ptr[index]); + if (index != len - 1) { +- snprintf(&macAddress[strlen(macAddress)], sizeof(macAddress) - strlen(macAddress), "%s", ":"); ++ snprintf(&macAddress[qstrlen(macAddress)], sizeof(macAddress) - qstrlen(macAddress), "%s", ":"); + } + } + +@@ -192,9 +192,9 @@ int KyIpv6Arping::parseIpv6Packet(const uint8_t *buf, size_t len, const struct s + uint8_t hw_addr[6] = {0}; + getLocalMacAddress(m_ifaceName.toUtf8().constData(), hw_addr); + for (index = 0; index < 6; index++) { +- snprintf(&macAddress[strlen(macAddress)], sizeof(macAddress) - strlen(macAddress), "%02X", hw_addr[index]); ++ snprintf(&macAddress[qstrlen(macAddress)], sizeof(macAddress) - qstrlen(macAddress), "%02X", hw_addr[index]); + if (index != 5) { +- snprintf(&macAddress[strlen(macAddress)], sizeof(macAddress) - strlen(macAddress), "%s", ":"); ++ snprintf(&macAddress[qstrlen(macAddress)], sizeof(macAddress) - qstrlen(macAddress), "%s", ":"); + } + } + QString localAddr(macAddress); +diff --git a/sys-dbus-register/kynmsystemdbus.cpp b/sys-dbus-register/kynmsystemdbus.cpp +index 235ddf6..6700afa 100644 +--- a/sys-dbus-register/kynmsystemdbus.cpp ++++ b/sys-dbus-register/kynmsystemdbus.cpp +@@ -27,7 +27,7 @@ KynmSystemDbus::KynmSystemDbus(QObject *parent) : QObject(parent) + QString switchSettingFile = "/etc/kylin-nm/switch.conf"; + switchSetting = new QSettings(switchSettingFile, QSettings::IniFormat, this); + if (!switchSetting->contains("switch")) +- switchSetting->setValue("switch", false); ++ switchSetting->setValue("switch", true); + } + + KynmSystemDbus::~KynmSystemDbus() diff -Nru kylin-nm-4.10.0.0/debian/patches/0074-changelog.patch kylin-nm-4.10.0.0/debian/patches/0074-changelog.patch --- kylin-nm-4.10.0.0/debian/patches/0074-changelog.patch 1970-01-01 08:00:00.000000000 +0800 +++ kylin-nm-4.10.0.0/debian/patches/0074-changelog.patch 2025-02-28 15:53:07.000000000 +0800 @@ -0,0 +1,33 @@ +From: Lixit <lixiang1@kylinos.cn> +Date: Fri, 28 Feb 2025 15:53:48 +0800 +Subject: changelog + +--- + src/frontend/mainwindow.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/frontend/mainwindow.cpp b/src/frontend/mainwindow.cpp +index 908ba97..010db72 100644 +--- a/src/frontend/mainwindow.cpp ++++ b/src/frontend/mainwindow.cpp +@@ -237,16 +237,16 @@ void MainWindow::initWindowProperties() + this->setAttribute(Qt::WA_TranslucentBackground, true); //透明 + this->setFocusPolicy(Qt::NoFocus); + +- QString platform = QGuiApplication::platformName(); +- if(!platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) +- { ++// QString platform = QGuiApplication::platformName(); ++// if(!platform.startsWith(QLatin1String("wayland"),Qt::CaseInsensitive)) ++// { + QPainterPath path; + auto rect = this->rect(); + // path.addRoundedRect(rect, 12, 12); + path.addRect(rect); + KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); //背景模糊 + } +-} ++//} + + /** + * @brief MainWindow::registerTrayIcon 注册托盘图标 diff -Nru kylin-nm-4.10.0.0/debian/patches/series kylin-nm-4.10.0.0/debian/patches/series --- kylin-nm-4.10.0.0/debian/patches/series 2024-10-23 20:18:44.000000000 +0800 +++ kylin-nm-4.10.0.0/debian/patches/series 2025-02-28 15:53:07.000000000 +0800 @@ -63,3 +63,12 @@ 0063-Translated-using-Weblate-Uyghur.patch 0064-Translated-using-Weblate-Uyghur.patch 0065-81-fixbug.patch +0066-95-v11.patch +0067-Added-translation-using-Weblate-Arabic.patch +0068-Added-translation-using-Weblate-Arabic.patch +0069-Added-translation-using-Weblate-Arabic.patch +0070-Added-translation-using-Weblate-Arabic.patch +0071-Added-translation-using-Weblate-Vietnamese.patch +0072-Added-translation-using-Weblate-Vietnamese.patch +0073-98-fix-all-v11.patch +0074-changelog.patch