diff --git a/kylin-nm.pro b/kylin-nm.pro index 476c89e1..e7f03162 100644 --- a/kylin-nm.pro +++ b/kylin-nm.pro @@ -3,6 +3,7 @@ TEMPLATE = subdirs CONFIG += \ ordered \ + qt \ qt SUBDIRS = \ @@ -10,8 +11,4 @@ SUBDIRS = \ src-vpn/src-vpn.pro \ src -TRANSLATIONS += \ - translations/kylin-nm_zh_CN.ts \ - translations/kylin-nm_tr.ts \ - translations/kylin-nm_bo.ts \ - translations/kylin-nm_bo_CN.ts +QT += widgets diff --git a/src/backend/dbus-interface/kylinconnectresource.cpp b/src/backend/dbus-interface/kylinconnectresource.cpp index 68a25a28..c6958a84 100644 --- a/src/backend/dbus-interface/kylinconnectresource.cpp +++ b/src/backend/dbus-interface/kylinconnectresource.cpp @@ -451,36 +451,28 @@ void KyConnectResourse::getIpv4ConnectSetting( NetworkManager::Ipv4Setting::Ptr &ipv4Setting, KyConnectSetting &connectSetting) { + connectSetting.m_ipv4Dns = ipv4Setting->dns(); if (NetworkManager::Ipv4Setting::Automatic == ipv4Setting->method()) { connectSetting.m_ipv4ConfigIpType = CONFIG_IP_DHCP; return; } connectSetting.m_ipv4ConfigIpType = CONFIG_IP_MANUAL; - connectSetting.m_ipv4Address = ipv4Setting->addresses(); - connectSetting.m_ipv4Dns = ipv4Setting->dns(); - - return; } void KyConnectResourse::getIpv6ConnectSetting( NetworkManager::Ipv6Setting::Ptr &ipv6Setting, KyConnectSetting &connectSetting) { - + connectSetting.m_ipv6Dns = ipv6Setting->dns(); if (NetworkManager::Ipv6Setting::Automatic == ipv6Setting->method()) { connectSetting.m_ipv6ConfigIpType = CONFIG_IP_DHCP; return; } connectSetting.m_ipv6ConfigIpType = CONFIG_IP_MANUAL; - - connectSetting.m_ipv6Address = ipv6Setting->addresses(); - - connectSetting.m_ipv6Dns = ipv6Setting->dns(); - - return; + connectSetting.m_ipv6Address = ipv6Setting->addresses(); } void KyConnectResourse::getConnectivity(NetworkManager::Connectivity &connectivity) diff --git a/src/backend/dbus-interface/kylinconnectsetting.cpp b/src/backend/dbus-interface/kylinconnectsetting.cpp index 88aeb57d..e112faa5 100644 --- a/src/backend/dbus-interface/kylinconnectsetting.cpp +++ b/src/backend/dbus-interface/kylinconnectsetting.cpp @@ -69,7 +69,8 @@ int KyConnectSetting::setIpConfigType(KyIpAddressType ipType, KyIpConfigType ipC return 0; } -void KyConnectSetting::ipv4AddressConstruct(QString &ipv4Address, QString &ipv4NetMask, QString &ipv4GateWay, QStringList &ipv4Dns) + +void KyConnectSetting::ipv4AddressConstruct(QString &ipv4Address, QString &ipv4NetMask, QString &ipv4GateWay) { qDebug()<<"ipv4 address"< &ipv4Dns) +{ + m_ipv4Dns = ipv4Dns; +} + +void KyConnectSetting::ipv6AddressConstruct(QString &ipv6Address, QString &ipv6NetMask, QString &ipv6GateWay) { NetworkManager::IpAddress nmIpv6Address; nmIpv6Address.setIp(QHostAddress(ipv6Address)); @@ -96,12 +95,11 @@ void KyConnectSetting::ipv6AddressConstruct(QString &ipv6Address, QString &ipv6N m_ipv6Address.clear(); m_ipv6Address << nmIpv6Address; - m_ipv6Dns.clear(); - for (int index = 0; index < ipv6Dns.size(); index++) { - m_ipv6Dns << QHostAddress(ipv6Dns[index]); - } +} - return ; +void KyConnectSetting::ipv6DnsConstruct(QList &ipv6Dns) +{ + m_ipv6Dns = ipv6Dns; } void KyConnectSetting::dumpInfo() diff --git a/src/backend/dbus-interface/kylinconnectsetting.h b/src/backend/dbus-interface/kylinconnectsetting.h index f2e967e6..58d70c17 100644 --- a/src/backend/dbus-interface/kylinconnectsetting.h +++ b/src/backend/dbus-interface/kylinconnectsetting.h @@ -50,8 +50,10 @@ public: void setIfaceName(QString &ifaceName); void setConnectName(QString &connectName); int setIpConfigType(KyIpAddressType ipType, KyIpConfigType configType); - void ipv4AddressConstruct(QString &ipv4Address, QString &ipv4NetMask, QString &ipv4GateWay, QStringList &ipv4Dns); - void ipv6AddressConstruct(QString &ipv6Address, QString &ipv6NetMask, QString &ipv6GateWay, QStringList &ipv6Dns); + void ipv4DnsConstruct(QList &ipv4Dns); + void ipv4AddressConstruct(QString &ipv4Address, QString &ipv4NetMask, QString &ipv4GateWay); + void ipv6DnsConstruct(QList &ipv6Dns); + void ipv6AddressConstruct(QString &ipv6Address, QString &ipv6NetMask, QString &ipv6GateWay); void dumpInfo(); public: diff --git a/src/frontend/netdetails/creatnetpage.cpp b/src/frontend/netdetails/creatnetpage.cpp index b09cd69c..faf3dc34 100644 --- a/src/frontend/netdetails/creatnetpage.cpp +++ b/src/frontend/netdetails/creatnetpage.cpp @@ -47,7 +47,7 @@ void CreatNetPage::initUI() // IP的正则格式限制 QRegExp rx("\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b"); - m_dnsWidget = new MultipleDnsWidget(rx, this); + m_dnsWidget = new MultipleDnsWidget(rx, false, this); QLabel *nameEmptyLabel = new QLabel(this); QLabel *configEmptyLabel = new QLabel(this); @@ -189,7 +189,6 @@ void CreatNetPage::setLineEnabled(bool check) { ipv4addressEdit->setEnabled(check); netMaskEdit->setEnabled(check); gateWayEdit->setEnabled(check); - m_dnsWidget->setEditEnabled(check); if (!check) { ipv4addressEdit->clear(); @@ -245,16 +244,14 @@ void CreatNetPage::constructIpv4Info(KyConnectSetting &setting) QList ipv4dnsList; ipv4dnsList.clear(); ipv4dnsList = m_dnsWidget->getDns(); - for (QHostAddress str: ipv4dnsList) { - dnsList << str.toString(); - } if (ipv4ConfigCombox->currentData() == AUTO_CONFIG) { setting.setIpConfigType(IPADDRESS_V4, CONFIG_IP_DHCP); } else { setting.setIpConfigType(IPADDRESS_V4, CONFIG_IP_MANUAL); - setting.ipv4AddressConstruct(ipv4address, netMask, gateWay, dnsList); + setting.ipv4AddressConstruct(ipv4address, netMask, gateWay); } + setting.ipv4DnsConstruct(ipv4dnsList); } diff --git a/src/frontend/netdetails/dnssettingwidget.cpp b/src/frontend/netdetails/dnssettingwidget.cpp new file mode 100644 index 00000000..557138a2 --- /dev/null +++ b/src/frontend/netdetails/dnssettingwidget.cpp @@ -0,0 +1,156 @@ +#include "dnssettingwidget.h" +#include +#include +#include +#include + +#include "coninfo.h" + +#define THEME_SCHAME "org.ukui.style" +#define COLOR_THEME "styleName" + +#define BOTTOM_LAYOUT_MARGINS 24, 16, 24, 24 +#define LAYOUT_SPACING 16 + +DnsSettingWidget::DnsSettingWidget(QString timeout, QString retry, QString tactic, QWidget *parent) + :m_timeout(timeout), m_retry(retry), m_tactic(tactic), QDialog(parent) +{ + this->setFixedSize(420, 420); + setAttribute(Qt::WA_DeleteOnClose, false); + setProperty("useStyleWindowManager", false); + initUi(); + initConnect(); + onPaletteChanged(); +} + +void DnsSettingWidget::initUi() +{ + m_titleWidget = new QWidget(this); + m_centerWidget = new QWidget(this); + m_bottomWidget = new QWidget(this); + + m_titleLabel = new QLabel(this); + m_titleLabel->setContentsMargins(24,14,0,0); + m_titleLabel->setText(tr("DNS Server Advanced Settings")); + + m_tacticLabel = new QLabel(this); + m_tacticLabel->setText(tr("Tactic")); + + m_timeoutLabel = new QLabel(this); + m_timeoutLabel->setText(tr("Timeout")); + + m_retryLabel = new QLabel(this); + m_retryLabel->setText(tr("Retry Count")); + + m_tacticComboBox = new QComboBox(this); + m_tacticComboBox->addItem(tr("order"), "order"); + m_tacticComboBox->addItem(tr("rotate"), "rotate"); + m_tacticComboBox->addItem(tr("concurrency"), "concurrency"); + m_tacticComboBox->setCurrentIndex(m_tacticComboBox->findData(m_tactic)); + + m_timeoutComboBox = new QComboBox(this); + for (int i = 0; i < 30; ++i) { + m_timeoutComboBox->insertItem(i, QString::number(i+1) + tr(" s"), QString::number(i+1)); + } + m_timeoutComboBox->setCurrentIndex(m_timeoutComboBox->findData(m_timeout.toInt())); + + m_retryComboBox = new QComboBox(this); + for (int i = 0; i < 4; ++i) { + m_retryComboBox->insertItem(i, QString::number(i+1) + tr(" times"), QString::number(i+1)); + } + m_retryComboBox->setCurrentIndex(m_retryComboBox->findData(m_retry.toInt())); + + m_bottomDivider = new Divider(true, this); + + m_closeBtn = new QPushButton(this); + m_closeBtn->setFixedSize(32,32); + m_closeBtn->setIcon(QIcon::fromTheme("application-exit-symbolic")); + m_closeBtn->setProperty("useButtonPalette", true); + m_closeBtn->setFlat(true); + + m_cancelBtn = new QPushButton(this); + m_cancelBtn->setText(tr("Cancel")); + + m_confirmBtn = new QPushButton(this); + m_confirmBtn->setText(tr("Confirm")); + + + QHBoxLayout* titleLayout = new QHBoxLayout(m_titleWidget); + titleLayout->setContentsMargins(0,4,3,0); + titleLayout->addStretch(); + titleLayout->addWidget(m_closeBtn); + + QVBoxLayout* mainLayout = new QVBoxLayout(this); + mainLayout->setContentsMargins(0,0,0,0); + mainLayout->setSpacing(0); + mainLayout->addWidget(m_titleWidget); + mainLayout->addWidget(m_titleLabel, Qt::AlignLeft); + mainLayout->addWidget(m_centerWidget); + mainLayout->addSpacing(115); + mainLayout->addWidget(m_bottomDivider); + mainLayout->addWidget(m_bottomWidget); + this->setLayout(mainLayout); + + //中间页面 + QFormLayout* centerLayout = new QFormLayout(m_centerWidget); + centerLayout->setContentsMargins(24,10,24,0); + centerLayout->setSpacing(16); + centerLayout->addRow(m_tacticLabel, m_tacticComboBox); + centerLayout->addRow(m_timeoutLabel, m_timeoutComboBox); + centerLayout->addRow(m_retryLabel, m_retryComboBox); + + //底部按钮 + QHBoxLayout* bottomLayout = new QHBoxLayout(m_bottomWidget); + bottomLayout->setContentsMargins(BOTTOM_LAYOUT_MARGINS); + bottomLayout->setSpacing(LAYOUT_SPACING); + bottomLayout->addStretch(); + bottomLayout->addWidget(m_cancelBtn); + bottomLayout->addWidget(m_confirmBtn); + + this->setWindowFlags(Qt::Dialog); +} + +void DnsSettingWidget::initConnect() +{ + connect(m_closeBtn, &QPushButton::released, this, [=](){ + reject(); + }); + connect(m_cancelBtn, &QPushButton::released, this, [=](){ + reject(); + }); + connect(m_confirmBtn, &QPushButton::released, this, [=](){ + m_timeout = m_timeoutComboBox->currentData().toString(); + m_tactic = m_tacticComboBox->currentData().toString(); + m_retry = m_retryComboBox->currentData().toString(); + accept(); + }); + connect(qApp, &QApplication::paletteChanged, this, &DnsSettingWidget::onPaletteChanged); +} + +void DnsSettingWidget::onPaletteChanged() +{ + QPalette pal = qApp->palette(); + + QGSettings * styleGsettings = nullptr; + const QByteArray style_id(THEME_SCHAME); + if (QGSettings::isSchemaInstalled(style_id)) { + styleGsettings = new QGSettings(style_id); + QString currentTheme = styleGsettings->get(COLOR_THEME).toString(); + if(currentTheme == "ukui-default"){ + pal = lightPalette(this); + } + } + this->setPalette(pal); + QList comboBoxList = this->findChildren(); + for (int i = 0; i < comboBoxList.count(); ++i) { + comboBoxList.at(i)->setPalette(pal); + if (comboBoxList.at(i)->view()) { + comboBoxList.at(i)->view()->setPalette(pal); + } + } + + if (styleGsettings != nullptr) { + delete styleGsettings; + styleGsettings = nullptr; + } +} diff --git a/src/frontend/netdetails/dnssettingwidget.h b/src/frontend/netdetails/dnssettingwidget.h new file mode 100644 index 00000000..91291b9f --- /dev/null +++ b/src/frontend/netdetails/dnssettingwidget.h @@ -0,0 +1,57 @@ +#ifndef DNSSETTINGWIDGET_H +#define DNSSETTINGWIDGET_H + +#include +#include +#include +#include +#include +#include + +#include "divider.h" + +class DnsSettingWidget : public QDialog +{ + Q_OBJECT +public: + explicit DnsSettingWidget(QString timeout = "", QString retry = "", QString tactic = "", QWidget *parent = nullptr); + + void getDnsSettings(QString& timeout, QString& retry, QString& tactic) { + timeout = QString::number(m_timeoutComboBox->currentData().toInt()); + retry = QString::number(m_retryComboBox->currentData().toInt()); + tactic = m_tacticComboBox->currentData().toString(); + } + +private: + QWidget* m_titleWidget; + QWidget* m_centerWidget; + QWidget* m_bottomWidget; + + QString m_timeout; + QString m_retry; + QString m_tactic; + + QLabel* m_titleLabel; + QLabel* m_tacticLabel; + QLabel* m_timeoutLabel; + QLabel* m_retryLabel; + + QComboBox* m_tacticComboBox; + QComboBox* m_timeoutComboBox; + QComboBox* m_retryComboBox; + + Divider *m_bottomDivider = nullptr; + + QPushButton *m_closeBtn; + QPushButton *m_cancelBtn; + QPushButton *m_confirmBtn; + + void initUi(); + void initConnect(); + +private Q_SLOTS: + void onPaletteChanged(); + +}; + +#endif // DNSSETTINGWIDGET_H diff --git a/src/frontend/netdetails/ipv4page.cpp b/src/frontend/netdetails/ipv4page.cpp index 28d7f022..37349ef4 100644 --- a/src/frontend/netdetails/ipv4page.cpp +++ b/src/frontend/netdetails/ipv4page.cpp @@ -60,6 +60,9 @@ void Ipv4Page::initUI() { m_gateWayEmptyLabel = new QLabel(this); m_gateWayEmptyLabel->setFixedHeight(LABEL_HEIGHT); + m_dnsEmptyLabel = new QLabel(this); + m_dnsEmptyLabel->setFixedHeight(21); + m_configLabel->setText(tr("IPv4Config")); m_addressLabel->setText(tr("Address")); m_maskLabel->setText(tr("Netmask")); @@ -92,7 +95,9 @@ void Ipv4Page::initUI() { // IP的正则格式限制 QRegExp rx("\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b"); - m_dnsWidget = new MultipleDnsWidget(rx, this); + + Divider* divider = new Divider(true, this); + m_dnsWidget = new MultipleDnsWidget(rx, true, this); m_detailLayout = new QFormLayout(this); m_detailLayout->setVerticalSpacing(0); @@ -103,6 +108,8 @@ void Ipv4Page::initUI() { m_detailLayout->addRow(m_maskLabel,maskWidget); m_detailLayout->addRow(m_gateWayLabel,gateWayEdit); m_detailLayout->addRow(m_gateWayEmptyLabel); + m_detailLayout->addRow(divider); + m_detailLayout->addRow(m_dnsEmptyLabel); m_detailLayout->addRow(m_dnsWidget); ipv4ConfigCombox->addItem(tr("Auto(DHCP)")); //"自动(DHCP)" @@ -139,6 +146,8 @@ void Ipv4Page::initComponent() { connect(ipv4addressEdit, SIGNAL(textChanged(QString)), this, SLOT(setEnableOfSaveBtn())); connect(netMaskEdit, SIGNAL(textChanged(QString)), this, SLOT(setEnableOfSaveBtn())); connect(gateWayEdit, SIGNAL(textChanged(QString)), this, SLOT(setEnableOfSaveBtn())); + + connect(m_dnsWidget, &MultipleDnsWidget::scrollToBottom, this, &Ipv4Page::scrollToBottom); } void Ipv4Page::setIpv4Config(KyIpConfigType ipv4Config) @@ -173,55 +182,53 @@ void Ipv4Page::setGateWay(const QString &gateWay) bool Ipv4Page::checkIsChanged(const ConInfo info, KyConnectSetting &setting) { bool isChanged = false; + KyIpConfigType type; if (ipv4ConfigCombox->currentIndex() == AUTO_CONFIG) { + type = CONFIG_IP_DHCP; if (info.ipv4ConfigType != CONFIG_IP_DHCP) { qDebug() << "ipv4ConfigType change to Auto"; - setting.setIpConfigType(IPADDRESS_V4, CONFIG_IP_DHCP); - QString ipv4address(""); - QString netMask(""); - QString gateWay(""); - QStringList dnsList; - dnsList.empty(); - qDebug() << ipv4address << netMask << gateWay; - setting.ipv4AddressConstruct(ipv4address, netMask, gateWay, dnsList); isChanged = true; } } else { + type = CONFIG_IP_MANUAL; if (info.ipv4ConfigType != CONFIG_IP_MANUAL) { qDebug() << "ipv4ConfigType change to Manual"; - setting.setIpConfigType(IPADDRESS_V4, CONFIG_IP_MANUAL); isChanged = true; - } - qDebug() << "ipv4 netmask " << getNetMaskText(netMaskEdit->text()); + } else { - QList ipv4dnsList; - ipv4dnsList.clear(); - ipv4dnsList = m_dnsWidget->getDns(); - - if(info.strIPV4Address != ipv4addressEdit->text() - || info.strIPV4NetMask != /*netMaskEdit->text()*/getNetMaskText(netMaskEdit->text()) - || info.strIPV4GateWay != gateWayEdit->text() - || info.ipv4DnsList != ipv4dnsList) { - - qDebug() << "ipv4 info changed"; - QStringList dnsList; - dnsList.clear(); - for (QHostAddress str: ipv4dnsList) { - dnsList << str.toString(); + if(info.strIPV4Address != ipv4addressEdit->text() + || info.strIPV4NetMask != getNetMaskText(netMaskEdit->text()) + || info.strIPV4GateWay != gateWayEdit->text()) { + qDebug() << "ipv4 info changed"; + isChanged = true; } - - QString ipv4address =ipv4addressEdit->text(); - QString netMask = getNetMaskText(netMaskEdit->text()); - QString gateWay = gateWayEdit->text(); - qDebug() << ipv4address << netMask << gateWay; - setting.ipv4AddressConstruct(ipv4address, netMask, gateWay, dnsList); - setting.dumpInfo(); - isChanged = true; } } + + QList ipv4dnsList; + ipv4dnsList.clear(); + ipv4dnsList = m_dnsWidget->getDns(); + if(info.ipv4DnsList != ipv4dnsList) { + isChanged = true; + } + + if (isChanged) { + setting.setIpConfigType(IPADDRESS_V4, type); + QString ipv4address = ipv4addressEdit->text(); + QString netMask = getNetMaskText(netMaskEdit->text()); + QString gateWay = gateWayEdit->text(); + setting.ipv4AddressConstruct(ipv4address, netMask, gateWay); + setting.ipv4DnsConstruct(ipv4dnsList); + setting.dumpInfo(); + } + return isChanged; } +bool Ipv4Page::checkDnsSettingsIsChanged() { + return m_dnsWidget->getDnsSettingsChanged(); +} + bool Ipv4Page::checkConnectBtnIsEnabled() { qDebug() << "checkConnectBtnIsEnabled currentIndex" << ipv4ConfigCombox->currentIndex(); @@ -304,7 +311,7 @@ void Ipv4Page::setLineEnabled(bool check) { ipv4addressEdit->setEnabled(check); netMaskEdit->setEnabled(check); gateWayEdit->setEnabled(check); - m_dnsWidget->setEditEnabled(check); +// m_dnsWidget->setEditEnabled(check); } void Ipv4Page::setEnableOfSaveBtn() { diff --git a/src/frontend/netdetails/ipv4page.h b/src/frontend/netdetails/ipv4page.h index f25148fd..43d824b3 100644 --- a/src/frontend/netdetails/ipv4page.h +++ b/src/frontend/netdetails/ipv4page.h @@ -34,6 +34,7 @@ //#include "kylinconnectsetting.h" #include "coninfo.h" #include "multiplednswidget.h" +#include "divider.h" class Ipv4Page : public QFrame { @@ -45,8 +46,14 @@ public: void setNetMask(const QString &netMask); void setMulDns(const QList &dns); void setGateWay(const QString &gateWay); + void setUuid(QString uuid) { + if (m_dnsWidget != nullptr) { + m_dnsWidget->setUuid(uuid); + } + } bool checkIsChanged(const ConInfo info, KyConnectSetting &setting); + bool checkDnsSettingsIsChanged(); void startLoading(); void stopLoading(); @@ -69,6 +76,7 @@ private: QLabel *m_addressHintLabel; QLabel *m_maskHintLabel; QLabel *m_gateWayEmptyLabel; + QLabel *m_dnsEmptyLabel; MultipleDnsWidget *m_dnsWidget = nullptr; @@ -103,6 +111,7 @@ private Q_SLOTS: Q_SIGNALS: void setIpv4PageState(bool); void ipv4EditFinished(const QString &address); + void scrollToBottom(); }; #endif // IPV4PAGE_H diff --git a/src/frontend/netdetails/ipv6page.cpp b/src/frontend/netdetails/ipv6page.cpp index 6e275fe1..b65a3a0a 100644 --- a/src/frontend/netdetails/ipv6page.cpp +++ b/src/frontend/netdetails/ipv6page.cpp @@ -65,48 +65,43 @@ void Ipv6Page::setGateWay(const QString &gateWay) bool Ipv6Page::checkIsChanged(const ConInfo info, KyConnectSetting &setting) { bool isChanged = false; + KyIpConfigType type; if (ipv6ConfigCombox->currentIndex() == AUTO_CONFIG) { + type = CONFIG_IP_DHCP; if (info.ipv6ConfigType != CONFIG_IP_DHCP) { qDebug() << "ipv6ConfigType change to Auto"; - setting.setIpConfigType(IPADDRESS_V6, CONFIG_IP_DHCP); - QString ipv6address(""); - QString prefix(""); - QString gateWay(""); - QStringList dnsList; - dnsList.empty(); - setting.ipv6AddressConstruct(ipv6address, prefix, gateWay, dnsList); isChanged = true; } } else { + type = CONFIG_IP_DHCP; if (info.ipv6ConfigType != CONFIG_IP_MANUAL) { qDebug() << "ipv6ConfigType change to Manual"; - setting.setIpConfigType(IPADDRESS_V6, CONFIG_IP_MANUAL); isChanged = true; } - QList ipv6dnsList; - ipv6dnsList.clear(); - ipv6dnsList = m_dnsWidget->getDns(); if(info.strIPV6Address != ipv6AddressEdit->text() || info.iIPV6Prefix != lengthEdit->text().toInt() - || info.strIPV6GateWay != gateWayEdit->text() - || info.ipv6DnsList != ipv6dnsList) { + || info.strIPV6GateWay != gateWayEdit->text()) { - qDebug() << "ipv6 info changed"; - QStringList dnsList; - dnsList.clear(); - for (QHostAddress str: ipv6dnsList) { - dnsList << str.toString(); - } - - QString ipv6address =ipv6AddressEdit->text(); - QString prefix = lengthEdit->text(); - QString gateWay = gateWayEdit->text(); - setting.ipv6AddressConstruct(ipv6address, prefix, gateWay, dnsList); - setting.dumpInfo(); isChanged = true; } } + QList ipv6dnsList; + ipv6dnsList.clear(); + ipv6dnsList = m_dnsWidget->getDns(); + if (info.ipv6DnsList != ipv6dnsList) { + isChanged = true; + } + + if (isChanged) { + setting.setIpConfigType(IPADDRESS_V6, type); + QString ipv6address =ipv6AddressEdit->text(); + QString prefix = lengthEdit->text(); + QString gateWay = gateWayEdit->text(); + setting.ipv6AddressConstruct(ipv6address, prefix, gateWay); + setting.ipv6DnsConstruct(ipv6dnsList); + setting.dumpInfo(); + } return isChanged; } @@ -167,7 +162,7 @@ void Ipv6Page::initUI() { gateWayLayout->addWidget(m_gateWayHintLabel); QRegExp ipv6_rx("^\\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$"); - m_dnsWidget = new MultipleDnsWidget(ipv6_rx, this); + m_dnsWidget = new MultipleDnsWidget(ipv6_rx, false, this); m_detailLayout = new QFormLayout(this); m_detailLayout->setContentsMargins(0, 0, 0, 0); @@ -208,6 +203,8 @@ void Ipv6Page::initComponent() { connect(ipv6AddressEdit, SIGNAL(textChanged(QString)), this, SLOT(setEnableOfSaveBtn())); connect(lengthEdit, SIGNAL(textChanged(QString)), this, SLOT(setEnableOfSaveBtn())); connect(gateWayEdit, SIGNAL(textChanged(QString)), this, SLOT(setEnableOfSaveBtn())); + + connect(m_dnsWidget, &MultipleDnsWidget::scrollToBottom, this, &Ipv6Page::scrollToBottom); } void Ipv6Page::configChanged(int index) { @@ -237,7 +234,6 @@ void Ipv6Page::setControlEnabled(bool check) ipv6AddressEdit->setEnabled(check); lengthEdit->setEnabled(check); gateWayEdit->setEnabled(check); - m_dnsWidget->setEditEnabled(check); } void Ipv6Page::setEnableOfSaveBtn() diff --git a/src/frontend/netdetails/ipv6page.h b/src/frontend/netdetails/ipv6page.h index 7f93dd72..49c5e917 100644 --- a/src/frontend/netdetails/ipv6page.h +++ b/src/frontend/netdetails/ipv6page.h @@ -104,6 +104,7 @@ private Q_SLOTS: Q_SIGNALS: void setIpv6PageState(bool); void ipv6EditFinished(const QString &address); + void scrollToBottom(); }; #endif // IPV6PAGE_H diff --git a/src/frontend/netdetails/multiplednswidget.cpp b/src/frontend/netdetails/multiplednswidget.cpp index 609a1bd8..fcae3144 100644 --- a/src/frontend/netdetails/multiplednswidget.cpp +++ b/src/frontend/netdetails/multiplednswidget.cpp @@ -20,13 +20,28 @@ #include "multiplednswidget.h" #include +#include +#include +#include -#define DNS_LISTWIDGET_HEIGHT 76 + 60 +#include "ukuistylehelper/ukuistylehelper.h" +#include "coninfo.h" + +#define THEME_SCHAME "org.ukui.style" +#define COLOR_THEME "styleName" + +#define DNS_LISTWIDGET_EMPTY_HEIGHT 79 +#define DNS_LISTWIDGET_HEIGHT 188 #define BUTTON_SIZE 36,36 #define ITEM_HEIGHT 36 -MultipleDnsWidget::MultipleDnsWidget(const QRegExp &rx, QWidget *parent) +#define STR_ATTEMPTS "attempts" +#define STR_TIMEOUT "timeout" +#define STR_TYPE "type" + +MultipleDnsWidget::MultipleDnsWidget(const QRegExp &rx, bool settingShow, QWidget *parent) : m_regExp(rx), + m_settingShow(settingShow), QWidget(parent) { initUI(); @@ -36,12 +51,22 @@ MultipleDnsWidget::MultipleDnsWidget(const QRegExp &rx, QWidget *parent) void MultipleDnsWidget::initUI() { QVBoxLayout *mulDnsVLayout = new QVBoxLayout(this); - mulDnsVLayout->setContentsMargins(0, 0, 0, 0); + mulDnsVLayout->setContentsMargins(0, 0, 0, 30); m_mulDnsLabel = new QLabel(this); - m_mulDnsLabel->setText(tr("DNS server:")); //DNS服务器: + m_mulDnsLabel->setText(tr("DNS server(Drag to sort)")); //DNS服务器: + + m_emptyWidget = new QFrame(this); + m_emptyWidget->setFrameShape(QFrame::Shape::StyledPanel); + m_emptyWidget->setFixedHeight(DNS_LISTWIDGET_EMPTY_HEIGHT); + emptyLabel = new QLabel(m_emptyWidget); + emptyLabel->setAlignment(Qt::AlignCenter); + emptyLabel->setText(tr("Click \"+\" to configure DNS")); + QVBoxLayout* emptyLayout = new QVBoxLayout(m_emptyWidget); + emptyLayout->addWidget(emptyLabel,Qt::AlignCenter); + m_dnsListWidget = new QListWidget(this); - m_dnsListWidget->setFixedHeight(DNS_LISTWIDGET_HEIGHT); + m_dnsListWidget->setFixedHeight(DNS_LISTWIDGET_EMPTY_HEIGHT); m_dnsListWidget->setBackgroundRole(QPalette::Base); m_dnsListWidget->setFocusPolicy(Qt::FocusPolicy::NoFocus); m_dnsListWidget->setFrameShape(QFrame::Shape::StyledPanel); @@ -56,32 +81,51 @@ void MultipleDnsWidget::initUI() setDnsListWidgetStyle(); - m_addDnsBtn = new QPushButton(this); + m_buttonBox = new KButtonBox(this); + m_buttonBox->setExclusive(false); + + m_addDnsBtn = new KPushButton(this); + m_addDnsBtn->setIcon(QIcon::fromTheme("list-add-symbolic")); m_addDnsBtn->setFixedSize(BUTTON_SIZE); m_addDnsBtn->setProperty("useButtonPalette", true); - m_addDnsBtn->setIcon(QIcon::fromTheme("list-add-symbolic")); - m_removeDnsBtn = new QPushButton(this); + m_removeDnsBtn = new KPushButton(this); + m_removeDnsBtn->setIcon(QIcon::fromTheme("list-remove-symbolic")); m_removeDnsBtn->setFixedSize(BUTTON_SIZE); m_removeDnsBtn->setProperty("useButtonPalette", true); - m_removeDnsBtn->setIcon(QIcon::fromTheme("list-remove-symbolic")); m_removeDnsBtn->setEnabled(false); + m_buttonBox->addButton(m_addDnsBtn); + m_buttonBox->addButton(m_removeDnsBtn); + + + m_settingsLabel = new KBorderlessButton(this); + m_settingsLabel->setText(tr("Settings")); + QHBoxLayout *btnHLayout = new QHBoxLayout(); btnHLayout->setContentsMargins(0, 0, 0, 0); btnHLayout->setSpacing(1); btnHLayout->setAlignment(Qt::AlignLeft); - btnHLayout->addWidget(m_addDnsBtn); - btnHLayout->addWidget(m_removeDnsBtn); + btnHLayout->addWidget(m_buttonBox); + btnHLayout->addSpacing(23); + btnHLayout->addWidget(m_settingsLabel); mulDnsVLayout->addWidget(m_mulDnsLabel, Qt::AlignLeft); + mulDnsVLayout->addWidget(m_emptyWidget); mulDnsVLayout->addWidget(m_dnsListWidget); mulDnsVLayout->addLayout(btnHLayout); + + m_emptyWidget->show(); + m_dnsListWidget->hide(); + + if (!m_settingShow) { + m_settingsLabel->hide(); + } } void MultipleDnsWidget::initComponent() { connect(qApp, &QApplication::paletteChanged, this, &MultipleDnsWidget::setDnsListWidgetStyle); - connect(m_addDnsBtn, &QPushButton::clicked, this, &MultipleDnsWidget::onAddBtnClicked); - connect(m_removeDnsBtn, &QPushButton::clicked, this, &MultipleDnsWidget::onRemoveBtnClicked); + connect(m_addDnsBtn, &KPushButton::clicked, this, &MultipleDnsWidget::onAddBtnClicked); + connect(m_removeDnsBtn, &KPushButton::clicked, this, &MultipleDnsWidget::onRemoveBtnClicked); connect(m_dnsListWidget, &QListWidget::itemClicked, this, [=]() { if (m_dnsListWidget->count() < 1) { m_removeDnsBtn->setEnabled(false); @@ -93,6 +137,10 @@ void MultipleDnsWidget::initComponent() m_dnsListWidget->edit(m_dnsListWidget->currentIndex()); item->setFlags(item->flags() | Qt::ItemIsEditable); }); + + connect(m_settingsLabel, &KBorderlessButton::clicked, this, [&](){ + showDnsSettingWidget(); + }); } void MultipleDnsWidget::setEditEnabled(bool state) @@ -126,6 +174,11 @@ QList MultipleDnsWidget::getDns() const void MultipleDnsWidget::setDnsListText(const QList &dns) { m_dnsListWidget->clear(); + if (!dns.isEmpty()) { + m_dnsListWidget->setFixedHeight(DNS_LISTWIDGET_HEIGHT); + m_emptyWidget->hide(); + m_dnsListWidget->show(); + } for (QHostAddress str: dns) { QListWidgetItem *dnsListWidgetItem = new QListWidgetItem(m_dnsListWidget); dnsListWidgetItem->setSizeHint(QSize(0,ITEM_HEIGHT)); @@ -135,6 +188,12 @@ void MultipleDnsWidget::setDnsListText(const QList &dns) void MultipleDnsWidget::AddOneDnsItem(QListWidget *listWidget) { + if (m_dnsListWidget->count() == 0) { + m_emptyWidget->hide(); + m_dnsListWidget->show(); + m_dnsListWidget->setFixedHeight(DNS_LISTWIDGET_HEIGHT); + Q_EMIT scrollToBottom(); + } QListWidgetItem *dnsListWidgetItem = new QListWidgetItem(listWidget); dnsListWidgetItem->setSizeHint(QSize(0,ITEM_HEIGHT)); dnsListWidgetItem->setFlags(dnsListWidgetItem->flags() | Qt::ItemIsEditable); @@ -152,15 +211,32 @@ void MultipleDnsWidget::RemoveOneDnsItem(QListWidgetItem *aItem, QListWidget *li listWidget->removeItemWidget(aItem); delete aItem; } + if (m_dnsListWidget->count() == 0) { + m_emptyWidget->show(); + m_dnsListWidget->hide(); + m_dnsListWidget->setFixedHeight(DNS_LISTWIDGET_EMPTY_HEIGHT); + } } void MultipleDnsWidget::setDnsListWidgetStyle() { - QPalette mpal(m_dnsListWidget->palette()); - mpal.setColor(QPalette::Base, qApp->palette().base().color()); - mpal.setColor(QPalette::AlternateBase, qApp->palette().alternateBase().color()); + QPalette pal = qApp->palette(); + const QByteArray style_id(THEME_SCHAME); + if (QGSettings::isSchemaInstalled(style_id)) { + QGSettings styleGsettings(style_id); + QString currentTheme = styleGsettings.get(COLOR_THEME).toString(); + if(currentTheme == "ukui-default"){ + pal = lightPalette(this); + } + } + + this->setPalette(pal); + m_dnsListWidget->setAlternatingRowColors(true); - m_dnsListWidget->setPalette(mpal); + + QColor color = pal.color(QPalette::PlaceholderText); + pal.setColor(QPalette::WindowText, color); + emptyLabel->setPalette(pal); } void MultipleDnsWidget::onAddBtnClicked() @@ -192,3 +268,45 @@ void MultipleDnsWidget::onRemoveBtnClicked() m_removeDnsBtn->setEnabled(false); } } + +void MultipleDnsWidget::showDnsSettingWidget() +{ + QDBusInterface iface("com.kylin.network.enhancement.optimization", + "/com/kylin/network/enhancement/optimization/DNS", + "com.kylin.network.enhancement.optimization.DNS", + QDBusConnection::systemBus()); + + if (!iface.isValid()) { + return; + } + + QDBusMessage result = iface.call("GetExtraDns", m_uuid); + const QDBusArgument &dbusArg1st = result.arguments().at( 0 ).value(); + QVariantMap map = result.arguments().at(0).toMap(); + QString timeout, retry, tactic; + dbusArg1st >> map; + + QString originTimeout,originRetry,originType; + originTimeout = map.value(STR_TIMEOUT).toString(); + originRetry = map.value(STR_ATTEMPTS).toString(); + originType = map.value(STR_TYPE).toString(); + + timeout = !originTimeout.isEmpty() ? map.value(STR_TIMEOUT).toString() : "5"; + retry = !originRetry.isEmpty() ? map.value(STR_ATTEMPTS).toString() : "2"; + tactic = !originType.isEmpty() ? map.value(STR_TYPE).toString() : "order"; + + DnsSettingWidget* dialog = new DnsSettingWidget(timeout, retry, tactic); + kdk::UkuiStyleHelper::self()->removeHeader(dialog); + if (dialog->exec() == QDialog::Accepted) { + QString timeout, retry, tactic; + dialog->getDnsSettings(timeout, retry, tactic); + if (iface.isValid()) { + iface.call("SetOptions", m_uuid, timeout, retry, tactic); + } + if (timeout != originTimeout || retry != originRetry || tactic != originType) { + m_dnsSettingChanged = true; + } + } + delete dialog; + dialog = nullptr; +} diff --git a/src/frontend/netdetails/multiplednswidget.h b/src/frontend/netdetails/multiplednswidget.h index 5b32dd53..a89f5d23 100644 --- a/src/frontend/netdetails/multiplednswidget.h +++ b/src/frontend/netdetails/multiplednswidget.h @@ -33,34 +33,56 @@ #include #include "listitemedit.h" +#include "dnssettingwidget.h" +#include "kborderlessbutton.h" +#include "kbuttonbox.h" + +using namespace kdk; class MultipleDnsWidget: public QWidget { Q_OBJECT public: - MultipleDnsWidget(const QRegExp &rx, QWidget *parent = nullptr); + MultipleDnsWidget(const QRegExp &rx, bool settingShow = true, QWidget *parent = nullptr); ~MultipleDnsWidget() = default; void setEditEnabled(bool state); QList getDns() const; void setDnsListText(const QList &dns); + void setUuid(QString uuid) { + m_uuid = uuid; + } + bool getDnsSettingsChanged() { + return m_dnsSettingChanged; + } private: void initUI(); void initComponent(); void AddOneDnsItem(QListWidget *listWidget); void RemoveOneDnsItem(QListWidgetItem *aItem, QListWidget *listWidget); + void showDnsSettingWidget(); QLabel *m_mulDnsLabel; + QLabel *emptyLabel; + QFrame *m_emptyWidget; QListWidget *m_dnsListWidget = nullptr; - QPushButton *m_addDnsBtn; - QPushButton *m_removeDnsBtn; + KPushButton *m_addDnsBtn; + KPushButton *m_removeDnsBtn; + KButtonBox *m_buttonBox; + KBorderlessButton* m_settingsLabel; QRegExp m_regExp; + QString m_uuid; + bool m_settingShow; + bool m_dnsSettingChanged = false; private Q_SLOTS: void setDnsListWidgetStyle(); void onAddBtnClicked(); void onRemoveBtnClicked(); + +Q_SIGNALS: + void scrollToBottom(); }; #endif // MULTIPLEDNSWIDGET_H diff --git a/src/frontend/netdetails/netdetail.cpp b/src/frontend/netdetails/netdetail.cpp index a21e3b8c..2de46604 100644 --- a/src/frontend/netdetails/netdetail.cpp +++ b/src/frontend/netdetails/netdetail.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include "windowmanager/windowmanager.h" @@ -282,7 +283,7 @@ void NetDetail::initUI() { QVBoxLayout *mainLayout = new QVBoxLayout(this); mainLayout->setContentsMargins(0,9,0,24); - mainLayout->setSpacing(24); + mainLayout->setSpacing(0); this->installEventFilter(this); pageFrame = new QFrame(this); @@ -318,6 +319,11 @@ void NetDetail::initUI() m_ipv4ScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_ipv4ScrollArea->setWidget(ipv4Page); m_ipv4ScrollArea->setWidgetResizable(true); + connect(ipv4Page, &Ipv4Page::scrollToBottom, this, [&](){ + QTimer::singleShot(50,this,[=]() { + m_ipv4ScrollArea->verticalScrollBar()->setValue(m_ipv4ScrollArea->verticalScrollBar()->maximum()); + }); + }); m_ipv6ScrollArea = new QScrollArea(centerWidget); m_ipv6ScrollArea->setFixedWidth(SCRO_WIDTH); @@ -325,12 +331,25 @@ void NetDetail::initUI() m_ipv6ScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_ipv6ScrollArea->setWidget(ipv6Page); m_ipv6ScrollArea->setWidgetResizable(true); + connect(ipv6Page, &Ipv6Page::scrollToBottom, this, [&](){ + QTimer::singleShot(50,this,[=]() { + m_ipv6ScrollArea->verticalScrollBar()->setValue(m_ipv6ScrollArea->verticalScrollBar()->maximum()); + }); + }); + + m_createNetPageScrollArea = new QScrollArea(centerWidget); + m_createNetPageScrollArea->setFixedWidth(SCRO_WIDTH); + m_createNetPageScrollArea->setFrameShape(QFrame::NoFrame); + m_createNetPageScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + m_createNetPageScrollArea->setWidget(createNetPage); + m_createNetPageScrollArea->setWidgetResizable(true); QPalette pal = m_secuPageScrollArea->palette(); pal.setBrush(QPalette::Base, QColor(0,0,0,0)); m_secuPageScrollArea->setPalette(pal); m_ipv4ScrollArea->setPalette(pal); m_ipv6ScrollArea->setPalette(pal); + m_createNetPageScrollArea->setPalette(pal); stackWidget = new QStackedWidget(centerWidget); stackWidget->addWidget(detailPage); @@ -338,7 +357,7 @@ void NetDetail::initUI() stackWidget->addWidget(m_ipv6ScrollArea); stackWidget->addWidget(m_secuPageScrollArea); stackWidget->addWidget(configPage); - stackWidget->addWidget(createNetPage); + stackWidget->addWidget(m_createNetPageScrollArea); // TabBar onPaletteChanged(); @@ -382,6 +401,8 @@ void NetDetail::initUI() centerlayout->setContentsMargins(CENTER_LAYOUT_MARGINS); // 右边距为0,为安全页滚动区域留出空间 centerlayout->addWidget(stackWidget); + Divider *divider = new Divider(true, this); + QHBoxLayout *bottomLayout = new QHBoxLayout(bottomWidget); bottomLayout->setContentsMargins(BOTTOM_LAYOUT_MARGINS); bottomLayout->setSpacing(BOTTOM_LAYOUT_SPACING); @@ -392,7 +413,10 @@ void NetDetail::initUI() bottomWidget->setMinimumHeight(PAGE_MIN_HEIGHT); mainLayout->addWidget(pageFrame); + mainLayout->addSpacing(24); mainLayout->addWidget(centerWidget); + mainLayout->addWidget(divider); + mainLayout->addSpacing(16); mainLayout->addWidget(bottomWidget); this->setAutoFillBackground(true); @@ -492,6 +516,8 @@ void NetDetail::pagePadding(QString netName, bool isWlan) detailPage->setAutoConnect(m_info.isAutoConnect); //ipv4页面填充 + ipv4Page->setUuid(m_uuid); + ipv4Page->setMulDns(m_info.ipv4DnsList); if (m_info.ipv4ConfigType == CONFIG_IP_MANUAL) { Q_EMIT checkCurrentIpv4Conflict(m_info.strIPV4Address); ipv4Page->setIpv4Config(m_info.ipv4ConfigType); @@ -499,12 +525,12 @@ void NetDetail::pagePadding(QString netName, bool isWlan) ipv4Page->setNetMask(m_info.strIPV4NetMask); // ipv4Page->setIpv4FirDns(m_info.strIPV4FirDns); // ipv4Page->setIpv4SecDns(m_info.strIPV4SecDns); - ipv4Page->setMulDns(m_info.ipv4DnsList); ipv4Page->setGateWay(m_info.strIPV4GateWay); } else { ipv4Page->setIpv4Config(m_info.ipv4ConfigType); } //ipv6页面填充 + ipv6Page->setMulDns(m_info.ipv6DnsList); if (m_info.ipv6ConfigType == CONFIG_IP_MANUAL) { Q_EMIT checkCurrentIpv6Conflict(m_info.strIPV6Address); ipv6Page->setIpv6Config(m_info.ipv6ConfigType); @@ -512,7 +538,6 @@ void NetDetail::pagePadding(QString netName, bool isWlan) ipv6Page->setIpv6Perfix(m_info.iIPV6Prefix); // ipv6Page->setIpv6FirDns(m_info.strIPV6FirDns); // ipv6Page->setIpv6SecDns(m_info.strIPV6SecDns); - ipv6Page->setMulDns(m_info.ipv6DnsList); ipv6Page->setGateWay(m_info.strIPV6GateWay); } else { ipv6Page->setIpv6Config(m_info.ipv6ConfigType); @@ -678,6 +703,8 @@ void NetDetail::getStaticIpInfo(ConInfo &conInfo, bool bActived) 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; if (connetSetting.m_ipv4ConfigIpType == CONFIG_IP_MANUAL) { if (connetSetting.m_ipv4Address.size() > 0) { @@ -693,8 +720,6 @@ void NetDetail::getStaticIpInfo(ConInfo &conInfo, bool bActived) conInfo.strIPV4SecDns = connetSetting.m_ipv4Dns.at(1).toString(); } #endif - - conInfo.ipv4DnsList = connetSetting.m_ipv4Dns; } if (connetSetting.m_ipv6ConfigIpType == CONFIG_IP_MANUAL) { @@ -710,9 +735,7 @@ void NetDetail::getStaticIpInfo(ConInfo &conInfo, bool bActived) conInfo.strIPV6FirDns = connetSetting.m_ipv6Dns.at(0).toString(); conInfo.strIPV6SecDns = connetSetting.m_ipv6Dns.at(1).toString(); } -#endif - - conInfo.ipv6DnsList = connetSetting.m_ipv6Dns; +#endif } if (!bActived) { @@ -1099,22 +1122,6 @@ bool NetDetail::updateConnect() qDebug() << "ipv4Changed" << ipv4Change << "ipv6Change" << ipv6Change; -// if (ipv4Change && connetSetting.m_ipv4ConfigIpType == CONFIG_IP_MANUAL) { -// if (checkIpv4Conflict(connetSetting.m_ipv4Address.at(0).ip().toString())) { -// qDebug() << "ipv4 conflict"; -// showDesktopNotify(tr("ipv4 address conflict!"), "networkwrong"); -// return false; -// } -// } - -// if (ipv6Change && connetSetting.m_ipv6ConfigIpType == CONFIG_IP_MANUAL) { -// if (checkIpv6Conflict(connetSetting.m_ipv6Address.at(0).ip().toString())) { -// qDebug() << "ipv6 conflict"; -// showDesktopNotify(tr("ipv6 address conflict!"), "networkwrong"); -// return false; -// } -// } - if (ipv4Change || ipv6Change) { connetSetting.dumpInfo(); m_wiredConnOperation->updateWiredConnect(m_uuid, connetSetting); @@ -1129,7 +1136,7 @@ bool NetDetail::updateConnect() } } - if (ipv4Change || ipv6Change || securityChange) { + if (ipv4Change || ipv6Change || securityChange || ipv4Page->checkDnsSettingsIsChanged()) { if (isActive) { //信息变化 断开-重连 更新需要時間 不可以立即重連 // sleep(1); diff --git a/src/frontend/netdetails/netdetail.h b/src/frontend/netdetails/netdetail.h index 0c5385fb..3f0f7b72 100644 --- a/src/frontend/netdetails/netdetail.h +++ b/src/frontend/netdetails/netdetail.h @@ -165,6 +165,7 @@ private: QScrollArea * m_secuPageScrollArea; QScrollArea * m_ipv4ScrollArea; QScrollArea * m_ipv6ScrollArea; + QScrollArea * m_createNetPageScrollArea; QPushButton * cancelBtn; QPushButton * forgetBtn; diff --git a/src/frontend/netdetails/netdetails.pri b/src/frontend/netdetails/netdetails.pri index f06fe245..72d05b83 100644 --- a/src/frontend/netdetails/netdetails.pri +++ b/src/frontend/netdetails/netdetails.pri @@ -12,7 +12,8 @@ HEADERS += \ $$PWD/joinhiddenwifipage.h \ $$PWD/multiplednswidget.h \ $$PWD/netdetail.h \ - $$PWD/securitypage.h + $$PWD/securitypage.h \ + $$PWD/dnssettingwidget.h SOURCES += \ $$PWD/configpage.cpp \ @@ -25,4 +26,5 @@ SOURCES += \ $$PWD/joinhiddenwifipage.cpp \ $$PWD/multiplednswidget.cpp \ $$PWD/netdetail.cpp \ - $$PWD/securitypage.cpp + $$PWD/securitypage.cpp \ + $$PWD/dnssettingwidget.cpp diff --git a/src/frontend/netdetails/securitypage.cpp b/src/frontend/netdetails/securitypage.cpp index defa2c61..a0d4eefe 100644 --- a/src/frontend/netdetails/securitypage.cpp +++ b/src/frontend/netdetails/securitypage.cpp @@ -1192,8 +1192,14 @@ void SecurityPage::onClientPrivateKeyComboxIndexChanged(QString str) { if (str.contains("Choose from file...") || str.contains("从文件选择...")) { - QString fileName = QFileDialog::getOpenFileName(this, tr("Choose a CA certificate"), "recent:///", - tr("CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx)")); + QString fileName; +// = QFileDialog::getOpenFileName(this, tr("Choose a CA certificate"), "recent:///", +// tr("CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx)")); + QFileDialog aa; + aa.setPalette(lightPalette(this));aa.update(); + if (aa.exec()) { + + } if (!fileName.isNull()) { QStringList nameList = fileName.split("/"); clientPrivateKeyCombox->blockSignals(true); diff --git a/src/frontend/tools/divider.cpp b/src/frontend/tools/divider.cpp index 1bb28182..633770a2 100644 --- a/src/frontend/tools/divider.cpp +++ b/src/frontend/tools/divider.cpp @@ -21,20 +21,47 @@ #include #include -Divider::Divider(QWidget * parent) : QFrame(parent) +#include "../netdetails/coninfo.h" + +#define THEME_SCHAME "org.ukui.style" +#define COLOR_THEME "styleName" + +Divider::Divider(bool useLightPal, QWidget * parent) + :m_useLightPal(useLightPal), + QFrame(parent) { this->setFixedHeight(1); + connect(qApp, &QApplication::paletteChanged, this ,&Divider::onPaletteChanged); + onPaletteChanged(); } +void Divider::onPaletteChanged() +{ + QPalette pal = qApp->palette(); + QGSettings * styleGsettings = nullptr; + const QByteArray style_id(THEME_SCHAME); + if (QGSettings::isSchemaInstalled(style_id) && m_useLightPal) { + styleGsettings = new QGSettings(style_id); + QString currentTheme = styleGsettings->get(COLOR_THEME).toString(); + if(currentTheme == "ukui-default"){ + pal = lightPalette(this); + } + } + m_color = pal.color(QPalette::BrightText); + m_color.setAlphaF(0.08); + + if (styleGsettings != nullptr) { + delete styleGsettings; + styleGsettings = nullptr; + } +} void Divider::paintEvent(QPaintEvent * e) { QPainter p(this); - QColor color = qApp->palette().color(QPalette::BrightText); - color.setAlphaF(0.08); p.save(); - p.setBrush(color); + p.setBrush(m_color); p.setPen(Qt::transparent); p.drawRoundedRect(this->rect(), 6, 6); p.restore(); diff --git a/src/frontend/tools/divider.h b/src/frontend/tools/divider.h index 9d7b1729..8cd43840 100644 --- a/src/frontend/tools/divider.h +++ b/src/frontend/tools/divider.h @@ -24,11 +24,15 @@ class Divider : public QFrame { public: - Divider(QWidget * parent = nullptr); + Divider(bool useLightPal = false, QWidget * parent = nullptr); ~Divider() = default; - +private: + bool m_useLightPal; + QColor m_color; +private Q_SLOTS: + void onPaletteChanged(); protected: - void paintEvent(QPaintEvent *event); + void paintEvent(QPaintEvent * e); }; #endif // DIVIDER_H diff --git a/src/src.pro b/src/src.pro index 2258665e..f3b7290b 100644 --- a/src/src.pro +++ b/src/src.pro @@ -74,3 +74,9 @@ unix { DISTFILES += \ org.ukui.kylin-nm.switch.gschema.xml + +TRANSLATIONS += \ + translations/kylin-nm_zh_CN.ts \ + translations/kylin-nm_tr.ts \ + translations/kylin-nm_bo.ts \ + translations/kylin-nm_bo_CN.ts diff --git a/src/translations/kylin-nm_bo.ts b/src/translations/kylin-nm_bo.ts index fa557feb..712c2ef7 100644 --- a/src/translations/kylin-nm_bo.ts +++ b/src/translations/kylin-nm_bo.ts @@ -4,22 +4,22 @@ ConfigPage - + Network profile type - + 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. - - 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. + + 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. - + Config firewall and security settings @@ -27,47 +27,53 @@ CreatNetPage - + Connection Name - - Ipv4Config + + IPv4Config - + Address - + Netmask - + Default Gateway - - Prefs DNS + + Invalid address - - Alternative DNS + + Invalid subnet mask - + + + Required + + + + Auto(DHCP) - + Manual @@ -75,110 +81,168 @@ DetailPage - + Auto Connection - - + + SSID: - + Copied successfully! - + Copy all - + Please input SSID: - - + + Protocol: - - + + Security Type: - - + + Hz: - - + + Chan: - - + + BandWidth: - - - IPV6: + + + IPv4: - - - IPV4: + + + IPv4 DNS: - - - IPV4 Dns: + + + IPv6: - - + + Mac: + + DnsSettingWidget + + + DNS Server Advanced Settings + + + + + Tactic + + + + + Timeout + + + + + Retry Count + + + + + order + + + + + rotate + + + + + concurrency + + + + + s + + + + + times + + + + + Cancel + + + + + Confirm + + + EnterpriseWlanDialog - + Wi-Fi network requires authentication - + Access to Wi-Fi network " - + " requires a password or encryption key. - + Cancel - + Connect @@ -186,22 +250,22 @@ FirewallDialog - + Allow other devices on this network to discover this computer? - + It is not recommended to enable this feature on public networks - + Not allowed (recommended) - + Allowed @@ -209,63 +273,53 @@ Ipv4Page - - Ipv4Config - - - - + Address - + Netmask - + Default Gateway - - Prefs DNS + + IPv4Config - - Alternative DNS - - - - + Auto(DHCP) - + Manual - + Invalid address - + Invalid subnet mask - - + + Required - + Address conflict @@ -273,64 +327,53 @@ Ipv6Page - - Ipv6Config - - - - + Address - + Subnet prefix Length - + Default Gateway - - Prefs DNS + + IPv6Config - - Alternative DNS - - - - + Auto(DHCP) - + Manual - - - + + Required - + Invalid address - + Invalid gateway - + Address conflict @@ -338,37 +381,37 @@ JoinHiddenWiFiPage - + Please enter the network name and security type - + Network name(SSID) - + Show Network List - + Cancel - + Join - + Required - + Find and Join Wi-Fi @@ -376,65 +419,95 @@ LanListItem - + Not connected - + Wired Device not carried - - + + + Disconnect - - + + + Connect + + + + Property + + + + + + Delete + + LanPage - + No ethernet device avaliable - + LAN - + Activated LAN - + Inactivated LAN - + Wired Device not carried + + + + Connected: + + + + + (Limited) + + + + + Not Connected + + ListItem - + Kylin NM - + kylin network applet desktop message @@ -442,140 +515,174 @@ MainWindow - + kylin-nm - + LAN - + WLAN - + Settings - + + Network tool - + + Network Card + + + + + Not connected to the network + + + + Show MainWindow + + MultipleDnsWidget + + + DNS server(Drag to sort) + + + + + Click "+" to configure DNS + + + + + Settings + + + NetDetail - + Kylin NM - + kylin network desktop message - + Detail - - Ipv4 - - - - - Ipv6 - - - - + Security - - + + Config - + Confirm - + Cancel - + Forget this network - - Add Lan Connect + + IPv4 - - connect hiddin wlan + + IPv6 - - - + + Add LAN Connect + + + + + Connect Hidden WLAN + + + + + Delete this network + + + + + + None - - - + + + Auto - + start check ipv4 address conflict - + start check ipv6 address conflict - + this wifi no support enterprise type - + this wifi no support None type - + this wifi no support WPA2 type - + this wifi no support WPA3 type @@ -583,7 +690,7 @@ OneConnForm - + Form @@ -591,7 +698,7 @@ OneLancForm - + Form @@ -599,169 +706,214 @@ SecurityPage - + Remember the Network - + Security - - + + Password - + EAP type - + Identity - + Domain - + CA certficate - + no need for CA certificate - + User certificate - + User private key - + User key password - + Password options - - - + + + Required - + Ineer authentication - - Usename + + Username - + Ask pwd each query - - - - - - - - - + + + + + + + + + + + + + None - + WPA&WPA2 Personal - + WPA&WPA2 Enterprise - + WPA3 Personal - - - + + + + Choose from file... - + Store passwords only for this user - + Store password only for this user - + Store passwords for all users - + Store password for all users - + Ask this password every time - + Ask password every time - - - + + PAC provisioning + + + + + Allow automatic PAC provisioning + + + + + PAC file + + + + + Anonymous + + + + + Authenticated + + + + + Both + + + + + + Choose a CA certificate - - - + + + CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx) - + + Choose a PAC file + + + + + PAC Files (*.pac) + + + + @@ -769,88 +921,70 @@ TabPage - + Current Device - + Devices Closed! - + Settings - + Kylin NM - + kylin network applet desktop message - - VpnPage - - - Activated VPN - - - - - Inactivated VPN - - - - - Wired Device not carried - - - WiFiConfigDialog - + Dialog - + WLAN Authentication - + Input WLAN Information Please - + WLAN ID: - + WLAN Name: - + Password: - + Cancl - + Ok @@ -858,31 +992,42 @@ WlanListItem - + Not connected - - + + + + + Disconnect - - - + + + + + Connect - - + + + Property + + + + + Forget - + Auto Connect @@ -890,7 +1035,7 @@ WlanMoreItem - + Add Others... @@ -898,32 +1043,48 @@ WlanPage - + WLAN - + Activated WLAN - + Other WLAN - + + + Connected: + + + + + (Limited) + + + + + Not Connected + + + + No wireless network card detected - + WLAN Connected Successfully - + WLAN Disconnected Successfully @@ -931,32 +1092,19 @@ main - + kylinnm - + show kylin-nm wifi page - + show kylin-nm lan page - - vpnMainWindow - - - kylin-vpn - - - - - vpn tool - - - diff --git a/src/translations/kylin-nm_bo_CN.ts b/src/translations/kylin-nm_bo_CN.ts index eef07a08..d80da93d 100644 --- a/src/translations/kylin-nm_bo_CN.ts +++ b/src/translations/kylin-nm_bo_CN.ts @@ -32,33 +32,25 @@ ip地址冲突,请更改ip {6 ?} - - MultipleDnsWidget - - - DNS server: - DNSཞབས་ཞུ་བ།: - - ConfigPage - + Network profile type དྲ་རྒྱའི་བཀོད་སྒྲིག་ཡིག་ཆའི་རིགས། - + 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. སྤྱི་སྤྱོད།(འོས་སྦྱོར་བྱས་པ།)དྲ་རྒྱའི་སྒྲིག་ཆས་ཀྱིས་གློག་ཀླད་འདི་མཐོང་མི་ཐུབ། སྤྱིར་བཏང་གི་གནས་ཚུལ་འོག་ཏུ་མི་མང་འདུ་སའི་ནང་གི་དྲ་བ་ལ་འཚམ་པ་སྟེ།དཔེར་ན་གནམ་གྲུ་ཐང་དང་འཚིག་ཇའི་ཁང་སོགས་ལྟ་བུ།. - + 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. ཆེད་སྤྱོད། དྲ་རྒྱའི་སྒྲིག་ཆས་ཀྱིས་གློག་ཀླད་འདི་མཐོང་ཐུབ། སྤྱིར་བཏང་གི་གནས་ཚུལ་འོག་ཁྱིམ་ཚང་ངམ་ལས་དོན་ཚན་པའི་དྲ་བ་དང་འཚམ་པས།ཁྱེད་ཀྱིས་དྲ་ཐོག་གི་མི་སྒེར་དང་སྒྲིག་ཆས་ལ་ངོས་འཛིན་དང་ཡིད་ཆེས་བྱེད་དགོས།. - + Config firewall and security settings མེ་འགོག་གྱང་རྩིག་དང་བདེ་འཇགས་བཀོད་སྒྲིག་བྱ་དགོས། @@ -81,63 +73,61 @@ CreatNetPage - + Connection Name འབྲེལ་མཐུད་ཀྱི་མིང་། - + IPv4Config IPv4ཁུང་ཙི། - + Address སྡོད་གནས། - + Netmask དྲ་རྒྱའི་མ་ལག - + Default Gateway ཁ་ཆད་བཞག་པའི་སྒོ་ཆེན། - Prefs DNS - སྔོན་གྲབས་DNS + སྔོན་གྲབས་DNS - Alternative DNS - ཚབ་བྱེད་རང་བཞིན་གྱི་DNS + ཚབ་བྱེད་རང་བཞིན་གྱི་DNS - + Auto(DHCP) རང་འགུལ་(DHCP) - + Manual ལག་དེབ། - + Invalid address རྩིས་འགྲོ་མེད་པའི་ས་གནས། - + Invalid subnet mask རྩིས་འགྲོ་མེད་པའི་དྲ་བ་འགེབས་སྲུང་བྱེད་པ། - - + + Required ངེས་པར་དུ་སྐོང་དགོས། @@ -145,82 +135,82 @@ DetailPage - + Auto Connection རང་འགུལ་གྱིས་འབྲེལ་མཐུད་བྱེད - - + + SSID: SSID: - + Copied successfully! འདྲ་བཟོ་བྱས་ནས་གྲུབ་འབྲས་ཐོབ་! - + Copy all ཚང་མ་འདྲ་བཤུས་བྱེད་ - + Please input SSID: SSID:ནང་འཇུག་གནང་རོགས།: - - + + Protocol: གྲོས་ཆོད་ནང་དུ།: - - + + Security Type: བདེ་འཇགས་ཀྱི་རིགས་དབྱིབས་ནི།: - - + + Hz: དྲ་རྒྱའི་འཕྲིན་ལམ།: - - + + Chan: དྲ་བའི་བགྲོད་ལམ།: - - + + BandWidth: ཞེང་ཆེ་བ།: - - + + IPv6: IPv6: - - + + IPv4: IPv4: - - + + IPv4 DNS: IPv4 DNS: - - + + Mac: ཨའོ་མོན་ནི།: @@ -455,6 +445,64 @@ + + DnsSettingWidget + + + DNS Server Advanced Settings + DNSགྱི་ཞབས་ཞུའི་ཡོ་བྱད་མཐོ་རིམ་སྒྲིག་བཀོད། + + + + Tactic + ཐབས་ཇུས། + + + + Timeout + དུས་ཚོད་ལས་བརྒལ་བ། + + + + Retry Count + བསྐྱར་དུ་ཚོད་ལྟ་བྱེད་ཐེངས་གྲངས། + + + + order + གོ་རིམ། + + + + rotate + སྐབས་བསྟུན་བྱེད་པ། + + + + concurrency + འགྲེམས་སྤེལ་ཡང་བྱ། + + + + s + སྐར་ཆ། + + + + times + གཉིས་པ། + + + + Cancel + མེད་པར་བཟོ་དགོས། + + + + Confirm + དངོས་སུ་ཁས་ལེན་པ། + + EnterpriseWlanDialog @@ -466,27 +514,27 @@ 关闭 - + Wi-Fi network requires authentication Wi-Fiཡི་དྲ་རྒྱའི་བླང་བྱར་སྤྲོད་བྱ་རྒྱུའི་བླང་བྱ་བཏོན་ཡོད། - + Access to Wi-Fi network " Wii-Fiབར་གྱི་དྲ་རྒྱར་འཚམས་འདྲི་གནང་བ་རེད། - + " requires a password or encryption key. གསང་གྲངས་དང་གསང་བའི་ལྡེ་མིག་དགོས། - + Cancel ཕྱིར་འཐེན། - + Connect སྦྲེལ་མཐུད་བྱེད་པ @@ -510,22 +558,22 @@ དེ་ལྟར་མ་བྱས་ - + Allow other devices on this network to discover this computer? དྲ་རྒྱའི་སྟེང་གི་སྒྲིག་ཆས་གཞན་པས་གློག་ཀླད་འདི་རྙེད་དུ་འཇུག་གམ།? - + It is not recommended to enable this feature on public networks བསམ་འཆར་མེད་།སྤྱི་པའི་དྲ་རྒྱའི་སྟེང་ནས་ནུས་པ་འདི་མགོ་བརྩམས་། - + Not allowed (recommended) མི་ཆོག་པ་(འོས་སྦྱོར།) - + Allowed ཆོག་པ་ @@ -533,63 +581,61 @@ Ipv4Page - + IPv4Config IPv4ཁུང་ཙི། - + Address སྡོད་གནས། - + Netmask དྲ་རྒྱའི་མ་ལག - + Default Gateway ཁ་ཆད་བཞག་པའི་སྒོ་ཆེན། - Prefs DNS - སྔོན་གྲབས་DNS + སྔོན་གྲབས་DNS - Alternative DNS - ཚབ་བྱེད་རང་བཞིན་གྱི་DNS + ཚབ་བྱེད་རང་བཞིན་གྱི་DNS - + Auto(DHCP) རང་འགུལ་(DHCP) - + Manual ལག་དེབ། - + Invalid address རྩིས་འགྲོ་མེད་པའི་ས་གནས། - + Invalid subnet mask རྩིས་འགྲོ་མེད་པའི་དྲ་བ་འགེབས་སྲུང་བྱེད་པ། - - + + Required ངེས་པར་དུ་སྐོང་དགོས། - + Address conflict ཤག་གནས་གདོང་གཏུག་ @@ -597,64 +643,61 @@ Ipv6Page - + IPv6Config IPv6ཁུང་ཙི། - + Address སྡོད་གནས། - + Subnet prefix Length ཡན་ལག་དྲ་རྒྱའི་སྔོན་སྒྲིག་གི་རིང་ཚད། - + Default Gateway ཁ་ཆད་བཞག་པའི་སྒོ་ཆེན། - Prefs DNS - སྔོན་གྲབས་DNS + སྔོན་གྲབས་DNS - Alternative DNS - ཚབ་བྱེད་རང་བཞིན་གྱི་DNS + ཚབ་བྱེད་རང་བཞིན་གྱི་DNS - + Auto(DHCP) རང་འགུལ་(DHCP) - + Manual ལག་དེབ། - - - + + Required ངེས་པར་དུ་སྐོང་དགོས། - + Invalid address རྩིས་འགྲོ་མེད་པའི་ས་གནས། - + Invalid gateway རྩིས་འགྲོ་མེད་པའི་དྲ་བའི་འགག་སྒོ། - + Address conflict ཤག་གནས་གདོང་གཏུག་ @@ -662,12 +705,12 @@ JoinHiddenWiFiPage - + Please enter the network name and security type ཁྱེད་རང་དྲ་རྒྱའི་ནང་དུ་ཞུགས་འདོད་པའི་མིང་དང་བདེ་འཇགས་རིགས་ནང་འཇུག་བྱེད་རོགས། - + Network name(SSID) དྲ་རྒྱའི་མིང་། (SID) @@ -676,27 +719,27 @@ དྲ་རྒྱ་དེ་སེམས་ལ་འཛིན་དགོས། - + Show Network List དྲ་རྒྱའི་རེའུ་མིག་གསལ་པོར་མངོན་པ། - + Cancel མེད་པར་བཟོ་དགོས། - + Join དེའི་ནང་དུ་ཞུགས་པ། - + Required ངེས་པར་དུ་སྐོང་དགོས། - + Find and Join Wi-Fi འཚོལ་ཞིབ་བྱས་པ་མ་ཟད་WI-FIལ་ཞུགས་པ་རེད། @@ -704,32 +747,38 @@ LanListItem - + Not connected འབྲེལ་མཐུད་མི་བྱེད་པ། - + Wired Device not carried སྐུད་ཡོད་སྒྲིག་ཆས་འཁྱེར་མེད་པ། - - + + + Disconnect འབྲེལ་ཐག་ཆད་པ། - - + + + Connect སྦྲེལ་མཐུད་བྱེད་པ + + Property ངོ་བོ། + + Delete དྲ་རྒྱ་དེ་བསུབ་དགོས། @@ -737,22 +786,22 @@ LanPage - + No ethernet device avaliable ཨེ་ཙི་དྲ་རྒྱའི་སྒྲིག་ཆས་ལ་བཙན་འཛུལ་བྱས་མི་ཆོག། - + LAN སྐུད་ཡོད་དྲ་བ། - + Activated LAN ངའི་དྲ་རྒྱ། - + Inactivated LAN དྲ་བ་གཞན་དག @@ -761,7 +810,7 @@ སྐུད་ཡོད་དྲ་བ་ཆད་སོང་། - + Wired Device not carried སྐུད་ཡོད་སྒྲིག་ཆས་འཁྱེར་མེད་པ། @@ -770,14 +819,18 @@ སྐུད་ཡོད་དྲ་བ་སྦྲེལ་ཡོད། + + Connected: འབྲེལ་མཐུད་བྱུང་ཡོད།: + Not Connected འབྲེལ་མཐུད་མ་བྱས་པ། + (Limited) (དྲ་བར་ཚོད་འཛིན་ཐེབས་པ་རེད།) @@ -785,12 +838,12 @@ ListItem - + Kylin NM དྲ་རྒྱའི་ཡོ་བྱད། - + kylin network applet desktop message དྲ་རྒྱའི་གསལ་འདེབས་གནས་ཚུལ། @@ -798,76 +851,101 @@ MainWindow - + kylin-nm དྲ་རྒྱའི་ཡོ་བྱད། - + LAN 有线网络 སྐུད་ཡོད་དྲ་བ། - + WLAN 无线局域网 སྐུད་མེད་ཅུས་ཁོངས་ཀྱི་དྲ་བ། - + Show MainWindow རླུང་གཙོ་བོ་མངོན་པར་བྱས་ཡོད། - + Settings 设置网络项 སྒྲིག་བཀོད། - + + Network tool དྲ་རྒྱའི་ལག་ཆ་ + Network Card དྲ་བྱང་། + Not connected to the network དྲ་རྒྱ་དང་སྦྲེལ་མཐུད་མ་བྱས་པ། + + MultipleDnsWidget + + DNS server: + DNSཞབས་ཞུ་བ།: + + + + DNS server(Drag to sort) + DNS ཞབས་ཞུའི་ཡོ་བྱད། (འདྲུད་འཐེན་曳་གོ་རིམ། ) + + + + Click "+" to configure DNS + "+"མནན་ན་ད་གཟོད་DNSལ་བཀོད་སྒྲིག་བྱེད་ཐུབ། + + + + Settings + མཐོ་རིམ་གྱི་བཀོད་སྒྲིག་བྱ་དགོས། + + NetDetail - + Kylin NM ཅིན་ལིན་NM - + kylin network desktop message དྲ་རྒྱའི་གསལ་འདེབས་གནས་ཚུལ། - + Detail ཞིབ་ཕྲའི་གནས་ཚུལ། - + IPv4 IPv4 - + IPv6 IPv6 - + Security བདེ་འཇགས། @@ -876,61 +954,62 @@ 关闭 - - + + Config བཀོད་སྒྲིག་བཅས་བྱ་དགོས། - + Confirm གཏན་འཁེལ་བྱ་དགོས། - + Cancel ཕྱིར་འཐེན། - + Forget this network དྲ་རྒྱ་འདི་བརྗེད་སོང་། + Delete this network དྲ་རྒྱ་དེ་བསུབ་དགོས། - + Add LAN Connect སྐུད་ཡོད་དྲ་བ་ཁ་སྣོན་བྱ་དགོས། - + Connect Hidden WLAN ཧའེ་ཏེན་ཝེ་ལན་དང་འབྲེལ་མཐུད་བྱེད་པ། - - - + + + None གཅིག་ཀྱང་མེད། - - - + + + Auto རང་འགུལ་གྱིས་རླངས་ - + start check ipv4 address conflict ipv4ས་གནས་ཀྱི་འགལ་བ་ལ་ཞིབ་བཤེར་བྱེད་འགོ་ཚུགས། - + start check ipv6 address conflict ipv6གནས་ཡུལ་དང་འགལ་བར་ཞིབ་བཤེར་བྱེད་འགོ་ཚུགས། @@ -943,22 +1022,22 @@ ipv6ཐག་གཅོད་གདོང་གཏུག་བྱུང་བ་རེད།! - + this wifi no support enterprise type wifiལ་རྒྱབ་སྐྱོར་མེད་པའི་ཁེ་ལས་ཀྱི་རིགས་དབྱིབས། - + this wifi no support None type wifiལ་རྒྱབ་སྐྱོར་མི་བྱེད་པར་རིགས་དབྱིབས་གཅིག་ཀྱང་མེད། - + this wifi no support WPA2 type wifiལ་རྒྱབ་སྐྱོར་མི་བྱེད་པའི་WPA2རིགས་དབྱིབས་ - + this wifi no support WPA3 type wifiལ་རྒྱབ་སྐྱོར་མི་བྱེད་པའི་WPA3རིགས་དབྱིབས་ @@ -1017,7 +1096,7 @@ OneConnForm - + Form @@ -1045,7 +1124,7 @@ OneLancForm - + Form @@ -1069,203 +1148,222 @@ SecurityPage - + Remember the Network དྲ་རྒྱ་དེ་སེམས་ལ་འཛིན་དགོས། - + Security བདེ་འཇགས། - - + + Password གསང་གྲངས། - + EAP type EAP རིགས་དབྱིབས། - + Identity ཐོབ་ཐང་། - + Domain ཁྱབ་ཁོངས། - + CA certficate CAལག་ཁྱེར། - + no need for CA certificate CAཡི་ལག་ཁྱེར་མི་དགོས། - + User certificate སྤྱོད་མཁན་གྱི་ལག་ཁྱེར། - + User private key སྤྱོད་མཁན་གྱི་སྒེར་གྱི་ལྡེ་མིག - + User key password སྤྱོད་མཁན་གྱི་ལྡེ་མིག་གི་གསང་ - + Password options གསང་བའི་ཐོག་ནས་རྣམ་གྲངས་བདམས་པ། - - - + + + Required ངེས་པར་དུ་སྐོང་དགོས། - + Ineer authentication དབྱིན་ཆས་ཀྱི་བདེན་དཔང་ར་སྤྲོད་ - + Username བཀོལ་སྤྱོད་ཀྱི་མིང་། - + Ask pwd each query འདྲི་རྩད་རེ་རེར་འདྲི་རྩད་བྱེད་པ། - + + + + + + + + + + + + + None གཅིག་ཀྱང་མེད། - + WPA&WPA2 Personal WPA&WPA2མི་སྒེར་གྱི་ངོས་ནས་བཤད་ན། - + WPA&WPA2 Enterprise WPA&WPA2 ཁེ་ལས། - + WPA3 Personal WPA3མི་སྒེར་ - + + + + Choose from file... ཡིག་ཆའི་ནང་ནས་གདམ་ག་རྒྱག་དགོས།... - + Store passwords only for this user སྤྱོད་མཁན་དེ་ཁོ་ནའི་ཆེད་དུ་གསང་གྲངས་ཉར་ཚགས་བྱས་ཡོད། - + Store password only for this user སྤྱོད་མཁན་དེ་ཁོ་ནའི་ཆེད་དུ་གསང་གྲངས་ཉར་ཚགས་བྱས་ཡོད། - + Store passwords for all users སྤྱོད་མཁན་ཚང་མའི་གསང་བ་གསོག་ཉར་བྱེད་དགོས། - + Store password for all users སྤྱོད་མཁན་ཚང་མའི་གསང་བ་གསོག་ཉར་བྱེད་དགོས། - + Ask this password every time ཐེངས་རེར་གསང་བ་འདི་འདྲི་རྩད་བྱེད་ཐེངས་རེ་ཡིན། - + Ask password every time ཐེངས་རེར་གསང་བ་འདི་འདྲི་རྩད་བྱེད་ཐེངས་རེ་ཡིན། - + + + Choose a CA certificate CAཡི་དཔང་ཡིག་འདེམས་པ། - + + + CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx) CA དཔང་ཡིག (*.pem *.der *.p12 *.crt *.cer *.pfx) - + PAC provisioning PAC 配置 PAC གཏན་འབེབས་བྱས་པ། - + Allow automatic PAC provisioning 允许自动PAC配置 རང་འགུལ་གྱིས་PACམཚོ་འདོན་བྱས་ཆོག། - + PAC file PAC 文件 PACཡིག་ཆ། - + Anonymous 匿名 མིང་མ་བཀོད་པའི་ - + Authenticated 已认证 བདེན་དཔང་ར་སྤྲོད་བྱས། - + Both 两者兼用 དེ་གཉིས་ཀ - + Choose a PAC file 选择一个PAC文件 PACཡིག་ཆ་ཞིག་བདམས་པ། - + PAC Files (*.pac) PAC文件(*.pac) PACཡིག་ཆ།(*.pac) - + @@ -1273,27 +1371,27 @@ TabPage - + Current Device མིག་སྔའི་སྒྲིག་ཆས། - + Devices Closed! སྒྲིག་ཆས་སྒོ་རྒྱག་པ།! - + Settings སྒྲིག་བཀོད། - + Kylin NM ཅིན་ལིན་NM - + kylin network applet desktop message kylinདྲ་རྒྱའི་ཀུ་ཤུའི་ཅོག་ཙེའི་ཆ་འཕྲིན། @@ -1301,60 +1399,49 @@ VpnPage - - Activated VPN - - - - - Inactivated VPN - - - - Wired Device not carried - སྐུད་ཡོད་སྒྲིག་ཆས་འཁྱེར་མེད་པ། + སྐུད་ཡོད་སྒྲིག་ཆས་འཁྱེར་མེད་པ། WiFiConfigDialog - + Dialog - + WLAN Authentication སྐུད་མེད་བདེན་དཔང་ར་སྤྲོད། - + Input WLAN Information Please སྐུད་མེད་ཆ་འཕྲིན་ནང་འཇུག་གནང་རོགས། - + WLAN ID: WLAN ID: - + WLAN Name: སྐུད་མེད་མིང་།: - + Password: གསང་གྲངས་ནི།: - + Cancl ཁན་ཁེ་ལན། - + Ok འགྲིགས། @@ -1362,35 +1449,42 @@ WlanListItem - + Not connected འབྲེལ་མཐུད་མི་བྱེད་པ། - - + + + + + Disconnect འབྲེལ་ཐག་ཆད་པ། - - - + + + + + Connect སྦྲེལ་མཐུད་བྱེད་པ - - + + Forget བརྗེད་པ། + + Property ངོ་བོ། - + Auto Connect རང་འགུལ་གྱིས་སྦྲེལ་མཐུད་ @@ -1402,7 +1496,7 @@ 更多... - + Add Others... གཞན་པ་ཁ་སྣོན་བྱས་ནས་... @@ -1410,22 +1504,22 @@ WlanPage - + WLAN སྐུད་མེད་ཅུས་ཁོངས་ཀྱི་དྲ་བ། - + No wireless network card detected སྐུད་མེད་དྲ་རྒྱའི་བྱང་བུ་མ་རྙེད་པ། - + Activated WLAN ངའི་དྲ་རྒྱ། - + Other WLAN དྲ་བ་གཞན་དག @@ -1434,24 +1528,28 @@ 更多... - + WLAN Connected Successfully སྐུད་མེད་དྲ་བ་སྦྲེལ་ཡོད། - + WLAN Disconnected Successfully སྐུད་མེད་དྲ་རྒྱ་ཆད་སོང་། + + Connected: འབྲེལ་མཐུད་བྱུང་ཡོད།: + Not Connected འབྲེལ་མཐུད་མ་བྱས་པ། + (Limited) (དྲ་བར་ཚོད་འཛིན་ཐེབས་པ་རེད།) @@ -1514,32 +1612,19 @@ main - + kylinnm - + show kylin-nm wifi page སྐུད་མེད་དྲ་རྒྱའི་ངོས་མངོན་པར་བྱས་ཡོད། - + show kylin-nm lan page སྐུད་ཡོད་དྲ་རྒྱའི་ཤོག་ངོས་མངོན་པར་བྱས་ཡོད། - - vpnMainWindow - - - kylin-vpn - - - - - vpn tool - - - diff --git a/src/translations/kylin-nm_tr.ts b/src/translations/kylin-nm_tr.ts index bca72f95..59158211 100644 --- a/src/translations/kylin-nm_tr.ts +++ b/src/translations/kylin-nm_tr.ts @@ -102,22 +102,22 @@ ConfigPage - + Network profile type - + 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. - - 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. + + 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. - + Config firewall and security settings @@ -125,47 +125,53 @@ CreatNetPage - + Connection Name - - Ipv4Config + + IPv4Config - + Address - + Netmask - + Default Gateway - - Prefs DNS + + Invalid address - - Alternative DNS + + Invalid subnet mask - + + + Required + + + + Auto(DHCP) Oto(DHCP) - + Manual Elle @@ -173,82 +179,82 @@ DetailPage - + Auto Connection - - + + SSID: - + Copied successfully! - + Copy all - + Please input SSID: - - + + Protocol: - - + + Security Type: - - + + Hz: - - + + Chan: - - + + BandWidth: - - - IPV6: + + + IPv4: + IPv6 adresi: {4:?} + + + + + IPv4 DNS: - - - IPV4: - + + + IPv6: + IPv6 adresi: {6:?} - - - IPV4 Dns: - - - - - + + Mac: @@ -1175,29 +1181,87 @@ - EnterpriseWlanDialog + DnsSettingWidget - - Wi-Fi network requires authentication + + DNS Server Advanced Settings - - Access to Wi-Fi network " + + Tactic - - " requires a password or encryption key. + + Timeout - + + Retry Count + + + + + order + + + + + rotate + + + + + concurrency + + + + + s + + + + + times + + + + Cancel - + + Confirm + + + + + EnterpriseWlanDialog + + + Wi-Fi network requires authentication + + + + + Access to Wi-Fi network " + + + + + " requires a password or encryption key. + + + + + Cancel + + + + Connect @@ -1205,22 +1269,22 @@ FirewallDialog - + Allow other devices on this network to discover this computer? - + It is not recommended to enable this feature on public networks - + Not allowed (recommended) - + Allowed @@ -1228,63 +1292,53 @@ Ipv4Page - - Ipv4Config - - - - + Address - + Netmask - + Default Gateway - - Prefs DNS + + IPv4Config - - Alternative DNS - - - - + Auto(DHCP) Oto(DHCP) - + Manual Elle - + Invalid address - + Invalid subnet mask - - + + Required - + Address conflict @@ -1292,64 +1346,53 @@ Ipv6Page - - Ipv6Config - - - - + Address - + Subnet prefix Length - + Default Gateway - - Prefs DNS + + IPv6Config - - Alternative DNS - - - - + Auto(DHCP) Oto(DHCP) - + Manual Elle - - - + + Required - + Invalid address - + Invalid gateway - + Address conflict @@ -1357,37 +1400,37 @@ JoinHiddenWiFiPage - + Please enter the network name and security type - + Network name(SSID) - + Show Network List - + Cancel - + Join - + Required - + Find and Join Wi-Fi @@ -1402,65 +1445,95 @@ LanListItem - + Not connected Bağlanamadı - + Wired Device not carried - - + + + Disconnect Bağlantıyı Kes - - + + + Connect + + + + Property + + + + + + Delete + + LanPage - + No ethernet device avaliable - + LAN - + Activated LAN - + Inactivated LAN - + Wired Device not carried + + + + Connected: + + + + + (Limited) + + + + + Not Connected + + ListItem - + Kylin NM - + kylin network applet desktop message Kylin ağ uygulaması masaüstü mesajı @@ -1468,7 +1541,7 @@ MainWindow - + kylin-nm @@ -1489,25 +1562,36 @@ Gizli Ağı Bağlan - + LAN - + WLAN WLAN - + Settings - + + Network tool + + + Network Card + + + + + Not connected to the network + + Enabled Aktif @@ -1521,7 +1605,7 @@ HotSpot - + Show MainWindow Ana Pencereyi Göster @@ -1614,110 +1698,133 @@ WLAN Bağlantısı Başarılı + + MultipleDnsWidget + + + DNS server(Drag to sort) + + + + + Click "+" to configure DNS + + + + + Settings + + + NetDetail - + Kylin NM - + kylin network desktop message - + Detail - - Ipv4 - - - - - Ipv6 - - - - + Security - - + + Config Ayar - + Confirm - + Cancel - + Forget this network - - Add Lan Connect + + IPv4 + IPv6 adresi: {4?} + + + + IPv6 + IPv6 adresi: {6?} + + + + Add LAN Connect - - connect hiddin wlan + + Connect Hidden WLAN - - - + + Delete this network + + + + + + None Yok - - - + + + Auto Oto - + start check ipv4 address conflict - + start check ipv6 address conflict - + this wifi no support enterprise type - + this wifi no support None type - + this wifi no support WPA2 type - + this wifi no support WPA3 type @@ -1811,7 +1918,7 @@ OneConnForm - + Form -- @@ -1883,7 +1990,7 @@ OneLancForm - + Form -- @@ -1939,169 +2046,214 @@ SecurityPage - + Remember the Network - + Security - - + + Password - + EAP type - + Identity Kimlik: - + Domain Domain: - + CA certficate - + no need for CA certificate - + User certificate Kullanıcı sertifikası: - + User private key Kullanıcı özel anahtarı: - + User key password Kullanıcı anahtarı şifresi: - + Password options - - - + + + Required - + Ineer authentication - - Usename + + Username - + Ask pwd each query - - - - - - - - - + + + + + + + + + + + + + None Yok - + WPA&WPA2 Personal - + WPA&WPA2 Enterprise - + WPA3 Personal - - - + + + + Choose from file... - + Store passwords only for this user - + Store password only for this user - + Store passwords for all users - + Store password for all users - + Ask this password every time - + Ask password every time - - - + + PAC provisioning + + + + + Allow automatic PAC provisioning + + + + + PAC file + PAC dosyası + + + + Anonymous + Anonim + + + + Authenticated + Doğrulanmış + + + + Both + Her ikisi de + + + + + Choose a CA certificate - - - + + + CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx) - + + Choose a PAC file + + + + + PAC Files (*.pac) + + + + @@ -2109,27 +2261,27 @@ TabPage - + Current Device - + Devices Closed! - + Settings - + Kylin NM - + kylin network applet desktop message Kylin ağ uygulaması masaüstü mesajı @@ -2141,63 +2293,45 @@ Kylin ağ uygulaması masaüstü mesajı - - VpnPage - - - Activated VPN - - - - - Inactivated VPN - - - - - Wired Device not carried - - - WiFiConfigDialog - + Dialog - + WLAN Authentication - + Input WLAN Information Please - + WLAN ID: - + WLAN Name: - + Password: - + Cancl - + Ok Tamam @@ -2205,31 +2339,42 @@ WlanListItem - + Not connected Bağlanamadı - - + + + + + Disconnect Bağlantıyı Kes - - - + + + + + Connect - - + + + Property + + + + + Forget - + Auto Connect @@ -2237,7 +2382,7 @@ WlanMoreItem - + Add Others... @@ -2245,32 +2390,48 @@ WlanPage - + WLAN WLAN - + Activated WLAN - + Other WLAN - + + + Connected: + + + + + (Limited) + + + + + Not Connected + + + + No wireless network card detected - + WLAN Connected Successfully - + WLAN Disconnected Successfully @@ -2293,32 +2454,19 @@ main - + kylinnm - + show kylin-nm wifi page - + show kylin-nm lan page - - vpnMainWindow - - - kylin-vpn - - - - - vpn tool - - - diff --git a/src/translations/kylin-nm_zh_CN.ts b/src/translations/kylin-nm_zh_CN.ts index 71386cb7..8f15ea0a 100644 --- a/src/translations/kylin-nm_zh_CN.ts +++ b/src/translations/kylin-nm_zh_CN.ts @@ -32,33 +32,25 @@ ip地址冲突,请更改ip {6 ?} - - MultipleDnsWidget - - - DNS server: - DNS服务器: - - ConfigPage - + Network profile type 网络配置文件类型 - + 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. 公用(推荐) 网络中的设备不可发现此电脑。一般情况下适用于公共场所中的网络,如机场或咖啡店等等。 - + 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. 专用 网络中的设备可发现此电脑。一般情况下适用于家庭或工作单位的网络,您认识并信任网络上的个人和设备。 - + Config firewall and security settings 配置防火墙和安全设置 @@ -81,63 +73,61 @@ CreatNetPage - + Connection Name 网络名称 - + IPv4Config IPv4配置 - + Address IPv4地址 - + Netmask 子网掩码 - + Default Gateway 默认网关 - Prefs DNS - 首选DNS + 首选DNS - Alternative DNS - 备选DNS + 备选DNS - + Auto(DHCP) 自动(DHCP) - + Manual 手动 - + Invalid address 无效地址 - + Invalid subnet mask 无效子网掩码 - - + + Required 必填 @@ -145,82 +135,82 @@ DetailPage - + Auto Connection 自动连接 - - + + SSID: SSID: - + Copied successfully! 复制成功! - + Copy all 复制全部 - + Please input SSID: 请输入SSID: - - + + Protocol: 协议: - - + + Security Type: 安全类型: - - + + Hz: 网络频带: - - + + Chan: 网络通道: - - + + BandWidth: 带宽: - - + + IPv6: 本地链接IPv6地址: - - + + IPv4: IPv4地址: - - + + IPv4 DNS: IPv4 DNS服务器: - - + + Mac: 物理地址: @@ -455,6 +445,72 @@ + + DnsSettingWidget + + + DNS Server Advanced Settings + DNS 服务器高级设置 + + + + Tactic + 策略 + + + + Timeout + 超时时间 + + + + Retry Count + 重试次数 + + + + order + 顺序 + + + + rotate + 随机 + + + + concurrency + 并行 + + + + s + + + + + times + + + + s + + + + times + + + + + Cancel + 取消 + + + + Confirm + 确定 + + EnterpriseWlanDialog @@ -466,27 +522,27 @@ 关闭 - + Wi-Fi network requires authentication Wi-Fi网络要求认证 - + Access to Wi-Fi network " 访问Wi-Fi网络 - + " requires a password or encryption key. 需要密码或加密密钥。 - + Cancel 取消 - + Connect 连接 @@ -510,22 +566,22 @@ - + Allow other devices on this network to discover this computer? 是否允许此网络上的其他设备发现这台电脑? - + It is not recommended to enable this feature on public networks 不建议在公共网络上开启此功能 - + Not allowed (recommended) 不允许(推荐) - + Allowed 允许 @@ -533,63 +589,61 @@ Ipv4Page - + IPv4Config IPv4配置 - + Address 地址 - + Netmask 子网掩码 - + Default Gateway 默认网关 - Prefs DNS - 首选DNS + 首选DNS - Alternative DNS - 备选DNS + 备选DNS - + Auto(DHCP) 自动 - + Manual 手动 - + Invalid address 无效地址 - + Invalid subnet mask 无效子网掩码 - - + + Required 必填 - + Address conflict 地址冲突 @@ -597,64 +651,61 @@ Ipv6Page - + IPv6Config IPv6配置 - + Address 地址 - + Subnet prefix Length 子网前缀长度 - + Default Gateway 默认网关 - Prefs DNS - 首选DNS + 首选DNS - Alternative DNS - 备选DNS + 备选DNS - + Auto(DHCP) 自动 - + Manual 手动 - - - + + Required 必填 - + Invalid address 无效地址 - + Invalid gateway 无效网关 - + Address conflict 地址冲突 @@ -662,12 +713,12 @@ JoinHiddenWiFiPage - + Please enter the network name and security type 请输入您想要加入网络的名称和安全类型 - + Network name(SSID) 网络名(SSID) @@ -676,27 +727,27 @@ 记住该网络 - + Show Network List 显示网络列表 - + Cancel 取消 - + Join 加入 - + Required 必填 - + Find and Join Wi-Fi 查找并加入Wi-Fi @@ -704,32 +755,38 @@ LanListItem - + Not connected 未连接 - + Wired Device not carried 未插入网线 - - + + + Disconnect 断开 - - + + + Connect 连接 + + Property 属性 + + Delete 删除此网络 @@ -737,22 +794,22 @@ LanPage - + No ethernet device avaliable 未检测到有线设备 - + LAN 有线网络 - + Activated LAN 我的网络 - + Inactivated LAN 其他网络 @@ -761,7 +818,7 @@ 有线网络已断开 - + Wired Device not carried 未插入网线 @@ -770,14 +827,18 @@ 有线网络已连接 + + Connected: 已连接: + Not Connected 未连接 + (Limited) (网络受限) @@ -785,12 +846,12 @@ ListItem - + Kylin NM 网络设置工具 - + kylin network applet desktop message 网络提示消息 @@ -798,76 +859,105 @@ MainWindow - + kylin-nm 网络工具 - + LAN 有线网络 有线网络 - + WLAN 无线局域网 无线局域网 - + Show MainWindow 打开网络工具 - + Settings 设置网络项 设置网络项 - + + Network tool 网络工具 + Network Card 网卡 + Not connected to the network 未连接网络 + + MultipleDnsWidget + + DNS server: + DNS服务器: + + + DNS server(Drag to sort): + DNS 服务器(拖曳以排序) + + + + DNS server(Drag to sort) + DNS 服务器(拖曳以排序) + + + + Click "+" to configure DNS + 点击“+”配置 DNS + + + + Settings + 高级设置 + + NetDetail - + Kylin NM 网络设置工具 - + kylin network desktop message 网络提示消息 - + Detail 详情 - + IPv4 IPv4 - + IPv6 IPv6 - + Security 安全 @@ -876,61 +966,62 @@ 关闭 - - + + Config 配置 - + Confirm 确定 - + Cancel 取消 - + Forget this network 忘记此网络 + Delete this network 删除此网络 - + Add LAN Connect 添加有线网络 - + Connect Hidden WLAN 连接到隐藏WLAN - - - + + + None - - - + + + Auto 自动 - + start check ipv4 address conflict 开始检测ipv4地址冲突 - + start check ipv6 address conflict 开始检测ipv6地址冲突 @@ -943,22 +1034,22 @@ ipv6地址冲突! - + this wifi no support enterprise type 此wifi不支持企业网类型 - + this wifi no support None type 此wifi不支持空类型 - + this wifi no support WPA2 type 此wifi不支持WPA2类型 - + this wifi no support WPA3 type 此wifi不支持WPA3类型 @@ -1017,7 +1108,7 @@ OneConnForm - + Form @@ -1045,7 +1136,7 @@ OneLancForm - + Form @@ -1069,195 +1160,214 @@ SecurityPage - + Remember the Network 记住该网络 - + Security 安全性 - - + + Password 密钥 - + EAP type EAP方法 - + Identity 匿名身份 - + Domain - + CA certficate CA 证书 - + no need for CA certificate 不需要CA证书 - + User certificate 用户证书 - + User private key 用户私钥 - + User key password 用户密钥密码 - + Password options 密码选项 - - - + + + Required 必填 - + Ineer authentication 内部认证 - + Username 用户名 - + Ask pwd each query 每次询问密码 - + + + + + + + + + + + + + None - + WPA&WPA2 Personal WPA&WPA2 个人 - + WPA&WPA2 Enterprise WPA&WPA2 企业 - + WPA3 Personal WPA3 个人 - + + + + Choose from file... 从文件选择... - + Store passwords only for this user 仅为该用户存储密码 - + Store password only for this user 仅为该用户存储密码 - + Store passwords for all users 存储所有用户的密码 - + Store password for all users 存储所有用户的密码 - + Ask this password every time 每次询问这个密码 - + Ask password every time 每次询问这个密码 - + + + Choose a CA certificate 选择一个CA证书 - + + + CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx) CA 证书 (*.pem *.der *.p12 *.crt *.cer *.pfx) - + PAC provisioning PAC 配置 - + Allow automatic PAC provisioning 允许自动PAC配置 - + PAC file PAC 文件 - + Anonymous 匿名 - + Authenticated 已认证 - + Both 两者兼用 - + Choose a PAC file 选择一个PAC文件 - + PAC Files (*.pac) PAC文件(*.pac) - + @@ -1265,27 +1375,27 @@ TabPage - + Current Device 当前网卡 - + Devices Closed! 设备关闭! - + Settings 网络设置 - + Kylin NM 网络设置工具 - + kylin network applet desktop message 网络提示消息 @@ -1293,60 +1403,49 @@ VpnPage - - Activated VPN - - - - - Inactivated VPN - - - - Wired Device not carried - 未插入网线 + 未插入网线 WiFiConfigDialog - + Dialog - + WLAN Authentication - + Input WLAN Information Please - + WLAN ID: - + WLAN Name: - + Password: - + Cancl - + Ok @@ -1354,35 +1453,42 @@ WlanListItem - + Not connected 未连接 - - + + + + + Disconnect 断开 - - - + + + + + Connect 连接 - - + + Forget 忘记此网络 + + Property 属性 - + Auto Connect 自动加入该网络 @@ -1394,7 +1500,7 @@ 更多... - + Add Others... 加入其他网络... @@ -1402,22 +1508,22 @@ WlanPage - + WLAN 无线局域网 - + No wireless network card detected 未检测到无线网卡 - + Activated WLAN 我的网络 - + Other WLAN 其他网络 @@ -1426,24 +1532,28 @@ 更多... - + WLAN Connected Successfully 无线网络已连接 - + WLAN Disconnected Successfully 无线网络已断开 + + Connected: 已连接: + Not Connected 未连接 + (Limited) (网络受限) @@ -1506,32 +1616,19 @@ main - + kylinnm - + show kylin-nm wifi page - + show kylin-nm lan page - - vpnMainWindow - - - kylin-vpn - - - - - vpn tool - - -