From a21606044705cef955f0303c67c169775a8adbef Mon Sep 17 00:00:00 2001 From: arcan1s Date: Thu, 2 Jul 2015 00:08:14 +0300 Subject: [PATCH] update to netctl 1.10 and 1.11 changes --- CHANGELOG | 5 + sources/CMakeLists.txt | 2 +- sources/gui/src/bondwidget.cpp | 69 ++++ sources/gui/src/bondwidget.h | 47 +++ sources/gui/src/bondwidget.ui | 71 ++++ sources/gui/src/errorwindow.cpp | 5 + sources/gui/src/ethernetwidget.cpp | 5 + sources/gui/src/ethernetwidget.ui | 41 +- sources/gui/src/generalwidget.cpp | 6 + sources/gui/src/generalwidget.ui | 32 +- sources/gui/src/mobilewidget.cpp | 32 +- sources/gui/src/mobilewidget.h | 1 + sources/gui/src/mobilewidget.ui | 81 +++- sources/gui/src/newprofilewidget.cpp | 31 +- sources/gui/src/newprofilewidget.h | 2 + sources/gui/src/tunnelwidget.cpp | 8 + sources/gui/src/tunnelwidget.ui | 35 +- sources/gui/src/wirelesswidget.cpp | 6 - sources/gui/src/wirelesswidget.ui | 42 +-- sources/plasmoid-kf5/package/metadata.desktop | 2 +- sources/resources/translations/en.ts | 71 +++- sources/resources/translations/ja.ts | 351 ++++++++++------- sources/resources/translations/netctl-gui.ts | 355 +++++++++++------- sources/resources/translations/ru.ts | 71 +++- 24 files changed, 1030 insertions(+), 341 deletions(-) create mode 100644 sources/gui/src/bondwidget.cpp create mode 100644 sources/gui/src/bondwidget.h create mode 100644 sources/gui/src/bondwidget.ui diff --git a/CHANGELOG b/CHANGELOG index fffb818..fc9c4de 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +Ver.1.4.8 +--------- +* gui + * update profile tab to netclt 1.10 and 1.11 changes + Ver.1.4.7 --------- * all diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt index 6db5221..2f8713d 100644 --- a/sources/CMakeLists.txt +++ b/sources/CMakeLists.txt @@ -11,7 +11,7 @@ set (PROJECT_CONTACT "esalexeev@gmail.com") set (PROJECT_LICENSE "GPLv3") set (PROJECT_VERSION_MAJOR 1) set (PROJECT_VERSION_MINOR 4) -set (PROJECT_VERSION_PATCH 7) +set (PROJECT_VERSION_PATCH 8) set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) string (TIMESTAMP CURRENT_DATE "%Y-%m-%d %H:%M" UTC) string (TIMESTAMP CURRENT_YEAR "%Y") diff --git a/sources/gui/src/bondwidget.cpp b/sources/gui/src/bondwidget.cpp new file mode 100644 index 0000000..0bf4754 --- /dev/null +++ b/sources/gui/src/bondwidget.cpp @@ -0,0 +1,69 @@ +/*************************************************************************** + * This file is part of netctl-gui * + * * + * netctl-gui is free software: you can redistribute it and/or * + * modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation, either version 3 of the * + * License, or (at your option) any later version. * + * * + * netctl-gui is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with netctl-gui. If not, see http://www.gnu.org/licenses/ * + ***************************************************************************/ + +#include "bondwidget.h" +#include "ui_bondwidget.h" + + +BondWidget::BondWidget(QWidget *parent) + : QWidget(parent), + ui(new Ui::BondWidget) +{ + ui->setupUi(this); + clear(); +} + + +BondWidget::~BondWidget() +{ + delete ui; +} + + +void BondWidget::clear() +{ + ui->lineEdit_mode->setText(QString("balance-rr")); +} + + +QMap BondWidget::getSettings() +{ + QMap settings; + + if (isOk() != 0) return settings; + + if (ui->lineEdit_mode->text() != QString("balance-rr")) + settings[QString("Mode")] = ui->lineEdit_mode->text(); + + return settings; +} + + +int BondWidget::isOk() +{ + // all fine + return 0; +} + + +void BondWidget::setSettings(const QMap settings) +{ + clear(); + + if (settings.contains(QString("Mode"))) + ui->lineEdit_mode->setText(settings[QString("Mode")]); +} diff --git a/sources/gui/src/bondwidget.h b/sources/gui/src/bondwidget.h new file mode 100644 index 0000000..ad02838 --- /dev/null +++ b/sources/gui/src/bondwidget.h @@ -0,0 +1,47 @@ +/*************************************************************************** + * This file is part of netctl-gui * + * * + * netctl-gui is free software: you can redistribute it and/or * + * modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation, either version 3 of the * + * License, or (at your option) any later version. * + * * + * netctl-gui is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with netctl-gui. If not, see http://www.gnu.org/licenses/ * + ***************************************************************************/ + +#ifndef BONDWIDGET_H +#define BONDWIDGET_H + +#include + + +namespace Ui { +class BondWidget; +} + +class BondWidget : public QWidget +{ + Q_OBJECT + +public: + explicit BondWidget(QWidget *parent = 0); + ~BondWidget(); + QMap getSettings(); + int isOk(); + void setSettings(const QMap settings); + +public slots: + void clear(); + +private: + Ui::BondWidget *ui; +}; + + +#endif /* BONDWIDGET_H */ diff --git a/sources/gui/src/bondwidget.ui b/sources/gui/src/bondwidget.ui new file mode 100644 index 0000000..a12d729 --- /dev/null +++ b/sources/gui/src/bondwidget.ui @@ -0,0 +1,71 @@ + + + BondWidget + + + + 0 + 0 + 550 + 46 + + + + + 0 + + + + + QDockWidget::NoDockWidgetFeatures + + + Bond settings + + + + + 0 + + + + + + + + 1 + 0 + + + + Mode + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 2 + 0 + + + + The bonding policy. See the kernel documentation on bonding for details + + + + + + + + + + + + + + diff --git a/sources/gui/src/errorwindow.cpp b/sources/gui/src/errorwindow.cpp index a90dd6d..9ff519a 100644 --- a/sources/gui/src/errorwindow.cpp +++ b/sources/gui/src/errorwindow.cpp @@ -124,6 +124,10 @@ QStringList ErrorWindow::getMessage(const int mess) title = QApplication::translate("ErrorWindow", "Error!"); message = QApplication::translate("ErrorWindow", "IP address does not match the standard"); break; + case 21: + title = QApplication::translate("ErrorWindow", "Error!"); + message = QApplication::translate("ErrorWindow", "Key is required for 'gre' mode"); + break; default: title = QApplication::translate("ErrorWindow", "Error!"); message = QApplication::translate("ErrorWindow", "Unknown error"); @@ -164,6 +168,7 @@ QMessageBox::Icon ErrorWindow::getIcon(const int mess) case 18: case 19: case 20: + case 21: icon = QMessageBox::Critical; break; default: diff --git a/sources/gui/src/ethernetwidget.cpp b/sources/gui/src/ethernetwidget.cpp index 2de2462..9e4c23a 100644 --- a/sources/gui/src/ethernetwidget.cpp +++ b/sources/gui/src/ethernetwidget.cpp @@ -46,6 +46,7 @@ void EthernetWidget::clear() showWpa(ui->checkBox_8021x->checkState()); ui->lineEdit_wpaConfig->clear(); ui->comboBox_driver->setCurrentIndex(0); + ui->spinBox_priority->setValue(1); ui->spinBox_timeoutCarrier->setValue(5); ui->spinBox_timeoutWpa->setValue(15); @@ -104,6 +105,8 @@ QMap EthernetWidget::getSettings() settings[QString("WPAConfigFile")] = QString("'%1'").arg(ui->lineEdit_wpaConfig->text()); settings[QString("WPADriver")] = ui->comboBox_driver->currentText(); } + if (ui->spinBox_priority->value() != 1) + settings[QString("Priority")] = QString::number(ui->spinBox_priority->value()); if (ui->spinBox_timeoutCarrier->value() != 5) settings[QString("TimeoutCarrier")] = QString::number(ui->spinBox_timeoutCarrier->value()); if (ui->spinBox_timeoutWpa->value() != 15) @@ -139,6 +142,8 @@ void EthernetWidget::setSettings(const QMap settings) int index = ui->comboBox_driver->findText(settings[QString("WPADriver")]); ui->comboBox_driver->setCurrentIndex(index); } + if (settings.contains(QString("Priority"))) + ui->spinBox_priority->setValue(settings[QString("Priority")].toInt()); if (settings.contains(QString("TimeoutCarrier"))) ui->spinBox_timeoutCarrier->setValue(settings[QString("TimeoutCarrier")].toInt()); if (settings.contains(QString("TimeoutWPA"))) diff --git a/sources/gui/src/ethernetwidget.ui b/sources/gui/src/ethernetwidget.ui index 336fde4..ecd553d 100644 --- a/sources/gui/src/ethernetwidget.ui +++ b/sources/gui/src/ethernetwidget.ui @@ -7,7 +7,7 @@ 0 0 550 - 227 + 255 @@ -301,6 +301,45 @@ + + + + + + + 1 + 0 + + + + Priority + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 2 + 0 + + + + Priority level of the profile. In case of automatic profile selection, profiles are tried in decreasing order of priority + + + 999 + + + 1 + + + + + diff --git a/sources/gui/src/generalwidget.cpp b/sources/gui/src/generalwidget.cpp index b8fba35..0cccabf 100644 --- a/sources/gui/src/generalwidget.cpp +++ b/sources/gui/src/generalwidget.cpp @@ -59,6 +59,7 @@ void GeneralWidget::clear() ui->listWidget_after->clear(); ui->lineEdit_execUpPost->clear(); ui->lineEdit_execDownPre->clear(); + ui->checkBox_exclude->setCheckState(Qt::Unchecked); ui->checkBox_forceConnect->setCheckState(Qt::Unchecked); ui->checkBox_debug->setCheckState(Qt::Unchecked); @@ -139,6 +140,8 @@ QMap GeneralWidget::getSettings() settings[QString("ExecUpPost")] = QString("'%1'").arg(ui->lineEdit_execUpPost->text()); if (!ui->lineEdit_execDownPre->text().isEmpty()) settings[QString("ExecDownPre")] = QString("'%1'").arg(ui->lineEdit_execDownPre->text()); + if (ui->checkBox_exclude->checkState() == Qt::Checked) + settings[QString("ExcludeAuto")] = QString("yes"); if (ui->checkBox_forceConnect->checkState() == Qt::Checked) settings[QString("ForceConnect")] = QString("yes"); if (ui->checkBox_debug->checkState() == Qt::Checked) @@ -186,6 +189,9 @@ void GeneralWidget::setSettings(const QMap settings) ui->lineEdit_execUpPost->setText(settings[QString("ExecUpPost")]); if (settings.contains(QString("ExecDownPre"))) ui->lineEdit_execDownPre->setText(settings[QString("ExecDownPre")]); + if (settings.contains(QString("ExcludeAuto"))) + if (settings[QString("ExcludeAuto")] == QString("yes")) + ui->checkBox_exclude->setCheckState(Qt::Checked); if (settings.contains(QString("ForceConnect"))) if (settings[QString("ForceConnect")] == QString("yes")) ui->checkBox_forceConnect->setCheckState(Qt::Checked); diff --git a/sources/gui/src/generalwidget.ui b/sources/gui/src/generalwidget.ui index 3d5d32f..c4f775c 100644 --- a/sources/gui/src/generalwidget.ui +++ b/sources/gui/src/generalwidget.ui @@ -7,7 +7,7 @@ 0 0 550 - 452 + 479 @@ -417,6 +417,36 @@ + + + + + + + 1 + 0 + + + + + + + + + 2 + 0 + + + + Whether or not to exclude this profile from automatic profile selection + + + Exclude auto + + + + + diff --git a/sources/gui/src/mobilewidget.cpp b/sources/gui/src/mobilewidget.cpp index 3a4c1cc..357562f 100644 --- a/sources/gui/src/mobilewidget.cpp +++ b/sources/gui/src/mobilewidget.cpp @@ -46,9 +46,11 @@ void MobileWidget::clear() ui->lineEdit_apn->clear(); ui->lineEdit_pin->clear(); ui->comboBox_mode->setCurrentIndex(0); - ui->spinBox_fail->setValue(5); ui->checkBox_route->setCheckState(Qt::Checked); ui->checkBox_dns->setCheckState(Qt::Checked); + ui->lineEdit_init->setText(QString("ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0")); + ui->spinBox_fail->setValue(5); + ui->lineEdit_chat->clear(); ui->lineEdit_options->clear(); ui->pushButton_mobileAdvanced->setChecked(false);; @@ -59,10 +61,22 @@ void MobileWidget::clear() void MobileWidget::createActions() { connect(ui->pushButton_mobileAdvanced, SIGNAL(clicked(bool)), this, SLOT(showAdvanced())); + connect(ui->pushButton_chat, SIGNAL(clicked(bool)), this, SLOT(selectChatFile())); connect(ui->pushButton_options, SIGNAL(clicked(bool)), this, SLOT(selectOptionsFile())); } +void MobileWidget::selectChatFile() +{ + QString filename = QFileDialog::getOpenFileName(this, + QApplication::translate("MobileWidget", "Select chat file"), + QDir::currentPath(), + QApplication::translate("MobileWidget", "All (*.*)")); + if (!filename.isEmpty()) + ui->lineEdit_chat->setText(filename); +} + + void MobileWidget::selectOptionsFile() { QString filename = QFileDialog::getOpenFileName(this, @@ -102,12 +116,16 @@ QMap MobileWidget::getSettings() else settings[QString("PIN")] = QString("None"); settings[QString("Mode")] = ui->comboBox_mode->currentText(); - if (ui->spinBox_fail->value() != 5) - settings[QString("MaxFail")] = QString::number(ui->spinBox_fail->value()); if (ui->checkBox_route->checkState() == Qt::Unchecked) settings[QString("DefaultRoute")] = QString("false"); if (ui->checkBox_dns->checkState() == Qt::Unchecked) settings[QString("UsePeerDNS")] = QString("false"); + if (ui->lineEdit_init->text() != QString("ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0")) + settings[QString("Init")] = QString("'%1'").arg(ui->lineEdit_init->text()); + if (ui->spinBox_fail->value() != 5) + settings[QString("MaxFail")] = QString::number(ui->spinBox_fail->value()); + if (!ui->lineEdit_chat->text().isEmpty()) + settings[QString("ChatScript")] = QString("'%1'").arg(ui->lineEdit_chat->text()); if (!ui->lineEdit_options->text().isEmpty()) settings[QString("OptionsFile")] = QString("'%1'").arg(ui->lineEdit_options->text()); @@ -143,14 +161,18 @@ void MobileWidget::setSettings(const QMap settings) int index = ui->comboBox_mode->findText(settings[QString("Mode")]); ui->comboBox_mode->setCurrentIndex(index); } - if (settings.contains(QString("MaxFail"))) - ui->spinBox_fail->setValue(settings[QString("MaxFail")].toInt()); if (settings.contains(QString("DefaultRoute"))) if (settings[QString("DefaultRoute")] == QString("false")) ui->checkBox_route->setCheckState(Qt::Unchecked); if (settings.contains(QString("UsePeerDNS"))) if (settings[QString("UsePeerDNS")] == QString("false")) ui->checkBox_dns->setCheckState(Qt::Unchecked); + if (settings.contains(QString("Init"))) + ui->lineEdit_init->setText(settings[QString("Init")]); + if (settings.contains(QString("MaxFail"))) + ui->spinBox_fail->setValue(settings[QString("MaxFail")].toInt()); + if (settings.contains(QString("ChatScript"))) + ui->lineEdit_chat->setText(settings[QString("ChatScript")]); if (settings.contains(QString("OptionsFile"))) ui->lineEdit_options->setText(settings[QString("OptionsFile")]); } diff --git a/sources/gui/src/mobilewidget.h b/sources/gui/src/mobilewidget.h index 855dc91..699867b 100644 --- a/sources/gui/src/mobilewidget.h +++ b/sources/gui/src/mobilewidget.h @@ -40,6 +40,7 @@ public slots: void clear(); private slots: + void selectChatFile(); void selectOptionsFile(); void showAdvanced(); diff --git a/sources/gui/src/mobilewidget.ui b/sources/gui/src/mobilewidget.ui index 195ee4c..d835064 100644 --- a/sources/gui/src/mobilewidget.ui +++ b/sources/gui/src/mobilewidget.ui @@ -7,7 +7,7 @@ 0 0 445 - 314 + 376 @@ -319,6 +319,39 @@ + + + + + + + 1 + 0 + + + + Init + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 2 + 0 + + + + An initialization string sent to the modem before dialing + + + + + @@ -358,6 +391,52 @@ + + + + + + + 7 + 0 + + + + Chat script + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 10 + 0 + + + + Path to a chat file + + + + + + + + 4 + 0 + + + + Browse + + + + + diff --git a/sources/gui/src/newprofilewidget.cpp b/sources/gui/src/newprofilewidget.cpp index ca726dc..c42a68d 100644 --- a/sources/gui/src/newprofilewidget.cpp +++ b/sources/gui/src/newprofilewidget.cpp @@ -25,8 +25,9 @@ #include #include -#include "calls.h" +#include "bondwidget.h" #include "bridgewidget.h" +#include "calls.h" #include "commonfunctions.h" #include "dbusoperation.h" #include "errorwindow.h" @@ -60,6 +61,8 @@ NewProfileWidget::NewProfileWidget(QWidget *parent, const QMap ui->scrollAreaWidgetContents->layout()->addWidget(generalWid); ipWid = new IpWidget(this); ui->scrollAreaWidgetContents->layout()->addWidget(ipWid); + bondWid = new BondWidget(this); + ui->scrollAreaWidgetContents->layout()->addWidget(bondWid); bridgeWid = new BridgeWidget(this); ui->scrollAreaWidgetContents->layout()->addWidget(bridgeWid); ethernetWid = new EthernetWidget(this); @@ -87,6 +90,7 @@ NewProfileWidget::~NewProfileWidget() { if (debug) qDebug() << PDEBUG; + if (bondWid != nullptr) delete bondWid; if (bridgeWid != nullptr) delete bridgeWid; if (ethernetWid != nullptr) delete ethernetWid; if (generalWid != nullptr) delete generalWid; @@ -168,6 +172,7 @@ void NewProfileWidget::updateProfileTab() generalWid->clear(); ipWid->clear(); + bondWid->clear(); bridgeWid->clear(); ethernetWid->clear(); macvlanWid->clear(); @@ -192,6 +197,7 @@ void NewProfileWidget::profileTabChangeState(const QString current) generalWid->setVisible(true); ipWid->setVisible((current != QString("pppoe")) && (current != QString("mobile_ppp"))); + bondWid->setVisible(current == QString("bond")); bridgeWid->setVisible(current == QString("bridge")); ethernetWid->setVisible((current == QString("ethernet")) || (current == QString("vlan")) || @@ -250,6 +256,7 @@ void NewProfileWidget::profileTabCreateProfile() return ErrorWindow::showWindow(7, QString(PDEBUG), debug); else if (wirelessWid->isOk() == 5) return ErrorWindow::showWindow(11, QString(PDEBUG), debug); + } else if (generalWid->connectionType->currentText() == QString("bond")) { } else if (generalWid->connectionType->currentText() == QString("bridge")) { } else if (generalWid->connectionType->currentText() == QString("pppoe")) { if (pppoeWid->isOk() == 1) @@ -269,11 +276,13 @@ void NewProfileWidget::profileTabCreateProfile() else if (generalWid->connectionType->currentText() == QString("tunnel")) { if (tunnelWid->isOk() == 1) return ErrorWindow::showWindow(20, QString(PDEBUG), debug); + else if (tunnelWid->isOk() == 2) + return ErrorWindow::showWindow(21, QString(PDEBUG), debug); } else if (generalWid->connectionType->currentText() == QString("tuntap")) { if (tuntapWid->isOk() == 1) return ErrorWindow::showWindow(15, QString(PDEBUG), debug); - if (tuntapWid->isOk() == 2) + else if (tuntapWid->isOk() == 2) return ErrorWindow::showWindow(15, QString(PDEBUG), debug); } else if (generalWid->connectionType->currentText() == QString("vlan")) { @@ -304,17 +313,23 @@ void NewProfileWidget::profileTabCreateProfile() addSettings = wirelessWid->getSettings(); for (int i=0; iconnectionType->currentText() == QString("bond")) || - (generalWid->connectionType->currentText() == QString("dummy")) || + } else if ((generalWid->connectionType->currentText() == QString("dummy")) || (generalWid->connectionType->currentText() == QString("openvswitch"))) { QMap addSettings = ipWid->getSettings(); for (int i=0; iconnectionType->currentText() == QString("bond")) { + QMap addSettings = ipWid->getSettings(); + for (int i=0; igetSettings(); + for (int i=0; iconnectionType->currentText() == QString("bridge")) { QMap addSettings = ipWid->getSettings(); for (int i=0; igetSettings(); + addSettings = bridgeWid->getSettings(); for (int i=0; iconnectionType->currentText() == QString("pppoe")) { @@ -388,13 +403,15 @@ void NewProfileWidget::profileTabLoadProfile() } else if (generalWid->connectionType->currentText() == QString("wireless")) { ipWid->setSettings(settings); wirelessWid->setSettings(settings); - } else if ((generalWid->connectionType->currentText() == QString("bond")) || - (generalWid->connectionType->currentText() == QString("dummy")) || + } else if ((generalWid->connectionType->currentText() == QString("dummy")) || (generalWid->connectionType->currentText() == QString("openvswitch"))) { ipWid->setSettings(settings); } else if (generalWid->connectionType->currentText() == QString("bridge")) { ipWid->setSettings(settings); bridgeWid->setSettings(settings); + } else if (generalWid->connectionType->currentText() == QString("bond")) { + ipWid->setSettings(settings); + bondWid->setSettings(settings); } else if (generalWid->connectionType->currentText() == QString("pppoe")) { pppoeWid->setSettings(settings); } else if (generalWid->connectionType->currentText() == QString("mobile_ppp")) { diff --git a/sources/gui/src/newprofilewidget.h b/sources/gui/src/newprofilewidget.h index 6c69dcf..0bb56b0 100644 --- a/sources/gui/src/newprofilewidget.h +++ b/sources/gui/src/newprofilewidget.h @@ -23,6 +23,7 @@ #include +class BondWidget; class BridgeWidget; class EthernetWidget; class GeneralWidget; @@ -71,6 +72,7 @@ private: // ui MainWindow *mainWindow; Ui::NewProfileWidget *ui = nullptr; + BondWidget *bondWid = nullptr; BridgeWidget *bridgeWid = nullptr; EthernetWidget *ethernetWid = nullptr; GeneralWidget *generalWid = nullptr; diff --git a/sources/gui/src/tunnelwidget.cpp b/sources/gui/src/tunnelwidget.cpp index 6b1964d..820c257 100644 --- a/sources/gui/src/tunnelwidget.cpp +++ b/sources/gui/src/tunnelwidget.cpp @@ -42,6 +42,7 @@ void TunnelWidget::clear() ui->comboBox_mode->setCurrentIndex(0); ui->lineEdit_local->clear(); ui->lineEdit_remote->clear(); + ui->lineEdit_key->clear(); } @@ -62,6 +63,8 @@ QMap TunnelWidget::getSettings() if (!IpRegExp::checkString(ui->lineEdit_local->text(), IpRegExp::ip4Regex())) settings[QString("Local")] = QString("'%1'").arg(ui->lineEdit_local->text()); settings[QString("Remote")] = QString("'%1'").arg(ui->lineEdit_remote->text()); + if (ui->comboBox_mode->currentText() == QString("gre")) + settings[QString("Key")] = QString("'%1'").arg(ui->lineEdit_key->text()); return settings; } @@ -71,6 +74,9 @@ int TunnelWidget::isOk() { // ip is not correct if (!IpRegExp::checkString(ui->lineEdit_remote->text(), IpRegExp::ip4Regex())) return 1; + // key is empty + if (ui->comboBox_mode->currentText() == QString("gre")) + if (ui->lineEdit_key->text().isEmpty()) return 2; // all fine return 0; } @@ -88,4 +94,6 @@ void TunnelWidget::setSettings(const QMap settings) ui->lineEdit_local->setText(settings[QString("Local")]); if (settings.contains(QString("Remote"))) ui->lineEdit_remote->setText(settings[QString("Remote")]); + if (settings.contains(QString("Key"))) + ui->lineEdit_key->setText(settings[QString("Key")]); } diff --git a/sources/gui/src/tunnelwidget.ui b/sources/gui/src/tunnelwidget.ui index 3232a88..4d29d58 100644 --- a/sources/gui/src/tunnelwidget.ui +++ b/sources/gui/src/tunnelwidget.ui @@ -7,7 +7,7 @@ 0 0 411 - 108 + 137 @@ -166,6 +166,39 @@ + + + + + + + 1 + 0 + + + + Key + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 2 + 0 + + + + A key identifying an individual traffic flow within a tunnel + + + + + diff --git a/sources/gui/src/wirelesswidget.cpp b/sources/gui/src/wirelesswidget.cpp index fe2a434..d29a14a 100644 --- a/sources/gui/src/wirelesswidget.cpp +++ b/sources/gui/src/wirelesswidget.cpp @@ -77,7 +77,6 @@ void WirelessWidget::clear() } ui->comboBox_rfkill->setCurrentIndex(0); ui->spinBox_timeoutWpa->setValue(15); - ui->checkBox_exclude->setCheckState(Qt::Unchecked); ui->pushButton_wirelessAdvanced->setChecked(false); showAdvanced(); @@ -231,8 +230,6 @@ QMap WirelessWidget::getSettings() settings[QString("RFKill")] = ui->comboBox_rfkill->currentText(); if (ui->spinBox_timeoutWpa->value() != 15) settings[QString("TimeoutWPA")] = QString::number(ui->spinBox_timeoutWpa->value()); - if (ui->checkBox_exclude->checkState() == Qt::Checked) - settings[QString("ExcludeAuto")] = QString("yes"); return settings; } @@ -310,9 +307,6 @@ void WirelessWidget::setSettings(const QMap settings) } if (settings.contains(QString("TimeoutWPA"))) ui->spinBox_timeoutWpa->setValue(settings[QString("TimeoutWPA")].toInt()); - if (settings.contains(QString("ExcludeAuto"))) - if (settings[QString("ExcludeAuto")] == QString("yes")) - ui->checkBox_exclude->setCheckState(Qt::Checked); changeSecurity(ui->comboBox_security->currentText()); } diff --git a/sources/gui/src/wirelesswidget.ui b/sources/gui/src/wirelesswidget.ui index b387852..9fa1227 100644 --- a/sources/gui/src/wirelesswidget.ui +++ b/sources/gui/src/wirelesswidget.ui @@ -7,7 +7,7 @@ 0 0 584 - 697 + 670 @@ -280,17 +280,11 @@ - + Qt::Horizontal - - - 40 - 20 - - - + @@ -313,36 +307,6 @@ 0 - - - - - - - 1 - 0 - - - - - - - - - 2 - 0 - - - - Whether or not to exclude this profile from automatic profile selection - - - Exclude auto - - - - - diff --git a/sources/plasmoid-kf5/package/metadata.desktop b/sources/plasmoid-kf5/package/metadata.desktop index efd7d5e..3fb1f0b 100644 --- a/sources/plasmoid-kf5/package/metadata.desktop +++ b/sources/plasmoid-kf5/package/metadata.desktop @@ -14,7 +14,7 @@ X-Plasma-RemoteLocation= X-KDE-PluginInfo-Author=Evgeniy Alekseev X-KDE-PluginInfo-Email=esalexeev@gmail.com X-KDE-PluginInfo-Name=org.kde.plasma.netctl -X-KDE-PluginInfo-Version=1.4.7 +X-KDE-PluginInfo-Version=1.4.8 X-KDE-PluginInfo-Website=http://arcanis.name/projects/netctl-gui X-KDE-PluginInfo-Category=Network X-KDE-PluginInfo-Depends= diff --git a/sources/resources/translations/en.ts b/sources/resources/translations/en.ts index 1b23f45..9975c3e 100644 --- a/sources/resources/translations/en.ts +++ b/sources/resources/translations/en.ts @@ -65,6 +65,21 @@ This software uses: %1 + + BondWidget + + Bond settings + Bond settings + + + Mode + Mode + + + The bonding policy. See the kernel documentation on bonding for details + The bonding policy. See the kernel documentation on bonding for details + + BridgeWidget @@ -190,6 +205,10 @@ IP address does not match the standard IP address does not match the standard + + Key is required for 'gre' mode + Key is required for 'gre' mode + EthernetWidget @@ -281,6 +300,14 @@ Maximum time, in seconds, to wait for 802.1x authentication to succeed Maximum time, in seconds, to wait for 802.1x authentication to succeed + + Priority + Priority + + + Priority level of the profile. In case of automatic profile selection, profiles are tried in decreasing order of priority + Priority level of the profile. In case of automatic profile selection, profiles are tried in decreasing order of priority + GeneralWidget @@ -376,6 +403,14 @@ A description of the profile A description of the profile + + Whether or not to exclude this profile from automatic profile selection + Whether or not to exclude this profile from automatic profile selection + + + Exclude auto + Exclude auto + IpWidget @@ -1519,6 +1554,30 @@ Should be according to standards Browse Browse + + Select chat file + Select chat file + + + All (*.*) + All (*.*) + + + Init + Init + + + An initialization string sent to the modem before dialing + An initialization string sent to the modem before dialing + + + Chat script + Chat script + + + Path to a chat file + Path to a chat file + NetctlAutoWindow @@ -2467,6 +2526,14 @@ Should be according to standards The address of the remote end of the tunnel The address of the remote end of the tunnel + + Key + Key + + + A key identifying an individual traffic flow within a tunnel + A key identifying an individual traffic flow within a tunnel + TuntapWidget @@ -2809,11 +2876,11 @@ Should be according to standards Whether or not to exclude this profile from automatic profile selection - Whether or not to exclude this profile from automatic profile selection + Whether or not to exclude this profile from automatic profile selection Exclude auto - Exclude auto + Exclude auto Frequency diff --git a/sources/resources/translations/ja.ts b/sources/resources/translations/ja.ts index db9392d..73b194f 100644 --- a/sources/resources/translations/ja.ts +++ b/sources/resources/translations/ja.ts @@ -79,6 +79,24 @@ 概要 + + BondWidget + + + Bond settings + + + + + Mode + モード + + + + The bonding policy. See the kernel documentation on bonding for details + + + BridgeWidget @@ -125,6 +143,7 @@ + Error! エラー! @@ -230,11 +249,16 @@ + Key is required for 'gre' mode + + + + Unknown error 不明なエラーです - + Sender : %1 送信元:%1 @@ -246,7 +270,7 @@ フォーム - + Ethernet options イーサネットのオプション @@ -255,95 +279,105 @@ 詳細を隠す - + <html><head/><body><p>Whether or not the absence of a carrier is acceptable</p></body></html> I don't know this translation is exactry correct because of my lack of knowledge in network. <html><head/><body><p>受理可能なキャリアの不在を問わない</p></body></html> - + Skip no carrier 存在しないキャリアをスキップ - + Set to ‘yes’ to use 802.1x authentication 802.1.x 認証を使用「する」ように設定する - + 802.1x authentication 802.1.x 認証 - + WPA config file WPA 設定ファイル - + Path to a wpa_supplicant configuration file wpa_supplicant 設定ファイルへのパス - + Browse ブラウズ - + WPA driver WPA ドライバ - + The wpa_supplicant driver to use for 802.1x authentication 802.1.x 認証利用の為の wpa_supplicant ドライバ - + + Priority + 優先度 + + + + Priority level of the profile. In case of automatic profile selection, profiles are tried in decreasing order of priority + + + + wired wired - + nl80211 nl80211 - + wext wext - + Timeout carrier キャリアのタイムアウト - + Maximum time, in seconds, to wait for a carrier キャリアを待機する最大時間(秒) - + Timeout WPA WPA のタイムアウト - + Maximum time, in seconds, to wait for 802.1x authentication to succeed 802.1.x 認証の成功を待機する最大時間(秒) - - + + Select wpa configuration file WPA 設定ファイルを選択 - - + + Configuration files (*.conf) 設定ファイル (*.conf) @@ -359,12 +393,12 @@ フォーム - + General 一般 - + Description 説明 @@ -373,98 +407,108 @@ <html><head/><body><p>プロファイルの説明</p></body></html> - + Connection 接続 - + The connection type used by the profile プロファイルで利用される接続 - + Interface インターフェース - + The name of the associated network interface 確立されたネットワークインターフェースの名前 - + Binds to interfaces インターフェースとの紐付け - - + + Add 追加 - + An array of physical network interfaces that this profile needs before it can be started 開始前にプロファイルを必要とする物理ネットワークインターフェース - + Hide advanced 詳細を隠す - + A description of the profile - + After - + An array of profile names that should be started before this profile is started 開始前にプロファイルを必要とするプロファイル名 - + Command after starting 開始後に実行するコマンド - + A command that is executed after a connection is established 接続確立後に実行されるコマンド - + Command before stoping 停止前に実行するコマンド - + A command that is executed before a connection is brought down 接続切断前に実行されるコマンド - + + Whether or not to exclude this profile from automatic profile selection + 自動的なプロファイル選択からこのプロファイルを除外するか否かを問わない + + + + Exclude auto + プロファイルを除外する + + + Set to ‘yes’ to force connecting even if the interface is up インターフェースが有効であっても強制的に接続「する」ように設定する - + Force connect 接続を強制 - + Debug mode デバッグモード - + Show advanced 詳細を表示 @@ -1438,12 +1482,12 @@ Should be according to standards ライセンス - + Restore existing session. 既存のセッションを復元します。 - + Close existing session. 既存のセッションを閉じます。 @@ -1484,78 +1528,78 @@ Should be according to standards フォーム - + Mobile PPP settings モバイル PPP の設定 - + Username ユーザ名 - - + + The username and password to connect with 接続する際のユーザ名とパスワード - + Password パスワード - + Access point name アクセスポイント名 - + The access point (apn) to connect on 接続するアクセスポイント (APN) - + PIN PIN - + If your modem requires a PIN to unlock, use this option モデムが PIN のアンロックを要求する場合にこのオプションを使用する - + Mode モード - + This option is used to specify the connection mode このオプションは接続モードを示す際に使用されます - + None 無し - + 3Gpref 3Gpref - + 3Gonly 3Gonly - + GPRSpref GPRSpref - + GPRSonly GPRSonly @@ -1564,57 +1608,88 @@ Should be according to standards 詳細を表示 - + Max fail 最大失敗回数 - + The number of consecutive failed connection attempts to tolerate 連続して失敗した接続試行について許容できる回数 - + Use the default route provided by the peer ピアから提供されるデフォルトの経路を使用 - + Default route デフォルトの経路 - + Use the DNS provided by the peer ピアから提供される DNS を使用 - + Use peer DNS ピア DNS を使用 - + + Init + + + + + An initialization string sent to the modem before dialing + + + + + Chat script + + + + + Path to a chat file + + + + Options file オプションのファイル - + A file to read additional pppd options from 追加の PPPD オプションを読み込む為のファイル - + + Browse ブラウズ - + + Select chat file + + + + + All (*.*) + + + + Select options file オプションファイルを選択 - + Configuration files (*.conf) 設定ファイル (*.conf) @@ -2687,80 +2762,90 @@ Should be according to standards フォーム - + Tunnel settings トンネルの設定 - + Mode モード - + The tunnel type トンネルのタイプ - + ipip ipip - + gre gre - + sit sit - + isatap isatap - + ip6ip6 ip6ip6 - + ipip6 ipip6 - + ip6gre ip6gre - + any すべて - + Local ローカル - + The address of the local end of the tunnel トンネルのローカルにおける始点アドレス - + Remote リモート - + The address of the remote end of the tunnel トンネルのリモートにおける終点アドレス + + + Key + キー + + + + A key identifying an individual traffic flow within a tunnel + + TuntapWidget @@ -2988,109 +3073,109 @@ Should be according to standards フォーム - + Wireless options 無線オプション - + Security セキュリティ - + none none - + wep wep - + wpa wpa - + wpa-configsection wpa-configsection - + wpa-config wpa-config - + ESSID ESSID - + The name of the network to connect to 接続するネットワーク名 - + Wpa config section WPA 設定セクション - - - + + + Add 追加 - + Array of lines that form a network block for wpa_supplicant wpa_supplicant に対するネットワークブロックを形作る行 - + Wpa config file WPA 設定ファイル - + Path to a wpa_supplicant configuration file wpa_supplicant 設定ファイルへのパス - + Browse ブラウズ - + Key キー - + The secret key to a WEP, or WPA encrypted network WEP 又は WPA 暗号化ネットワークの秘密鍵 - + Whether or not the specified network is a hidden network 指定したネットワークが隠蔽されたものであるかを問わない - + Hidden 隠蔽 - + Whether or not to use ad-hoc mode アドホックモードを使用するかを問わない - + Ad-hoc アドホック @@ -3099,105 +3184,103 @@ Should be according to standards 詳細を表示する - + Scan frequencies 帯域をスキャン - + A space-separated list of frequencies in MHz to scan when searching for the network ネットワークを検索する際に対象となる帯域 (MHz) をスペースで区切ったリスト - + Frequency 帯域 - - + + Priority group for the network ネットワークの優先グループ - + Priority 優先度 - + Country - + The country for which frequency regulations will be enforced 周波数帯域の制限が実施される国 - + WPA group WPA グループ - + Group that has the authority to configure wpa_supplicant via its control interface wpa_supplicant のコントロールインターフェースを用いてその設定をする権威者が存在するグループ - + Drivers ドライバ - + west west - + nl80211 nl80211 - + wired wired - + The wpa_supplicant driver to use 使用する wpa_supplicant ドライバ - + RFkill device RFkill デバイス - + The name of an rfkill device Rfkill デバイスの名前 - + Timeout WPA WPA のタイムアウト - + Maximum time, in seconds, to wait for steps in the association and authentication to succeed 接続確立と認証の成功との段階を待機する最大時間(秒) - Whether or not to exclude this profile from automatic profile selection - 自動的なプロファイル選択からこのプロファイルを除外するか否かを問わない + 自動的なプロファイル選択からこのプロファイルを除外するか否かを問わない - Exclude auto - プロファイルを除外する + プロファイルを除外する Hide advanced diff --git a/sources/resources/translations/netctl-gui.ts b/sources/resources/translations/netctl-gui.ts index 86b0c11..ce5419e 100644 --- a/sources/resources/translations/netctl-gui.ts +++ b/sources/resources/translations/netctl-gui.ts @@ -78,6 +78,24 @@ + + BondWidget + + + Bond settings + + + + + Mode + + + + + The bonding policy. See the kernel documentation on bonding for details + + + BridgeWidget @@ -120,6 +138,7 @@ + Error! @@ -225,11 +244,16 @@ + Key is required for 'gre' mode + + + + Unknown error - + Sender : %1 @@ -237,99 +261,109 @@ EthernetWidget - + Ethernet options - + <html><head/><body><p>Whether or not the absence of a carrier is acceptable</p></body></html> - + Skip no carrier - + Set to ‘yes’ to use 802.1x authentication - + 802.1x authentication - + WPA config file - + Path to a wpa_supplicant configuration file - + Browse - + WPA driver - + The wpa_supplicant driver to use for 802.1x authentication - + + Priority + + + + + Priority level of the profile. In case of automatic profile selection, profiles are tried in decreasing order of priority + + + + wired - + nl80211 - + wext - + Timeout carrier - + Maximum time, in seconds, to wait for a carrier - + Timeout WPA - + Maximum time, in seconds, to wait for 802.1x authentication to succeed - - + + Select wpa configuration file - - + + Configuration files (*.conf) @@ -337,108 +371,118 @@ GeneralWidget - + General - + Description - + Connection - + The connection type used by the profile - + Interface - + The name of the associated network interface - + Binds to interfaces - - + + Add - + An array of physical network interfaces that this profile needs before it can be started - + Hide advanced - + A description of the profile - + After - + An array of profile names that should be started before this profile is started - + Command after starting - + A command that is executed after a connection is established - + Command before stoping - + A command that is executed before a connection is brought down - + + Whether or not to exclude this profile from automatic profile selection + + + + + Exclude auto + + + + Set to ‘yes’ to force connecting even if the interface is up - + Force connect - + Debug mode - + Show advanced @@ -1236,12 +1280,12 @@ Should be according to standards - + Restore existing session. - + Close existing session. @@ -1270,133 +1314,164 @@ Should be according to standards MobileWidget - + Mobile PPP settings - + Username - - + + The username and password to connect with - + Password - + Access point name - + The access point (apn) to connect on - + PIN - + If your modem requires a PIN to unlock, use this option - + Mode - + This option is used to specify the connection mode - + None - + 3Gpref - + 3Gonly - + GPRSpref - + GPRSonly - + + Init + + + + + An initialization string sent to the modem before dialing + + + + Max fail - + The number of consecutive failed connection attempts to tolerate - + Use the default route provided by the peer - + Default route - + Use the DNS provided by the peer - + Use peer DNS - + + Chat script + + + + + Path to a chat file + + + + Options file - + A file to read additional pppd options from - + + Browse - + + Select chat file + + + + + All (*.*) + + + + Select options file - + Configuration files (*.conf) @@ -2397,80 +2472,90 @@ Should be according to standards TunnelWidget - + Tunnel settings - + Mode - + The tunnel type - + ipip - + gre - + sit - + isatap - + ip6ip6 - + ipip6 - + ip6gre - + any - + Local - + The address of the local end of the tunnel - + Remote - + The address of the remote end of the tunnel + + + Key + + + + + A key identifying an individual traffic flow within a tunnel + + TuntapWidget @@ -2686,212 +2771,202 @@ Should be according to standards WirelessWidget - + Wireless options - + Security - + none - + wep - + wpa - + wpa-configsection - + wpa-config - + ESSID - + The name of the network to connect to - + Wpa config section - - - + + + Add - + Array of lines that form a network block for wpa_supplicant - + Wpa config file - + Path to a wpa_supplicant configuration file - + Browse - + Key - + The secret key to a WEP, or WPA encrypted network - + Whether or not the specified network is a hidden network - + Hidden - + Whether or not to use ad-hoc mode - + Ad-hoc - + Scan frequencies - + A space-separated list of frequencies in MHz to scan when searching for the network - + Frequency - - + + Priority group for the network - + Priority - + Country - + The country for which frequency regulations will be enforced - + WPA group - + Group that has the authority to configure wpa_supplicant via its control interface - + Drivers - + west - + nl80211 - + wired - + The wpa_supplicant driver to use - + RFkill device - + The name of an rfkill device - + Timeout WPA - + Maximum time, in seconds, to wait for steps in the association and authentication to succeed - - - Whether or not to exclude this profile from automatic profile selection - - - - - Exclude auto - - diff --git a/sources/resources/translations/ru.ts b/sources/resources/translations/ru.ts index c6c3f64..52031de 100644 --- a/sources/resources/translations/ru.ts +++ b/sources/resources/translations/ru.ts @@ -65,6 +65,21 @@ Данное приложение использует: %1 + + BondWidget + + Bond settings + Настройки bond соединения + + + Mode + Режим + + + The bonding policy. See the kernel documentation on bonding for details + Политка соединения. Обратитесь к документации ядра для более подробной информации + + BridgeWidget @@ -190,6 +205,10 @@ IP address does not match the standard IP адрес не соответствует стандартам + + Key is required for 'gre' mode + Необходимо указать ключ для 'gre' режима + EthernetWidget @@ -281,6 +300,14 @@ Maximum time, in seconds, to wait for 802.1x authentication to succeed Максимальное время в секундах для ожидания выполнения 802.1x авторизации + + Priority + Приоритет + + + Priority level of the profile. In case of automatic profile selection, profiles are tried in decreasing order of priority + Приоритет профиля. В случае автоматического выбора профиля, профили будут выбираться по уменьшению приоритета + GeneralWidget @@ -376,6 +403,14 @@ A description of the profile Описание профиля + + Whether or not to exclude this profile from automatic profile selection + Исключить ли профиль из автоматического выбора + + + Exclude auto + Исключить профиль + IpWidget @@ -1518,6 +1553,30 @@ Should be according to standards Browse Обзор + + Select chat file + Выберете скрипт с настройками чата + + + All (*.*) + Все (*.*) + + + Init + Инициализация + + + An initialization string sent to the modem before dialing + Команда, которая будет послана при инициализации модема + + + Chat script + Скрипт + + + Path to a chat file + Путь к скрипту с настройками чата + NetctlAutoWindow @@ -2466,6 +2525,14 @@ Should be according to standards The address of the remote end of the tunnel Адрес удаленного конца туннеля + + Key + Ключ + + + A key identifying an individual traffic flow within a tunnel + Ключ, указывающий на отдельные потоки трафика в туннеле + TuntapWidget @@ -2808,11 +2875,11 @@ Should be according to standards Whether or not to exclude this profile from automatic profile selection - Исключить ли профиль из автоматического выбора + Исключить ли профиль из автоматического выбора Exclude auto - Исключить профиль + Исключить профиль Frequency