!56 合并主线代码

Merge pull request !56 from zhaoshixu/0922-ok
This commit is contained in:
zhaoshixu 2023-09-26 06:56:35 +00:00 committed by Gitee
commit a5e9fad934
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
181 changed files with 11032 additions and 3021 deletions

View File

@ -3,24 +3,12 @@ TEMPLATE = subdirs
CONFIG += \ CONFIG += \
ordered \ ordered \
qt qt \
SUBDIRS = \ SUBDIRS = \
plugins/plugin.pro \ plugins/plugin.pro \
src-vpn/src-vpn.pro \ src-vpn/src-vpn.pro \
src src \
sys-dbus-register \
TRANSLATIONS += \ QT += widgets
translations/kylin-nm_zh_CN.ts \
translations/kylin-nm_tr.ts \
translations/kylin-nm_bo.ts \
translations/kylin-nm_bo_CN.ts
CONFIG(release, debug|release) {
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
}
qm_files.path = $${PREFIX}/share/kylin-nm/kylin-nm/
qm_files.files = translations/*.qm
INSTALLS += qm_files \

View File

@ -79,14 +79,13 @@ void AddNetBtn::leaveEvent(QEvent *event){
void AddNetBtn::paintEvent(QPaintEvent *event) void AddNetBtn::paintEvent(QPaintEvent *event)
{ {
QPalette pal = qApp->palette();
QPainter painter(this); QPainter painter(this);
painter.setRenderHint(QPainter:: Antialiasing, true); //设置渲染,启动反锯齿 painter.setRenderHint(QPainter:: Antialiasing, true); //设置渲染,启动反锯齿
painter.setPen(Qt::NoPen); painter.setPen(Qt::NoPen);
painter.setBrush(this->palette().base().color()); painter.setBrush(this->palette().base().color());
QPalette pal = qApp->palette();
QColor color = pal.color(QPalette::Button); QColor color = pal.color(QPalette::Button);
color.setAlphaF(0.5); color.setAlphaF(0.5);
pal.setColor(QPalette::Button, color); pal.setColor(QPalette::Button, color);

View File

@ -22,7 +22,6 @@
#include <QPainter> #include <QPainter>
#include <QApplication> #include <QApplication>
#include <QDebug> #include <QDebug>
#include <QPainterPath>
#define BUTTON_SIZE 36,36 #define BUTTON_SIZE 36,36
#define ICON_SIZE 16,16 #define ICON_SIZE 16,16

View File

@ -4,6 +4,11 @@ CONFIG += plugin
TARGET = $$qtLibraryTarget(mobilehotspot) TARGET = $$qtLibraryTarget(mobilehotspot)
DESTDIR = ../.. DESTDIR = ../..
CONFIG(release, debug|release) {
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
}
target.path = $$[QT_INSTALL_LIBS]/ukui-control-center target.path = $$[QT_INSTALL_LIBS]/ukui-control-center
trans.files = translations/* trans.files = translations/*
trans.path = /usr/share/kylin-nm/mobilehotspot/ trans.path = /usr/share/kylin-nm/mobilehotspot/
@ -50,4 +55,5 @@ TRANSLATIONS += \
translations/tr.ts \ translations/tr.ts \
translations/bo.ts\ translations/bo.ts\
translations/bo_CN.ts \ translations/bo_CN.ts \
translations/en_US.ts translations/en_US.ts \
translations/mn.ts

View File

@ -38,10 +38,10 @@
#define ICON_SIZE 24,24 #define ICON_SIZE 24,24
#define PASSWORD_FRAME_MIN_HIGHT 60 #define PASSWORD_FRAME_MIN_HIGHT 60
#define PASSWORD_FRAME_FIX_HIGHT 80 #define PASSWORD_FRAME_FIX_HIGHT 90
#define PASSWORD_FRAME_MIN_SIZE 550, 60 #define PASSWORD_FRAME_MIN_SIZE 550, 60
#define PASSWORD_FRAME_MAX_SIZE 16777215, 86 #define PASSWORD_FRAME_MAX_SIZE 16777215, 86
#define PASSWORD_ITEM_MARGINS 16, 12, 16, 14 #define PASSWORD_ITEM_MARGINS 16, 10, 16, 10
#define WIRELESS 1 #define WIRELESS 1
@ -61,10 +61,10 @@ void MobileHotspotWidget::showDesktopNotify(const QString &message)
"org.freedesktop.Notifications", "org.freedesktop.Notifications",
QDBusConnection::sessionBus()); QDBusConnection::sessionBus());
QList<QVariant> args; QList<QVariant> args;
args<<(tr("ukui control center")) args<<(tr("Settings"))
<<((unsigned int) 0) <<((unsigned int) 0)
<<QString("ukui-control-center") <<QString("ukui-control-center")
<<tr("ukui control center desktop message") //显示的是什么类型的信息 <<tr("Settings desktop message") //显示的是什么类型的信息
<<message //显示的具体信息 <<message //显示的具体信息
<<QStringList() <<QStringList()
<<QVariantMap() <<QVariantMap()
@ -117,10 +117,18 @@ MobileHotspotWidget::MobileHotspotWidget(QWidget *parent) : QWidget(parent)
m_Vlayout->addStretch(); m_Vlayout->addStretch();
connect(m_switchBtn, &KSwitchButton::stateChanged, this, &MobileHotspotWidget::setUiEnabled); connect(m_switchBtn, &KSwitchButton::stateChanged, this, &MobileHotspotWidget::setUiEnabled);
connect(m_interfaceComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MobileHotspotWidget::onInterfaceChanged);
connect(m_interfaceComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=]() { connect(m_interfaceComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=]() {
UkccCommon::buriedSettings("MobileHotspot", "Net card", QString("select"), m_interfaceComboBox->currentText());
m_interfaceName = m_interfaceComboBox->currentText(); m_interfaceName = m_interfaceComboBox->currentText();
updateBandCombox(); updateBandCombox();
}); });
connect(m_freqBandComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), [=](){
if (m_isUserSelect && !m_freqBandComboBox->currentText().isEmpty()) {
UkccCommon::buriedSettings("MobileHotspot", "Frequency band", QString("select"), m_freqBandComboBox->currentText());
}
});
onInterfaceChanged();
#ifdef HOTSPOT_CONTROL #ifdef HOTSPOT_CONTROL
m_connectDevPage->refreshStalist(); m_connectDevPage->refreshStalist();
@ -142,7 +150,6 @@ bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event)
return true; return true;
} }
if (watched == m_switchBtn) { if (watched == m_switchBtn) {
if (event->type() == QEvent::MouseButtonRelease) { if (event->type() == QEvent::MouseButtonRelease) {
if (!m_interface->isValid()) { if (!m_interface->isValid()) {
@ -152,6 +159,7 @@ bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event)
showDesktopNotify(tr("wirless switch is close or no wireless device")); showDesktopNotify(tr("wirless switch is close or no wireless device"));
return true; return true;
} }
UkccCommon::buriedSettings("MobileHotspot", "Open", QString("settings"), !m_switchBtn->isChecked() ? "true":"false");
if (m_switchBtn->isChecked()) { if (m_switchBtn->isChecked()) {
// showDesktopNotify(tr("start to close hotspot")); // showDesktopNotify(tr("start to close hotspot"));
QDBusReply<void> reply = m_interface->call("deactiveWirelessAp", m_apNameLine->text(), m_uuid); QDBusReply<void> reply = m_interface->call("deactiveWirelessAp", m_apNameLine->text(), m_uuid);
@ -259,7 +267,7 @@ void MobileHotspotWidget::initDbusConnect()
if(m_interface->isValid()) { if(m_interface->isValid()) {
connect(m_interface,SIGNAL(activateFailed(QString)), this, SLOT(onActivateFailed(QString)), Qt::QueuedConnection); connect(m_interface,SIGNAL(activateFailed(QString)), this, SLOT(onActivateFailed(QString)), Qt::QueuedConnection);
connect(m_interface,SIGNAL(deactivateFailed(QString)), this, SLOT(onDeactivateFailed(QString)), Qt::QueuedConnection); connect(m_interface,SIGNAL(deactivateFailed(QString)), this, SLOT(onDeactivateFailed(QString)), Qt::QueuedConnection);
connect(m_interface,SIGNAL(deviceStatusChanged()), this, SLOT(onDeviceStatusChanged()), Qt::QueuedConnection); 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(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(hotspotDeactivated(QString, QString)), this, SLOT(onHotspotDeactivated(QString, QString)), Qt::QueuedConnection);
@ -270,7 +278,6 @@ void MobileHotspotWidget::initDbusConnect()
connect(m_interface, SIGNAL(wirelessSwitchBtnChanged(bool)), this, SLOT(onWirelessBtnChanged(bool)), Qt::QueuedConnection); connect(m_interface, SIGNAL(wirelessSwitchBtnChanged(bool)), this, SLOT(onWirelessBtnChanged(bool)), Qt::QueuedConnection);
} }
connect(m_apNameLine, &QLineEdit::textEdited, this, &MobileHotspotWidget::onApLineEditTextEdit); connect(m_apNameLine, &QLineEdit::textEdited, this, &MobileHotspotWidget::onApLineEditTextEdit);
#ifdef HOTSPOT_CONTROL #ifdef HOTSPOT_CONTROL
connect(m_connectDevPage, SIGNAL(setStaIntoBlacklist(QString, QString)), m_blacklistPage, SLOT(onsetStaIntoBlacklist(QString, QString))); connect(m_connectDevPage, SIGNAL(setStaIntoBlacklist(QString, QString)), m_blacklistPage, SLOT(onsetStaIntoBlacklist(QString, QString)));
@ -286,11 +293,10 @@ void MobileHotspotWidget::onApLineEditTextEdit(QString text)
for ( ; i < text.length(); ++i) { for ( ; i < text.length(); ++i) {
count += text.mid(i,1).toLocal8Bit().length(); count += text.mid(i,1).toLocal8Bit().length();
if (count > AP_NAME_MAX_LENGTH) { if (count > AP_NAME_MAX_LENGTH) {
break;
}
}
m_apNameLine->setText(text.left(i)); m_apNameLine->setText(text.left(i));
return;
}
}
} }
void MobileHotspotWidget::onPwdTextChanged() void MobileHotspotWidget::onPwdTextChanged()
@ -306,6 +312,47 @@ void MobileHotspotWidget::onPwdTextChanged()
this->update(); this->update();
} }
void MobileHotspotWidget::onInterfaceChanged()
{
m_interfaceName = m_interfaceComboBox->currentText();
if(m_interface->isValid()) {
QDBusMessage result = m_interface->call(QStringLiteral("getWirelessList"));
if(result.type() == QDBusMessage::ErrorMessage)
{
qWarning() << "getWirelessList error:" << result.errorMessage();
return;
}
bool flag = false;
auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
QMap<QString, QVector<QStringList>> variantList;
dbusArg >> variantList;
if (variantList.size() != 0) {
QMap<QString, QVector<QStringList>>::iterator iter;
for (iter = variantList.begin(); iter != variantList.end(); iter++) {
if (m_interfaceName == iter.key()) {
QVector<QStringList> wlanListInfo = iter.value();
if (!wlanListInfo.isEmpty() && wlanListInfo.at(0).size() > 1) {
flag = true;
}
break;
}
}
}
if (flag) {
m_interfaceWarnLabel->setText(tr("use ") + m_interfaceName +
tr(" share network, will interrupt local wireless connection"));
m_interfaceFrame->setFixedHeight(PASSWORD_FRAME_FIX_HIGHT);
m_warnWidget->show();
} else {
m_interfaceFrame->setFixedHeight(PASSWORD_FRAME_MIN_HIGHT);
m_warnWidget->hide();
}
resetFrameSize();
}
updateBandCombox();
}
void MobileHotspotWidget::onActiveConnectionChanged(QString deviceName, QString ssid, QString uuid, int status) void MobileHotspotWidget::onActiveConnectionChanged(QString deviceName, QString ssid, QString uuid, int status)
{ {
if(m_uuid == uuid && status == 4) { if(m_uuid == uuid && status == 4) {
@ -314,6 +361,14 @@ void MobileHotspotWidget::onActiveConnectionChanged(QString deviceName, QString
setUiEnabled(false); setUiEnabled(false);
m_uuid.clear(); m_uuid.clear();
} }
if (deviceName != m_interfaceName) {
return;
}
if (m_interfaceComboBox && status == 2) {
onInterfaceChanged();
}
} }
void MobileHotspotWidget::onWirelessBtnChanged(bool state) void MobileHotspotWidget::onWirelessBtnChanged(bool state)
@ -332,6 +387,10 @@ void MobileHotspotWidget::initInterfaceInfo()
if(!m_interface->isValid()) { if(!m_interface->isValid()) {
return; return;
} }
if (m_interfaceComboBox->isVisible()) {
m_interfaceComboBox->hidePopup();
}
m_interfaceComboBox->clear(); m_interfaceComboBox->clear();
QDBusReply<QMap<QString, bool> > reply = m_interface->call("getDeviceListAndEnabled",WIRELESS); QDBusReply<QMap<QString, bool> > reply = m_interface->call("getDeviceListAndEnabled",WIRELESS);
@ -350,7 +409,6 @@ void MobileHotspotWidget::initInterfaceInfo()
} }
QMap<QString, int> devCapMap = capReply.value(); QMap<QString, int> devCapMap = capReply.value();
if (devMap.isEmpty()) { if (devMap.isEmpty()) {
qDebug() << LOG_HEAD << "no wireless device"; qDebug() << LOG_HEAD << "no wireless device";
setWidgetHidden(true); setWidgetHidden(true);
@ -359,7 +417,7 @@ void MobileHotspotWidget::initInterfaceInfo()
QMap<QString, bool>::Iterator iter = devMap.begin(); QMap<QString, bool>::Iterator iter = devMap.begin();
while (iter != devMap.end()) { while (iter != devMap.end()) {
QString interfaceName = iter.key(); QString interfaceName = iter.key();
if (devCapMap[interfaceName] & 0x01) { if (!(devCapMap[interfaceName] & 0x01)) {
m_interfaceComboBox->addItem(interfaceName); m_interfaceComboBox->addItem(interfaceName);
} }
iter++; iter++;
@ -404,12 +462,17 @@ void MobileHotspotWidget::getApInfo()
m_pwdNameLine->setText("12345678"); m_pwdNameLine->setText("12345678");
return; return;
} else { } else {
int index = m_interfaceComboBox->findText(apInfo.at(2));
if (index >= 0) {
m_apNameLine->setText(apInfo.at(0)); m_apNameLine->setText(apInfo.at(0));
m_pwdNameLine->setText(apInfo.at(1)); m_pwdNameLine->setText(apInfo.at(1));
int index = m_interfaceComboBox->findText(apInfo.at(2));
if (index >= 0) {
m_interfaceComboBox->setCurrentIndex(index); m_interfaceComboBox->setCurrentIndex(index);
m_interfaceName = apInfo.at(2); m_interfaceName = apInfo.at(2);
} else {
qDebug() << LOG_HEAD << "no such interface " << apInfo.at(2);
}
if (apInfo.at(3) == "true") { if (apInfo.at(3) == "true") {
m_switchBtn->setChecked(true); m_switchBtn->setChecked(true);
setUiEnabled(true); setUiEnabled(true);
@ -421,10 +484,9 @@ void MobileHotspotWidget::getApInfo()
} }
int i = m_freqBandComboBox->findText(apInfo.at(5)); int i = m_freqBandComboBox->findText(apInfo.at(5));
if (i >= 0) { if (i >= 0) {
m_isUserSelect = false;
m_freqBandComboBox->setCurrentIndex(i); m_freqBandComboBox->setCurrentIndex(i);
} m_isUserSelect = true;
} else {
qDebug() << LOG_HEAD << "no such interface " << apInfo.at(2);
} }
} }
} }
@ -502,10 +564,12 @@ void MobileHotspotWidget::setPasswordFrame()
pwdInputVLayout->addWidget(m_pwdNameLine); pwdInputVLayout->addWidget(m_pwdNameLine);
pwdInputVLayout->addWidget(m_pwdHintLabel); pwdInputVLayout->addWidget(m_pwdHintLabel);
QFormLayout *pwdLayout = new QFormLayout(m_passwordFrame); QGridLayout *pwdLayout = new QGridLayout(m_passwordFrame);
pwdLayout->setContentsMargins(PASSWORD_ITEM_MARGINS); pwdLayout->setContentsMargins(PASSWORD_ITEM_MARGINS);
pwdLayout->setSpacing(0); pwdLayout->setSpacing(0);
pwdLayout->addRow(m_pwdLabel, pwdInputWidget); pwdLayout->addWidget(m_pwdLabel, 0, 0);
pwdLayout->addWidget(m_pwdNameLine, 0, 1);
pwdLayout->addWidget(m_pwdHintLabel, 1, 1);
m_passwordFrame->setLayout(pwdLayout); m_passwordFrame->setLayout(pwdLayout);
@ -522,8 +586,9 @@ void MobileHotspotWidget::setFreqBandFrame()
QHBoxLayout *freqBandHLayout = new QHBoxLayout(m_freqBandFrame); QHBoxLayout *freqBandHLayout = new QHBoxLayout(m_freqBandFrame);
m_freqBandLabel = new QLabel(tr("Frequency band"), this); m_freqBandLabel = new FixLabel(this);
m_freqBandLabel->setMinimumWidth(LABLE_MIN_WIDTH); m_freqBandLabel->setText(tr("Frequency band"));
m_freqBandLabel->setFixedWidth(LABLE_MIN_WIDTH - 8);
m_freqBandComboBox = new QComboBox(this); m_freqBandComboBox = new QComboBox(this);
m_freqBandComboBox->setInsertPolicy(QComboBox::NoInsert); m_freqBandComboBox->setInsertPolicy(QComboBox::NoInsert);
m_freqBandComboBox->setMinimumWidth(COMBOBOX_MIN_WIDTH); m_freqBandComboBox->setMinimumWidth(COMBOBOX_MIN_WIDTH);
@ -531,7 +596,7 @@ void MobileHotspotWidget::setFreqBandFrame()
m_freqBandComboBox->addItem("2.4GHz"); m_freqBandComboBox->addItem("2.4GHz");
m_freqBandComboBox->addItem("5GHz"); m_freqBandComboBox->addItem("5GHz");
freqBandHLayout->setContentsMargins(ITEM_MARGINS); freqBandHLayout->setContentsMargins(ITEM_MARGINS);
freqBandHLayout->setSpacing(0); freqBandHLayout->setSpacing(8);
freqBandHLayout->addWidget(m_freqBandLabel); freqBandHLayout->addWidget(m_freqBandLabel);
freqBandHLayout->addWidget(m_freqBandComboBox); freqBandHLayout->addWidget(m_freqBandComboBox);
@ -543,23 +608,48 @@ void MobileHotspotWidget::setInterFaceFrame()
/* key tips */ /* key tips */
m_interfaceFrame = new QFrame(this); m_interfaceFrame = new QFrame(this);
m_interfaceFrame->setFrameShape(QFrame::Shape::NoFrame); m_interfaceFrame->setFrameShape(QFrame::Shape::NoFrame);
m_interfaceFrame->setMinimumSize(FRAME_MIN_SIZE); m_interfaceFrame->setMinimumSize(PASSWORD_FRAME_MIN_SIZE);
m_interfaceFrame->setMaximumSize(CONTECT_FRAME_MAX_SIZE); m_interfaceFrame->setMaximumSize(PASSWORD_FRAME_MAX_SIZE);
QHBoxLayout *interfaceHLayout = new QHBoxLayout(m_interfaceFrame);
m_interfaceLabel = new QLabel(tr("Net card"), this); m_interfaceLabel = new QLabel(tr("Net card"), this);
m_interfaceLabel->setMinimumWidth(LABLE_MIN_WIDTH); m_interfaceLabel->setFixedWidth(LABLE_MIN_WIDTH);
m_interfaceComboBox = new QComboBox(this); m_interfaceComboBox = new QComboBox(this);
m_interfaceComboBox->setInsertPolicy(QComboBox::NoInsert); m_interfaceComboBox->setInsertPolicy(QComboBox::NoInsert);
m_interfaceComboBox->setMinimumWidth(COMBOBOX_MIN_WIDTH); m_interfaceComboBox->setMinimumWidth(COMBOBOX_MIN_WIDTH);
m_interfaceComboBox->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
interfaceHLayout->setContentsMargins(ITEM_MARGINS);
interfaceHLayout->setSpacing(0);
interfaceHLayout->addWidget(m_interfaceLabel);
interfaceHLayout->addWidget(m_interfaceComboBox);
m_interfaceFrame->setLayout(interfaceHLayout); m_warnWidget = new QWidget(this);
m_warnWidget->setFixedHeight(20);
m_warnWidget->setContentsMargins(8,0,0,0);
QHBoxLayout *warnTextHLayout = new QHBoxLayout(m_warnWidget);
QLabel* warnIcon = new QLabel(this);
warnIcon->setContentsMargins(0,0,0,0);
warnIcon->setPixmap(QIcon::fromTheme("dialog-warning").pixmap(16,16));
m_interfaceWarnLabel= new FixLabel(this);
m_interfaceWarnLabel->setFixedHeight(20);
QPalette hintTextColor;
hintTextColor.setColor(QPalette::WindowText, Qt::red);
m_interfaceWarnLabel->setPalette(hintTextColor);
warnTextHLayout->setSpacing(8);
warnTextHLayout->setContentsMargins(0,0,0,0);
warnTextHLayout->addWidget(warnIcon);
warnTextHLayout->addWidget(m_interfaceWarnLabel);
warnIcon->setFixedWidth(16);
m_warnWidget->setLayout(warnTextHLayout);
QGridLayout *interfaceFLayout = new QGridLayout(m_interfaceFrame);
interfaceFLayout->setContentsMargins(PASSWORD_ITEM_MARGINS);
interfaceFLayout->setSpacing(0);
interfaceFLayout->addWidget(m_interfaceLabel, 0, 0);
interfaceFLayout->addWidget(m_interfaceComboBox, 0, 1);
interfaceFLayout->addWidget(m_warnWidget, 1, 1);
m_interfaceFrame->setLayout(interfaceFLayout);
m_warnWidget->hide();
} }
void MobileHotspotWidget::onActivateFailed(QString errorMessage) void MobileHotspotWidget::onActivateFailed(QString errorMessage)
@ -596,6 +686,12 @@ void MobileHotspotWidget::onDeviceNameChanged(QString oldName, QString newName,
m_interfaceName = newName; m_interfaceName = newName;
} }
} }
QTimer::singleShot(100, this, [=]() {
if (m_interfaceComboBox->currentText() == newName) {
updateBandCombox();
}
});
} }
//热点断开 //热点断开
@ -656,7 +752,9 @@ void MobileHotspotWidget::onHotspotActivated(QString devName, QString ssid, QStr
updateBandCombox(); updateBandCombox();
index = m_freqBandComboBox->findText(info.at(1)); index = m_freqBandComboBox->findText(info.at(1));
if (index >= 0) { if (index >= 0) {
m_isUserSelect = false;
m_freqBandComboBox->setCurrentIndex(index); m_freqBandComboBox->setCurrentIndex(index);
m_isUserSelect = true;
} }
m_uuid = uuid; m_uuid = uuid;
} else { } else {
@ -735,6 +833,8 @@ void MobileHotspotWidget::updateBandCombox()
setWidgetHidden(true); setWidgetHidden(true);
return; return;
} }
m_isUserSelect = false;
QMap<QString, int> devCapMap = capReply.value(); QMap<QString, int> devCapMap = capReply.value();
if (devCapMap[m_interfaceName] & 0x02) { if (devCapMap[m_interfaceName] & 0x02) {
m_freqBandComboBox->addItem("2.4GHz"); m_freqBandComboBox->addItem("2.4GHz");
@ -746,6 +846,7 @@ void MobileHotspotWidget::updateBandCombox()
if (index >= 0) { if (index >= 0) {
m_freqBandComboBox->setCurrentIndex(index); m_freqBandComboBox->setCurrentIndex(index);
} }
m_isUserSelect = true;
} }
QFrame* MobileHotspotWidget::myLine() QFrame* MobileHotspotWidget::myLine()

View File

@ -46,8 +46,11 @@
#include "connectdevlistitem.h" #include "connectdevlistitem.h"
#include "blacklistpage.h" #include "blacklistpage.h"
#include "connectdevpage.h" #include "connectdevpage.h"
#include "fixlabel.h"
#include "ukcccommon.h"
using namespace kdk; using namespace kdk;
using namespace ukcc;
class MobileHotspotWidget : public QWidget class MobileHotspotWidget : public QWidget
{ {
@ -71,7 +74,7 @@ private:
QLabel *m_apNameLabel; QLabel *m_apNameLabel;
QLabel *m_pwdLabel; QLabel *m_pwdLabel;
QLabel *m_pwdHintLabel; QLabel *m_pwdHintLabel;
QLabel *m_freqBandLabel; FixLabel *m_freqBandLabel;
QLabel *m_interfaceLabel; QLabel *m_interfaceLabel;
QFrame *switchAndApNameLine; QFrame *switchAndApNameLine;
@ -87,6 +90,9 @@ private:
QComboBox *m_freqBandComboBox; QComboBox *m_freqBandComboBox;
QComboBox *m_interfaceComboBox; QComboBox *m_interfaceComboBox;
FixLabel *m_interfaceWarnLabel;
QWidget* m_warnWidget;
QDBusInterface *m_interface = nullptr; QDBusInterface *m_interface = nullptr;
QString m_interfaceName = ""; QString m_interfaceName = "";
@ -137,6 +143,8 @@ private:
void deleteSettingPathInterface(); void deleteSettingPathInterface();
void initConnectDevPage(); void initConnectDevPage();
void initBlackListPage(); void initBlackListPage();
bool m_isUserSelect = true; //是否用户操作
signals: signals:
private slots: private slots:
@ -157,6 +165,8 @@ private slots:
void onApLineEditTextEdit(QString text); void onApLineEditTextEdit(QString text);
void onPwdTextChanged(); void onPwdTextChanged();
void onInterfaceChanged();
}; };
#endif // MOBILEHOTSPOTWIDGET_H #endif // MOBILEHOTSPOTWIDGET_H

View File

@ -0,0 +1,15 @@
#!/bin/bash
ts_list=(`ls translations/*.ts`)
source /etc/os-release
version=(`echo $ID`)
for ts in "${ts_list[@]}"
do
printf "\nprocess ${ts}\n"
if [ "$version" == "fedora" ] || [ "$version" == "opensuse-leap" ] || [ "$version" == "opensuse-tumbleweed" ];then
lrelease-qt5 "${ts}"
else
lrelease "${ts}"
fi
done

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -56,69 +56,79 @@
<context> <context>
<name>MobileHotspotWidget</name> <name>MobileHotspotWidget</name>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="61"/> <location filename="../mobilehotspotwidget.cpp" line="159"/>
<source>ukui control center</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="64"/>
<source>ukui control center desktop message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="149"/>
<source>wirless switch is close or no wireless device</source> <source>wirless switch is close or no wireless device</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="169"/> <location filename="../mobilehotspotwidget.cpp" line="180"/>
<source>hotpots name or device is invalid</source> <source>hotpots name or device is invalid</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="490"/> <location filename="../mobilehotspotwidget.cpp" line="558"/>
<source>Contains at least 8 characters</source> <source>Contains at least 8 characters</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="223"/> <location filename="../mobilehotspotwidget.cpp" line="233"/>
<source>Hotspot</source> <source>Hotspot</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="310"/> <location filename="../mobilehotspotwidget.cpp" line="64"/>
<location filename="../mobilehotspotwidget.cpp" line="605"/> <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="342"/>
<source>use </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="343"/>
<source> share network, will interrupt local wireless connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="359"/>
<location filename="../mobilehotspotwidget.cpp" line="707"/>
<source>hotspot already close</source> <source>hotspot already close</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="436"/> <location filename="../mobilehotspotwidget.cpp" line="504"/>
<source>Open</source> <source>Open</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="457"/> <location filename="../mobilehotspotwidget.cpp" line="525"/>
<source>Wi-Fi Name</source> <source>Wi-Fi Name</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="478"/> <location filename="../mobilehotspotwidget.cpp" line="546"/>
<source>Password</source> <source>Password</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="519"/> <location filename="../mobilehotspotwidget.cpp" line="590"/>
<source>Frequency band</source> <source>Frequency band</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="545"/> <location filename="../mobilehotspotwidget.cpp" line="614"/>
<source>Net card</source> <source>Net card</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="635"/> <location filename="../mobilehotspotwidget.cpp" line="737"/>
<location filename="../mobilehotspotwidget.cpp" line="643"/> <location filename="../mobilehotspotwidget.cpp" line="745"/>
<source>hotspot already open</source> <source>hotspot already open</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -56,17 +56,15 @@
<context> <context>
<name>MobileHotspotWidget</name> <name>MobileHotspotWidget</name>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="61"/>
<source>ukui control center</source> <source>ukui control center</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="64"/>
<source>ukui control center desktop message</source> <source>ukui control center desktop message</source>
<translation>ukui </translation> <translation type="vanished">ukui </translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="149"/> <location filename="../mobilehotspotwidget.cpp" line="159"/>
<source>wirless switch is close or no wireless device</source> <source>wirless switch is close or no wireless device</source>
<translation></translation> <translation></translation>
</message> </message>
@ -75,7 +73,7 @@
<translation type="vanished"></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="169"/> <location filename="../mobilehotspotwidget.cpp" line="180"/>
<source>hotpots name or device is invalid</source> <source>hotpots name or device is invalid</source>
<translation></translation> <translation></translation>
</message> </message>
@ -88,49 +86,69 @@
<translation type="vanished"> </translation> <translation type="vanished"> </translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="490"/> <location filename="../mobilehotspotwidget.cpp" line="558"/>
<source>Contains at least 8 characters</source> <source>Contains at least 8 characters</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="223"/> <location filename="../mobilehotspotwidget.cpp" line="233"/>
<source>Hotspot</source> <source>Hotspot</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="310"/> <location filename="../mobilehotspotwidget.cpp" line="64"/>
<location filename="../mobilehotspotwidget.cpp" line="605"/> <source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="67"/>
<source>Settings desktop message</source>
<translation> </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="342"/>
<source>use </source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="343"/>
<source> share network, will interrupt local wireless connection</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="359"/>
<location filename="../mobilehotspotwidget.cpp" line="707"/>
<source>hotspot already close</source> <source>hotspot already close</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="436"/> <location filename="../mobilehotspotwidget.cpp" line="504"/>
<source>Open</source> <source>Open</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="457"/> <location filename="../mobilehotspotwidget.cpp" line="525"/>
<source>Wi-Fi Name</source> <source>Wi-Fi Name</source>
<translation>Wi-Fiཡི</translation> <translation>Wi-Fiཡི</translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="478"/> <location filename="../mobilehotspotwidget.cpp" line="546"/>
<source>Password</source> <source>Password</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="519"/> <location filename="../mobilehotspotwidget.cpp" line="590"/>
<source>Frequency band</source> <source>Frequency band</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="545"/> <location filename="../mobilehotspotwidget.cpp" line="614"/>
<source>Net card</source> <source>Net card</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="635"/> <location filename="../mobilehotspotwidget.cpp" line="737"/>
<location filename="../mobilehotspotwidget.cpp" line="643"/> <location filename="../mobilehotspotwidget.cpp" line="745"/>
<source>hotspot already open</source> <source>hotspot already open</source>
<translation></translation> <translation></translation>
</message> </message>

View File

@ -56,69 +56,87 @@
<context> <context>
<name>MobileHotspotWidget</name> <name>MobileHotspotWidget</name>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="61"/>
<source>ukui control center</source> <source>ukui control center</source>
<translation>ukui control center</translation> <translation type="vanished">ukui control center</translation>
</message>
<message>
<source>ukui control center desktop message</source>
<translation type="vanished">ukui control center desktop message</translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="64"/> <location filename="../mobilehotspotwidget.cpp" line="64"/>
<source>ukui control center desktop message</source> <source>Settings</source>
<translation>ukui control center desktop message</translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="149"/> <location filename="../mobilehotspotwidget.cpp" line="67"/>
<source>Settings desktop message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="159"/>
<source>wirless switch is close or no wireless device</source> <source>wirless switch is close or no wireless device</source>
<translation>wirless switch is close or no wireless device</translation> <translation>wirless switch is close or no wireless device</translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="169"/> <location filename="../mobilehotspotwidget.cpp" line="180"/>
<source>hotpots name or device is invalid</source> <source>hotpots name or device is invalid</source>
<translation>hotpots name or device is invalid</translation> <translation>hotpots name or device is invalid</translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="223"/> <location filename="../mobilehotspotwidget.cpp" line="233"/>
<source>Hotspot</source> <source>Hotspot</source>
<translation>Hotspot</translation> <translation>Hotspot</translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="310"/> <location filename="../mobilehotspotwidget.cpp" line="342"/>
<location filename="../mobilehotspotwidget.cpp" line="605"/> <source>use </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="343"/>
<source> share network, will interrupt local wireless connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="359"/>
<location filename="../mobilehotspotwidget.cpp" line="707"/>
<source>hotspot already close</source> <source>hotspot already close</source>
<translation>hotspot already close</translation> <translation>hotspot already close</translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="436"/> <location filename="../mobilehotspotwidget.cpp" line="504"/>
<source>Open</source> <source>Open</source>
<translation>Open</translation> <translation>Open</translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="457"/> <location filename="../mobilehotspotwidget.cpp" line="525"/>
<source>Wi-Fi Name</source> <source>Wi-Fi Name</source>
<translation>Wi-Fi Name</translation> <translation>Wi-Fi Name</translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="478"/> <location filename="../mobilehotspotwidget.cpp" line="546"/>
<source>Password</source> <source>Password</source>
<translation>Password</translation> <translation>Password</translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="490"/> <location filename="../mobilehotspotwidget.cpp" line="558"/>
<source>Contains at least 8 characters</source> <source>Contains at least 8 characters</source>
<translation>Contains at least 8 characters</translation> <translation>Contains at least 8 characters</translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="519"/> <location filename="../mobilehotspotwidget.cpp" line="590"/>
<source>Frequency band</source> <source>Frequency band</source>
<translation>Frequency band</translation> <translation>Frequency band</translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="545"/> <location filename="../mobilehotspotwidget.cpp" line="614"/>
<source>Net card</source> <source>Net card</source>
<translation>Net card</translation> <translation>Net card</translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="635"/> <location filename="../mobilehotspotwidget.cpp" line="737"/>
<location filename="../mobilehotspotwidget.cpp" line="643"/> <location filename="../mobilehotspotwidget.cpp" line="745"/>
<source>hotspot already open</source> <source>hotspot already open</source>
<translation>hotspot already open</translation> <translation>hotspot already open</translation>
</message> </message>

View File

@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="mn">
<context>
<name>BlacklistItem</name>
<message>
<location filename="../blacklistitem.cpp" line="50"/>
<source>Remove</source>
<translation> </translation>
</message>
</context>
<context>
<name>BlacklistPage</name>
<message>
<location filename="../blacklistpage.cpp" line="47"/>
<source>Blacklist</source>
<translation> </translation>
</message>
</context>
<context>
<name>ConnectDevListItem</name>
<message>
<location filename="../connectdevlistitem.cpp" line="50"/>
<source>drag into blacklist</source>
<translation> </translation>
</message>
</context>
<context>
<name>ConnectdevPage</name>
<message>
<location filename="../connectdevpage.cpp" line="48"/>
<source>Connect device</source>
<translation> </translation>
</message>
</context>
<context>
<name>MobileHotspot</name>
<message>
<location filename="../mobilehotspot.cpp" line="35"/>
<source>MobileHotspot</source>
<translation> </translation>
</message>
<message>
<location filename="../mobilehotspot.cpp" line="101"/>
<source>mobilehotspot</source>
<translation> </translation>
<extra-contents_path>/mobilehotspot/mobilehotspot</extra-contents_path>
</message>
<message>
<location filename="../mobilehotspot.cpp" line="103"/>
<source>mobilehotspot open</source>
<translation> </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> </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> </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="558"/>
<source>Contains at least 8 characters</source>
<translation> 8 </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="233"/>
<source>Hotspot</source>
<translation> </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="64"/>
<source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="67"/>
<source>Settings desktop message</source>
<translation> </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="342"/>
<source>use </source>
<translation> </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="343"/>
<source> share network, will interrupt local wireless connection</source>
<translation> </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="359"/>
<location filename="../mobilehotspotwidget.cpp" line="707"/>
<source>hotspot already close</source>
<translation> </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="504"/>
<source>Open</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="525"/>
<source>Wi-Fi Name</source>
<translation>Wi-Fi </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="546"/>
<source>Password</source>
<translation> </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="590"/>
<source>Frequency band</source>
<translation> </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="614"/>
<source>Net card</source>
<translation> </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="737"/>
<location filename="../mobilehotspotwidget.cpp" line="745"/>
<source>hotspot already open</source>
<translation> </translation>
</message>
</context>
</TS>

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -56,69 +56,79 @@
<context> <context>
<name>MobileHotspotWidget</name> <name>MobileHotspotWidget</name>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="61"/> <location filename="../mobilehotspotwidget.cpp" line="159"/>
<source>ukui control center</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="64"/>
<source>ukui control center desktop message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="149"/>
<source>wirless switch is close or no wireless device</source> <source>wirless switch is close or no wireless device</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="169"/> <location filename="../mobilehotspotwidget.cpp" line="180"/>
<source>hotpots name or device is invalid</source> <source>hotpots name or device is invalid</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="490"/> <location filename="../mobilehotspotwidget.cpp" line="558"/>
<source>Contains at least 8 characters</source> <source>Contains at least 8 characters</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="223"/> <location filename="../mobilehotspotwidget.cpp" line="233"/>
<source>Hotspot</source> <source>Hotspot</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="310"/> <location filename="../mobilehotspotwidget.cpp" line="64"/>
<location filename="../mobilehotspotwidget.cpp" line="605"/> <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="342"/>
<source>use </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="343"/>
<source> share network, will interrupt local wireless connection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="359"/>
<location filename="../mobilehotspotwidget.cpp" line="707"/>
<source>hotspot already close</source> <source>hotspot already close</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="436"/> <location filename="../mobilehotspotwidget.cpp" line="504"/>
<source>Open</source> <source>Open</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="457"/> <location filename="../mobilehotspotwidget.cpp" line="525"/>
<source>Wi-Fi Name</source> <source>Wi-Fi Name</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="478"/> <location filename="../mobilehotspotwidget.cpp" line="546"/>
<source>Password</source> <source>Password</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="519"/> <location filename="../mobilehotspotwidget.cpp" line="590"/>
<source>Frequency band</source> <source>Frequency band</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="545"/> <location filename="../mobilehotspotwidget.cpp" line="614"/>
<source>Net card</source> <source>Net card</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="635"/> <location filename="../mobilehotspotwidget.cpp" line="737"/>
<location filename="../mobilehotspotwidget.cpp" line="643"/> <location filename="../mobilehotspotwidget.cpp" line="745"/>
<source>hotspot already open</source> <source>hotspot already open</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -56,17 +56,15 @@
<context> <context>
<name>MobileHotspotWidget</name> <name>MobileHotspotWidget</name>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="61"/>
<source>ukui control center</source> <source>ukui control center</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="64"/>
<source>ukui control center desktop message</source> <source>ukui control center desktop message</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="149"/> <location filename="../mobilehotspotwidget.cpp" line="159"/>
<source>wirless switch is close or no wireless device</source> <source>wirless switch is close or no wireless device</source>
<translation>线线</translation> <translation>线线</translation>
</message> </message>
@ -75,7 +73,7 @@
<translation type="vanished"></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="169"/> <location filename="../mobilehotspotwidget.cpp" line="180"/>
<source>hotpots name or device is invalid</source> <source>hotpots name or device is invalid</source>
<translation></translation> <translation></translation>
</message> </message>
@ -88,49 +86,69 @@
<translation type="vanished"></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="490"/> <location filename="../mobilehotspotwidget.cpp" line="558"/>
<source>Contains at least 8 characters</source> <source>Contains at least 8 characters</source>
<translation>8</translation> <translation>8</translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="223"/> <location filename="../mobilehotspotwidget.cpp" line="233"/>
<source>Hotspot</source> <source>Hotspot</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="310"/> <location filename="../mobilehotspotwidget.cpp" line="64"/>
<location filename="../mobilehotspotwidget.cpp" line="605"/> <source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="67"/>
<source>Settings desktop message</source>
<translation> </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="342"/>
<source>use </source>
<translation>使 </translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="343"/>
<source> share network, will interrupt local wireless connection</source>
<translation> 线</translation>
</message>
<message>
<location filename="../mobilehotspotwidget.cpp" line="359"/>
<location filename="../mobilehotspotwidget.cpp" line="707"/>
<source>hotspot already close</source> <source>hotspot already close</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="436"/> <location filename="../mobilehotspotwidget.cpp" line="504"/>
<source>Open</source> <source>Open</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="457"/> <location filename="../mobilehotspotwidget.cpp" line="525"/>
<source>Wi-Fi Name</source> <source>Wi-Fi Name</source>
<translation>Wi-Fi </translation> <translation>Wi-Fi </translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="478"/> <location filename="../mobilehotspotwidget.cpp" line="546"/>
<source>Password</source> <source>Password</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="519"/> <location filename="../mobilehotspotwidget.cpp" line="590"/>
<source>Frequency band</source> <source>Frequency band</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="545"/> <location filename="../mobilehotspotwidget.cpp" line="614"/>
<source>Net card</source> <source>Net card</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../mobilehotspotwidget.cpp" line="635"/> <location filename="../mobilehotspotwidget.cpp" line="737"/>
<location filename="../mobilehotspotwidget.cpp" line="643"/> <location filename="../mobilehotspotwidget.cpp" line="745"/>
<source>hotspot already open</source> <source>hotspot already open</source>
<translation></translation> <translation></translation>
</message> </message>

View File

@ -143,13 +143,12 @@ void LanItem::onDeletetTriggered()
void LanItem::paintEvent(QPaintEvent *event) void LanItem::paintEvent(QPaintEvent *event)
{ {
QPalette pal = qApp->palette();
QPainter painter(this); QPainter painter(this);
painter.setRenderHint(QPainter:: Antialiasing, true); //设置渲染,启动反锯齿 painter.setRenderHint(QPainter:: Antialiasing, true); //设置渲染,启动反锯齿
painter.setPen(Qt::NoPen); painter.setPen(Qt::NoPen);
painter.setBrush(this->palette().base().color()); painter.setBrush(this->palette().base().color());
QPalette pal = qApp->palette();
QColor color = pal.color(QPalette::Button); QColor color = pal.color(QPalette::Button);
color.setAlphaF(0.5); color.setAlphaF(0.5);
pal.setColor(QPalette::Button, color); pal.setColor(QPalette::Button, color);
@ -165,7 +164,7 @@ bool LanItem::eventFilter(QObject *watched, QEvent *event)
{ {
//菜单右边界与按钮右边界对齐 //菜单右边界与按钮右边界对齐
if (event->type() == QEvent::Show && watched == m_moreMenu) { if (event->type() == QEvent::Show && watched == m_moreMenu) {
int menuXPos = m_moreMenu->pos().x(); int menuXPos = mapToGlobal(m_moreButton->pos()).x();
int menuWidth = m_moreMenu->size().width(); int menuWidth = m_moreMenu->size().width();
int btnWidth = m_moreButton->size().width(); int btnWidth = m_moreButton->size().width();

View File

@ -63,10 +63,10 @@ void NetConnect::showDesktopNotify(const QString &message)
"org.freedesktop.Notifications", "org.freedesktop.Notifications",
QDBusConnection::sessionBus()); QDBusConnection::sessionBus());
QList<QVariant> args; QList<QVariant> args;
args<<(tr("ukui control center")) args<<(tr("Settings"))
<<((unsigned int) 0) <<((unsigned int) 0)
<<QString("gnome-dev-ethernet") <<QString("gnome-dev-ethernet")
<<tr("ukui control center desktop message") //显示的是什么类型的信息 <<tr("Settings desktop message") //显示的是什么类型的信息
<<message //显示的具体信息 <<message //显示的具体信息
<<QStringList() <<QStringList()
<<QVariantMap() <<QVariantMap()
@ -167,11 +167,13 @@ bool NetConnect::eventFilter(QObject *w, QEvent *e) {
if (w->findChild<QWidget*>()) if (w->findChild<QWidget*>())
w->findChild<QWidget*>()->setStyleSheet("QWidget{background: palette(base);border-radius:4px;}"); w->findChild<QWidget*>()->setStyleSheet("QWidget{background: palette(base);border-radius:4px;}");
} }
// if (w == wiredSwitch) { // if (w == wiredSwitch) {
// if (e->type() == QMouseEvent::MouseButtonRelease) { // if (e->type() == QMouseEvent::MouseButtonRelease) {
// if (!wiredSwitch->isCheckable()) { // if (!wiredSwitch->isCheckable()) {
// showDesktopNotify(tr("No ethernet device avaliable")); // showDesktopNotify(tr("No ethernet device avaliable"));
// } else { // } else {
// UkccCommon::buriedSettings(QString("netconnect"), QString("Open"), QString("settings"),wiredSwitch->isChecked()?"false":"true");
// if (m_interface != nullptr && m_interface->isValid()) { // if (m_interface != nullptr && m_interface->isValid()) {
// m_interface->call(QStringLiteral("setWiredSwitchEnable"), !wiredSwitch->isChecked()); // m_interface->call(QStringLiteral("setWiredSwitchEnable"), !wiredSwitch->isChecked());
// } // }
@ -242,6 +244,7 @@ void NetConnect::initComponent() {
connect(ui->detailBtn, &QPushButton::clicked, this, [=](bool checked) { connect(ui->detailBtn, &QPushButton::clicked, this, [=](bool checked) {
Q_UNUSED(checked) Q_UNUSED(checked)
UkccCommon::buriedSettings(QString("netconnect"), QString("Advanced settings"), QString("clicked"));
runExternalApp(); runExternalApp();
}); });
} }
@ -468,6 +471,7 @@ void NetConnect::addLanItem(ItemFrame *frame, QString devName, QStringList infoL
if (m_interface == nullptr || !m_interface->isValid()) { if (m_interface == nullptr || !m_interface->isValid()) {
return; return;
} }
UkccCommon::buriedSettings(QString("netconnect"), QString("info"), QString("clicked"));
qDebug() << "[NetConnect]call showPropertyWidget" << __LINE__; qDebug() << "[NetConnect]call showPropertyWidget" << __LINE__;
m_interface->call(QStringLiteral("showPropertyWidget"), devName, infoList.at(1)); m_interface->call(QStringLiteral("showPropertyWidget"), devName, infoList.at(1));
qDebug() << "[NetConnect]call showPropertyWidget respond" << __LINE__; qDebug() << "[NetConnect]call showPropertyWidget respond" << __LINE__;
@ -541,6 +545,7 @@ void NetConnect::addDeviceFrame(QString devName)
qDebug() << "[NetConnect]deviceFrameMap insert" << devName; qDebug() << "[NetConnect]deviceFrameMap insert" << devName;
// connect(itemFrame->deviceFrame, &DeviceFrame::deviceSwitchClicked ,this, [=] (bool checked) { // connect(itemFrame->deviceFrame, &DeviceFrame::deviceSwitchClicked ,this, [=] (bool checked) {
// UkccCommon::buriedSettings(QString("netconnect"), "device open", QString("settings"), checked?"true":"fasle");
// qDebug() << "[NetConnect]call setDeviceEnable" << devName << checked << __LINE__; // qDebug() << "[NetConnect]call setDeviceEnable" << devName << checked << __LINE__;
// m_interface->call(QStringLiteral("setDeviceEnable"), devName, checked); // m_interface->call(QStringLiteral("setDeviceEnable"), devName, checked);
// qDebug() << "[NetConnect]call setDeviceEnable Respond" << __LINE__; // qDebug() << "[NetConnect]call setDeviceEnable Respond" << __LINE__;
@ -565,6 +570,7 @@ void NetConnect::addDeviceFrame(QString devName)
// }); // });
connect(itemFrame->addLanWidget, &AddNetBtn::clicked, this, [=](){ connect(itemFrame->addLanWidget, &AddNetBtn::clicked, this, [=](){
UkccCommon::buriedSettings(pluginName, "Add net", QString("clicked"));
if (m_interface != nullptr && m_interface->isValid()) { if (m_interface != nullptr && m_interface->isValid()) {
qDebug() << "[NetConnect]call showCreateWiredConnectWidget" << devName << __LINE__; qDebug() << "[NetConnect]call showCreateWiredConnectWidget" << devName << __LINE__;
m_interface->call(QStringLiteral("showCreateWiredConnectWidget"), devName); m_interface->call(QStringLiteral("showCreateWiredConnectWidget"), devName);
@ -765,6 +771,7 @@ void NetConnect::addOneLanFrame(ItemFrame *frame, QString deviceName, QStringLis
if (m_interface == nullptr || !m_interface->isValid()) { if (m_interface == nullptr || !m_interface->isValid()) {
return; return;
} }
UkccCommon::buriedSettings(QString("netconnect"), QString("info"), QString("clicked"));
qDebug() << "[NetConnect]call showPropertyWidget" << deviceName << connUuid << __LINE__; qDebug() << "[NetConnect]call showPropertyWidget" << deviceName << connUuid << __LINE__;
m_interface->call(QStringLiteral("showPropertyWidget"), deviceName, connUuid); m_interface->call(QStringLiteral("showPropertyWidget"), deviceName, connUuid);
qDebug() << "[NetConnect]call showPropertyWidget respond" << __LINE__; qDebug() << "[NetConnect]call showPropertyWidget respond" << __LINE__;
@ -908,7 +915,6 @@ void NetConnect::itemActiveConnectionStatusChanged(LanItem *item, int status)
item->statusLabel->setText(tr("not connected")); item->statusLabel->setText(tr("not connected"));
} }
item->setConnectActionText(item->isAcitve); item->setConnectActionText(item->isAcitve);
// QIcon searchIcon = QIcon::fromTheme(iconPath); // QIcon searchIcon = QIcon::fromTheme(iconPath);
// item->iconLabel->setPixmap(searchIcon.pixmap(searchIcon.actualSize(QSize(24, 24)))); // item->iconLabel->setPixmap(searchIcon.pixmap(searchIcon.actualSize(QSize(24, 24))));
} }

View File

@ -54,8 +54,10 @@
#include "itemframe.h" #include "itemframe.h"
#include "kwidget.h" #include "kwidget.h"
#include "kswitchbutton.h" #include "kswitchbutton.h"
#include "ukcccommon.h"
using namespace kdk; using namespace kdk;
using namespace ukcc;
enum { enum {
DISCONNECTED, DISCONNECTED,
@ -100,7 +102,6 @@ private:
int getInsertPos(QString connName, QString deviceName); int getInsertPos(QString connName, QString deviceName);
void deleteOneLan(QString ssid, int type); void deleteOneLan(QString ssid, int type);
void activeConnect(QString ssid, QString deviceName, int type); void activeConnect(QString ssid, QString deviceName, int type);
void deActiveConnect(QString ssid, QString deviceName, int type); void deActiveConnect(QString ssid, QString deviceName, int type);

View File

@ -7,6 +7,11 @@ include(../component/addbtn.pri)
TARGET = $$qtLibraryTarget(netconnect) TARGET = $$qtLibraryTarget(netconnect)
DESTDIR = ../.. DESTDIR = ../..
CONFIG(release, debug|release) {
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
}
target.path = $$[QT_INSTALL_LIBS]/ukui-control-center target.path = $$[QT_INSTALL_LIBS]/ukui-control-center
trans.files = translations/* trans.files = translations/*
trans.path = /usr/share/kylin-nm/netconnect/ trans.path = /usr/share/kylin-nm/netconnect/
@ -52,4 +57,5 @@ TRANSLATIONS += \
translations/tr.ts \ translations/tr.ts \
translations/bo.ts \ translations/bo.ts \
translations/bo_CN.ts \ translations/bo_CN.ts \
translations/en_US.ts translations/en_US.ts \
translations/mn.ts

View File

@ -0,0 +1,15 @@
#!/bin/bash
ts_list=(`ls translations/*.ts`)
source /etc/os-release
version=(`echo $ID`)
for ts in "${ts_list[@]}"
do
printf "\nprocess ${ts}\n"
if [ "$version" == "fedora" ] || [ "$version" == "opensuse-leap" ] || [ "$version" == "opensuse-tumbleweed" ];then
lrelease-qt5 "${ts}"
else
lrelease "${ts}"
fi
done

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -22,14 +22,14 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../lanitem.cpp" line="120"/> <location filename="../lanitem.cpp" line="118"/>
<location filename="../lanitem.cpp" line="133"/> <location filename="../lanitem.cpp" line="131"/>
<source>Disconnect</source> <source>Disconnect</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../lanitem.cpp" line="122"/> <location filename="../lanitem.cpp" line="120"/>
<location filename="../lanitem.cpp" line="131"/> <location filename="../lanitem.cpp" line="129"/>
<source>Connect</source> <source>Connect</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -43,54 +43,49 @@
</message> </message>
<message> <message>
<location filename="../netconnect.ui" line="112"/> <location filename="../netconnect.ui" line="112"/>
<location filename="../netconnect.cpp" line="158"/> <location filename="../netconnect.cpp" line="159"/>
<source>open</source> <source>open</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
<extra-contents_path>/netconnect/open</extra-contents_path> <extra-contents_path>/netconnect/open</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../netconnect.ui" line="198"/> <location filename="../netconnect.ui" line="198"/>
<location filename="../netconnect.cpp" line="155"/> <location filename="../netconnect.cpp" line="156"/>
<source>Advanced settings</source> <source>Advanced settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
<extra-contents_path>/netconnect/Advanced settings&quot;</extra-contents_path> <extra-contents_path>/netconnect/Advanced settings&quot;</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="67"/> <location filename="../netconnect.cpp" line="66"/>
<source>ukui control center</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="70"/> <location filename="../netconnect.cpp" line="69"/>
<source>ukui control center desktop message</source> <source>Settings desktop message</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="84"/> <location filename="../netconnect.cpp" line="83"/>
<location filename="../netconnect.cpp" line="156"/> <location filename="../netconnect.cpp" line="157"/>
<source>LAN</source> <source>LAN</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="172"/> <location filename="../netconnect.cpp" line="455"/>
<source>No ethernet device avaliable</source> <location filename="../netconnect.cpp" line="905"/>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../netconnect.cpp" line="450"/>
<location filename="../netconnect.cpp" line="896"/>
<source>connected</source> <source>connected</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="452"/> <location filename="../netconnect.cpp" line="457"/>
<location filename="../netconnect.cpp" line="749"/> <location filename="../netconnect.cpp" line="757"/>
<location filename="../netconnect.cpp" line="906"/> <location filename="../netconnect.cpp" line="915"/>
<source>not connected</source> <source>not connected</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="528"/> <location filename="../netconnect.cpp" line="534"/>
<source>card</source> <source>card</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -6,7 +6,7 @@
<message> <message>
<location filename="../../component/AddBtn/addnetbtn.cpp" line="44"/> <location filename="../../component/AddBtn/addnetbtn.cpp" line="44"/>
<source>Add Others</source> <source>Add Others</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../component/AddBtn/addnetbtn.cpp" line="48"/> <location filename="../../component/AddBtn/addnetbtn.cpp" line="48"/>
@ -19,19 +19,19 @@
<message> <message>
<location filename="../lanitem.cpp" line="57"/> <location filename="../lanitem.cpp" line="57"/>
<source>Delete</source> <source>Delete</source>
<translation></translation> <translation></translation>
</message>
<message>
<location filename="../lanitem.cpp" line="118"/>
<location filename="../lanitem.cpp" line="131"/>
<source>Disconnect</source>
<translation></translation>
</message> </message>
<message> <message>
<location filename="../lanitem.cpp" line="120"/> <location filename="../lanitem.cpp" line="120"/>
<location filename="../lanitem.cpp" line="133"/> <location filename="../lanitem.cpp" line="129"/>
<source>Disconnect</source>
<translation></translation>
</message>
<message>
<location filename="../lanitem.cpp" line="122"/>
<location filename="../lanitem.cpp" line="131"/>
<source>Connect</source> <source>Connect</source>
<translation></translation> <translation></translation>
</message> </message>
</context> </context>
<context> <context>
@ -43,58 +43,65 @@
</message> </message>
<message> <message>
<location filename="../netconnect.ui" line="112"/> <location filename="../netconnect.ui" line="112"/>
<location filename="../netconnect.cpp" line="158"/> <location filename="../netconnect.cpp" line="159"/>
<source>open</source> <source>open</source>
<translation></translation> <translation></translation>
<extra-contents_path>/netconnect/open</extra-contents_path> <extra-contents_path>/netconnect/open</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../netconnect.ui" line="198"/> <location filename="../netconnect.ui" line="198"/>
<location filename="../netconnect.cpp" line="155"/> <location filename="../netconnect.cpp" line="156"/>
<source>Advanced settings</source> <source>Advanced settings</source>
<translation></translation> <translation></translation>
<extra-contents_path>/netconnect/Advanced settings&quot;</extra-contents_path> <extra-contents_path>/netconnect/Advanced settings&quot;</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="67"/>
<source>ukui control center</source> <source>ukui control center</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="70"/>
<source>ukui control center desktop message</source> <source>ukui control center desktop message</source>
<translation>ukui </translation> <translation type="vanished">ukui </translation>
</message> </message>
<message> <message>
<source>WiredConnect</source> <source>WiredConnect</source>
<translation type="vanished"></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="84"/> <location filename="../netconnect.cpp" line="66"/>
<location filename="../netconnect.cpp" line="156"/> <source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../netconnect.cpp" line="69"/>
<source>Settings desktop message</source>
<translation> </translation>
</message>
<message>
<location filename="../netconnect.cpp" line="83"/>
<location filename="../netconnect.cpp" line="157"/>
<source>LAN</source> <source>LAN</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="172"/>
<source>No ethernet device avaliable</source> <source>No ethernet device avaliable</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="450"/> <location filename="../netconnect.cpp" line="455"/>
<location filename="../netconnect.cpp" line="896"/> <location filename="../netconnect.cpp" line="905"/>
<source>connected</source> <source>connected</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="452"/> <location filename="../netconnect.cpp" line="457"/>
<location filename="../netconnect.cpp" line="749"/> <location filename="../netconnect.cpp" line="757"/>
<location filename="../netconnect.cpp" line="906"/> <location filename="../netconnect.cpp" line="915"/>
<source>not connected</source> <source>not connected</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="528"/> <location filename="../netconnect.cpp" line="534"/>
<source>card</source> <source>card</source>
<translation></translation> <translation></translation>
</message> </message>

View File

@ -22,14 +22,14 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../lanitem.cpp" line="120"/> <location filename="../lanitem.cpp" line="118"/>
<location filename="../lanitem.cpp" line="133"/> <location filename="../lanitem.cpp" line="131"/>
<source>Disconnect</source> <source>Disconnect</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../lanitem.cpp" line="122"/> <location filename="../lanitem.cpp" line="120"/>
<location filename="../lanitem.cpp" line="131"/> <location filename="../lanitem.cpp" line="129"/>
<source>Connect</source> <source>Connect</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -43,54 +43,61 @@
</message> </message>
<message> <message>
<location filename="../netconnect.ui" line="112"/> <location filename="../netconnect.ui" line="112"/>
<location filename="../netconnect.cpp" line="158"/> <location filename="../netconnect.cpp" line="159"/>
<source>open</source> <source>open</source>
<translation>open</translation> <translation>open</translation>
<extra-contents_path>/netconnect/open</extra-contents_path> <extra-contents_path>/netconnect/open</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../netconnect.ui" line="198"/> <location filename="../netconnect.ui" line="198"/>
<location filename="../netconnect.cpp" line="155"/> <location filename="../netconnect.cpp" line="156"/>
<source>Advanced settings</source> <source>Advanced settings</source>
<translation>Advanced settings</translation> <translation>Advanced settings</translation>
<extra-contents_path>/netconnect/Advanced settings&quot;</extra-contents_path> <extra-contents_path>/netconnect/Advanced settings&quot;</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="67"/>
<source>ukui control center</source> <source>ukui control center</source>
<translation>ukui control center</translation> <translation type="vanished">ukui control center</translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="70"/>
<source>ukui control center desktop message</source> <source>ukui control center desktop message</source>
<translation>ukui control center desktop message</translation> <translation type="vanished">ukui control center desktop message</translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="84"/> <location filename="../netconnect.cpp" line="66"/>
<location filename="../netconnect.cpp" line="156"/> <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="83"/>
<location filename="../netconnect.cpp" line="157"/>
<source>LAN</source> <source>LAN</source>
<translation>LAN</translation> <translation>LAN</translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="172"/>
<source>No ethernet device avaliable</source> <source>No ethernet device avaliable</source>
<translation>No ethernet device avaliable</translation> <translation type="vanished">No ethernet device avaliable</translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="450"/> <location filename="../netconnect.cpp" line="455"/>
<location filename="../netconnect.cpp" line="896"/> <location filename="../netconnect.cpp" line="905"/>
<source>connected</source> <source>connected</source>
<translation>connected</translation> <translation>connected</translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="452"/> <location filename="../netconnect.cpp" line="457"/>
<location filename="../netconnect.cpp" line="749"/> <location filename="../netconnect.cpp" line="757"/>
<location filename="../netconnect.cpp" line="906"/> <location filename="../netconnect.cpp" line="915"/>
<source>not connected</source> <source>not connected</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="528"/> <location filename="../netconnect.cpp" line="534"/>
<source>card</source> <source>card</source>
<translation>card</translation> <translation>card</translation>
</message> </message>

View File

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="mn">
<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>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> </translation>
</message>
<message>
<location filename="../netconnect.ui" line="112"/>
<location filename="../netconnect.cpp" line="159"/>
<source>open</source>
<translation></translation>
<extra-contents_path>/netconnect/open</extra-contents_path>
</message>
<message>
<location filename="../netconnect.ui" line="198"/>
<location filename="../netconnect.cpp" line="156"/>
<source>Advanced settings</source>
<translation> </translation>
<extra-contents_path>/netconnect/Advanced settings&quot;</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></translation>
</message>
<message>
<location filename="../netconnect.cpp" line="69"/>
<source>Settings desktop message</source>
<translation> </translation>
</message>
<message>
<location filename="../netconnect.cpp" line="83"/>
<location filename="../netconnect.cpp" line="157"/>
<source>LAN</source>
<translation> </translation>
</message>
<message>
<source>No ethernet device avaliable</source>
<translation type="vanished"> </translation>
</message>
<message>
<location filename="../netconnect.cpp" line="455"/>
<location filename="../netconnect.cpp" line="905"/>
<source>connected</source>
<translation> </translation>
</message>
<message>
<location filename="../netconnect.cpp" line="457"/>
<location filename="../netconnect.cpp" line="757"/>
<location filename="../netconnect.cpp" line="915"/>
<source>not connected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../netconnect.cpp" line="534"/>
<source>card</source>
<translation> </translation>
</message>
</context>
</TS>

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -22,14 +22,14 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../lanitem.cpp" line="120"/> <location filename="../lanitem.cpp" line="118"/>
<location filename="../lanitem.cpp" line="133"/> <location filename="../lanitem.cpp" line="131"/>
<source>Disconnect</source> <source>Disconnect</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../lanitem.cpp" line="122"/> <location filename="../lanitem.cpp" line="120"/>
<location filename="../lanitem.cpp" line="131"/> <location filename="../lanitem.cpp" line="129"/>
<source>Connect</source> <source>Connect</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -43,54 +43,49 @@
</message> </message>
<message> <message>
<location filename="../netconnect.ui" line="112"/> <location filename="../netconnect.ui" line="112"/>
<location filename="../netconnect.cpp" line="158"/> <location filename="../netconnect.cpp" line="159"/>
<source>open</source> <source>open</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
<extra-contents_path>/netconnect/open</extra-contents_path> <extra-contents_path>/netconnect/open</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../netconnect.ui" line="198"/> <location filename="../netconnect.ui" line="198"/>
<location filename="../netconnect.cpp" line="155"/> <location filename="../netconnect.cpp" line="156"/>
<source>Advanced settings</source> <source>Advanced settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
<extra-contents_path>/netconnect/Advanced settings&quot;</extra-contents_path> <extra-contents_path>/netconnect/Advanced settings&quot;</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="67"/> <location filename="../netconnect.cpp" line="66"/>
<source>ukui control center</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="70"/> <location filename="../netconnect.cpp" line="69"/>
<source>ukui control center desktop message</source> <source>Settings desktop message</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="84"/> <location filename="../netconnect.cpp" line="83"/>
<location filename="../netconnect.cpp" line="156"/> <location filename="../netconnect.cpp" line="157"/>
<source>LAN</source> <source>LAN</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="172"/> <location filename="../netconnect.cpp" line="455"/>
<source>No ethernet device avaliable</source> <location filename="../netconnect.cpp" line="905"/>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../netconnect.cpp" line="450"/>
<location filename="../netconnect.cpp" line="896"/>
<source>connected</source> <source>connected</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="452"/> <location filename="../netconnect.cpp" line="457"/>
<location filename="../netconnect.cpp" line="749"/> <location filename="../netconnect.cpp" line="757"/>
<location filename="../netconnect.cpp" line="906"/> <location filename="../netconnect.cpp" line="915"/>
<source>not connected</source> <source>not connected</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="528"/> <location filename="../netconnect.cpp" line="534"/>
<source>card</source> <source>card</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -6,7 +6,7 @@
<message> <message>
<location filename="../../component/AddBtn/addnetbtn.cpp" line="44"/> <location filename="../../component/AddBtn/addnetbtn.cpp" line="44"/>
<source>Add Others</source> <source>Add Others</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../component/AddBtn/addnetbtn.cpp" line="48"/> <location filename="../../component/AddBtn/addnetbtn.cpp" line="48"/>
@ -22,14 +22,14 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../lanitem.cpp" line="120"/> <location filename="../lanitem.cpp" line="118"/>
<location filename="../lanitem.cpp" line="133"/> <location filename="../lanitem.cpp" line="131"/>
<source>Disconnect</source> <source>Disconnect</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../lanitem.cpp" line="122"/> <location filename="../lanitem.cpp" line="120"/>
<location filename="../lanitem.cpp" line="131"/> <location filename="../lanitem.cpp" line="129"/>
<source>Connect</source> <source>Connect</source>
<translation></translation> <translation></translation>
</message> </message>
@ -43,58 +43,65 @@
</message> </message>
<message> <message>
<location filename="../netconnect.ui" line="112"/> <location filename="../netconnect.ui" line="112"/>
<location filename="../netconnect.cpp" line="158"/> <location filename="../netconnect.cpp" line="159"/>
<source>open</source> <source>open</source>
<translation></translation> <translation></translation>
<extra-contents_path>/netconnect/open</extra-contents_path> <extra-contents_path>/netconnect/open</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../netconnect.ui" line="198"/> <location filename="../netconnect.ui" line="198"/>
<location filename="../netconnect.cpp" line="155"/> <location filename="../netconnect.cpp" line="156"/>
<source>Advanced settings</source> <source>Advanced settings</source>
<translation></translation> <translation></translation>
<extra-contents_path>/netconnect/Advanced settings&quot;</extra-contents_path> <extra-contents_path>/netconnect/Advanced settings&quot;</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="67"/>
<source>ukui control center</source> <source>ukui control center</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="70"/>
<source>ukui control center desktop message</source> <source>ukui control center desktop message</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<source>WiredConnect</source> <source>WiredConnect</source>
<translation type="vanished">线</translation> <translation type="vanished">线</translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="84"/> <location filename="../netconnect.cpp" line="66"/>
<location filename="../netconnect.cpp" line="156"/> <source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../netconnect.cpp" line="69"/>
<source>Settings desktop message</source>
<translation> </translation>
</message>
<message>
<location filename="../netconnect.cpp" line="83"/>
<location filename="../netconnect.cpp" line="157"/>
<source>LAN</source> <source>LAN</source>
<translation>线</translation> <translation>线</translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="172"/>
<source>No ethernet device avaliable</source> <source>No ethernet device avaliable</source>
<translation>线</translation> <translation type="vanished">线</translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="450"/> <location filename="../netconnect.cpp" line="455"/>
<location filename="../netconnect.cpp" line="896"/> <location filename="../netconnect.cpp" line="905"/>
<source>connected</source> <source>connected</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="452"/> <location filename="../netconnect.cpp" line="457"/>
<location filename="../netconnect.cpp" line="749"/> <location filename="../netconnect.cpp" line="757"/>
<location filename="../netconnect.cpp" line="906"/> <location filename="../netconnect.cpp" line="915"/>
<source>not connected</source> <source>not connected</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../netconnect.cpp" line="528"/> <location filename="../netconnect.cpp" line="534"/>
<source>card</source> <source>card</source>
<translation></translation> <translation></translation>
</message> </message>

View File

@ -43,12 +43,11 @@ void AppListWidget::setAppChecked(bool flag)
/** /**
* @brief AppListWidget::setAppIcon * @brief AppListWidget::setAppIcon
* @param icon * @param icon
*/ */
void AppListWidget::setAppIcon(const QPixmap &icon) void AppListWidget::setAppIcon(const QIcon &icon)
{ {
m_iconLabel->setAlignment(Qt::AlignCenter); m_iconBtn->setIcon(icon);
m_iconLabel->setPixmap(icon);
} }
/** /**
@ -119,13 +118,19 @@ void AppListWidget::initUI()
mainLayout->setSpacing(8); mainLayout->setSpacing(8);
m_checkBox = new QCheckBox(this); m_checkBox = new QCheckBox(this);
m_checkBox->setAttribute(Qt::WA_TransparentForMouseEvents, true); //m_checkBox不响应鼠标事件,将其传递给父窗口 m_checkBox->setAttribute(Qt::WA_TransparentForMouseEvents, true); //m_checkBox不响应鼠标事件,将其传递给父窗口
m_iconLabel = new QLabel(this);
m_iconLabel->setFixedSize(24, 24); m_iconBtn = new QToolButton(this);
m_iconBtn->setToolButtonStyle(Qt::ToolButtonStyle::ToolButtonIconOnly);
m_iconBtn->setAttribute(Qt::WA_TranslucentBackground, true); //透明
m_iconBtn->setAttribute(Qt::WA_TransparentForMouseEvents, true);
m_iconBtn->setAutoRaise(true);
m_iconBtn->setFixedSize(24, 24);
m_iconBtn->setIconSize(QSize(24, 24));
m_nameLabel = new QLabel(this); m_nameLabel = new QLabel(this);
mainLayout->addWidget(m_checkBox); mainLayout->addWidget(m_checkBox);
mainLayout->addSpacing(8); mainLayout->addWidget(m_iconBtn);
mainLayout->addWidget(m_iconLabel);
mainLayout->addWidget(m_nameLabel); mainLayout->addWidget(m_nameLabel);
mainLayout->addStretch(); mainLayout->addStretch();
} }

View File

@ -28,6 +28,7 @@
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QDBusInterface> #include <QDBusInterface>
#include <QDBusReply> #include <QDBusReply>
#include <QToolButton>
class AppListWidget : public QWidget class AppListWidget : public QWidget
{ {
@ -37,7 +38,7 @@ public:
~AppListWidget(); ~AppListWidget();
void setAppChecked(bool flag); void setAppChecked(bool flag);
void setAppIcon(const QPixmap &icon); void setAppIcon(const QIcon &icon);
void setAppName(const QString &text); void setAppName(const QString &text);
void onAppCheckStateChanged(); void onAppCheckStateChanged();
void AddAppProxyConfig(); void AddAppProxyConfig();
@ -51,7 +52,7 @@ private:
void initDbus(); void initDbus();
QCheckBox *m_checkBox = nullptr; QCheckBox *m_checkBox = nullptr;
QLabel *m_iconLabel = nullptr; QToolButton *m_iconBtn = nullptr;
QLabel *m_nameLabel = nullptr; QLabel *m_nameLabel = nullptr;
QString m_path = nullptr; QString m_path = nullptr;
QDBusInterface *m_dbusInterface = nullptr; QDBusInterface *m_dbusInterface = nullptr;

View File

@ -40,7 +40,7 @@ AptProxyDialog::~AptProxyDialog()
void AptProxyDialog::initUi() void AptProxyDialog::initUi()
{ {
setWindowTitle(tr("Set Apt Proxy")); setWindowTitle(tr("Set APT Proxy"));
this->setFixedSize(480, 200); this->setFixedSize(480, 200);
QVBoxLayout *mAptProxyLyt = new QVBoxLayout(this); QVBoxLayout *mAptProxyLyt = new QVBoxLayout(this);

View File

@ -127,6 +127,7 @@ QWidget *Proxy::pluginUi() {
} else { } else {
qCritical() << "Xml needed by Proxy is not installed"; qCritical() << "Xml needed by Proxy is not installed";
} }
setUkccProxySettings();
} }
return pluginWidget; return pluginWidget;
} }
@ -428,14 +429,22 @@ void Proxy::initUi(QWidget *widget)
AptLayout->addWidget(line_7); AptLayout->addWidget(line_7);
AptLayout->addWidget(mAPTFrame_2); AptLayout->addWidget(mAPTFrame_2);
m_sysSpacerFrame = new QFrame(widget);
m_sysSpacerFrame->setFixedHeight(32);
m_appListSpacerFrame = new QFrame(widget);
m_appListSpacerFrame->setFixedHeight(4);
m_appSpacerFrame = new QFrame(widget);;
m_appSpacerFrame->setFixedHeight(32);;
mverticalLayout->addWidget(mTitleLabel); mverticalLayout->addWidget(mTitleLabel);
mverticalLayout->addWidget(mProxyFrame); mverticalLayout->addWidget(mProxyFrame);
mverticalLayout->addSpacing(32);
mverticalLayout->addWidget(m_sysSpacerFrame);
// mverticalLayout->addWidget(m_appProxyLabel); // mverticalLayout->addWidget(m_appProxyLabel);
// mverticalLayout->addWidget(m_appProxyFrame); // mverticalLayout->addWidget(m_appProxyFrame);
mverticalLayout->addSpacing(4); mverticalLayout->addWidget(m_appListSpacerFrame);
// mverticalLayout->addWidget(m_appListFrame); // mverticalLayout->addWidget(m_appListFrame);
// mverticalLayout->addSpacing(32); // mverticalLayout->addWidget(m_appSpacerFrame);
mverticalLayout->addWidget(mAptProxyLabel); mverticalLayout->addWidget(mAptProxyLabel);
mverticalLayout->addWidget(mAPTFrame); mverticalLayout->addWidget(mAPTFrame);
mverticalLayout->addStretch(); mverticalLayout->addStretch();
@ -464,8 +473,11 @@ void Proxy::retranslateUi()
mSOCKSPortLabel->setText(tr("Port")); mSOCKSPortLabel->setText(tr("Port"));
mIgnoreLabel->setText(tr("List of ignored hosts. more than one entry, please separate with english semicolon(;)")); mIgnoreLabel->setText(tr("List of ignored hosts. more than one entry, please separate with english semicolon(;)"));
//~ contents_path /Proxy/Apt Proxy //~ contents_path /Proxy/App Proxy
mAptProxyLabel->setText(tr("Apt Proxy")); tr("App Proxy");
//~ contents_path /Proxy/APT Proxy
mAptProxyLabel->setText(tr("APT Proxy"));
mAptLabel->setText(tr("Open")); mAptLabel->setText(tr("Open"));
mAPTHostLabel_1->setText(tr("Server Address : ")); mAPTHostLabel_1->setText(tr("Server Address : "));
mAPTPortLabel_1->setText(tr("Port : ")); mAPTPortLabel_1->setText(tr("Port : "));
@ -517,6 +529,7 @@ void Proxy::setupComponent(){
void Proxy::setupConnect(){ void Proxy::setupConnect(){
connect(mEnableBtn, &KSwitchButton::stateChanged, this ,[=](bool checked) { connect(mEnableBtn, &KSwitchButton::stateChanged, this ,[=](bool checked) {
UkccCommon::buriedSettings(QString("Proxy"), QString("System Proxy Open"), QString("settings"), checked?"true":"false");
mSelectFrame->setVisible(checked); mSelectFrame->setVisible(checked);
line_8->setVisible(checked); line_8->setVisible(checked);
mAutoBtn->setChecked(checked); mAutoBtn->setChecked(checked);
@ -530,9 +543,11 @@ void Proxy::setupConnect(){
connect(mProxyBtnGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked), [=](QAbstractButton * eBtn){ connect(mProxyBtnGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked), [=](QAbstractButton * eBtn){
if (eBtn == mAutoBtn) { if (eBtn == mAutoBtn) {
UkccCommon::buriedSettings(QString("Proxy"), QString("auto"), QString("clicked"));
mManualBtn->setChecked(false); mManualBtn->setChecked(false);
proxysettings->set(PROXY_MODE_KEY,"auto"); proxysettings->set(PROXY_MODE_KEY,"auto");
} else if (eBtn == mManualBtn){ } else if (eBtn == mManualBtn){
UkccCommon::buriedSettings(QString("Proxy"), QString("manual"), QString("clicked"));
mAutoBtn->setChecked(false); mAutoBtn->setChecked(false);
proxysettings->set(PROXY_MODE_KEY,"manual"); proxysettings->set(PROXY_MODE_KEY,"manual");
} }
@ -557,6 +572,7 @@ void Proxy::setupConnect(){
}); });
connect(mAptBtn , &KSwitchButton::stateChanged, this ,[=](bool checked){ connect(mAptBtn , &KSwitchButton::stateChanged, this ,[=](bool checked){
UkccCommon::buriedSettings(QString("Proxy"), QString("Apt Proxy Open"), QString("settings"), checked?"true":"false");
if (checked) { if (checked) {
emit mEditBtn->click(); emit mEditBtn->click();
} else { // 关闭APT代理删除对应的配置文件 } else { // 关闭APT代理删除对应的配置文件
@ -567,7 +583,7 @@ void Proxy::setupConnect(){
} else { } else {
QMessageBox *mReboot = new QMessageBox(pluginWidget->topLevelWidget()); QMessageBox *mReboot = new QMessageBox(pluginWidget->topLevelWidget());
mReboot->setIcon(QMessageBox::Warning); mReboot->setIcon(QMessageBox::Warning);
mReboot->setText(tr("The apt proxy has been turned off and needs to be restarted to take effect")); mReboot->setText(tr("The APT proxy has been turned off and needs to be restarted to take effect"));
QPushButton *laterbtn = mReboot->addButton(tr("Reboot Later"), QMessageBox::RejectRole); QPushButton *laterbtn = mReboot->addButton(tr("Reboot Later"), QMessageBox::RejectRole);
QPushButton *nowbtn = mReboot->addButton(tr("Reboot Now"), QMessageBox::AcceptRole); QPushButton *nowbtn = mReboot->addButton(tr("Reboot Now"), QMessageBox::AcceptRole);
mReboot->exec(); mReboot->exec();
@ -716,13 +732,10 @@ void Proxy::initDbus()
void Proxy::initAppProxyStatus() void Proxy::initAppProxyStatus()
{ {
bool state = getAppProxyState(); bool state = getAppProxyState();
m_appEnableBtn->setChecked(state);
onappProxyEnableChanged(state);
appProxyInfoPadding(); appProxyInfoPadding();
// m_cancelBtn->setEnabled(false);
// m_saveBtn->setEnabled(false);
appListPadding(); appListPadding();
m_appEnableBtn->setChecked(state);
setAppProxyUiEnable(state);
} }
int Proxy::_getCurrentProxyMode(){ int Proxy::_getCurrentProxyMode(){
@ -807,7 +820,7 @@ void Proxy::setAptInfo()
{ {
QMessageBox *mReboot = new QMessageBox(pluginWidget->topLevelWidget()); QMessageBox *mReboot = new QMessageBox(pluginWidget->topLevelWidget());
mReboot->setIcon(QMessageBox::Warning); mReboot->setIcon(QMessageBox::Warning);
mReboot->setText(tr("The system needs to be restarted to set the Apt proxy, whether to reboot")); mReboot->setText(tr("The system needs to be restarted to set the APT proxy, whether to reboot"));
QPushButton *laterbtn = mReboot->addButton(tr("Reboot Later"), QMessageBox::RejectRole); QPushButton *laterbtn = mReboot->addButton(tr("Reboot Later"), QMessageBox::RejectRole);
QPushButton *nowbtn = mReboot->addButton(tr("Reboot Now"), QMessageBox::AcceptRole); QPushButton *nowbtn = mReboot->addButton(tr("Reboot Now"), QMessageBox::AcceptRole);
mReboot->exec(); mReboot->exec();
@ -967,6 +980,50 @@ QMap<QString, QStringList> Proxy::getAppListProxy()
return appList; return appList;
} }
void Proxy::setUkccProxySettings()
{
setSystemProxyFrameHidden(false);
// setAppProxyFrameHidden(false);
setAPTProxyFrameHidden(false);
QDBusInterface ukccDbusInterface("org.ukui.ukcc.session",
"/",
"org.ukui.ukcc.session.interface",
QDBusConnection::sessionBus());
if(!ukccDbusInterface.isValid()) {
qWarning() << "ukccDbusInterface is invalid";
return;
}
QDBusReply<QMap<QString, QVariant> > reply = ukccDbusInterface.call("getModuleHideStatus");
if (!reply.isValid()) {
qWarning() << "reply of getModuleHideStatus is invalid";
return;
}
QStringList proxySettingList;
if (reply.value().contains("proxySettings")) {
QString proxySettings = reply.value()["proxySettings"].toString();
qDebug() << "proxySettings" << proxySettings;
if (proxySettings.isEmpty()) {
return;
}
proxySettingList = proxySettings.split(",");
}
for (const QString setting : proxySettingList) {
if (setting.contains("SystemProxyFrame") && setting.contains("false")) {
setSystemProxyFrameHidden(true);
} else if (setting.contains("AppProxyFrame") && setting.contains("false")) {
// setAppProxyFrameHidden(true);
} else if (setting.contains("APTProxyFrame") && setting.contains("false")) {
setAPTProxyFrameHidden(true);
}
}
}
#if 0 #if 0
bool Proxy::checkIsChanged(QStringList info) bool Proxy::checkIsChanged(QStringList info)
{ {
@ -1130,22 +1187,32 @@ void Proxy::setAppProxyFrameUi(QWidget *widget)
m_appLine4 = setLine(m_appProxyFrame); m_appLine4 = setLine(m_appProxyFrame);
m_appLine5 = setLine(m_appProxyFrame); m_appLine5 = setLine(m_appProxyFrame);
m_appProxyInfoWidget = new QWidget(m_appProxyFrame);
QVBoxLayout *widgetHLayout = new QVBoxLayout(m_appProxyInfoWidget);
widgetHLayout->setContentsMargins(0, 0, 0, 0);
widgetHLayout->setSpacing(0);
widgetHLayout->addWidget(m_appLine1);
widgetHLayout->addWidget(m_proxyTypeFrame);
widgetHLayout->addWidget(m_appLine2);
widgetHLayout->addWidget(m_ipAddressFrame);
widgetHLayout->addWidget(m_appLine3);
widgetHLayout->addWidget(m_portFrame);
widgetHLayout->addWidget(m_appLine4);
widgetHLayout->addWidget(m_userNameFrame);
widgetHLayout->addWidget(m_appLine5);
widgetHLayout->addWidget(m_pwdFrame);
appProxyLayout->addWidget(m_appEnableFrame); appProxyLayout->addWidget(m_appEnableFrame);
appProxyLayout->addWidget(m_appLine1); appProxyLayout->addWidget(m_appProxyInfoWidget);
appProxyLayout->addWidget(m_proxyTypeFrame);
appProxyLayout->addWidget(m_appLine2);
appProxyLayout->addWidget(m_ipAddressFrame);
appProxyLayout->addWidget(m_appLine3);
appProxyLayout->addWidget(m_portFrame);
appProxyLayout->addWidget(m_appLine4);
appProxyLayout->addWidget(m_userNameFrame);
appProxyLayout->addWidget(m_appLine5);
appProxyLayout->addWidget(m_pwdFrame);
// appProxyLayout->addWidget(line5); // appProxyLayout->addWidget(line5);
// appProxyLayout->addWidget(m_appBtnFrame); // appProxyLayout->addWidget(m_appBtnFrame);
connect(m_appEnableBtn, &KSwitchButton::stateChanged, this, &Proxy::onappProxyEnableChanged); connect(m_appEnableBtn, &KSwitchButton::stateChanged, this, &Proxy::setAppProxyUiEnable);
connect(m_appEnableBtn, &KSwitchButton::stateChanged, this, &Proxy::setAppProxyState); connect(m_appEnableBtn, &KSwitchButton::stateChanged, this, &Proxy::setAppProxyState);
connect(m_appEnableBtn, &KSwitchButton::stateChanged, [=](bool checked) {
UkccCommon::buriedSettings(QString("Proxy"), QString("App Proxy Open"), QString("settings"), checked?"true":"false");
});
connect(m_proxyTypeComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(onAppProxyConfChanged())); connect(m_proxyTypeComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(onAppProxyConfChanged()));
connect(m_ipAddressLineEdit, SIGNAL(textChanged(QString)), this, SLOT(onipEditStateChanged())); connect(m_ipAddressLineEdit, SIGNAL(textChanged(QString)), this, SLOT(onipEditStateChanged()));
connect(m_ipAddressLineEdit, SIGNAL(textChanged(QString)), this, SLOT(onAppProxyConfChanged())); connect(m_ipAddressLineEdit, SIGNAL(textChanged(QString)), this, SLOT(onAppProxyConfChanged()));
@ -1180,6 +1247,7 @@ void Proxy::setAppListFrameUi(QWidget *widget)
m_appListWidget->setMinimumHeight(240); m_appListWidget->setMinimumHeight(240);
m_appListWidget->setFocusPolicy(Qt::FocusPolicy::NoFocus); m_appListWidget->setFocusPolicy(Qt::FocusPolicy::NoFocus);
m_appListWidget->setFrameShape(QFrame::Shape::Panel); m_appListWidget->setFrameShape(QFrame::Shape::Panel);
m_appListWidget->setVerticalScrollMode(QAbstractItemView::ScrollMode::ScrollPerPixel);
appListLayout->addWidget(m_allowAppProxyLabel); appListLayout->addWidget(m_allowAppProxyLabel);
appListLayout->addWidget(m_appListWidget); appListLayout->addWidget(m_appListWidget);
@ -1224,7 +1292,7 @@ void Proxy::appListPadding()
AppListWidget *appWidget = new AppListWidget(index, m_appListWidget); AppListWidget *appWidget = new AppListWidget(index, m_appListWidget);
appWidget->setAppName(appInfo.value(0)); appWidget->setAppName(appInfo.value(0));
appWidget->setAppIcon(QIcon::fromTheme(appInfo.value(1)).pixmap(24, 24)); appWidget->setAppIcon(QIcon::fromTheme(appInfo.value(1)));
appWidget->setAppChecked(flag); appWidget->setAppChecked(flag);
QListWidgetItem *appListWidgetItem = new QListWidgetItem(m_appListWidget); QListWidgetItem *appListWidgetItem = new QListWidgetItem(m_appListWidget);
@ -1248,6 +1316,32 @@ bool Proxy::getipEditState(QString text)
return match; return match;
} }
void Proxy::setSystemProxyFrameHidden(bool state)
{
mTitleLabel->setHidden(state);
mProxyFrame->setHidden(state);
m_sysSpacerFrame->setHidden(state);
}
void Proxy::setAppProxyFrameHidden(bool state)
{
m_appProxyLabel->setHidden(state);
m_appProxyFrame->setHidden(state);
if (state) {
m_appListFrame->setHidden(state);
} else {
m_appListFrame->setHidden(!m_appEnableBtn->isChecked());
}
m_appListSpacerFrame->setHidden(state);
m_appSpacerFrame->setHidden(state);
}
void Proxy::setAPTProxyFrameHidden(bool state)
{
mAptProxyLabel->setHidden(state);
mAPTFrame->setHidden(state);
}
void Proxy::onipEditStateChanged() void Proxy::onipEditStateChanged()
{ {
if (!getipEditState(m_ipAddressLineEdit->text())) { if (!getipEditState(m_ipAddressLineEdit->text())) {
@ -1299,19 +1393,15 @@ void Proxy::onPaletteChanged()
m_appListWidget->setPalette(mpal); m_appListWidget->setPalette(mpal);
} }
void Proxy::onappProxyEnableChanged(bool enable) void Proxy::setAppProxyUiEnable(bool enable)
{ {
m_proxyTypeFrame->setVisible(enable); if (enable) {
m_ipAddressFrame->setVisible(enable); m_appProxyInfoWidget->show();
m_portFrame->setVisible(enable); m_appListFrame->show();
m_userNameFrame->setVisible(enable); } else {
m_pwdFrame->setVisible(enable); m_appProxyInfoWidget->hide();
m_appListFrame->setVisible(enable); m_appListFrame->hide();
m_appLine1->setVisible(enable); }
m_appLine2->setVisible(enable);
m_appLine3->setVisible(enable);
m_appLine4->setVisible(enable);
m_appLine5->setVisible(enable);
} }
#if 0 #if 0

View File

@ -52,8 +52,10 @@
#include "kswitchbutton.h" #include "kswitchbutton.h"
#include "kpasswordedit.h" #include "kpasswordedit.h"
#include "ukcccommon.h"
using namespace kdk; using namespace kdk;
using namespace ukcc;
/* qt会将glib里的signals成员识别为宏所以取消该宏 /* qt会将glib里的signals成员识别为宏所以取消该宏
* signals时使Q_SIGNALS代替即可 * signals时使Q_SIGNALS代替即可
@ -136,13 +138,20 @@ public:
void setAppProxyConf(QStringList list); //设置应用代理配置信息--调用Dbus void setAppProxyConf(QStringList list); //设置应用代理配置信息--调用Dbus
static QMap<QString, QStringList> getAppListProxy(); static QMap<QString, QStringList> getAppListProxy();
// bool checkIsChanged(QStringList info); // bool checkIsChanged(QStringList info);
void setUkccProxySettings(); // 设置控制面板代理模块显示/隐藏
private: private:
void setAppProxyFrameUi(QWidget *widget); void setAppProxyFrameUi(QWidget *widget);
void setAppListFrameUi(QWidget *widget); void setAppListFrameUi(QWidget *widget);
void appProxyInfoPadding(); void appProxyInfoPadding();
void appListPadding(); void appListPadding();
bool getipEditState(QString text); bool getipEditState(QString text);
void setSystemProxyFrameHidden(bool state);
void setAppProxyFrameHidden(bool state);
void setAPTProxyFrameHidden(bool state);
QFrame *m_sysSpacerFrame;
QFrame *m_appListSpacerFrame;
QFrame *m_appSpacerFrame;
QString pluginName; QString pluginName;
int pluginType; int pluginType;
@ -250,6 +259,7 @@ private:
// QPushButton *m_cancelBtn; // QPushButton *m_cancelBtn;
// QPushButton *m_saveBtn; // QPushButton *m_saveBtn;
QListWidget *m_appListWidget = nullptr; QListWidget *m_appListWidget = nullptr;
QWidget *m_appProxyInfoWidget;
QTextEdit *mIgnoreLineEdit; QTextEdit *mIgnoreLineEdit;
@ -274,7 +284,7 @@ private:
private slots: private slots:
void setAptProxySlot(); //处理apt代理前端交互逻辑 void setAptProxySlot(); //处理apt代理前端交互逻辑
void onappProxyEnableChanged(bool enable); //IP地址无效提示 void setAppProxyUiEnable(bool enable);
void onipEditStateChanged(); //IP地址无效提示 void onipEditStateChanged(); //IP地址无效提示
void onAppProxyConfChanged(); //应用代理配置信息变化 void onAppProxyConfChanged(); //应用代理配置信息变化
void onAppProxyConfEditFinished(); void onAppProxyConfEditFinished();

View File

@ -7,6 +7,11 @@ CONFIG += plugin
TARGET = $$qtLibraryTarget(proxy) TARGET = $$qtLibraryTarget(proxy)
DESTDIR = ../.. DESTDIR = ../..
CONFIG(release, debug|release) {
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
}
target.path = $$[QT_INSTALL_LIBS]/ukui-control-center target.path = $$[QT_INSTALL_LIBS]/ukui-control-center
trans.files = translations/* trans.files = translations/*
trans.path = /usr/share/kylin-nm/proxy/ trans.path = /usr/share/kylin-nm/proxy/
@ -49,4 +54,9 @@ INSTALLS += target \
TRANSLATIONS += \ TRANSLATIONS += \
translations/zh_CN.ts \ translations/zh_CN.ts \
translations/tr.ts \ translations/tr.ts \
translations/bo_CN.ts translations/bo_CN.ts \
translations/en_US.ts \
translations/mn.ts
DISTFILES += \
translations/en_US.ts

View File

@ -0,0 +1,15 @@
#!/bin/bash
ts_list=(`ls translations/*.ts`)
source /etc/os-release
version=(`echo $ID`)
for ts in "${ts_list[@]}"
do
printf "\nprocess ${ts}\n"
if [ "$version" == "fedora" ] || [ "$version" == "opensuse-leap" ] || [ "$version" == "opensuse-tumbleweed" ];then
lrelease-qt5 "${ts}"
else
lrelease "${ts}"
fi
done

Binary file not shown.

View File

@ -4,27 +4,27 @@
<context> <context>
<name>AptProxyDialog</name> <name>AptProxyDialog</name>
<message> <message>
<location filename="../aptproxydialog.cpp" line="24"/> <location filename="../aptproxydialog.cpp" line="43"/>
<source>Set Apt Proxy</source> <source>Set APT Proxy</source>
<translation>Apt </translation> <translation>APT </translation>
</message> </message>
<message> <message>
<location filename="../aptproxydialog.cpp" line="41"/> <location filename="../aptproxydialog.cpp" line="60"/>
<source>Server Address</source> <source>Server Address</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aptproxydialog.cpp" line="59"/> <location filename="../aptproxydialog.cpp" line="78"/>
<source>Port</source> <source>Port</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aptproxydialog.cpp" line="80"/> <location filename="../aptproxydialog.cpp" line="99"/>
<source>Cancel</source> <source>Cancel</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aptproxydialog.cpp" line="84"/> <location filename="../aptproxydialog.cpp" line="103"/>
<source>Confirm</source> <source>Confirm</source>
<translation></translation> <translation></translation>
</message> </message>
@ -37,130 +37,135 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="194"/> <location filename="../proxy.cpp" line="201"/>
<source>Start using</source> <source>Start using</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="207"/> <location filename="../proxy.cpp" line="214"/>
<source>Proxy mode</source> <source>Proxy mode</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="211"/> <location filename="../proxy.cpp" line="218"/>
<source>Auto</source> <source>Auto</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="214"/> <location filename="../proxy.cpp" line="221"/>
<source>Manual</source> <source>Manual</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="369"/>
<source>Application Proxy</source> <source>Application Proxy</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="444"/> <location filename="../proxy.cpp" line="459"/>
<source>System Proxy</source> <source>System Proxy</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="446"/> <location filename="../proxy.cpp" line="461"/>
<source>Auto url</source> <source>Auto url</source>
<translation></translation> <translation></translation>
<extra-contents_path>/Proxy/Auto url</extra-contents_path> <extra-contents_path>/Proxy/Auto url</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="448"/> <location filename="../proxy.cpp" line="463"/>
<source>Http Proxy</source> <source>Http Proxy</source>
<translation>HTTP </translation> <translation>HTTP </translation>
<extra-contents_path>/Proxy/Http Proxy</extra-contents_path> <extra-contents_path>/Proxy/Http Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="450"/> <location filename="../proxy.cpp" line="465"/>
<source>Https Proxy</source> <source>Https Proxy</source>
<translation>HTTPS </translation> <translation>HTTPS </translation>
<extra-contents_path>/Proxy/Https Proxy</extra-contents_path> <extra-contents_path>/Proxy/Https Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="452"/> <location filename="../proxy.cpp" line="467"/>
<source>Ftp Proxy</source> <source>Ftp Proxy</source>
<translation>FTP </translation> <translation>FTP </translation>
<extra-contents_path>/Proxy/Ftp Proxy</extra-contents_path> <extra-contents_path>/Proxy/Ftp Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="454"/> <location filename="../proxy.cpp" line="469"/>
<source>Socks Proxy</source> <source>Socks Proxy</source>
<translation>SOCKS </translation> <translation>SOCKS </translation>
<extra-contents_path>/Proxy/Socks Proxy</extra-contents_path> <extra-contents_path>/Proxy/Socks Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="455"/> <location filename="../proxy.cpp" line="470"/>
<location filename="../proxy.cpp" line="456"/> <location filename="../proxy.cpp" line="471"/>
<location filename="../proxy.cpp" line="457"/> <location filename="../proxy.cpp" line="472"/>
<location filename="../proxy.cpp" line="458"/> <location filename="../proxy.cpp" line="473"/>
<location filename="../proxy.cpp" line="1047"/> <location filename="../proxy.cpp" line="1122"/>
<source>Port</source> <source>Port</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="459"/> <location filename="../proxy.cpp" line="474"/>
<source>List of ignored hosts. more than one entry, please separate with english semicolon(;)</source> <source>List of ignored hosts. more than one entry, please separate with english semicolon(;)</source>
<translation> (;)</translation> <translation> (;)</translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="462"/> <location filename="../proxy.cpp" line="477"/>
<source>Apt Proxy</source> <source>App Proxy</source>
<translation>APT </translation> <translation></translation>
<extra-contents_path>/Proxy/Apt Proxy</extra-contents_path> <extra-contents_path>/Proxy/App Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="463"/> <location filename="../proxy.cpp" line="480"/>
<location filename="../proxy.cpp" line="984"/> <source>APT Proxy</source>
<translation>APT </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> <source>Open</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="464"/> <location filename="../proxy.cpp" line="482"/>
<source>Server Address : </source> <source>Server Address : </source>
<translation> </translation> <translation> </translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="465"/> <location filename="../proxy.cpp" line="483"/>
<source>Port : </source> <source>Port : </source>
<translation> </translation> <translation> </translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="466"/> <location filename="../proxy.cpp" line="484"/>
<source>Edit</source> <source>Edit</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="564"/> <location filename="../proxy.cpp" line="586"/>
<source>The apt proxy has been turned off and needs to be restarted to take effect</source> <source>The APT proxy has been turned off and needs to be restarted to take effect</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="565"/> <location filename="../proxy.cpp" line="587"/>
<location filename="../proxy.cpp" line="797"/> <location filename="../proxy.cpp" line="824"/>
<source>Reboot Later</source> <source>Reboot Later</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="566"/> <location filename="../proxy.cpp" line="588"/>
<location filename="../proxy.cpp" line="798"/> <location filename="../proxy.cpp" line="825"/>
<source>Reboot Now</source> <source>Reboot Now</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="796"/> <location filename="../proxy.cpp" line="823"/>
<source>The system needs to be restarted to set the Apt proxy, whether to reboot</source> <source>The system needs to be restarted to set the APT proxy, whether to reboot</source>
<translation>Aptཡ </translation> <translation>APT </translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="996"/> <location filename="../proxy.cpp" line="1071"/>
<source>Proxy type</source> <source>Proxy type</source>
<translation></translation> <translation></translation>
</message> </message>
@ -177,49 +182,49 @@
<translation type="vanished">5</translation> <translation type="vanished">5</translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1013"/> <location filename="../proxy.cpp" line="1088"/>
<source>IP address</source> <source>IP address</source>
<translation>IPས</translation> <translation>IPས</translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1019"/> <location filename="../proxy.cpp" line="1094"/>
<location filename="../proxy.cpp" line="1050"/> <location filename="../proxy.cpp" line="1125"/>
<source>Required</source> <source>Required</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1040"/> <location filename="../proxy.cpp" line="1115"/>
<source>Invalid IP Address</source> <source>Invalid IP Address</source>
<translation>IPས</translation> <translation>IPས</translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1061"/> <location filename="../proxy.cpp" line="1136"/>
<source>Username</source> <source>Username</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1064"/> <location filename="../proxy.cpp" line="1139"/>
<location filename="../proxy.cpp" line="1078"/> <location filename="../proxy.cpp" line="1153"/>
<source>Optional</source> <source>Optional</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1074"/> <location filename="../proxy.cpp" line="1149"/>
<source>Password</source> <source>Password</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1097"/> <location filename="../proxy.cpp" line="1172"/>
<source>Cancel</source> <source>Cancel</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1098"/> <location filename="../proxy.cpp" line="1173"/>
<source>Save</source> <source>Save</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1160"/> <location filename="../proxy.cpp" line="1245"/>
<source>The following applications are allowed to use this configuration:</source> <source>The following applications are allowed to use this configuration:</source>
<translation></translation> <translation></translation>
</message> </message>

View File

@ -0,0 +1,216 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<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>
<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>

View File

@ -0,0 +1,220 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="mn">
<context>
<name>AptProxyDialog</name>
<message>
<location filename="../aptproxydialog.cpp" line="43"/>
<source>Set APT Proxy</source>
<translation>APT </translation>
</message>
<message>
<location filename="../aptproxydialog.cpp" line="60"/>
<source>Server Address</source>
<translation> </translation>
</message>
<message>
<location filename="../aptproxydialog.cpp" line="78"/>
<source>Port</source>
<translation></translation>
</message>
<message>
<location filename="../aptproxydialog.cpp" line="99"/>
<source>Cancel</source>
<translation></translation>
</message>
<message>
<location filename="../aptproxydialog.cpp" line="103"/>
<source>Confirm</source>
<translation></translation>
</message>
</context>
<context>
<name>Proxy</name>
<message>
<location filename="../proxy.cpp" line="63"/>
<source>Proxy</source>
<translation></translation>
</message>
<message>
<location filename="../proxy.cpp" line="201"/>
<source>Start using</source>
<translation></translation>
</message>
<message>
<location filename="../proxy.cpp" line="214"/>
<source>Proxy mode</source>
<translation> </translation>
</message>
<message>
<location filename="../proxy.cpp" line="218"/>
<source>Auto</source>
<translation></translation>
</message>
<message>
<location filename="../proxy.cpp" line="221"/>
<source>Manual</source>
<translation> </translation>
</message>
<message>
<source>Application Proxy</source>
<translation type="vanished"> </translation>
</message>
<message>
<location filename="../proxy.cpp" line="459"/>
<source>System Proxy</source>
<translation> </translation>
</message>
<message>
<location filename="../proxy.cpp" line="461"/>
<source>Auto url</source>
<translation>URL </translation>
<extra-contents_path>/Proxy/Auto url</extra-contents_path>
</message>
<message>
<location filename="../proxy.cpp" line="463"/>
<source>Http Proxy</source>
<translation>HTTP </translation>
<extra-contents_path>/Proxy/Http Proxy</extra-contents_path>
</message>
<message>
<location filename="../proxy.cpp" line="465"/>
<source>Https Proxy</source>
<translation>HTTPS </translation>
<extra-contents_path>/Proxy/Https Proxy</extra-contents_path>
</message>
<message>
<location filename="../proxy.cpp" line="467"/>
<source>Ftp Proxy</source>
<translation>FTP </translation>
<extra-contents_path>/Proxy/Ftp Proxy</extra-contents_path>
</message>
<message>
<location filename="../proxy.cpp" line="469"/>
<source>Socks Proxy</source>
<translation>SOCKS </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></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> (;)</translation>
</message>
<message>
<location filename="../proxy.cpp" line="477"/>
<source>App Proxy</source>
<translation> </translation>
<extra-contents_path>/Proxy/App Proxy</extra-contents_path>
</message>
<message>
<location filename="../proxy.cpp" line="480"/>
<source>APT Proxy</source>
<translation>APT </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></translation>
</message>
<message>
<location filename="../proxy.cpp" line="482"/>
<source>Server Address : </source>
<translation> : </translation>
</message>
<message>
<location filename="../proxy.cpp" line="483"/>
<source>Port : </source>
<translation> : </translation>
</message>
<message>
<location filename="../proxy.cpp" line="484"/>
<source>Edit</source>
<translation></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>APT </translation>
</message>
<message>
<location filename="../proxy.cpp" line="587"/>
<location filename="../proxy.cpp" line="824"/>
<source>Reboot Later</source>
<translation> </translation>
</message>
<message>
<location filename="../proxy.cpp" line="588"/>
<location filename="../proxy.cpp" line="825"/>
<source>Reboot Now</source>
<translation> </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> APT </translation>
</message>
<message>
<location filename="../proxy.cpp" line="1071"/>
<source>Proxy type</source>
<translation> </translation>
</message>
<message>
<location filename="../proxy.cpp" line="1088"/>
<source>IP address</source>
<translation>IP </translation>
</message>
<message>
<location filename="../proxy.cpp" line="1094"/>
<location filename="../proxy.cpp" line="1125"/>
<source>Required</source>
<translation> </translation>
</message>
<message>
<location filename="../proxy.cpp" line="1115"/>
<source>Invalid IP Address</source>
<translation> IP </translation>
</message>
<message>
<location filename="../proxy.cpp" line="1136"/>
<source>Username</source>
<translation> </translation>
</message>
<message>
<location filename="../proxy.cpp" line="1139"/>
<location filename="../proxy.cpp" line="1153"/>
<source>Optional</source>
<translation> </translation>
</message>
<message>
<location filename="../proxy.cpp" line="1149"/>
<source>Password</source>
<translation> </translation>
</message>
<message>
<location filename="../proxy.cpp" line="1172"/>
<source>Cancel</source>
<translation></translation>
</message>
<message>
<location filename="../proxy.cpp" line="1173"/>
<source>Save</source>
<translation></translation>
</message>
<message>
<location filename="../proxy.cpp" line="1245"/>
<source>The following applications are allowed to use this configuration:</source>
<translation> :</translation>
</message>
</context>
</TS>

View File

@ -4,27 +4,27 @@
<context> <context>
<name>AptProxyDialog</name> <name>AptProxyDialog</name>
<message> <message>
<location filename="../aptproxydialog.cpp" line="24"/> <location filename="../aptproxydialog.cpp" line="43"/>
<source>Set Apt Proxy</source> <source>Set APT Proxy</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aptproxydialog.cpp" line="41"/> <location filename="../aptproxydialog.cpp" line="60"/>
<source>Server Address</source> <source>Server Address</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aptproxydialog.cpp" line="59"/> <location filename="../aptproxydialog.cpp" line="78"/>
<source>Port</source> <source>Port</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aptproxydialog.cpp" line="80"/> <location filename="../aptproxydialog.cpp" line="99"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../aptproxydialog.cpp" line="84"/> <location filename="../aptproxydialog.cpp" line="103"/>
<source>Confirm</source> <source>Confirm</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -37,177 +37,178 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="194"/> <location filename="../proxy.cpp" line="201"/>
<source>Start using</source> <source>Start using</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="207"/> <location filename="../proxy.cpp" line="214"/>
<source>Proxy mode</source> <source>Proxy mode</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="211"/> <location filename="../proxy.cpp" line="218"/>
<source>Auto</source> <source>Auto</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="214"/> <location filename="../proxy.cpp" line="221"/>
<source>Manual</source> <source>Manual</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="369"/> <location filename="../proxy.cpp" line="459"/>
<source>Application Proxy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../proxy.cpp" line="444"/>
<source>System Proxy</source> <source>System Proxy</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="446"/> <location filename="../proxy.cpp" line="461"/>
<source>Auto url</source> <source>Auto url</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
<extra-contents_path>/Proxy/Auto url</extra-contents_path> <extra-contents_path>/Proxy/Auto url</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="448"/> <location filename="../proxy.cpp" line="463"/>
<source>Http Proxy</source> <source>Http Proxy</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
<extra-contents_path>/Proxy/Http Proxy</extra-contents_path> <extra-contents_path>/Proxy/Http Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="450"/> <location filename="../proxy.cpp" line="465"/>
<source>Https Proxy</source> <source>Https Proxy</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
<extra-contents_path>/Proxy/Https Proxy</extra-contents_path> <extra-contents_path>/Proxy/Https Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="452"/> <location filename="../proxy.cpp" line="467"/>
<source>Ftp Proxy</source> <source>Ftp Proxy</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
<extra-contents_path>/Proxy/Ftp Proxy</extra-contents_path> <extra-contents_path>/Proxy/Ftp Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="454"/> <location filename="../proxy.cpp" line="469"/>
<source>Socks Proxy</source> <source>Socks Proxy</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
<extra-contents_path>/Proxy/Socks Proxy</extra-contents_path> <extra-contents_path>/Proxy/Socks Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="455"/> <location filename="../proxy.cpp" line="470"/>
<location filename="../proxy.cpp" line="456"/> <location filename="../proxy.cpp" line="471"/>
<location filename="../proxy.cpp" line="457"/> <location filename="../proxy.cpp" line="472"/>
<location filename="../proxy.cpp" line="458"/> <location filename="../proxy.cpp" line="473"/>
<location filename="../proxy.cpp" line="1047"/> <location filename="../proxy.cpp" line="1122"/>
<source>Port</source> <source>Port</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="459"/> <location filename="../proxy.cpp" line="474"/>
<source>List of ignored hosts. more than one entry, please separate with english semicolon(;)</source> <source>List of ignored hosts. more than one entry, please separate with english semicolon(;)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="462"/> <location filename="../proxy.cpp" line="477"/>
<source>Apt Proxy</source> <source>App Proxy</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
<extra-contents_path>/Proxy/Apt Proxy</extra-contents_path> <extra-contents_path>/Proxy/App Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="463"/> <location filename="../proxy.cpp" line="480"/>
<location filename="../proxy.cpp" line="984"/> <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> <source>Open</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="464"/> <location filename="../proxy.cpp" line="482"/>
<source>Server Address : </source> <source>Server Address : </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="465"/> <location filename="../proxy.cpp" line="483"/>
<source>Port : </source> <source>Port : </source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="466"/> <location filename="../proxy.cpp" line="484"/>
<source>Edit</source> <source>Edit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="564"/> <location filename="../proxy.cpp" line="586"/>
<source>The apt proxy has been turned off and needs to be restarted to take effect</source> <source>The APT proxy has been turned off and needs to be restarted to take effect</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="565"/> <location filename="../proxy.cpp" line="587"/>
<location filename="../proxy.cpp" line="797"/> <location filename="../proxy.cpp" line="824"/>
<source>Reboot Later</source> <source>Reboot Later</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="566"/> <location filename="../proxy.cpp" line="588"/>
<location filename="../proxy.cpp" line="798"/> <location filename="../proxy.cpp" line="825"/>
<source>Reboot Now</source> <source>Reboot Now</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="796"/> <location filename="../proxy.cpp" line="823"/>
<source>The system needs to be restarted to set the Apt proxy, whether to reboot</source> <source>The system needs to be restarted to set the APT proxy, whether to reboot</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="996"/> <location filename="../proxy.cpp" line="1071"/>
<source>Proxy type</source> <source>Proxy type</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1013"/> <location filename="../proxy.cpp" line="1088"/>
<source>IP address</source> <source>IP address</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1019"/> <location filename="../proxy.cpp" line="1094"/>
<location filename="../proxy.cpp" line="1050"/> <location filename="../proxy.cpp" line="1125"/>
<source>Required</source> <source>Required</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1040"/> <location filename="../proxy.cpp" line="1115"/>
<source>Invalid IP Address</source> <source>Invalid IP Address</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1061"/> <location filename="../proxy.cpp" line="1136"/>
<source>Username</source> <source>Username</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1064"/> <location filename="../proxy.cpp" line="1139"/>
<location filename="../proxy.cpp" line="1078"/> <location filename="../proxy.cpp" line="1153"/>
<source>Optional</source> <source>Optional</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1074"/> <location filename="../proxy.cpp" line="1149"/>
<source>Password</source> <source>Password</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1097"/> <location filename="../proxy.cpp" line="1172"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1098"/> <location filename="../proxy.cpp" line="1173"/>
<source>Save</source> <source>Save</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1160"/> <location filename="../proxy.cpp" line="1245"/>
<source>The following applications are allowed to use this configuration:</source> <source>The following applications are allowed to use this configuration:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

Binary file not shown.

View File

@ -4,27 +4,27 @@
<context> <context>
<name>AptProxyDialog</name> <name>AptProxyDialog</name>
<message> <message>
<location filename="../aptproxydialog.cpp" line="24"/> <location filename="../aptproxydialog.cpp" line="43"/>
<source>Set Apt Proxy</source> <source>Set APT Proxy</source>
<translation> APT </translation> <translation> APT </translation>
</message> </message>
<message> <message>
<location filename="../aptproxydialog.cpp" line="41"/> <location filename="../aptproxydialog.cpp" line="60"/>
<source>Server Address</source> <source>Server Address</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aptproxydialog.cpp" line="59"/> <location filename="../aptproxydialog.cpp" line="78"/>
<source>Port</source> <source>Port</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aptproxydialog.cpp" line="80"/> <location filename="../aptproxydialog.cpp" line="99"/>
<source>Cancel</source> <source>Cancel</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../aptproxydialog.cpp" line="84"/> <location filename="../aptproxydialog.cpp" line="103"/>
<source>Confirm</source> <source>Confirm</source>
<translation></translation> <translation></translation>
</message> </message>
@ -37,177 +37,182 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="194"/> <location filename="../proxy.cpp" line="201"/>
<source>Start using</source> <source>Start using</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="207"/> <location filename="../proxy.cpp" line="214"/>
<source>Proxy mode</source> <source>Proxy mode</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="211"/> <location filename="../proxy.cpp" line="218"/>
<source>Auto</source> <source>Auto</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="214"/> <location filename="../proxy.cpp" line="221"/>
<source>Manual</source> <source>Manual</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="369"/>
<source>Application Proxy</source> <source>Application Proxy</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="444"/> <location filename="../proxy.cpp" line="459"/>
<source>System Proxy</source> <source>System Proxy</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="446"/> <location filename="../proxy.cpp" line="461"/>
<source>Auto url</source> <source>Auto url</source>
<translation> URL</translation> <translation> URL</translation>
<extra-contents_path>/Proxy/Auto url</extra-contents_path> <extra-contents_path>/Proxy/Auto url</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="448"/> <location filename="../proxy.cpp" line="463"/>
<source>Http Proxy</source> <source>Http Proxy</source>
<translation>HTTP </translation> <translation>HTTP </translation>
<extra-contents_path>/Proxy/Http Proxy</extra-contents_path> <extra-contents_path>/Proxy/Http Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="450"/> <location filename="../proxy.cpp" line="465"/>
<source>Https Proxy</source> <source>Https Proxy</source>
<translation>HTTPS </translation> <translation>HTTPS </translation>
<extra-contents_path>/Proxy/Https Proxy</extra-contents_path> <extra-contents_path>/Proxy/Https Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="452"/> <location filename="../proxy.cpp" line="467"/>
<source>Ftp Proxy</source> <source>Ftp Proxy</source>
<translation>FTP </translation> <translation>FTP </translation>
<extra-contents_path>/Proxy/Ftp Proxy</extra-contents_path> <extra-contents_path>/Proxy/Ftp Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="454"/> <location filename="../proxy.cpp" line="469"/>
<source>Socks Proxy</source> <source>Socks Proxy</source>
<translation>SOCKS </translation> <translation>SOCKS </translation>
<extra-contents_path>/Proxy/Socks Proxy</extra-contents_path> <extra-contents_path>/Proxy/Socks Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="455"/> <location filename="../proxy.cpp" line="470"/>
<location filename="../proxy.cpp" line="456"/> <location filename="../proxy.cpp" line="471"/>
<location filename="../proxy.cpp" line="457"/> <location filename="../proxy.cpp" line="472"/>
<location filename="../proxy.cpp" line="458"/> <location filename="../proxy.cpp" line="473"/>
<location filename="../proxy.cpp" line="1047"/> <location filename="../proxy.cpp" line="1122"/>
<source>Port</source> <source>Port</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="459"/> <location filename="../proxy.cpp" line="474"/>
<source>List of ignored hosts. more than one entry, please separate with english semicolon(;)</source> <source>List of ignored hosts. more than one entry, please separate with english semicolon(;)</source>
<translation>使;</translation> <translation>使;</translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="462"/> <location filename="../proxy.cpp" line="477"/>
<source>Apt Proxy</source> <source>App Proxy</source>
<translation>APT代</translation> <translation></translation>
<extra-contents_path>/Proxy/Apt Proxy</extra-contents_path> <extra-contents_path>/Proxy/App Proxy</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="463"/> <location filename="../proxy.cpp" line="480"/>
<location filename="../proxy.cpp" line="984"/> <source>APT Proxy</source>
<translation>APT </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> <source>Open</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="464"/> <location filename="../proxy.cpp" line="482"/>
<source>Server Address : </source> <source>Server Address : </source>
<translation> </translation> <translation> </translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="465"/> <location filename="../proxy.cpp" line="483"/>
<source>Port : </source> <source>Port : </source>
<translation> </translation> <translation> </translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="466"/> <location filename="../proxy.cpp" line="484"/>
<source>Edit</source> <source>Edit</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="564"/> <location filename="../proxy.cpp" line="586"/>
<source>The apt proxy has been turned off and needs to be restarted to take effect</source> <source>The APT proxy has been turned off and needs to be restarted to take effect</source>
<translation>APT </translation> <translation>APT </translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="565"/> <location filename="../proxy.cpp" line="587"/>
<location filename="../proxy.cpp" line="797"/> <location filename="../proxy.cpp" line="824"/>
<source>Reboot Later</source> <source>Reboot Later</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="566"/> <location filename="../proxy.cpp" line="588"/>
<location filename="../proxy.cpp" line="798"/> <location filename="../proxy.cpp" line="825"/>
<source>Reboot Now</source> <source>Reboot Now</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="796"/> <location filename="../proxy.cpp" line="823"/>
<source>The system needs to be restarted to set the Apt proxy, whether to reboot</source> <source>The system needs to be restarted to set the APT proxy, whether to reboot</source>
<translation> APT </translation> <translation> APT </translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="996"/> <location filename="../proxy.cpp" line="1071"/>
<source>Proxy type</source> <source>Proxy type</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1013"/> <location filename="../proxy.cpp" line="1088"/>
<source>IP address</source> <source>IP address</source>
<translation>IP </translation> <translation>IP </translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1019"/> <location filename="../proxy.cpp" line="1094"/>
<location filename="../proxy.cpp" line="1050"/> <location filename="../proxy.cpp" line="1125"/>
<source>Required</source> <source>Required</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1040"/> <location filename="../proxy.cpp" line="1115"/>
<source>Invalid IP Address</source> <source>Invalid IP Address</source>
<translation> IP </translation> <translation> IP </translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1061"/> <location filename="../proxy.cpp" line="1136"/>
<source>Username</source> <source>Username</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1064"/> <location filename="../proxy.cpp" line="1139"/>
<location filename="../proxy.cpp" line="1078"/> <location filename="../proxy.cpp" line="1153"/>
<source>Optional</source> <source>Optional</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1074"/> <location filename="../proxy.cpp" line="1149"/>
<source>Password</source> <source>Password</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1097"/> <location filename="../proxy.cpp" line="1172"/>
<source>Cancel</source> <source>Cancel</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1098"/> <location filename="../proxy.cpp" line="1173"/>
<source>Save</source> <source>Save</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../proxy.cpp" line="1160"/> <location filename="../proxy.cpp" line="1245"/>
<source>The following applications are allowed to use this configuration:</source> <source>The following applications are allowed to use this configuration:</source>
<translation>使</translation> <translation>使</translation>
</message> </message>

View File

@ -0,0 +1,15 @@
#!/bin/bash
ts_list=(`ls translations/*.ts`)
source /etc/os-release
version=(`echo $ID`)
for ts in "${ts_list[@]}"
do
printf "\nprocess ${ts}\n"
if [ "$version" == "fedora" ] || [ "$version" == "opensuse-leap" ] || [ "$version" == "opensuse-tumbleweed" ];then
lrelease-qt5 "${ts}"
else
lrelease "${ts}"
fi
done

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN" 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>VPN</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></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">VPN</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></translation>
</message>
<message>
<location filename="../vpn.cpp" line="374"/>
<location filename="../vpn.cpp" line="489"/>
<source>not connected</source>
<translation></translation>
</message>
</context>
<context>
<name>VpnItem</name>
<message>
<location filename="../vpnitem.cpp" line="55"/>
<source>Delete</source>
<translation></translation>
</message>
<message>
<location filename="../vpnitem.cpp" line="107"/>
<location filename="../vpnitem.cpp" line="120"/>
<source>Disconnect</source>
<translation></translation>
</message>
<message>
<location filename="../vpnitem.cpp" line="109"/>
<location filename="../vpnitem.cpp" line="118"/>
<source>Connect</source>
<translation></translation>
</message>
</context>
</TS>

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>AddNetBtn</name>
<message>
<location filename="../../component/AddBtn/addnetbtn.cpp" line="44"/>
<source>Add Others</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../component/AddBtn/addnetbtn.cpp" line="48"/>
<source>Add WiredNetork</source>
<translation type="unfinished"></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 type="unfinished"></translation>
</message>
<message>
<location filename="../vpn.ui" line="68"/>
<source>import</source>
<translation type="unfinished"></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>

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="mn" 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>VPN </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> </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">VPN </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></translation>
</message>
<message>
<location filename="../vpn.cpp" line="374"/>
<location filename="../vpn.cpp" line="489"/>
<source>not connected</source>
<translation> </translation>
</message>
</context>
<context>
<name>VpnItem</name>
<message>
<location filename="../vpnitem.cpp" line="55"/>
<source>Delete</source>
<translation></translation>
</message>
<message>
<location filename="../vpnitem.cpp" line="107"/>
<location filename="../vpnitem.cpp" line="120"/>
<source>Disconnect</source>
<translation></translation>
</message>
<message>
<location filename="../vpnitem.cpp" line="109"/>
<location filename="../vpnitem.cpp" line="118"/>
<source>Connect</source>
<translation></translation>
</message>
</context>
</TS>

Binary file not shown.

View File

@ -4,12 +4,12 @@
<context> <context>
<name>AddNetBtn</name> <name>AddNetBtn</name>
<message> <message>
<location filename="../../component/AddBtn/addnetbtn.cpp" line="47"/> <location filename="../../component/AddBtn/addnetbtn.cpp" line="44"/>
<source>Add Others</source> <source>Add Others</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../component/AddBtn/addnetbtn.cpp" line="51"/> <location filename="../../component/AddBtn/addnetbtn.cpp" line="48"/>
<source>Add WiredNetork</source> <source>Add WiredNetork</source>
<translation></translation> <translation></translation>
</message> </message>
@ -26,6 +26,7 @@
<name>Vpn</name> <name>Vpn</name>
<message> <message>
<location filename="../vpn.ui" line="53"/> <location filename="../vpn.ui" line="53"/>
<location filename="../vpn.cpp" line="68"/>
<source>VPN</source> <source>VPN</source>
<translation></translation> <translation></translation>
</message> </message>
@ -35,24 +36,27 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../vpn.cpp" line="68"/> <location filename="../vpn.cpp" line="157"/>
<source>VPN</source> <location filename="../vpn.cpp" line="284"/>
<translation></translation>
</message>
<message>
<location filename="../vpn.cpp" line="151"/>
<source>Show on Taskbar</source> <source>Show on Taskbar</source>
<translation></translation> <translation></translation>
<extra-contents_path>/Vpn/Show on Taskbar</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../vpn.cpp" line="347"/> <location filename="../vpn.cpp" line="286"/>
<location filename="../vpn.cpp" line="454"/> <source>Add VPN</source>
<translation> VPN </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> <source>connected</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../vpn.cpp" line="349"/> <location filename="../vpn.cpp" line="374"/>
<location filename="../vpn.cpp" line="464"/> <location filename="../vpn.cpp" line="489"/>
<source>not connected</source> <source>not connected</source>
<translation></translation> <translation></translation>
</message> </message>
@ -60,19 +64,19 @@
<context> <context>
<name>VpnItem</name> <name>VpnItem</name>
<message> <message>
<location filename="../vpnitem.cpp" line="58"/> <location filename="../vpnitem.cpp" line="56"/>
<source>Delete</source> <source>Delete</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../vpnitem.cpp" line="111"/> <location filename="../vpnitem.cpp" line="108"/>
<location filename="../vpnitem.cpp" line="124"/> <location filename="../vpnitem.cpp" line="121"/>
<source>Disconnect</source> <source>Disconnect</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../vpnitem.cpp" line="113"/> <location filename="../vpnitem.cpp" line="110"/>
<location filename="../vpnitem.cpp" line="122"/> <location filename="../vpnitem.cpp" line="119"/>
<source>Connect</source> <source>Connect</source>
<translation></translation> <translation></translation>
</message> </message>

View File

@ -107,6 +107,7 @@ QWidget *Vpn::pluginUi(){
initComponent(); initComponent();
initConnect(); initConnect();
initNet(); initNet();
initSearchText();
} }
return m_pluginWidget; return m_pluginWidget;
} }
@ -131,6 +132,11 @@ bool Vpn::isEnable() const
return true; return true;
} }
QString Vpn::translationPath() const
{
return "/usr/share/kylin-nm/vpn/%1.ts";
}
void Vpn::initComponent(){ void Vpn::initComponent(){
//在任务栏上显示图标 //在任务栏上显示图标
//显示已连接时间 //显示已连接时间
@ -188,6 +194,7 @@ void Vpn::initComponent(){
ui->verticalLayout_3->addWidget(m_listFrame); ui->verticalLayout_3->addWidget(m_listFrame);
connect(m_listFrame->m_addVpnWidget, &AddNetBtn::clicked, this, [=]() { connect(m_listFrame->m_addVpnWidget, &AddNetBtn::clicked, this, [=]() {
UkccCommon::buriedSettings(QString("VPN"), QString("Add VPN"), QString("clicked"));
runExternalApp(); runExternalApp();
}); });
@ -212,6 +219,10 @@ void Vpn::initComponent(){
} }
}); });
connect(m_showBtn, &KSwitchButton::clicked, this, [=](bool checked){
UkccCommon::buriedSettings(QString("VPN"), QString("Show on Taskbar"), QString("settings"), checked ? "true":"false");
});
// connect(m_timeBtn, &KSwitchButton::stateChanged, this, [=](bool state){ // connect(m_timeBtn, &KSwitchButton::stateChanged, this, [=](bool state){
// if (m_switchGsettings != nullptr) { // if (m_switchGsettings != nullptr) {
// m_switchGsettings->set(VISIBLE, state); // m_switchGsettings->set(VISIBLE, state);
@ -267,6 +278,14 @@ void Vpn::setShowSwitchStatus()
} }
} }
void Vpn::initSearchText()
{
//~ contents_path /Vpn/Show on Taskbar
tr("Show on Taskbar");
//~ contents_path /Vpn/Add VPN
tr("Add VPN");
}
void Vpn::runExternalApp(){ void Vpn::runExternalApp(){
// QString cmd = "nm-connection-editor"; // QString cmd = "nm-connection-editor";
// QProcess process(this); // QProcess process(this);
@ -488,6 +507,10 @@ int Vpn::getInsertPos(QString connName)
auto dbusArg = result.arguments().at(0).value<QDBusArgument>(); auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
QVector<QStringList> variantList; QVector<QStringList> variantList;
dbusArg >> variantList; dbusArg >> variantList;
if (variantList.isEmpty()) {
qDebug() << "[Vpn] virtualList is empty, getInsertPos return 0";
return 0;
}
for (int i = 0; i < variantList.size(); ++i ) { for (int i = 0; i < variantList.size(); ++i ) {
if (variantList.at(i).at(0) == connName) { if (variantList.at(i).at(0) == connName) {
qDebug() << "pos in kylin-nm is " << i; qDebug() << "pos in kylin-nm is " << i;

View File

@ -32,8 +32,10 @@
#include "kwidget.h" #include "kwidget.h"
#include "kswitchbutton.h" #include "kswitchbutton.h"
#include "itemframe.h" #include "itemframe.h"
#include "ukcccommon.h"
using namespace kdk; using namespace kdk;
using namespace ukcc;
namespace Ui { namespace Ui {
class Vpn; class Vpn;
@ -56,6 +58,7 @@ public:
bool isShowOnHomePage() const Q_DECL_OVERRIDE; bool isShowOnHomePage() const Q_DECL_OVERRIDE;
QIcon icon() const Q_DECL_OVERRIDE; QIcon icon() const Q_DECL_OVERRIDE;
bool isEnable() const Q_DECL_OVERRIDE; bool isEnable() const Q_DECL_OVERRIDE;
QString translationPath() const Q_DECL_OVERRIDE;
public: public:
void initComponent(); void initComponent();
@ -106,8 +109,9 @@ private:
//单个lan连接状态变化 //单个lan连接状态变化
void itemActiveConnectionStatusChanged(VpnItem *item, int status); void itemActiveConnectionStatusChanged(VpnItem *item, int status);
void setShowSwitchStatus(); void setShowSwitchStatus();
// 搜索词条
void initSearchText();
private slots: private slots:
void onVpnAdd(QStringList); void onVpnAdd(QStringList);

View File

@ -47,4 +47,11 @@ INSTALLS += target \
trans trans
TRANSLATIONS += \ TRANSLATIONS += \
translations/zh_CN.ts translations/zh_CN.ts \
translations/bo_CN.ts \
translations/en_US.ts \
translations/mn.ts
CONFIG(release, debug|release) {
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
}

View File

@ -20,6 +20,7 @@
#include "vpnitem.h" #include "vpnitem.h"
#include <QPainter> #include <QPainter>
#include <QPainterPath> #include <QPainterPath>
#include <QApplication>
#define FRAME_SPEED 150 #define FRAME_SPEED 150
#define LIMIT_TIME 60*1000 #define LIMIT_TIME 60*1000
#define TOTAL_PAGE 8 #define TOTAL_PAGE 8
@ -34,11 +35,6 @@ VpnItem::VpnItem(bool bAcitve, QWidget *parent)
this->setMinimumSize(550, 58); this->setMinimumSize(550, 58);
this->setProperty("useButtonPalette", true); this->setProperty("useButtonPalette", true);
this->setFlat(true); this->setFlat(true);
QPalette pal = this->palette();
QColor color = pal.color(QPalette::Button);
color.setAlphaF(0.5);
pal.setColor(QPalette::Button, color);
this->setPalette(pal);
QHBoxLayout *mLanLyt = new QHBoxLayout(this); QHBoxLayout *mLanLyt = new QHBoxLayout(this);
mLanLyt->setContentsMargins(16,0,16,0); mLanLyt->setContentsMargins(16,0,16,0);
mLanLyt->setSpacing(16); mLanLyt->setSpacing(16);
@ -136,12 +132,16 @@ void VpnItem::onDeletetTriggered()
void VpnItem::paintEvent(QPaintEvent *event) void VpnItem::paintEvent(QPaintEvent *event)
{ {
QPalette pal = this->palette();
QPainter painter(this); QPainter painter(this);
painter.setRenderHint(QPainter:: Antialiasing, true); //设置渲染,启动反锯齿 painter.setRenderHint(QPainter:: Antialiasing, true); //设置渲染,启动反锯齿
painter.setPen(Qt::NoPen); painter.setPen(Qt::NoPen);
painter.setBrush(pal.color(QPalette::Base)); painter.setBrush(this->palette().base().color());
QPalette pal = qApp->palette();
QColor color = pal.color(QPalette::Button);
color.setAlphaF(0.5);
pal.setColor(QPalette::Button, color);
this->setPalette(pal);
QRect rect = this->rect(); QRect rect = this->rect();
@ -175,11 +175,11 @@ bool VpnItem::eventFilter(QObject *watched, QEvent *event)
{ {
//菜单右边界与按钮右边界对齐 //菜单右边界与按钮右边界对齐
if (event->type() == QEvent::Show && watched == m_moreMenu) { if (event->type() == QEvent::Show && watched == m_moreMenu) {
int menuXPos = m_moreMenu->pos().x();
int menuWidth = m_moreMenu->size().width(); int menuWidth = m_moreMenu->size().width();
int btnWidth = m_moreButton->size().width(); int btnWidth = m_moreButton->size().width();
int btnGlobalXPos = mapToGlobal(m_moreButton->pos()).x();
QPoint pos = QPoint (menuXPos - menuWidth + btnWidth, m_moreMenu->pos().y()); QPoint pos = QPoint (btnGlobalXPos - menuWidth + btnWidth, m_moreMenu->pos().y());
m_moreMenu->move(pos); m_moreMenu->move(pos);
return true; return true;
} }

View File

@ -0,0 +1,15 @@
#!/bin/bash
ts_list=(`ls translations/*.ts`)
source /etc/os-release
version=(`echo $ID`)
for ts in "${ts_list[@]}"
do
printf "\nprocess ${ts}\n"
if [ "$version" == "fedora" ] || [ "$version" == "opensuse-leap" ] || [ "$version" == "opensuse-tumbleweed" ];then
lrelease-qt5 "${ts}"
else
lrelease "${ts}"
fi
done

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -44,12 +44,12 @@
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="127"/> <location filename="../wlanconnect.cpp" line="127"/>
<source>ukui control center</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="130"/> <location filename="../wlanconnect.cpp" line="130"/>
<source>ukui control center desktop message</source> <source>Settings desktop message</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
@ -58,14 +58,14 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="368"/> <location filename="../wlanconnect.cpp" line="369"/>
<location filename="../wlanconnect.cpp" line="1039"/> <location filename="../wlanconnect.cpp" line="1058"/>
<location filename="../wlanconnect.cpp" line="1101"/> <location filename="../wlanconnect.cpp" line="1121"/>
<source>connected</source> <source>connected</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="976"/> <location filename="../wlanconnect.cpp" line="994"/>
<source>card</source> <source>card</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -43,14 +43,22 @@
<extra-contents_path>/wlanconnect/Advanced settings&quot;</extra-contents_path> <extra-contents_path>/wlanconnect/Advanced settings&quot;</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="127"/>
<source>ukui control center</source> <source>ukui control center</source>
<translation></translation> <translation type="vanished"></translation>
</message>
<message>
<source>ukui control center desktop message</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../wlanconnect.cpp" line="127"/>
<source>Settings</source>
<translation></translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="130"/> <location filename="../wlanconnect.cpp" line="130"/>
<source>ukui control center desktop message</source> <source>Settings desktop message</source>
<translation></translation> <translation> </translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="232"/> <location filename="../wlanconnect.cpp" line="232"/>
@ -58,14 +66,14 @@
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="368"/> <location filename="../wlanconnect.cpp" line="369"/>
<location filename="../wlanconnect.cpp" line="1039"/> <location filename="../wlanconnect.cpp" line="1058"/>
<location filename="../wlanconnect.cpp" line="1101"/> <location filename="../wlanconnect.cpp" line="1121"/>
<source>connected</source> <source>connected</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="976"/> <location filename="../wlanconnect.cpp" line="994"/>
<source>card</source> <source>card</source>
<translation></translation> <translation></translation>
</message> </message>

View File

@ -43,14 +43,22 @@
<extra-contents_path>/wlanconnect/Advanced settings&quot;</extra-contents_path> <extra-contents_path>/wlanconnect/Advanced settings&quot;</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="127"/>
<source>ukui control center</source> <source>ukui control center</source>
<translation>ukui control center</translation> <translation type="vanished">ukui control center</translation>
</message>
<message>
<source>ukui control center desktop message</source>
<translation type="vanished">ukui control center desktop message</translation>
</message>
<message>
<location filename="../wlanconnect.cpp" line="127"/>
<source>Settings</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="130"/> <location filename="../wlanconnect.cpp" line="130"/>
<source>ukui control center desktop message</source> <source>Settings desktop message</source>
<translation>ukui control center desktop message</translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="232"/> <location filename="../wlanconnect.cpp" line="232"/>
@ -58,14 +66,14 @@
<translation>No wireless network card detected</translation> <translation>No wireless network card detected</translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="368"/> <location filename="../wlanconnect.cpp" line="369"/>
<location filename="../wlanconnect.cpp" line="1039"/> <location filename="../wlanconnect.cpp" line="1058"/>
<location filename="../wlanconnect.cpp" line="1101"/> <location filename="../wlanconnect.cpp" line="1121"/>
<source>connected</source> <source>connected</source>
<translation>connected</translation> <translation>connected</translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="976"/> <location filename="../wlanconnect.cpp" line="994"/>
<source>card</source> <source>card</source>
<translation>card</translation> <translation>card</translation>
</message> </message>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="mn">
<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>WlanConnect</name>
<message>
<location filename="../wlanconnect.ui" line="14"/>
<source>WlanConnect</source>
<translation> </translation>
</message>
<message>
<location filename="../wlanconnect.ui" line="35"/>
<location filename="../wlanconnect.cpp" line="144"/>
<location filename="../wlanconnect.cpp" line="215"/>
<source>WLAN</source>
<translation> </translation>
</message>
<message>
<location filename="../wlanconnect.ui" line="94"/>
<location filename="../wlanconnect.cpp" line="217"/>
<source>open</source>
<translation></translation>
<extra-contents_path>/wlanconnect/open</extra-contents_path>
</message>
<message>
<location filename="../wlanconnect.ui" line="147"/>
<location filename="../wlanconnect.cpp" line="214"/>
<source>Advanced settings</source>
<translation> </translation>
<extra-contents_path>/wlanconnect/Advanced settings&quot;</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>
<location filename="../wlanconnect.cpp" line="127"/>
<source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../wlanconnect.cpp" line="130"/>
<source>Settings desktop message</source>
<translation> </translation>
</message>
<message>
<location filename="../wlanconnect.cpp" line="232"/>
<source>No wireless network card detected</source>
<translation> </translation>
</message>
<message>
<location filename="../wlanconnect.cpp" line="369"/>
<location filename="../wlanconnect.cpp" line="1058"/>
<location filename="../wlanconnect.cpp" line="1121"/>
<source>connected</source>
<translation> </translation>
</message>
<message>
<location filename="../wlanconnect.cpp" line="994"/>
<source>card</source>
<translation> </translation>
</message>
</context>
</TS>

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -44,12 +44,12 @@
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="127"/> <location filename="../wlanconnect.cpp" line="127"/>
<source>ukui control center</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="130"/> <location filename="../wlanconnect.cpp" line="130"/>
<source>ukui control center desktop message</source> <source>Settings desktop message</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
@ -58,14 +58,14 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="368"/> <location filename="../wlanconnect.cpp" line="369"/>
<location filename="../wlanconnect.cpp" line="1039"/> <location filename="../wlanconnect.cpp" line="1058"/>
<location filename="../wlanconnect.cpp" line="1101"/> <location filename="../wlanconnect.cpp" line="1121"/>
<source>connected</source> <source>connected</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="976"/> <location filename="../wlanconnect.cpp" line="994"/>
<source>card</source> <source>card</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -43,14 +43,22 @@
<extra-contents_path>/wlanconnect/Advanced settings&quot;</extra-contents_path> <extra-contents_path>/wlanconnect/Advanced settings&quot;</extra-contents_path>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="127"/>
<source>ukui control center</source> <source>ukui control center</source>
<translation></translation> <translation type="vanished"></translation>
</message>
<message>
<source>ukui control center desktop message</source>
<translation type="vanished"></translation>
</message>
<message>
<location filename="../wlanconnect.cpp" line="127"/>
<source>Settings</source>
<translation></translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="130"/> <location filename="../wlanconnect.cpp" line="130"/>
<source>ukui control center desktop message</source> <source>Settings desktop message</source>
<translation></translation> <translation> </translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="232"/> <location filename="../wlanconnect.cpp" line="232"/>
@ -58,14 +66,14 @@
<translation>线</translation> <translation>线</translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="368"/> <location filename="../wlanconnect.cpp" line="369"/>
<location filename="../wlanconnect.cpp" line="1039"/> <location filename="../wlanconnect.cpp" line="1058"/>
<location filename="../wlanconnect.cpp" line="1101"/> <location filename="../wlanconnect.cpp" line="1121"/>
<source>connected</source> <source>connected</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../wlanconnect.cpp" line="976"/> <location filename="../wlanconnect.cpp" line="994"/>
<source>card</source> <source>card</source>
<translation></translation> <translation></translation>
</message> </message>

View File

@ -124,10 +124,10 @@ void WlanConnect::showDesktopNotify(const QString &message)
"org.freedesktop.Notifications", "org.freedesktop.Notifications",
QDBusConnection::sessionBus()); QDBusConnection::sessionBus());
QList<QVariant> args; QList<QVariant> args;
args<<(tr("ukui control center")) args<<(tr("Settings"))
<<((unsigned int) 0) <<((unsigned int) 0)
<<QString("gnome-dev-ethernet") <<QString("gnome-dev-ethernet")
<<tr("ukui control center desktop message") //显示的是什么类型的信息 <<tr("Settings desktop message") //显示的是什么类型的信息
<<message //显示的具体信息 <<message //显示的具体信息
<<QStringList() <<QStringList()
<<QVariantMap() <<QVariantMap()
@ -231,6 +231,7 @@ bool WlanConnect::eventFilter(QObject *w, QEvent *e) {
if (!getSwitchBtnEnable()) { if (!getSwitchBtnEnable()) {
showDesktopNotify(tr("No wireless network card detected")); showDesktopNotify(tr("No wireless network card detected"));
} else { } else {
UkccCommon::buriedSettings(QString("wlanconnect"), QString("Open"), QString("settings"),!getSwitchBtnState()?"true":"false");
if (m_interface != nullptr && m_interface->isValid()) { if (m_interface != nullptr && m_interface->isValid()) {
m_interface->call(QStringLiteral("setWirelessSwitchEnable"), !getSwitchBtnState()); m_interface->call(QStringLiteral("setWirelessSwitchEnable"), !getSwitchBtnState());
} }
@ -276,7 +277,7 @@ void WlanConnect::initComponent() {
//删除无线网络 //删除无线网络
connect(m_interface, SIGNAL(wlanRemove(QString, QString)), this, SLOT(onNetworkRemove(QString, QString)), Qt::QueuedConnection); connect(m_interface, SIGNAL(wlanRemove(QString, QString)), this, SLOT(onNetworkRemove(QString, QString)), Qt::QueuedConnection);
//网卡插拔处理 //网卡插拔处理
connect(m_interface, SIGNAL(deviceStatusChanged()), this, SLOT(onDeviceStatusChanged()), Qt::QueuedConnection); connect(m_interface, SIGNAL(wirelessDeviceStatusChanged()), this, SLOT(onDeviceStatusChanged()), Qt::QueuedConnection);
//信号更新处理 改为每过固定时间 主动获取 //信号更新处理 改为每过固定时间 主动获取
// connect(m_interface, SIGNAL(signalStrengthChange(QString, QString, int)), this, SLOT(updateStrengthList(QString, QString, int))); // connect(m_interface, SIGNAL(signalStrengthChange(QString, QString, int)), this, SLOT(updateStrengthList(QString, QString, int)));
//网卡name处理 //网卡name处理
@ -286,6 +287,7 @@ void WlanConnect::initComponent() {
//高级设置 //高级设置
connect(ui->detailBtn, &QPushButton::clicked, this, [=](bool checked) { connect(ui->detailBtn, &QPushButton::clicked, this, [=](bool checked) {
Q_UNUSED(checked) Q_UNUSED(checked)
UkccCommon::buriedSettings(QString("wlanconnect"), QString("Advanced settings"), QString("clicked"));
runExternalApp(); runExternalApp();
}); });
@ -606,7 +608,6 @@ void WlanConnect::onActiveConnectionChanged(QString deviceName, QString ssid, QS
if (!deviceFrameMap.contains(deviceName)) { if (!deviceFrameMap.contains(deviceName)) {
return; return;
} }
for (int i = 0; i < deviceFrameMap[deviceName]->itemMap.size(); ++i) {
if (deviceFrameMap[deviceName]->itemMap.contains(ssid)) { if (deviceFrameMap[deviceName]->itemMap.contains(ssid)) {
item = deviceFrameMap[deviceName]->itemMap[ssid]; item = deviceFrameMap[deviceName]->itemMap[ssid];
if (status == ACTIVATED || status == ACTIVATING) { if (status == ACTIVATED || status == ACTIVATING) {
@ -622,10 +623,21 @@ void WlanConnect::onActiveConnectionChanged(QString deviceName, QString ssid, QS
deviceFrameMap[deviceName]->uuid.clear(); deviceFrameMap[deviceName]->uuid.clear();
//todo 断开后排序 现在等下次更新列表 自动排序 //todo 断开后排序 现在等下次更新列表 自动排序
} }
} else {
if (uuid == deviceFrameMap[deviceName]->uuid) {
QMap<QString, WlanItem*>::iterator itemIter;
for (itemIter = deviceFrameMap[deviceName]->itemMap.begin(); itemIter != deviceFrameMap[deviceName]->itemMap.end(); itemIter++) {
if (itemIter.value()->uuid == uuid ) {
item = itemIter.value();
if (status == DEACTIVATED) {
itemIter.value()->uuid.clear();
}
break; break;
} }
} }
} }
}
}
if (nullptr != item) { if (nullptr != item) {
itemActiveConnectionStatusChanged(item, status); itemActiveConnectionStatusChanged(item, status);
@ -703,7 +715,14 @@ void WlanConnect::getDeviceList(QStringList &list)
auto dbusArg = result.arguments().at(0).value<QDBusArgument>(); auto dbusArg = result.arguments().at(0).value<QDBusArgument>();
QMap<QString,bool> map; QMap<QString,bool> map;
dbusArg >> map; dbusArg >> map;
list = map.keys();
//筛选已托管(managed)网卡
QMap<QString, bool>::iterator iters;
for (iters = map.begin(); iters != map.end(); ++iters) {
if (iters.value() == true) {
list << iters.key();
}
}
} }
void WlanConnect::initSwtichState() void WlanConnect::initSwtichState()
@ -976,6 +995,7 @@ void WlanConnect::addDeviceFrame(QString devName)
deviceFrameMap.insert(devName, itemFrame); deviceFrameMap.insert(devName, itemFrame);
connect(itemFrame->addWlanWidget, &AddNetBtn::clicked, this, [=](){ connect(itemFrame->addWlanWidget, &AddNetBtn::clicked, this, [=](){
UkccCommon::buriedSettings(QString("wlanconnect"), QString("Add wlan"), QString("clicked"));
if (m_interface != nullptr && m_interface->isValid()) { if (m_interface != nullptr && m_interface->isValid()) {
qDebug() << "[NetConnect]call showAddOtherWlanWidget" << devName << __LINE__; qDebug() << "[NetConnect]call showAddOtherWlanWidget" << devName << __LINE__;
m_interface->call(QStringLiteral("showAddOtherWlanWidget"), devName); m_interface->call(QStringLiteral("showAddOtherWlanWidget"), devName);
@ -996,7 +1016,7 @@ void WlanConnect::removeDeviceFrame(QString devName)
while ((layoutItem = item->lanItemFrame->layout()->takeAt(0)) != NULL) { while ((layoutItem = item->lanItemFrame->layout()->takeAt(0)) != NULL) {
delete layoutItem->widget(); delete layoutItem->widget();
delete layoutItem; delete layoutItem;
item = nullptr; layoutItem = nullptr;
} }
item->itemMap.clear(); item->itemMap.clear();
} }
@ -1047,6 +1067,7 @@ void WlanConnect::addOneWlanFrame(ItemFrame *frame, QString deviceName, QString
if (m_interface == nullptr || !m_interface->isValid()) { if (m_interface == nullptr || !m_interface->isValid()) {
return; return;
} }
UkccCommon::buriedSettings(QString("wlanconnect"), QString("info"), QString("clicked"));
qDebug() << "[WlanConnect]call showPropertyWidget" << __LINE__; qDebug() << "[WlanConnect]call showPropertyWidget" << __LINE__;
m_interface->call(QStringLiteral("showPropertyWidget"), deviceName, name); m_interface->call(QStringLiteral("showPropertyWidget"), deviceName, name);
qDebug() << "[WlanConnect]call showPropertyWidget respond" << __LINE__; qDebug() << "[WlanConnect]call showPropertyWidget respond" << __LINE__;

View File

@ -47,8 +47,10 @@
#include "wlanitem.h" #include "wlanitem.h"
#include "kwidget.h" #include "kwidget.h"
#include "kswitchbutton.h" #include "kswitchbutton.h"
#include "ukcccommon.h"
using namespace kdk; using namespace kdk;
using namespace ukcc;
namespace Ui { namespace Ui {
class WlanConnect; class WlanConnect;
@ -148,8 +150,8 @@ private:
return m_wifiSwitch->isChecked(); return m_wifiSwitch->isChecked();
} }
} }
bool LaunchApp(QString desktopFile); bool LaunchApp(QString desktopFile);
protected: protected:
bool eventFilter(QObject *w,QEvent *e); bool eventFilter(QObject *w,QEvent *e);

View File

@ -7,6 +7,11 @@ include(../component/addbtn.pri)
TARGET = $$qtLibraryTarget(wlanconnect) TARGET = $$qtLibraryTarget(wlanconnect)
DESTDIR = ../.. DESTDIR = ../..
CONFIG(release, debug|release) {
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
}
target.path = $$[QT_INSTALL_LIBS]/ukui-control-center target.path = $$[QT_INSTALL_LIBS]/ukui-control-center
trans.files = translations/* trans.files = translations/*
trans.path = /usr/share/kylin-nm/wlanconnect/ trans.path = /usr/share/kylin-nm/wlanconnect/
@ -52,4 +57,5 @@ TRANSLATIONS += \
translations/tr.ts \ translations/tr.ts \
translations/bo.ts \ translations/bo.ts \
translations/bo_CN.ts \ translations/bo_CN.ts \
translations/en_US.ts translations/en_US.ts \
translations/mn.ts

View File

@ -92,13 +92,12 @@ void WlanItem::stopLoading(){
void WlanItem::paintEvent(QPaintEvent *event) void WlanItem::paintEvent(QPaintEvent *event)
{ {
QPalette pal = qApp->palette();
QPainter painter(this); QPainter painter(this);
painter.setRenderHint(QPainter:: Antialiasing, true); //设置渲染,启动反锯齿 painter.setRenderHint(QPainter:: Antialiasing, true); //设置渲染,启动反锯齿
painter.setPen(Qt::NoPen); painter.setPen(Qt::NoPen);
painter.setBrush(this->palette().base().color()); painter.setBrush(this->palette().base().color());
QPalette pal = qApp->palette();
QColor color = pal.color(QPalette::Button); QColor color = pal.color(QPalette::Button);
color.setAlphaF(0.5); color.setAlphaF(0.5);
pal.setColor(QPalette::Button, color); pal.setColor(QPalette::Button, color);

View File

@ -19,6 +19,7 @@
*/ */
#include "listitem.h" #include "listitem.h"
#include <QDebug> #include <QDebug>
#include "themepalette.h"
#define MAIN_LAYOUT_MARGINS 0,0,0,0 #define MAIN_LAYOUT_MARGINS 0,0,0,0
#define MAIN_LAYOUT_SPACING 0 #define MAIN_LAYOUT_SPACING 0
@ -28,8 +29,9 @@
#define FRAME_WIDTH 404 #define FRAME_WIDTH 404
#define INFO_ICON_WIDTH 16 #define INFO_ICON_WIDTH 16
#define INFO_ICON_HEIGHT 16 #define INFO_ICON_HEIGHT 16
#define LIGHT_HOVER_COLOR QColor(240,240,240,255)
#define DARK_HOVER_COLOR QColor(15,15,15,255) #define THEME_SCHAME "org.ukui.style"
#define COLOR_THEME "styleName"
ListItem::ListItem(QWidget *parent) : QFrame(parent) ListItem::ListItem(QWidget *parent) : QFrame(parent)
{ {
@ -39,6 +41,7 @@ ListItem::ListItem(QWidget *parent) : QFrame(parent)
initConnection(); initConnection();
connect(qApp, &QApplication::paletteChanged, this, &ListItem::onPaletteChanged); connect(qApp, &QApplication::paletteChanged, this, &ListItem::onPaletteChanged);
// m_itemFrame->installEventFilter(this); // m_itemFrame->installEventFilter(this);
onPaletteChanged();
} }
ListItem::~ListItem() ListItem::~ListItem()
@ -144,8 +147,22 @@ void ListItem::initConnection()
void ListItem::onPaletteChanged() void ListItem::onPaletteChanged()
{ {
// QPalette pal = qApp->palette(); QPalette pal = qApp->palette();
// pal.setColor(QPalette::Window, qApp->palette().base().color()); QGSettings * styleGsettings = nullptr;
// this->setPalette(pal); const QByteArray style_id(THEME_SCHAME);
if (QGSettings::isSchemaInstalled(style_id)) {
styleGsettings = new QGSettings(style_id, QByteArray(), this);
QString currentTheme = styleGsettings->get(COLOR_THEME).toString();
if(currentTheme == "ukui-default"){
pal = themePalette(true, this);
}
}
this->setPalette(pal);
if (m_menu != nullptr) {
pal.setColor(QPalette::Base, pal.color(QPalette::Base));
pal.setColor(QPalette::Text, pal.color(QPalette::Text));
m_menu->setPalette(pal);
}
} }

View File

@ -74,10 +74,10 @@ public:
private: private:
void initUI(); void initUI();
void initConnection(); void initConnection();
void onPaletteChanged();
public Q_SLOTS: public Q_SLOTS:
virtual void onNetButtonClicked() = 0; virtual void onNetButtonClicked() = 0;
void onPaletteChanged();
virtual void onMenuTriggered(QAction *action)=0; virtual void onMenuTriggered(QAction *action)=0;
Q_SIGNALS: Q_SIGNALS:

View File

@ -191,11 +191,16 @@ void VpnListItem::runExternalApp() {
void VpnListItem::onInfoButtonClicked() void VpnListItem::onInfoButtonClicked()
{ {
#ifdef VPNDETAIL
if (m_vpnConnectItem.m_itemType != NetworkManager::ConnectionSettings::ConnectionType::Vpn) { if (m_vpnConnectItem.m_itemType != NetworkManager::ConnectionSettings::ConnectionType::Vpn) {
#else
if (true) {
#endif
runExternalApp(); runExternalApp();
return; return;
} }
#ifdef VPNDETAIL
if(m_vpnDetail != nullptr){ if(m_vpnDetail != nullptr){
m_vpnDetail->activateWindow(); m_vpnDetail->activateWindow();
return; return;
@ -209,6 +214,7 @@ void VpnListItem::onInfoButtonClicked()
m_vpnDetail->show(); m_vpnDetail->show();
m_vpnDetail->centerToScreen(); m_vpnDetail->centerToScreen();
#endif
} }
void VpnListItem::updateConnectionState(ConnectState state) void VpnListItem::updateConnectionState(ConnectState state)

View File

@ -26,11 +26,16 @@
#include <QPainterPath> #include <QPainterPath>
#include <KWindowEffects> #include <KWindowEffects>
#define THEME_SCHAME "org.ukui.style"
#define COLOR_THEME "styleName"
SinglePage::SinglePage(QWidget *parent) : QWidget(parent) SinglePage::SinglePage(QWidget *parent) : QWidget(parent)
{ {
setThemePalette();
initUI(); initUI();
initWindowProperties(); initWindowProperties();
initTransparency(); initTransparency();
initWindowTheme();
} }
SinglePage::~SinglePage() SinglePage::~SinglePage()
@ -53,7 +58,7 @@ void SinglePage::initUI()
m_titleLayout->addWidget(m_titleLabel); m_titleLayout->addWidget(m_titleLabel);
m_titleLayout->addStretch(); m_titleLayout->addStretch();
m_netDivider = new Divider(this); m_netDivider = new Divider(true, this);
m_listFrame = new QFrame(this); m_listFrame = new QFrame(this);
m_listLayout = new QVBoxLayout(m_listFrame); m_listLayout = new QVBoxLayout(m_listFrame);
@ -61,8 +66,9 @@ void SinglePage::initUI()
m_listFrame->setLayout(m_listLayout); m_listFrame->setLayout(m_listLayout);
m_listWidget = new QListWidget(m_listFrame); m_listWidget = new QListWidget(m_listFrame);
m_listLayout->addWidget(m_listWidget); m_listLayout->addWidget(m_listWidget);
m_listWidget->setProperty("needTranslucent", true);
m_setDivider = new Divider(this); m_setDivider = new Divider(true, this);
m_settingsFrame = new QFrame(this); m_settingsFrame = new QFrame(this);
m_settingsFrame->setFixedHeight(TITLE_FRAME_HEIGHT); m_settingsFrame->setFixedHeight(TITLE_FRAME_HEIGHT);
@ -104,6 +110,20 @@ void SinglePage::initWindowProperties()
} }
} }
/**
* @brief SinglePage::initWindowTheme
*/
void SinglePage::initWindowTheme()
{
const QByteArray style_id(THEME_SCHAME);
if (QGSettings::isSchemaInstalled(style_id)) {
m_styleGsettings = new QGSettings(style_id, QByteArray(), this);
connect(m_styleGsettings, &QGSettings::changed, this, &SinglePage::onThemeChanged);
} else {
qWarning() << "Gsettings interface \"org.ukui.style\" is not exist!" << Q_FUNC_INFO << __LINE__;
}
}
void SinglePage::showDesktopNotify(const QString &message, QString soundName) void SinglePage::showDesktopNotify(const QString &message, QString soundName)
{ {
QDBusInterface iface("org.freedesktop.Notifications", QDBusInterface iface("org.freedesktop.Notifications",
@ -111,8 +131,8 @@ void SinglePage::showDesktopNotify(const QString &message, QString soundName)
"org.freedesktop.Notifications", "org.freedesktop.Notifications",
QDBusConnection::sessionBus()); QDBusConnection::sessionBus());
QStringList actions; //跳转动作 QStringList actions; //跳转动作
actions.append("kylin-vpn"); actions.append("default");
actions.append("default"); //默认动作:点击消息体时打开麒麟录音 actions.append("kylin-vpn"); //默认动作:点击消息体时打开麒麟录音
QMap<QString, QVariant> hints; QMap<QString, QVariant> hints;
if (!soundName.isEmpty()) { if (!soundName.isEmpty()) {
hints.insert("sound-name",soundName); //添加声音 hints.insert("sound-name",soundName); //添加声音
@ -134,7 +154,7 @@ void SinglePage::paintEvent(QPaintEvent *event) {
QPainter painter(this); QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing); painter.setRenderHint(QPainter::Antialiasing);
painter.setPen(Qt::transparent); painter.setPen(Qt::transparent);
QColor col = qApp->palette().window().color(); QColor col = this->palette().window().color();
QPainterPath rectPath; QPainterPath rectPath;
@ -165,10 +185,37 @@ void SinglePage::onTransChanged()
paintWithTrans(); paintWithTrans();
} }
void SinglePage::onThemeChanged(const QString &key)
{
if (key == COLOR_THEME) {
setThemePalette();
paintWithTrans();
Q_EMIT qApp->paletteChanged(qApp->palette());
} else if ("themeColor" == key) {
setThemePalette();
}
}
void SinglePage::setThemePalette()
{
QPalette pal = qApp->palette();
QGSettings * styleGsettings = nullptr;
const QByteArray style_id(THEME_SCHAME);
if (QGSettings::isSchemaInstalled(style_id)) {
styleGsettings = new QGSettings(style_id, QByteArray(), this);
QString currentTheme = styleGsettings->get(COLOR_THEME).toString();
if(currentTheme == "ukui-default"){
pal = themePalette(true, this);
}
}
pal.setColor(QPalette::Background, pal.base().color());
this->setPalette(pal);
}
void SinglePage::paintWithTrans() void SinglePage::paintWithTrans()
{ {
QPalette pal = this->palette(); QPalette pal = this->palette();
QColor color = qApp->palette().base().color(); QColor color = this->palette().base().color();
color.setAlphaF(m_transparency); color.setAlphaF(m_transparency);
pal.setColor(QPalette::Window, color); pal.setColor(QPalette::Window, color);
this->setPalette(pal); this->setPalette(pal);
@ -181,5 +228,3 @@ void SinglePage::keyPressEvent(QKeyEvent *event)
} }
return QWidget::keyPressEvent(event); return QWidget::keyPressEvent(event);
} }

View File

@ -41,9 +41,9 @@ using namespace kdk;
#define MAIN_LAYOUT_MARGINS 0,0,0,0 #define MAIN_LAYOUT_MARGINS 0,0,0,0
#define MAIN_LAYOUT_SPACING 0 #define MAIN_LAYOUT_SPACING 0
#define TITLE_FRAME_HEIGHT 60 //TabWidget的tab和widget有间隙和设计稿看起来一致就不能设为设计稿里的高度 #define TITLE_FRAME_HEIGHT 50
#define TITLE_LAYOUT_MARGINS 24,0,24,0 #define TITLE_LAYOUT_MARGINS 24,0,24,0
#define NET_LAYOUT_MARGINS 8,8,0,8 #define NET_LAYOUT_MARGINS 8,4,0,4
#define TEXT_HEIGHT 20 #define TEXT_HEIGHT 20
#define SETTINGS_LAYOUT_MARGINS 23,0,24,0 #define SETTINGS_LAYOUT_MARGINS 23,0,24,0
@ -71,6 +71,8 @@ Q_SIGNALS:
private Q_SLOTS: private Q_SLOTS:
void onTransChanged(); void onTransChanged();
void onThemeChanged(const QString &key);
void setThemePalette();
protected: protected:
void paintEvent(QPaintEvent *event); void paintEvent(QPaintEvent *event);
@ -84,6 +86,7 @@ protected:
private: private:
void initWindowProperties(); void initWindowProperties();
void initWindowTheme();
protected: protected:
QVBoxLayout * m_mainLayout = nullptr; QVBoxLayout * m_mainLayout = nullptr;
@ -106,6 +109,8 @@ protected:
QGSettings * m_transGsettings = nullptr; QGSettings * m_transGsettings = nullptr;
double m_transparency = 1.0; //透明度 double m_transparency = 1.0; //透明度
//监听主题的Gsettings
QGSettings * m_styleGsettings = nullptr;
}; };

View File

@ -638,8 +638,7 @@ void VpnPage::showUI()
void VpnPage::resetWindowPosition() void VpnPage::resetWindowPosition()
{ {
#define MARGIN 8
#define MARGIN 4
#define PANEL_TOP 1 #define PANEL_TOP 1
#define PANEL_LEFT 2 #define PANEL_LEFT 2
#define PANEL_RIGHT 3 #define PANEL_RIGHT 3

View File

@ -38,7 +38,7 @@
#define VPNPAGE_LAYOUT_MARGINS 0,0,0,0 #define VPNPAGE_LAYOUT_MARGINS 0,0,0,0
#define VPN_LIST_SPACING 0 #define VPN_LIST_SPACING 0
#define ITEM_HEIGHT 50 #define ITEM_HEIGHT 50
#define ITEM_SPACE 16 #define ITEM_SPACE 8
#define PAGE_SPACE 22 #define PAGE_SPACE 22
#define LOG_FLAG "[VpnPage]" #define LOG_FLAG "[VpnPage]"

View File

@ -36,6 +36,30 @@
#include "kyvpnconnectoperation.h" #include "kyvpnconnectoperation.h"
#define VPNADDPAGE_MAINLAYOUT_MARGINS 0, 12, 0, 12
#define VPNADDPAGE_ITEM_MARGINS 24, 0, 24, 0
#define VPNADDPAGE_NULLMAGINS 0, 0, 0, 0
#define VPNADDPAGE_SIZE 520,312
#define VPNADDPAGE_FRAME_FIXEDSIZE 520, 60
#define VPNADDPAGE_BUTTON_FIXEDSIZE 96, 36
#define VPNADDPAGE_NULLSPACE 0
#define VPNADDPAGE_BUTTON_SPACE 16
#define VPNADDPAGE_NAME_MAX_LENGTH 32
#define VPNADDPAGE_LABLE_FIXEDWIDTH 112
#define VPNADDPAGE_COMBOBOX_FIXEDWIDTH 360
#define VPNADDPAGE_INPUTBOX_FIXEDWIDTH 360
#define VPNDETAILPAGE_ITEM_MARGINS 24, 0, 24, 0
#define VPNDETAILPAGE_NULLMAGINS 0, 0, 0, 0
#define VPNDETAILPAGE_FRAME_FIXEDSIZE 520, 60
#define VPNDETAILPAGE_BUTTON_FIXEDSIZE 96, 36
#define VPNDETAILPAGE_NULLSPACE 0
#define VPNDETAILPAGE_BUTTON_SPACE 16
class vpnAddPage : public QWidget class vpnAddPage : public QWidget
{ {
Q_OBJECT Q_OBJECT

View File

@ -102,7 +102,7 @@ void VpnDetail::initUI()
m_topWidget = new QWidget(this); m_topWidget = new QWidget(this);
m_centerWidget = new QWidget(this); m_centerWidget = new QWidget(this);
m_bottomWidget = new QWidget(this); m_bottomWidget = new QWidget(this);
m_divider = new Divider(this); m_divider = new Divider(false, this);
m_vpnTabBar = new VpnTabBar(this); m_vpnTabBar = new VpnTabBar(this);
m_autoConnectBox = new QCheckBox(this); m_autoConnectBox = new QCheckBox(this);
m_autoConnectLabel = new QLabel(this); m_autoConnectLabel = new QLabel(this);

View File

@ -109,7 +109,6 @@ void VpnIpv4Page::updateVpnIpv4Info(KyVpnConfig &vpnInfo)
QString netMask(""); QString netMask("");
QString gateWay(""); QString gateWay("");
vpnInfo.setIpConfigType(IPADDRESS_V4, CONFIG_IP_DHCP); vpnInfo.setIpConfigType(IPADDRESS_V4, CONFIG_IP_DHCP);
vpnInfo.ipv4AddressConstruct(ipv4address, netMask, gateWay);
qDebug() << LOG_FLAG << "IPv4 method" << vpnInfo.m_ipv4ConfigIpType; qDebug() << LOG_FLAG << "IPv4 method" << vpnInfo.m_ipv4ConfigIpType;
qDebug() << LOG_FLAG << "Update IPv4 info finished"; qDebug() << LOG_FLAG << "Update IPv4 info finished";
} else { } else {
@ -118,7 +117,6 @@ void VpnIpv4Page::updateVpnIpv4Info(KyVpnConfig &vpnInfo)
QString gateWay = m_gateWayEdit->text(); QString gateWay = m_gateWayEdit->text();
qDebug() << ipv4address << netMask << gateWay; qDebug() << ipv4address << netMask << gateWay;
vpnInfo.setIpConfigType(IPADDRESS_V4, CONFIG_IP_MANUAL); vpnInfo.setIpConfigType(IPADDRESS_V4, CONFIG_IP_MANUAL);
vpnInfo.ipv4AddressConstruct(ipv4address, netMask, gateWay);
vpnInfo.dumpInfo(); vpnInfo.dumpInfo();
qDebug() << LOG_FLAG << "Update IPv4 info finished"; qDebug() << LOG_FLAG << "Update IPv4 info finished";
} }
@ -128,7 +126,6 @@ void VpnIpv4Page::updateVpnIpv4Info(KyVpnConfig &vpnInfo)
if (!m_dnsServerEdit->text().isEmpty()) { if (!m_dnsServerEdit->text().isEmpty()) {
ipv4DnsList.append(QHostAddress(m_dnsServerEdit->text())); ipv4DnsList.append(QHostAddress(m_dnsServerEdit->text()));
} }
vpnInfo.ipv4DnsConstruct(ipv4DnsList);
vpnInfo.m_ipv4DnsSearch.clear(); vpnInfo.m_ipv4DnsSearch.clear();
vpnInfo.m_ipv4DnsSearch.append(m_searchDomainEdit->text()); vpnInfo.m_ipv4DnsSearch.append(m_searchDomainEdit->text());

View File

@ -102,7 +102,6 @@ void VpnIpv6Page::updateVpnIpv6Info(KyVpnConfig &vpnInfo)
QString netMask(""); QString netMask("");
QString gateWay(""); QString gateWay("");
vpnInfo.setIpConfigType(IPADDRESS_V6, CONFIG_IP_DHCP); vpnInfo.setIpConfigType(IPADDRESS_V6, CONFIG_IP_DHCP);
vpnInfo.ipv6AddressConstruct(ipv6address, netMask, gateWay);
qDebug() << LOG_FLAG << "IPv6 method" << vpnInfo.m_ipv6ConfigIpType; qDebug() << LOG_FLAG << "IPv6 method" << vpnInfo.m_ipv6ConfigIpType;
qDebug() << LOG_FLAG << "Update IPv6 info finished"; qDebug() << LOG_FLAG << "Update IPv6 info finished";
} else { } else {
@ -111,7 +110,6 @@ void VpnIpv6Page::updateVpnIpv6Info(KyVpnConfig &vpnInfo)
QString gateWay = m_gateWayEdit->text(); QString gateWay = m_gateWayEdit->text();
qDebug() << ipv6address << netMask << gateWay; qDebug() << ipv6address << netMask << gateWay;
vpnInfo.setIpConfigType(IPADDRESS_V6, CONFIG_IP_MANUAL); vpnInfo.setIpConfigType(IPADDRESS_V6, CONFIG_IP_MANUAL);
vpnInfo.ipv6AddressConstruct(ipv6address, netMask, gateWay);
vpnInfo.dumpInfo(); vpnInfo.dumpInfo();
qDebug() << LOG_FLAG << "Update IPv6 info finished"; qDebug() << LOG_FLAG << "Update IPv6 info finished";
} }
@ -121,7 +119,6 @@ void VpnIpv6Page::updateVpnIpv6Info(KyVpnConfig &vpnInfo)
if (!m_dnsServerEdit->text().isEmpty()) { if (!m_dnsServerEdit->text().isEmpty()) {
ipv6DnsList.append(QHostAddress(m_dnsServerEdit->text())); ipv6DnsList.append(QHostAddress(m_dnsServerEdit->text()));
} }
vpnInfo.ipv6DnsConstruct(ipv6DnsList);
vpnInfo.m_ipv6DnsSearch.clear(); vpnInfo.m_ipv6DnsSearch.clear();
vpnInfo.m_ipv6DnsSearch.append(m_searchDomainEdit->text()); vpnInfo.m_ipv6DnsSearch.append(m_searchDomainEdit->text());

View File

@ -17,6 +17,7 @@
* *
* *
*/ */
#ifndef VPNIPV6PAGE_H #ifndef VPNIPV6PAGE_H
#define VPNIPV6PAGE_H #define VPNIPV6PAGE_H

View File

@ -146,8 +146,33 @@ void vpnObject::onTabletModeChanged(bool mode)
m_vpnPage->hide(); m_vpnPage->hide();
} }
bool vpnObject::launchApp(QString desktopFile)
{
QDBusInterface appManagerDbusInterface(KYLIN_APP_MANAGER_NAME,
KYLIN_APP_MANAGER_PATH,
KYLIN_APP_MANAGER_INTERFACE,
QDBusConnection::sessionBus());
if (!appManagerDbusInterface.isValid()) {
qWarning()<<"appManagerDbusInterface init error";
return false;
} else {
QDBusReply<bool> reply = appManagerDbusInterface.call("LaunchApp", desktopFile);
return reply;
}
}
void vpnObject::runExternalApp() {
if (!launchApp("nm-connection-editor.desktop")){
QString cmd = "nm-connection-editor";
QProcess process(this);
process.startDetached(cmd);
}
}
void vpnObject::showVpnAddWidget() void vpnObject::showVpnAddWidget()
{ {
#ifdef VPNDETAIL
if (m_vpnAddPage == nullptr) { if (m_vpnAddPage == nullptr) {
m_vpnAddPage = new vpnAddPage(); m_vpnAddPage = new vpnAddPage();
connect(m_vpnAddPage, &vpnAddPage::closed, [&] () {m_vpnAddPage = nullptr;}); connect(m_vpnAddPage, &vpnAddPage::closed, [&] () {m_vpnAddPage = nullptr;});
@ -155,4 +180,8 @@ void vpnObject::showVpnAddWidget()
m_vpnAddPage->centerToScreen(); m_vpnAddPage->centerToScreen();
} }
m_vpnAddPage->raise(); m_vpnAddPage->raise();
#else
runExternalApp();
return;
#endif
} }

View File

@ -59,6 +59,8 @@ private:
void initVpnIconVisible(); void initVpnIconVisible();
void initDbusConnnect(); void initDbusConnnect();
bool launchApp(QString desktopFile);
void runExternalApp();
private: private:
VpnPage *m_vpnPage = nullptr; VpnPage *m_vpnPage = nullptr;

View File

@ -93,17 +93,31 @@ int main(int argc, char *argv[])
QApplication::setQuitOnLastWindowClosed(false); QApplication::setQuitOnLastWindowClosed(false);
QThread thread; QDBusInterface interface("com.kylin.kylinvpn",
"/com/kylin/kylinvpn",
"com.kylin.kylinvpn",
QDBusConnection::sessionBus());
if(interface.isValid()) {
return 0;
}
QThread *thread = new QThread();
KyNetworkResourceManager *p_networkResource = KyNetworkResourceManager::getInstance(); KyNetworkResourceManager *p_networkResource = KyNetworkResourceManager::getInstance();
p_networkResource->moveToThread(&thread); p_networkResource->moveToThread(thread);
QObject::connect(&thread, SIGNAL(started()), p_networkResource, SLOT(onInitNetwork())); QObject::connect(thread, &QThread::started, p_networkResource, &KyNetworkResourceManager::onInitNetwork);
thread.start(); QObject::connect(&a,&QtSingleApplication::aboutToQuit, thread, &QThread::quit);
QObject::connect(thread, &QThread::finished, thread, &QThread::deleteLater);
QObject::connect(thread, &QThread::finished, [=](){
qDebug() << "release" ;
p_networkResource->Release();
});
thread->start();
// Internationalization // Internationalization
QString locale = QLocale::system().name(); QString locale = QLocale::system().name();
QTranslator trans_global; QTranslator trans_global;
qDebug() << "QLocale " << QLocale(); qDebug() << "QLocale " << QLocale();
if (trans_global.load(QLocale(), "kylin-vpn", "_", ":/translations/")) if (trans_global.load(QLocale(), "kylin-vpn", "_", "/usr/share/kylin-nm/kylin-vpn/"))
{ {
a.installTranslator(&trans_global); a.installTranslator(&trans_global);
qDebug()<<"Translations load success"; qDebug()<<"Translations load success";

View File

@ -28,10 +28,13 @@ desktop.path = /etc/xdg/autostart/
desktop.files = kylin-vpn.desktop desktop.files = kylin-vpn.desktop
gschema.files = org.ukui.kylin-vpn.switch.gschema.xml gschema.files = org.ukui.kylin-vpn.switch.gschema.xml
gschema.path = /usr/share/glib-2.0/schemas/ gschema.path = /usr/share/glib-2.0/schemas/
qm_files.path = $${PREFIX}/share/kylin-nm/kylin-vpn/
qm_files.files = translations/*.qm
INSTALLS += target \ INSTALLS += target \
desktop \ desktop \
gschema \ gschema \
qm_files \
# The following define makes your compiler emit warnings if you use # The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings # any feature of Qt which has been marked as deprecated (the exact warnings
@ -54,9 +57,6 @@ include(singleapplication/qt-single-application.pri)
include(backend/backend.pri) include(backend/backend.pri)
include(frontend/frontend.pri) include(frontend/frontend.pri)
RESOURCES += \
vpnqrc.qrc
SOURCES += \ SOURCES += \
main.cpp main.cpp
@ -71,4 +71,9 @@ DISTFILES += \
TRANSLATIONS += \ TRANSLATIONS += \
translations/kylin-vpn_zh_CN.ts \ translations/kylin-vpn_zh_CN.ts \
translations/kylin-vpn_bo_CN.ts translations/kylin-vpn_bo_CN.ts \
translations/kylin-vpn_mn.ts
CONFIG(release, debug|release) {
!system($$PWD/translate_generation.sh): error("Failed to generate translation")
}

15
src-vpn/translate_generation.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
ts_list=(`ls translations/*.ts`)
source /etc/os-release
version=(`echo $ID`)
for ts in "${ts_list[@]}"
do
printf "\nprocess ${ts}\n"
if [ "$version" == "fedora" ] || [ "$version" == "opensuse-leap" ] || [ "$version" == "opensuse-tumbleweed" ];then
lrelease-qt5 "${ts}"
else
lrelease "${ts}"
fi
done

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -1,22 +1,748 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.1" language="bo_CN"> <TS version="2.1" language="zh_CN">
<context> <context>
<name>SinglePage</name> <name>SinglePage</name>
<message> <message>
<location filename="../frontend/single-pages/singlepage.cpp" line="73"/> <location filename="../frontend/single-pages/singlepage.cpp" line="79"/>
<source>Settings</source> <source>Settings</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../frontend/single-pages/singlepage.cpp" line="121"/> <location filename="../frontend/single-pages/singlepage.cpp" line="141"/>
<source>Kylin VPN</source> <source>Kylin VPN</source>
<translation type="unfinished"></translation> <translation>VPNཡོ</translation>
</message> </message>
<message> <message>
<location filename="../frontend/single-pages/singlepage.cpp" line="124"/> <location filename="../frontend/single-pages/singlepage.cpp" line="144"/>
<source>kylin vpn applet desktop message</source> <source>kylin vpn applet desktop message</source>
<translation type="unfinished"></translation> <translation>vpnཅོག</translation>
</message>
</context>
<context>
<name>VpnAdvancedPage</name>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="827"/>
<source>MPPE encryption algorithm:</source>
<translation>MPPEགསང:</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="828"/>
<source>Use Stateful encryption</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="829"/>
<source>Send PPP echo packets</source>
<translation>PPPཁུག</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="830"/>
<source>Authentication Mode:</source>
<translation>:</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="831"/>
<source>PAP authentication</source>
<translation>PAPདཔང</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="832"/>
<source>CHAP authentication</source>
<translation>CHAPདཔང</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="833"/>
<source>MSCHAP authentication</source>
<translation>MSCHAPདཔང</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="834"/>
<source>MSCHAP2 authentication</source>
<translation>MSCHAP2དཔང</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="835"/>
<source>EAP authentication</source>
<translation>EAPདཔང</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="836"/>
<source>Compression Mode:</source>
<translation>:</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="837"/>
<source>Allow BSD data compression</source>
<translation>BSDཉུང</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="838"/>
<source>Allow Default data compression</source>
<translation>Defaultཉུང</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="839"/>
<source>Allow TCP header compression</source>
<translation>TCPམགོ</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="840"/>
<source>Use protocol field compression negotiation</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="841"/>
<source>Use Address/Control compression</source>
<translation>/</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="847"/>
<source>All Available</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="848"/>
<source>128-bit</source>
<translation>128</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="849"/>
<source>40-bit</source>
<translation>40</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1046"/>
<source>Use custom gateway port</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1047"/>
<source>Use compression</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1048"/>
<source>Use a TCP connection</source>
<translation>TCPའབྲེལ</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1049"/>
<source>Set virtual device type</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1050"/>
<source>Set virtual device name</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1051"/>
<source>Limit TCP Maximum Segment Size(MSS)</source>
<translation>TCPཆེས(MSS)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1052"/>
<source>Randomize remote hosts</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1053"/>
<source>IPv6 tun link</source>
<translation>IPv6 tunའབྲེལ</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1054"/>
<source>Specify ping interval</source>
<translation>Pingདུས</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1055"/>
<source>Specify exit or restart ping</source>
<translation>Ping</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1056"/>
<source>Specify max routes</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1057"/>
<source>Infinite retry on error</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1058"/>
<source>Use custom key size</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1059"/>
<source>Choose</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1062"/>
<source>Use custom renegotiation interval</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1064"/>
<source>Use custom tunnel Maximum Transmission Umit(MTU)</source>
<translation>(MTU)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1066"/>
<source>Use custom UDP fragment size</source>
<translation>UDPཆ</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1068"/>
<source>Accept authenticated packets from any address (Float)</source>
<translation>(Float)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1070"/>
<source>Subject Match</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1071"/>
<source>Key File</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1072"/>
<source>Key Direction</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1074"/>
<source>Server Address</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1075"/>
<source>Port</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1076"/>
<source>Proxy USername</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1077"/>
<source>Proxy Password</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1079"/>
<source>General</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1080"/>
<source>TLS settings</source>
<translation>TLSབཀོད</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1081"/>
<source>Server Certificate Check</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1083"/>
<source>Use the previous authentication end (server) certificate</source>
<translation>()</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1085"/>
<source>Verify peer (server) certificate nsCertType specification</source>
<translation>()nsCertTypeདམིགས</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1086"/>
<source>Mode</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1087"/>
<source>Proxies</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1088"/>
<source>Proxy Type</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1089"/>
<source>Security</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1090"/>
<source>HMAC Authentication</source>
<translation>HMACདཔང</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1100"/>
<source>Input content</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1102"/>
<source>No</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1106"/>
<source>Self-adaption</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1107"/>
<source>Automatic</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1112"/>
<source>Exit</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1113"/>
<source>Restart</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1115"/>
<source>Don&apos;t verify certificate identification</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1116"/>
<source>Verify the entire subject exactly</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1117"/>
<source>Verify name exactly</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1118"/>
<source>Verify name by prefix</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1120"/>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1123"/>
<source>Server</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1121"/>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1124"/>
<source>Client</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1126"/>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1130"/>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1139"/>
<source>None</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1127"/>
<source>TLS-Certification</source>
<translation>TLS-</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1128"/>
<source>TLS-Encryption</source>
<translation>TLS-</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1134"/>
<source>Not Required</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1138"/>
<source>Default</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1216"/>
<source>Options:</source>
<translation>:</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1219"/>
<source>Request an inner IP address</source>
<translation>IPས</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1220"/>
<source>Enforce UDP encapsulation</source>
<translation>UDPཐུམ</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1221"/>
<source>Use IP compression</source>
<translation>IPཉུང</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1222"/>
<source>Enable custom password suggestions</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1382"/>
<source>Choose a private key</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1384"/>
<source>Key Files (*.key *.pem *.der *.p12 *.pfx)</source>
<translation>(*.key *.pem *.der *.p12 *.pfx)</translation>
</message>
</context>
<context>
<name>VpnConfigPage</name>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="331"/>
<source>Type</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="332"/>
<source>Name</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="333"/>
<source>Static Key</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="334"/>
<source>Local IP</source>
<translation>IPས</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="335"/>
<source>Remote IP</source>
<translation>IPས</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="336"/>
<source>PIN Code</source>
<translation>PINཨང</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="337"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="849"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="856"/>
<source>Password</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="338"/>
<source>NT Domain</source>
<translation>NTས</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="340"/>
<source>Server Address</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="341"/>
<source>Authentication Mode</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="342"/>
<source>CA Certificate</source>
<translation>CAདཔང</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="343"/>
<source>User Certificate</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="344"/>
<source>Key Direction</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="345"/>
<source>Private Key</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="346"/>
<source>Private Key Password</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="347"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="349"/>
<source>Password Options</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="348"/>
<source>Username</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="352"/>
<source>Notice:
If key direction is used, it must be opposite to the VPN side used. If &apos;1&apos; is used, the connection must use &apos;0&apos;. If you are not sure which value to use, please contact your system administrator.</source>
<translation>
VPNཡི &quot;1&quot;&quot;0&quot; </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="359"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="360"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="361"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="362"/>
<source>Choose</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="369"/>
<source>None</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="373"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="379"/>
<source>Save password only for this user</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="374"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="380"/>
<source>Save password for all users</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="375"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="381"/>
<source>Ask password every time</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="376"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="382"/>
<source>Don&apos;t require a password</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="385"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="386"/>
<source>Required</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="854"/>
<source>Certificate(TLS)</source>
<translation>(TLS)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="855"/>
<source>Static key</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="857"/>
<source>Password and certificate(TLS)</source>
<translation>(TLS)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="866"/>
<source>Certificate/Private key</source>
<translation>/</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="867"/>
<source>Certificate/ssh-agent</source>
<translation>/ssh-agent</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="868"/>
<source>Smart card</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="923"/>
<source>Choose a private key</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="925"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="964"/>
<source>Key Files (*.key *.pem *.der *.p12 *.pfx)</source>
<translation>(*.key *.pem *.der *.p12 *.pfx)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="936"/>
<source>Choose a CA certificate</source>
<translation>CAདཔང</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="938"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="951"/>
<source>CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx)</source>
<translation>CAཡིག (*.pem *.der *.p12 *.crt *.cer *.pfx)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="949"/>
<source>Choose a User certificate</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="962"/>
<source>Choose a Static key</source>
<translation></translation>
</message>
</context>
<context>
<name>VpnDetail</name>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="80"/>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="164"/>
<source>VPN</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="165"/>
<source>IPv4</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="167"/>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="244"/>
<source>IPv6</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="172"/>
<source>Advanced</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="177"/>
<source>Auto Connection</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="178"/>
<source>Cancel</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="179"/>
<source>Confirm</source>
<translation></translation>
</message>
</context>
<context>
<name>VpnIpv4Page</name>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="170"/>
<source>IPv4 Config</source>
<translation>IPv4བཀོད</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="171"/>
<source>Address</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="172"/>
<source>Netmask</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="173"/>
<source>Default Gateway</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="174"/>
<source>DNS Server</source>
<translation>DNSཞབས</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="175"/>
<source>Search Domain</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="176"/>
<source>DHCP Client ID</source>
<translation>DHCPཚོངID</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="178"/>
<source>Auto(DHCP)</source>
<translation>(DHCP)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="179"/>
<source>Manual</source>
<translation></translation>
</message>
</context>
<context>
<name>VpnIpv6Page</name>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="159"/>
<source>IPv6 Config</source>
<translation>IPv6བཀོད</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="160"/>
<source>Address</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="161"/>
<source>Netmask</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="162"/>
<source>Default Gateway</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="163"/>
<source>DNS Server</source>
<translation>DNSཞབས</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="164"/>
<source>Search Domain</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="166"/>
<source>Auto(DHCP)</source>
<translation>(DHCP)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="167"/>
<source>Manual</source>
<translation></translation>
</message> </message>
</context> </context>
<context> <context>
@ -24,121 +750,91 @@
<message> <message>
<location filename="../frontend/list-items/vpnlistitem.cpp" line="61"/> <location filename="../frontend/list-items/vpnlistitem.cpp" line="61"/>
<source>Not connected</source> <source>Not connected</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../frontend/list-items/vpnlistitem.cpp" line="160"/> <location filename="../frontend/list-items/vpnlistitem.cpp" line="146"/>
<location filename="../frontend/list-items/vpnlistitem.cpp" line="176"/> <location filename="../frontend/list-items/vpnlistitem.cpp" line="161"/>
<source>Disconnect</source> <source>Disconnect</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../frontend/list-items/vpnlistitem.cpp" line="162"/> <location filename="../frontend/list-items/vpnlistitem.cpp" line="148"/>
<location filename="../frontend/list-items/vpnlistitem.cpp" line="174"/> <location filename="../frontend/list-items/vpnlistitem.cpp" line="159"/>
<source>Connect</source> <source>Connect</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
</context> </context>
<context> <context>
<name>VpnPage</name> <name>VpnPage</name>
<message> <message>
<location filename="../frontend/single-pages/vpnpage.cpp" line="259"/> <location filename="../frontend/single-pages/vpnpage.cpp" line="253"/>
<source>VPN</source> <source>VPN</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../frontend/single-pages/vpnpage.cpp" line="270"/> <location filename="../frontend/single-pages/vpnpage.cpp" line="264"/>
<source>VPN Settings</source> <source>VPN Settings</source>
<translation type="unfinished"></translation> <translation>VPNབཀོད</translation>
</message> </message>
</context> </context>
<context> <context>
<name>vpnAddPage</name> <name>vpnAddPage</name>
<message> <message>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="15"/> <location filename="../frontend/vpndetails/vpnaddpage.cpp" line="58"/>
<source>create VPN</source> <source>create VPN</source>
<translation type="unfinished"></translation> <translation>VPN</translation>
</message> </message>
<message> <message>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="47"/> <location filename="../frontend/vpndetails/vpnaddpage.cpp" line="92"/>
<source>VPN Type</source> <source>VPN Type</source>
<translation type="unfinished"></translation> <translation>VPNརིགས</translation>
</message> </message>
<message> <message>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="75"/> <location filename="../frontend/vpndetails/vpnaddpage.cpp" line="120"/>
<source>VPN Name</source> <source>VPN Name</source>
<translation type="unfinished"></translation> <translation>VPNམིང</translation>
</message> </message>
<message> <message>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="81"/> <location filename="../frontend/vpndetails/vpnaddpage.cpp" line="126"/>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="103"/> <location filename="../frontend/vpndetails/vpnaddpage.cpp" line="147"/>
<source>Required</source> <source>Required</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="98"/> <location filename="../frontend/vpndetails/vpnaddpage.cpp" line="142"/>
<source>VPN Server</source> <source>VPN Server</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="12"/> <location filename="../frontend/vpndetails/vpnaddpage.cpp" line="168"/>
<source>VPN</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="41"/>
<source>Auto Connection</source> <source>Auto Connection</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="53"/> <location filename="../frontend/vpndetails/vpnaddpage.cpp" line="170"/>
<source>Confirm</source> <source>Confirm</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../frontend/vpndetails/vpndetailpage.cpp" line="56"/> <location filename="../frontend/vpndetails/vpnaddpage.cpp" line="172"/>
<source>Cancel</source> <source>Cancel</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
</context> </context>
<context> <context>
<name>vpnConfigPage</name> <name>vpnConfigPage</name>
<message> <message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="35"/>
<source>VPN Type</source> <source>VPN Type</source>
<translation type="unfinished"></translation> <translation type="vanished">VPN类型</translation>
</message>
</context>
<context>
<name>VpnDetail</name>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="15"/>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="27"/>
<source>VPN</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="28"/>
<source>IPv4</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="30"/>
<source>IPv6</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="32"/>
<source>Advanced</source>
<translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context> <context>
<name>vpnObject</name> <name>vpnObject</name>
<message> <message>
<location filename="../frontend/vpnobject.cpp" line="31"/> <location filename="../frontend/vpnobject.cpp" line="50"/>
<source>vpn tool</source> <source>vpn tool</source>
<translation type="unfinished"></translation> <translation>VPNཡོ</translation>
</message> </message>
</context> </context>
</TS> </TS>

View File

@ -0,0 +1,844 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="mn">
<context>
<name>SinglePage</name>
<message>
<location filename="../frontend/single-pages/singlepage.cpp" line="79"/>
<source>Settings</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/single-pages/singlepage.cpp" line="141"/>
<source>Kylin VPN</source>
<translation>VPN </translation>
</message>
<message>
<location filename="../frontend/single-pages/singlepage.cpp" line="144"/>
<source>kylin vpn applet desktop message</source>
<translation>VPN </translation>
</message>
</context>
<context>
<name>VpnAdvancedPage</name>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="827"/>
<source>MPPE encryption algorithm:</source>
<translation>MPPE :</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="828"/>
<source>Use Stateful encryption</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="829"/>
<source>Send PPP echo packets</source>
<translation>PPP </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="830"/>
<source>Authentication Mode:</source>
<translation> :</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="831"/>
<source>PAP authentication</source>
<translation>PAP </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="832"/>
<source>CHAP authentication</source>
<translation>CHAP </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="833"/>
<source>MSCHAP authentication</source>
<translation>MSCHAP </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="834"/>
<source>MSCHAP2 authentication</source>
<translation>MSCHAP2 </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="835"/>
<source>EAP authentication</source>
<translation>EAP </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="836"/>
<source>Compression Mode:</source>
<translation> :</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="837"/>
<source>Allow BSD data compression</source>
<translation>BSD </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="838"/>
<source>Allow Default data compression</source>
<translation>Default </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="839"/>
<source>Allow TCP header compression</source>
<translation>TCP </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="840"/>
<source>Use protocol field compression negotiation</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="841"/>
<source>Use Address/Control compression</source>
<translation> / </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="847"/>
<source>All Available</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="848"/>
<source>128-bit</source>
<translation>128- </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="849"/>
<source>40-bit</source>
<translation>40- </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1046"/>
<source>Use custom gateway port</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1047"/>
<source>Use compression</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1048"/>
<source>Use a TCP connection</source>
<translation>TCP </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1049"/>
<source>Set virtual device type</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1050"/>
<source>Set virtual device name</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1051"/>
<source>Limit TCP Maximum Segment Size(MSS)</source>
<translation>TCP / MSS</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1052"/>
<source>Randomize remote hosts</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1053"/>
<source>IPv6 tun link</source>
<translation>IPv6 tun </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1054"/>
<source>Specify ping interval</source>
<translation>ping / </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1055"/>
<source>Specify exit or restart ping</source>
<translation> ping / </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1056"/>
<source>Specify max routes</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1057"/>
<source>Infinite retry on error</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1058"/>
<source>Use custom key size</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1059"/>
<source>Choose</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1062"/>
<source>Use custom renegotiation interval</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1064"/>
<source>Use custom tunnel Maximum Transmission Umit(MTU)</source>
<translation> MTU</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1066"/>
<source>Use custom UDP fragment size</source>
<translation> UDP </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1068"/>
<source>Accept authenticated packets from any address (Float)</source>
<translation> (Float) </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1070"/>
<source>Subject Match</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1071"/>
<source>Key File</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1072"/>
<source>Key Direction</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1074"/>
<source>Server Address</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1075"/>
<source>Port</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1076"/>
<source>Proxy USername</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1077"/>
<source>Proxy Password</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1079"/>
<source>General</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1080"/>
<source>TLS settings</source>
<translation>TLS </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1081"/>
<source>Server Certificate Check</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1083"/>
<source>Use the previous authentication end (server) certificate</source>
<translation> ( ) </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1085"/>
<source>Verify peer (server) certificate nsCertType specification</source>
<translation> ( ) nsCertType / </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1086"/>
<source>Mode</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1087"/>
<source>Proxies</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1088"/>
<source>Proxy Type</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1089"/>
<source>Security</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1090"/>
<source>HMAC Authentication</source>
<translation>HMAC </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1100"/>
<source>Input content</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1102"/>
<source>No</source>
<translation>/ </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1106"/>
<source>Self-adaption</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1107"/>
<source>Automatic</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1112"/>
<source>Exit</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1113"/>
<source>Restart</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1115"/>
<source>Don&apos;t verify certificate identification</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1116"/>
<source>Verify the entire subject exactly</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1117"/>
<source>Verify name exactly</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1118"/>
<source>Verify name by prefix</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1120"/>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1123"/>
<source>Server</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1121"/>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1124"/>
<source>Client</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1126"/>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1130"/>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1139"/>
<source>None</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1127"/>
<source>TLS-Certification</source>
<translation>TLS- </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1128"/>
<source>TLS-Encryption</source>
<translation>TLS- </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1134"/>
<source>Not Required</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1138"/>
<source>Default</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1216"/>
<source>Options:</source>
<translation>:</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1219"/>
<source>Request an inner IP address</source>
<translation> IP </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1220"/>
<source>Enforce UDP encapsulation</source>
<translation> UDP </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1221"/>
<source>Use IP compression</source>
<translation>IP </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1222"/>
<source>Enable custom password suggestions</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1382"/>
<source>Choose a private key</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnadvancedpage.cpp" line="1384"/>
<source>Key Files (*.key *.pem *.der *.p12 *.pfx)</source>
<translation> (*.key *.pem *.der *.p12 *.pfx)</translation>
</message>
</context>
<context>
<name>VpnConfigPage</name>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="331"/>
<source>Type</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="332"/>
<source>Name</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="333"/>
<source>Static Key</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="334"/>
<source>Local IP</source>
<translation> IP </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="335"/>
<source>Remote IP</source>
<translation> IP </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="336"/>
<source>PIN Code</source>
<translation>PIN </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="337"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="849"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="856"/>
<source>Password</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="338"/>
<source>NT Domain</source>
<translation>NT </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="340"/>
<source>Server Address</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="341"/>
<source>Authentication Mode</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="342"/>
<source>CA Certificate</source>
<translation>CA </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="343"/>
<source>User Certificate</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="344"/>
<source>Key Direction</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="345"/>
<source>Private Key</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="346"/>
<source>Private Key Password</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="347"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="349"/>
<source>Password Options</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="348"/>
<source>Username</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="352"/>
<source>Notice:
If key direction is used, it must be opposite to the VPN side used. If &apos;1&apos; is used, the connection must use &apos;0&apos;. If you are not sure which value to use, please contact your system administrator.</source>
<translation>:
VPN &apos;1&apos; / &apos;0&apos; / .</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="359"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="360"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="361"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="362"/>
<source>Choose</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="369"/>
<source>None</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="373"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="379"/>
<source>Save password only for this user</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="374"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="380"/>
<source>Save password for all users</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="375"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="381"/>
<source>Ask password every time</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="376"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="382"/>
<source>Don&apos;t require a password</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="385"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="386"/>
<source>Required</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="854"/>
<source>Certificate(TLS)</source>
<translation> (TLS)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="855"/>
<source>Static key</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="857"/>
<source>Password and certificate(TLS)</source>
<translation> TLS</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="866"/>
<source>Certificate/Private key</source>
<translation> / </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="867"/>
<source>Certificate/ssh-agent</source>
<translation> /ssh-agent</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="868"/>
<source>Smart card</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="923"/>
<source>Choose a private key</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="925"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="964"/>
<source>Key Files (*.key *.pem *.der *.p12 *.pfx)</source>
<translation> (*.key *.pem *.der *.p12 *.pfx)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="936"/>
<source>Choose a CA certificate</source>
<translation>CA </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="938"/>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="951"/>
<source>CA Files (*.pem *.der *.p12 *.crt *.cer *.pfx)</source>
<translation>CA (*.pem *.der *.p12 *.crt *.cer *.pfx)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="949"/>
<source>Choose a User certificate</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnconfigpage.cpp" line="962"/>
<source>Choose a Static key</source>
<translation> </translation>
</message>
</context>
<context>
<name>VpnDetail</name>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="80"/>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="164"/>
<source>VPN</source>
<translation>vpn</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="165"/>
<source>IPv4</source>
<translation>ipv4</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="167"/>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="244"/>
<source>IPv6</source>
<translation>ipv6</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="172"/>
<source>Advanced</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="177"/>
<source>Auto Connection</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="178"/>
<source>Cancel</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpndetail.cpp" line="179"/>
<source>Confirm</source>
<translation></translation>
</message>
</context>
<context>
<name>VpnIpv4Page</name>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="170"/>
<source>IPv4 Config</source>
<translation>IPv4 </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="171"/>
<source>Address</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="172"/>
<source>Netmask</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="173"/>
<source>Default Gateway</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="174"/>
<source>DNS Server</source>
<translation>DNS </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="175"/>
<source>Search Domain</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="176"/>
<source>DHCP Client ID</source>
<translation>DHCP ID</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="178"/>
<source>Auto(DHCP)</source>
<translation> (DHCP)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv4page.cpp" line="179"/>
<source>Manual</source>
<translation> </translation>
</message>
</context>
<context>
<name>VpnIpv6Page</name>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="159"/>
<source>IPv6 Config</source>
<translation>IPv6 </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="160"/>
<source>Address</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="161"/>
<source>Netmask</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="162"/>
<source>Default Gateway</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="163"/>
<source>DNS Server</source>
<translation>DNS </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="164"/>
<source>Search Domain</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="166"/>
<source>Auto(DHCP)</source>
<translation> (DHCP)</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnipv6page.cpp" line="167"/>
<source>Manual</source>
<translation> </translation>
</message>
</context>
<context>
<name>VpnListItem</name>
<message>
<location filename="../frontend/list-items/vpnlistitem.cpp" line="61"/>
<source>Not connected</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/list-items/vpnlistitem.cpp" line="146"/>
<location filename="../frontend/list-items/vpnlistitem.cpp" line="161"/>
<source>Disconnect</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/list-items/vpnlistitem.cpp" line="148"/>
<location filename="../frontend/list-items/vpnlistitem.cpp" line="159"/>
<source>Connect</source>
<translation></translation>
</message>
</context>
<context>
<name>VpnPage</name>
<message>
<location filename="../frontend/single-pages/vpnpage.cpp" line="253"/>
<source>VPN</source>
<translation>vpn</translation>
</message>
<message>
<location filename="../frontend/single-pages/vpnpage.cpp" line="264"/>
<source>VPN Settings</source>
<translation>VPN </translation>
</message>
</context>
<context>
<name>vpnAddPage</name>
<message>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="58"/>
<source>create VPN</source>
<translation>VPN </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="92"/>
<source>VPN Type</source>
<translation>VPN </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="120"/>
<source>VPN Name</source>
<translation>VPN </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="126"/>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="147"/>
<source>Required</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="142"/>
<source>VPN Server</source>
<translation> </translation>
</message>
<message>
<source>VPN</source>
<translation type="vanished">vpn</translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="168"/>
<source>Auto Connection</source>
<translation> </translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="170"/>
<source>Confirm</source>
<translation></translation>
</message>
<message>
<location filename="../frontend/vpndetails/vpnaddpage.cpp" line="172"/>
<source>Cancel</source>
<translation></translation>
</message>
</context>
<context>
<name>vpnConfigPage</name>
<message>
<source>VPN Type</source>
<translation type="vanished">VPN类型</translation>
</message>
</context>
<context>
<name>vpnObject</name>
<message>
<location filename="../frontend/vpnobject.cpp" line="50"/>
<source>vpn tool</source>
<translation>vpn </translation>
</message>
</context>
</TS>

File diff suppressed because it is too large Load Diff

View File

@ -4,19 +4,12 @@ include(dbus-interface/dbus-interface.pri)
HEADERS += \ HEADERS += \
$$PWD/dbusadaptor.h \ $$PWD/dbusadaptor.h \
$$PWD/kylinarping.h \
$$PWD/kylinipv4arping.h \
$$PWD/kylinipv6arping.h \
$$PWD/sysdbusregister.h \ $$PWD/sysdbusregister.h \
$$PWD/utils.h \ $$PWD/utils.h \
$$PWD/wifi-auth-thread.h $$PWD/wifi-auth-thread.h
SOURCES += \ SOURCES += \
$$PWD/dbusadaptor.cpp \ $$PWD/dbusadaptor.cpp \
$$PWD/kylinipv4arping.cpp \
$$PWD/kylinipv6arping.cpp \
$$PWD/sysdbusregister.cpp \ $$PWD/sysdbusregister.cpp \
$$PWD/utils.cpp \ $$PWD/utils.cpp \
$$PWD/wifi-auth-thread.cpp $$PWD/wifi-auth-thread.cpp
DISTFILES +=

View File

@ -32,7 +32,7 @@ enum KyEapMethodType {
TTLS, TTLS,
LEAP, LEAP,
PWD, PWD,
FAST, FAST
}; };
class KyEapMethodTlsInfo class KyEapMethodTlsInfo

View File

@ -660,7 +660,7 @@ bool KyActiveConnectResourse::connectionIsVirtual(QString uuid)
return false; return false;
} }
return !m_networkdevice->deviceIsWired(devicePtr->interfaceName()); return !m_networkdevice->checkDeviceType(devicePtr->interfaceName(), NetworkManager::Device::Type::Ethernet);
} }
bool KyActiveConnectResourse::wiredConnectIsActived() bool KyActiveConnectResourse::wiredConnectIsActived()
@ -748,9 +748,9 @@ QString KyActiveConnectResourse::getAcitveConnectionPathByUuid(QString connectUu
return activeAonnectPtr->path(); return activeAonnectPtr->path();
} }
int KyActiveConnectResourse::getAcivateWifiSignal() int KyActiveConnectResourse::getActivateWifiSignal(QString devName)
{ {
int signalStrength = 0; int signalStrength = -1;
KyNetworkDeviceResourse devResource; KyNetworkDeviceResourse devResource;
QStringList devList; QStringList devList;
devResource.getNetworkDeviceList(NetworkManager::Device::Type::Wifi, devList); devResource.getNetworkDeviceList(NetworkManager::Device::Type::Wifi, devList);
@ -766,6 +766,8 @@ int KyActiveConnectResourse::getAcivateWifiSignal()
} }
if (connectDevice->type() == NetworkManager::Device::Wifi) { if (connectDevice->type() == NetworkManager::Device::Wifi) {
if ((!devName.isEmpty() && connectDevice->interfaceName() == devName)
|| devName.isEmpty()) {
NetworkManager::WirelessDevice *wirelessDevicePtr = NetworkManager::WirelessDevice *wirelessDevicePtr =
qobject_cast<NetworkManager::WirelessDevice *>(connectDevice.data()); qobject_cast<NetworkManager::WirelessDevice *>(connectDevice.data());
NetworkManager::AccessPoint::Ptr apPtr = wirelessDevicePtr->activeAccessPoint(); NetworkManager::AccessPoint::Ptr apPtr = wirelessDevicePtr->activeAccessPoint();
@ -776,6 +778,7 @@ int KyActiveConnectResourse::getAcivateWifiSignal()
break; break;
} }
} }
}
return signalStrength; return signalStrength;
} }

View File

@ -60,7 +60,8 @@ public:
bool wiredConnectIsActived(); bool wiredConnectIsActived();
bool checkWirelessStatus(NetworkManager::ActiveConnection::State state); bool checkWirelessStatus(NetworkManager::ActiveConnection::State state);
QString getAcitveConnectionPathByUuid(QString uuid); QString getAcitveConnectionPathByUuid(QString uuid);
int getAcivateWifiSignal();
int getActivateWifiSignal(QString devName = "");
private: private:
void getActiveConnectIp(NetworkManager::ActiveConnection::Ptr activeConnectPtr, void getActiveConnectIp(NetworkManager::ActiveConnection::Ptr activeConnectPtr,

View File

@ -80,6 +80,7 @@ KyConnectResourse::KyConnectResourse(QObject *parent) : QObject(parent)
connect(m_networkResourceInstance, &KyNetworkResourceManager::connectionRemove, this, &KyConnectResourse::connectionRemove); connect(m_networkResourceInstance, &KyNetworkResourceManager::connectionRemove, this, &KyConnectResourse::connectionRemove);
connect(m_networkResourceInstance, &KyNetworkResourceManager::connectionUpdate, this, &KyConnectResourse::connectionUpdate); connect(m_networkResourceInstance, &KyNetworkResourceManager::connectionUpdate, this, &KyConnectResourse::connectionUpdate);
connect(m_networkResourceInstance, &KyNetworkResourceManager::connectivityChanged, this, &KyConnectResourse::connectivityChanged); connect(m_networkResourceInstance, &KyNetworkResourceManager::connectivityChanged, this, &KyConnectResourse::connectivityChanged);
connect(m_networkResourceInstance, &KyNetworkResourceManager::needShowDesktop, this, &KyConnectResourse::needShowDesktop);
} }
KyConnectResourse::~KyConnectResourse() KyConnectResourse::~KyConnectResourse()
@ -451,38 +452,28 @@ void KyConnectResourse::getIpv4ConnectSetting(
NetworkManager::Ipv4Setting::Ptr &ipv4Setting, NetworkManager::Ipv4Setting::Ptr &ipv4Setting,
KyConnectSetting &connectSetting) KyConnectSetting &connectSetting)
{ {
connectSetting.m_ipv4Dns = ipv4Setting->dns();
if (NetworkManager::Ipv4Setting::Automatic == ipv4Setting->method()) { if (NetworkManager::Ipv4Setting::Automatic == ipv4Setting->method()) {
connectSetting.m_ipv4ConfigIpType = CONFIG_IP_DHCP; connectSetting.m_ipv4ConfigIpType = CONFIG_IP_DHCP;
connectSetting.m_ipv4Dns = ipv4Setting->dns();
return; return;
} }
connectSetting.m_ipv4ConfigIpType = CONFIG_IP_MANUAL; connectSetting.m_ipv4ConfigIpType = CONFIG_IP_MANUAL;
connectSetting.m_ipv4Address = ipv4Setting->addresses(); connectSetting.m_ipv4Address = ipv4Setting->addresses();
connectSetting.m_ipv4Dns = ipv4Setting->dns();
return;
} }
void KyConnectResourse::getIpv6ConnectSetting( void KyConnectResourse::getIpv6ConnectSetting(
NetworkManager::Ipv6Setting::Ptr &ipv6Setting, NetworkManager::Ipv6Setting::Ptr &ipv6Setting,
KyConnectSetting &connectSetting) KyConnectSetting &connectSetting)
{ {
connectSetting.m_ipv6Dns = ipv6Setting->dns();
if (NetworkManager::Ipv6Setting::Automatic == ipv6Setting->method()) { if (NetworkManager::Ipv6Setting::Automatic == ipv6Setting->method()) {
connectSetting.m_ipv6ConfigIpType = CONFIG_IP_DHCP; connectSetting.m_ipv6ConfigIpType = CONFIG_IP_DHCP;
connectSetting.m_ipv6Dns = ipv6Setting->dns();
return; return;
} }
connectSetting.m_ipv6ConfigIpType = CONFIG_IP_MANUAL; connectSetting.m_ipv6ConfigIpType = CONFIG_IP_MANUAL;
connectSetting.m_ipv6Address = ipv6Setting->addresses(); connectSetting.m_ipv6Address = ipv6Setting->addresses();
connectSetting.m_ipv6Dns = ipv6Setting->dns();
return;
} }
void KyConnectResourse::getConnectivity(NetworkManager::Connectivity &connectivity) void KyConnectResourse::getConnectivity(NetworkManager::Connectivity &connectivity)
@ -737,10 +728,11 @@ KyApConnectItem *KyConnectResourse::getApConnectItem(NetworkManager::Connection:
apConnectItem->m_connectName = connectPtr->name(); apConnectItem->m_connectName = connectPtr->name();
apConnectItem->m_connectSsid = getSsidFromByteArray(rawSsid); apConnectItem->m_connectSsid = getSsidFromByteArray(rawSsid);
apConnectItem->m_connectUuid = connectPtr->uuid(); apConnectItem->m_connectUuid = connectPtr->uuid();
if (wirelessSetting->band() == NetworkManager::WirelessSetting::FrequencyBand::Bg) {
apConnectItem->m_band = str2GBand; if (wirelessSetting->band() == NetworkManager::WirelessSetting::FrequencyBand::A) {
} else if (wirelessSetting->band() == NetworkManager::WirelessSetting::FrequencyBand::A) {
apConnectItem->m_band = str5GBand; apConnectItem->m_band = str5GBand;
} else if (wirelessSetting->band() == NetworkManager::WirelessSetting::FrequencyBand::Bg) {
apConnectItem->m_band = str2GBand;
} }
apConnectItem->m_ifaceName = settingPtr->interfaceName(); apConnectItem->m_ifaceName = settingPtr->interfaceName();
apConnectItem->m_isActivated = m_networkResourceInstance->isActiveConnection(connectPtr->uuid()); apConnectItem->m_isActivated = m_networkResourceInstance->isActiveConnection(connectPtr->uuid());

View File

@ -87,6 +87,8 @@ Q_SIGNALS:
void connectionRemove(QString path); void connectionRemove(QString path);
void connectivityChanged(NetworkManager::Connectivity connectivity); void connectivityChanged(NetworkManager::Connectivity connectivity);
void needShowDesktop(QString);
private: private:
KyNetworkResourceManager *m_networkResourceInstance = nullptr; KyNetworkResourceManager *m_networkResourceInstance = nullptr;
}; };

View File

@ -69,6 +69,7 @@ int KyConnectSetting::setIpConfigType(KyIpAddressType ipType, KyIpConfigType ipC
return 0; return 0;
} }
void KyConnectSetting::ipv4AddressConstruct(QString &ipv4Address, QString &ipv4NetMask, QString &ipv4GateWay) void KyConnectSetting::ipv4AddressConstruct(QString &ipv4Address, QString &ipv4NetMask, QString &ipv4GateWay)
{ {
qDebug()<<"ipv4 address"<<ipv4Address << ipv4NetMask << ipv4GateWay; qDebug()<<"ipv4 address"<<ipv4Address << ipv4NetMask << ipv4GateWay;
@ -78,9 +79,13 @@ void KyConnectSetting::ipv4AddressConstruct(QString &ipv4Address, QString &ipv4N
nmIpv4Address.setNetmask(QHostAddress(ipv4NetMask)); nmIpv4Address.setNetmask(QHostAddress(ipv4NetMask));
m_ipv4Address.clear(); m_ipv4Address.clear();
m_ipv4Address << nmIpv4Address; m_ipv4Address << nmIpv4Address;
return ;
} }
void KyConnectSetting::ipv4DnsConstruct(QList<QHostAddress> &ipv4Dns)
{
m_ipv4Dns = ipv4Dns;
}
void KyConnectSetting::ipv6AddressConstruct(QString &ipv6Address, QString &ipv6NetMask, QString &ipv6GateWay) void KyConnectSetting::ipv6AddressConstruct(QString &ipv6Address, QString &ipv6NetMask, QString &ipv6GateWay)
{ {
NetworkManager::IpAddress nmIpv6Address; NetworkManager::IpAddress nmIpv6Address;
@ -91,14 +96,9 @@ void KyConnectSetting::ipv6AddressConstruct(QString &ipv6Address, QString &ipv6N
m_ipv6Address << nmIpv6Address; m_ipv6Address << nmIpv6Address;
} }
void KyConnectSetting::ipv4DnsConstruct(QList<QHostAddress> &ipv4DnsList) void KyConnectSetting::ipv6DnsConstruct(QList<QHostAddress> &ipv6Dns)
{ {
m_ipv4Dns = ipv4DnsList; m_ipv6Dns = ipv6Dns;
}
void KyConnectSetting::ipv6DnsConstruct(QList<QHostAddress> &ipv6DnsList)
{
m_ipv6Dns = ipv6DnsList;
} }
void KyConnectSetting::dumpInfo() void KyConnectSetting::dumpInfo()

Some files were not shown because too many files have changed in this diff Show More