Compare commits

..

10 Commits

Author SHA1 Message Date
5a171f6c67 fix url links 2016-03-06 18:29:36 +03:00
arcan1s
c2e4ea2258 fix #46, release 1.4.9 2015-12-21 11:26:54 +03:00
arcan1s
d2714dca02 some library refactoring 2015-08-20 00:13:09 +03:00
arcan1s
5efb25dca3 edit mobilewidget.ui, main and wifi tab now only will be update if they
are active
2015-08-19 00:42:29 +03:00
arcan1s
e67493f5c0 plasmoid fixes 2015-08-15 02:35:09 +03:00
arcan1s
32f7b9344c fix font rendering 2015-07-11 01:22:24 +03:00
arcan1s
2041e01caa Fix pkgbuild 2015-07-06 01:28:29 +03:00
arcan1s
271fdb0d99 release 1.4.8 2015-07-06 01:25:15 +03:00
arcan1s
45904db741 fix no actions on links activation 2015-07-05 00:32:46 +03:00
arcan1s
a216060447 update to netctl 1.10 and 1.11 changes 2015-07-02 00:08:14 +03:00
61 changed files with 1745 additions and 1159 deletions

View File

@ -1,3 +1,19 @@
Ver.1.4.9
---------
* library
* fix bug with invalid enabled profile definition (#46)
* some imrovements inside
* plasmoid
* change rendering from Qt to native
* update plasmoid to recent plasma changes
Ver.1.4.8
---------
* gui
* update profile tab to netclt 1.10 and 1.11 changes
* plasmoid
* fix bug with no action on link activation
Ver.1.4.7 Ver.1.4.7
--------- ---------
* all * all

View File

@ -3,7 +3,7 @@
pkgbase=netctl-gui pkgbase=netctl-gui
pkgname=('libnetctlgui' 'netctlgui-helper' 'netctl-gui' pkgname=('libnetctlgui' 'netctlgui-helper' 'netctl-gui'
'plasma5-applet-netctl-gui') 'plasma5-applet-netctl-gui')
pkgver=1.4.7 pkgver=1.4.9
pkgrel=1 pkgrel=1
pkgdesc="Qt4/Qt5 GUI for netctl. Also provides a widget for KDE" pkgdesc="Qt4/Qt5 GUI for netctl. Also provides a widget for KDE"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
@ -11,7 +11,7 @@ url="http://arcanis.name/projects/netctl-gui"
license=('GPL3') license=('GPL3')
makedepends=('cmake' 'extra-cmake-modules' 'plasma-framework' 'qt5-tools') makedepends=('cmake' 'extra-cmake-modules' 'plasma-framework' 'qt5-tools')
source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${pkgbase}-${pkgver}-src.tar.xz") source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${pkgbase}-${pkgver}-src.tar.xz")
md5sums=('9723d9358412b212880c93e931f26b73') md5sums=('64c04c36eea017e7c0ddf687d60de128')
prepare() { prepare() {
rm -rf "${srcdir}/build-"{plasmoid,qt5} rm -rf "${srcdir}/build-"{plasmoid,qt5}

View File

@ -4,7 +4,7 @@ pkgbase=netctl-gui-qt4
_pkgbase=netctl-gui _pkgbase=netctl-gui
pkgname=('libnetctlgui-qt4' 'netctlgui-helper-qt4' 'netctl-gui-qt4' pkgname=('libnetctlgui-qt4' 'netctlgui-helper-qt4' 'netctl-gui-qt4'
'kdeplasma-applets-netctl-gui') 'kdeplasma-applets-netctl-gui')
pkgver=1.4.7 pkgver=1.4.9
pkgrel=1 pkgrel=1
pkgdesc="Qt4 GUI for netctl. Also provides a widget for KDE4" pkgdesc="Qt4 GUI for netctl. Also provides a widget for KDE4"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
@ -12,7 +12,7 @@ url="http://arcanis.name/projects/netctl-gui"
license=('GPL3') license=('GPL3')
makedepends=('automoc4' 'cmake' 'kdelibs') makedepends=('automoc4' 'cmake' 'kdelibs')
source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${_pkgbase}-${pkgver}-src.tar.xz") source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${_pkgbase}-${pkgver}-src.tar.xz")
md5sums=('9723d9358412b212880c93e931f26b73') md5sums=('64c04c36eea017e7c0ddf687d60de128')
prepare() { prepare() {
@ -65,7 +65,6 @@ package_libnetctlgui-qt4() {
'wpa_supplicant: wifi support') 'wpa_supplicant: wifi support')
provides=('libnetctlgui') provides=('libnetctlgui')
conflicts=('libnetctlgui') conflicts=('libnetctlgui')
install=""
cd "${srcdir}/build-qt4/netctlgui" cd "${srcdir}/build-qt4/netctlgui"
make DESTDIR="${pkgdir}" install make DESTDIR="${pkgdir}" install

@ -1 +1 @@
Subproject commit d2798204a1a84a23a9510aeda73d5b9b75d2c8eb Subproject commit dd52af08c9d6a2c8652d2d5e21bc2a433efb497a

View File

@ -11,7 +11,7 @@ set (PROJECT_CONTACT "esalexeev@gmail.com")
set (PROJECT_LICENSE "GPLv3") set (PROJECT_LICENSE "GPLv3")
set (PROJECT_VERSION_MAJOR 1) set (PROJECT_VERSION_MAJOR 1)
set (PROJECT_VERSION_MINOR 4) set (PROJECT_VERSION_MINOR 4)
set (PROJECT_VERSION_PATCH 7) set (PROJECT_VERSION_PATCH 9)
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) 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_DATE "%Y-%m-%d %H:%M" UTC)
string (TIMESTAMP CURRENT_YEAR "%Y") string (TIMESTAMP CURRENT_YEAR "%Y")

View File

@ -86,7 +86,7 @@ QStringList Netctl::sources() const
} }
QString Netctl::getCmdOutput(const QString cmd) QString Netctl::getCmdOutput(const QString cmd) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "Cmd" << cmd;
@ -135,7 +135,7 @@ bool Netctl::sourceRequestEvent(const QString &name)
} }
QString Netctl::getExtIp(const QString cmd) QString Netctl::getExtIp(const QString cmd) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "Cmd" << cmd;
@ -144,34 +144,34 @@ QString Netctl::getExtIp(const QString cmd)
} }
QString Netctl::getInfo(const QStringList profiles, const QStringList statuses) QString Netctl::getInfo(const QStringList profiles, const QStringList statuses) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (profiles.count() != statuses.count()) return QString("N\\A"); if (profiles.count() != statuses.count()) return QString("N\\A");
QStringList list; QStringList list;
for (int i=0; i<profiles.count(); i++) for (int i=0; i<profiles.count(); i++)
list.append(QString("%1 (%2)").arg(profiles[i]).arg(statuses[i])); list.append(QString("%1 (%2)").arg(profiles.at(i)).arg(statuses.at(i)));
if (list.isEmpty()) list.append(QString("N\\A")); if (list.isEmpty()) list.append(QString("N\\A"));
return list.join(QString(" | ")); return list.join(QString(" | "));
} }
QStringList Netctl::getInterfaceList() QStringList Netctl::getInterfaceList() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
QList<QNetworkInterface> rawList = QNetworkInterface::allInterfaces(); QList<QNetworkInterface> rawList = QNetworkInterface::allInterfaces();
QStringList interfacesList; QStringList interfacesList;
for (int i=0; i<rawList.count(); i++) foreach(QNetworkInterface interface, rawList)
interfacesList.append(rawList[i].name()); interfacesList.append(interface.name());
return interfacesList; return interfacesList;
} }
QString Netctl::getIntIp(const QAbstractSocket::NetworkLayerProtocol protocol) QString Netctl::getIntIp(const QAbstractSocket::NetworkLayerProtocol protocol) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
@ -181,11 +181,11 @@ QString Netctl::getIntIp(const QAbstractSocket::NetworkLayerProtocol protocol)
else if (protocol == QAbstractSocket::IPv6Protocol) else if (protocol == QAbstractSocket::IPv6Protocol)
intIp = QString("::1/128"); intIp = QString("::1/128");
QList<QHostAddress> rawList = QNetworkInterface::allAddresses(); QList<QHostAddress> rawList = QNetworkInterface::allAddresses();
for (int i=0; i<rawList.count(); i++) { foreach(QHostAddress address, rawList) {
if(rawList[i] == QHostAddress(QHostAddress::LocalHost)) continue; if (address == QHostAddress(QHostAddress::LocalHost)) continue;
if(rawList[i] == QHostAddress(QHostAddress::LocalHostIPv6)) continue; if (address == QHostAddress(QHostAddress::LocalHostIPv6)) continue;
if (rawList[i].protocol() != protocol) continue; if (address.protocol() != protocol) continue;
intIp = rawList[i].toString(); intIp = address.toString();
break; break;
} }
@ -197,21 +197,24 @@ QStringList Netctl::getProfileList(const QString cmdNetctl, const QString cmdNet
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
netctlAutoStatus = true;
QString output = getCmdOutput(QString("%1 list").arg(cmdNetctlAuto)); QString output = getCmdOutput(QString("%1 list").arg(cmdNetctlAuto));
if (output.isEmpty()) { if (output.isEmpty()) {
output = getCmdOutput(QString("%1 list").arg(cmdNetctl)); output = getCmdOutput(QString("%1 list").arg(cmdNetctl));
netctlAutoStatus = false; netctlAutoStatus = false;
} } else
netctlAutoStatus = true;
// parse // parse
QStringList currentProfiles; QStringList currentProfiles;
QStringList profileList = output.split(QChar('\n')); // workaround for first element spaces on which are trimmed
QStringList profileList = QString(" %1").arg(output).split(QChar('\n'));
for (int i=0; i<profileList.count(); i++) { for (int i=0; i<profileList.count(); i++) {
bool isActive = (profileList[i][0] == QChar('*')); bool isActive = (profileList.at(i)[0] == QChar('*'));
profileList[i].remove(0, 2); profileList[i].remove(0, 2);
if (isActive) currentProfiles.append(profileList[i]); if (isActive) currentProfiles.append(profileList.at(i));
} }
profileList.sort();
currentProfiles.sort();
// return profiles // return profiles
currentProfile = currentProfiles; currentProfile = currentProfiles;
@ -220,7 +223,7 @@ QStringList Netctl::getProfileList(const QString cmdNetctl, const QString cmdNet
} }
QStringList Netctl::getProfileStringStatus(const QString cmdNetctl) QStringList Netctl::getProfileStringStatus(const QString cmdNetctl) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
@ -230,8 +233,8 @@ QStringList Netctl::getProfileStringStatus(const QString cmdNetctl)
return status; return status;
} }
for (int i=0; i<currentProfile.count(); i++) { foreach(QString profile, currentProfile) {
TaskResult process = runTask(QString("%1 is-enabled %2").arg(cmdNetctl).arg(currentProfile[i])); TaskResult process = runTask(QString("%1 is-enabled %2").arg(cmdNetctl).arg(profile));
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error; if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
status.append(process.exitCode == 0 ? QString("enabled") : QString("static")); status.append(process.exitCode == 0 ? QString("enabled") : QString("static"));
@ -246,8 +249,8 @@ void Netctl::initSources()
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
QStringList sourcesList = sources(); QStringList sourcesList = sources();
for (int i=0; i<sourcesList.count(); i++) foreach(QString source, sourcesList)
setData(sourcesList[i], QString("value"), QString("N\\A")); setData(source, QString("value"), QString("N\\A"));
} }

View File

@ -27,14 +27,14 @@ class Netctl : public Plasma::DataEngine
Q_OBJECT Q_OBJECT
public: public:
Netctl(QObject *parent, const QVariantList &args); explicit Netctl(QObject *parent, const QVariantList &args);
~Netctl(); virtual ~Netctl();
QString getExtIp(const QString cmd); QString getExtIp(const QString cmd) const;
QString getInfo(const QStringList profiles, const QStringList statuses); QString getInfo(const QStringList profiles, const QStringList statuses) const;
QStringList getInterfaceList(); QStringList getInterfaceList() const;
QString getIntIp(const QAbstractSocket::NetworkLayerProtocol protocol); QString getIntIp(const QAbstractSocket::NetworkLayerProtocol protocol) const;
QStringList getProfileList(const QString cmdNetctl, const QString cmdNetctlAuto); QStringList getProfileList(const QString cmdNetctl, const QString cmdNetctlAuto);
QStringList getProfileStringStatus(const QString cmdNetctl); QStringList getProfileStringStatus(const QString cmdNetctl) const;
public slots: public slots:
void initSources(); void initSources();
@ -53,7 +53,7 @@ private:
// configuration // configuration
bool debug; bool debug;
QVariantMap configuration; QVariantMap configuration;
QString getCmdOutput(const QString cmd); QString getCmdOutput(const QString cmd) const;
void readConfiguration(); void readConfiguration();
}; };

View File

@ -14,7 +14,7 @@ X-KDE-PluginInfo-Author=Evgeniy Alekseev
X-KDE-PluginInfo-Email=esalexeev@gmail.com X-KDE-PluginInfo-Email=esalexeev@gmail.com
X-KDE-PluginInfo-Name=netctl X-KDE-PluginInfo-Name=netctl
X-KDE-PluginInfo-Version=@PROJECT_VERSION@ X-KDE-PluginInfo-Version=@PROJECT_VERSION@
X-KDE-PluginInfo-Website=http://arcanis.name/projects/netctl-gui/ X-KDE-PluginInfo-Website=https://arcanis.me/projects/netctl-gui/
X-KDE-PluginInfo-Category=Network X-KDE-PluginInfo-Category=Network
X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPLv3 X-KDE-PluginInfo-License=GPLv3

View File

@ -290,12 +290,12 @@ small {
</tr> </tr>
<!-- general information --> <!-- general information -->
<tr> <tr>
<td>QString ActiveProfile()</td> <td>QStringList ActiveProfile()</td>
<td>returns active profile from netctl or netctl-auto</td> <td>returns active profile from netctl or netctl-auto</td>
<td>no</td> <td>no</td>
</tr> </tr>
<tr> <tr>
<td>QString ActiveProfileStatus()</td> <td>QStringList ActiveProfileStatus()</td>
<td>returns active profile status from netctl or netctl-auto. May be <code>netctl-auto</code>, <code>active (enabled)</code>, <code>active (static)</code>, <code>inactive (enabled)</code>, <code>inactive (static)</code></td> <td>returns active profile status from netctl or netctl-auto. May be <code>netctl-auto</code>, <code>active (enabled)</code>, <code>active (static)</code>, <code>inactive (enabled)</code>, <code>inactive (static)</code></td>
<td>no</td> <td>no</td>
</tr> </tr>
@ -305,7 +305,7 @@ small {
<td>no</td> <td>no</td>
</tr> </tr>
<tr> <tr>
<td>QString netctlActiveProfile()</td> <td>QStringList netctlActiveProfile()</td>
<td>returns active profile from netctl even if netctl-auto is running</td> <td>returns active profile from netctl even if netctl-auto is running</td>
<td>no</td> <td>no</td>
</tr> </tr>
@ -464,7 +464,7 @@ small {
<h2><a href="#links" class="anchor" id="links"></a>External links</h2> <h2><a href="#links" class="anchor" id="links"></a>External links</h2>
<ul> <ul>
<li><a href="http://arcanis.name/projects/netctl-gui/">Homepage</a></li> <li><a href="https://arcanis.me/projects/netctl-gui/">Homepage</a></li>
<li><a href="https://github.com/arcan1s/netctl-gui">Repository</a></li> <li><a href="https://github.com/arcan1s/netctl-gui">Repository</a></li>
<li><a href="https://github.com/arcan1s/netctl-gui/issues">Bugtracker</a></li> <li><a href="https://github.com/arcan1s/netctl-gui/issues">Bugtracker</a></li>
</ul> </ul>

View File

@ -98,7 +98,7 @@ env -i bash -c "source '&lt;profile&gt;'; for i in &#36;{!&lt;key&gt;[@]}; do ec
<h2><a href="#links" class="anchor" id="links"></a>External links</h2> <h2><a href="#links" class="anchor" id="links"></a>External links</h2>
<ul> <ul>
<li><a href="http://arcanis.name/projects/netctl-gui/">Homepage</a></li> <li><a href="https://arcanis.me/projects/netctl-gui/">Homepage</a></li>
<li><a href="https://github.com/arcan1s/netctl-gui">Repository</a></li> <li><a href="https://github.com/arcan1s/netctl-gui">Repository</a></li>
<li><a href="https://github.com/arcan1s/netctl-gui/issues">Bugtracker</a></li> <li><a href="https://github.com/arcan1s/netctl-gui/issues">Bugtracker</a></li>
</ul> </ul>

View File

@ -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<QString, QString> BondWidget::getSettings()
{
QMap<QString, QString> 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<QString, QString> settings)
{
clear();
if (settings.contains(QString("Mode")))
ui->lineEdit_mode->setText(settings[QString("Mode")]);
}

View File

@ -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 <QWidget>
namespace Ui {
class BondWidget;
}
class BondWidget : public QWidget
{
Q_OBJECT
public:
explicit BondWidget(QWidget *parent = 0);
~BondWidget();
QMap<QString, QString> getSettings();
int isOk();
void setSettings(const QMap<QString, QString> settings);
public slots:
void clear();
private:
Ui::BondWidget *ui;
};
#endif /* BONDWIDGET_H */

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>BondWidget</class>
<widget class="QWidget" name="BondWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>550</width>
<height>46</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QDockWidget" name="dockWidget_bond">
<property name="features">
<set>QDockWidget::NoDockWidgetFeatures</set>
</property>
<property name="windowTitle">
<string>Bond settings</string>
</property>
<widget class="QWidget" name="dockWidgetContents_bond">
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="margin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="layout_mode">
<item>
<widget class="QLabel" name="label_mode">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Mode</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_mode">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>The bonding policy. See the kernel documentation on bonding for details</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -177,7 +177,7 @@ InterfaceAnswer connectToEssid(const QString essid, QMap<QString,QString> settin
} }
netctlInformation generalInformation(NetctlInterface* interface, const bool useHelper, netctlInformation generalInformation(NetctlInterface *interface, const bool useHelper,
const bool debug) const bool debug)
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
@ -204,7 +204,7 @@ netctlInformation generalInformation(NetctlInterface* interface, const bool useH
} }
QMap<QString, QString> profileInformation(const QString profile, NetctlInterface* interface, QMap<QString, QString> profileInformation(const QString profile, NetctlInterface *interface,
const bool useHelper, const bool debug) const bool useHelper, const bool debug)
{ {
if (!useHelper) return interface->profileSettings(profile); if (!useHelper) return interface->profileSettings(profile);

View File

@ -124,6 +124,10 @@ QStringList ErrorWindow::getMessage(const int mess)
title = QApplication::translate("ErrorWindow", "Error!"); title = QApplication::translate("ErrorWindow", "Error!");
message = QApplication::translate("ErrorWindow", "IP address does not match the standard"); message = QApplication::translate("ErrorWindow", "IP address does not match the standard");
break; break;
case 21:
title = QApplication::translate("ErrorWindow", "Error!");
message = QApplication::translate("ErrorWindow", "Key is required for 'gre' mode");
break;
default: default:
title = QApplication::translate("ErrorWindow", "Error!"); title = QApplication::translate("ErrorWindow", "Error!");
message = QApplication::translate("ErrorWindow", "Unknown error"); message = QApplication::translate("ErrorWindow", "Unknown error");
@ -164,6 +168,7 @@ QMessageBox::Icon ErrorWindow::getIcon(const int mess)
case 18: case 18:
case 19: case 19:
case 20: case 20:
case 21:
icon = QMessageBox::Critical; icon = QMessageBox::Critical;
break; break;
default: default:

View File

@ -46,6 +46,7 @@ void EthernetWidget::clear()
showWpa(ui->checkBox_8021x->checkState()); showWpa(ui->checkBox_8021x->checkState());
ui->lineEdit_wpaConfig->clear(); ui->lineEdit_wpaConfig->clear();
ui->comboBox_driver->setCurrentIndex(0); ui->comboBox_driver->setCurrentIndex(0);
ui->spinBox_priority->setValue(1);
ui->spinBox_timeoutCarrier->setValue(5); ui->spinBox_timeoutCarrier->setValue(5);
ui->spinBox_timeoutWpa->setValue(15); ui->spinBox_timeoutWpa->setValue(15);
@ -104,6 +105,8 @@ QMap<QString, QString> EthernetWidget::getSettings()
settings[QString("WPAConfigFile")] = QString("'%1'").arg(ui->lineEdit_wpaConfig->text()); settings[QString("WPAConfigFile")] = QString("'%1'").arg(ui->lineEdit_wpaConfig->text());
settings[QString("WPADriver")] = ui->comboBox_driver->currentText(); 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) if (ui->spinBox_timeoutCarrier->value() != 5)
settings[QString("TimeoutCarrier")] = QString::number(ui->spinBox_timeoutCarrier->value()); settings[QString("TimeoutCarrier")] = QString::number(ui->spinBox_timeoutCarrier->value());
if (ui->spinBox_timeoutWpa->value() != 15) if (ui->spinBox_timeoutWpa->value() != 15)
@ -139,6 +142,8 @@ void EthernetWidget::setSettings(const QMap<QString, QString> settings)
int index = ui->comboBox_driver->findText(settings[QString("WPADriver")]); int index = ui->comboBox_driver->findText(settings[QString("WPADriver")]);
ui->comboBox_driver->setCurrentIndex(index); ui->comboBox_driver->setCurrentIndex(index);
} }
if (settings.contains(QString("Priority")))
ui->spinBox_priority->setValue(settings[QString("Priority")].toInt());
if (settings.contains(QString("TimeoutCarrier"))) if (settings.contains(QString("TimeoutCarrier")))
ui->spinBox_timeoutCarrier->setValue(settings[QString("TimeoutCarrier")].toInt()); ui->spinBox_timeoutCarrier->setValue(settings[QString("TimeoutCarrier")].toInt());
if (settings.contains(QString("TimeoutWPA"))) if (settings.contains(QString("TimeoutWPA")))

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>550</width> <width>550</width>
<height>227</height> <height>255</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@ -301,6 +301,45 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="layout_priority">
<item>
<widget class="QLabel" name="label_priority">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Priority</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="spinBox_priority">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Priority level of the profile. In case of automatic profile selection, profiles are tried in decreasing order of priority</string>
</property>
<property name="maximum">
<number>999</number>
</property>
<property name="value">
<number>1</number>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@ -59,6 +59,7 @@ void GeneralWidget::clear()
ui->listWidget_after->clear(); ui->listWidget_after->clear();
ui->lineEdit_execUpPost->clear(); ui->lineEdit_execUpPost->clear();
ui->lineEdit_execDownPre->clear(); ui->lineEdit_execDownPre->clear();
ui->checkBox_exclude->setCheckState(Qt::Unchecked);
ui->checkBox_forceConnect->setCheckState(Qt::Unchecked); ui->checkBox_forceConnect->setCheckState(Qt::Unchecked);
ui->checkBox_debug->setCheckState(Qt::Unchecked); ui->checkBox_debug->setCheckState(Qt::Unchecked);
@ -139,6 +140,8 @@ QMap<QString, QString> GeneralWidget::getSettings()
settings[QString("ExecUpPost")] = QString("'%1'").arg(ui->lineEdit_execUpPost->text()); settings[QString("ExecUpPost")] = QString("'%1'").arg(ui->lineEdit_execUpPost->text());
if (!ui->lineEdit_execDownPre->text().isEmpty()) if (!ui->lineEdit_execDownPre->text().isEmpty())
settings[QString("ExecDownPre")] = QString("'%1'").arg(ui->lineEdit_execDownPre->text()); 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) if (ui->checkBox_forceConnect->checkState() == Qt::Checked)
settings[QString("ForceConnect")] = QString("yes"); settings[QString("ForceConnect")] = QString("yes");
if (ui->checkBox_debug->checkState() == Qt::Checked) if (ui->checkBox_debug->checkState() == Qt::Checked)
@ -186,6 +189,9 @@ void GeneralWidget::setSettings(const QMap<QString, QString> settings)
ui->lineEdit_execUpPost->setText(settings[QString("ExecUpPost")]); ui->lineEdit_execUpPost->setText(settings[QString("ExecUpPost")]);
if (settings.contains(QString("ExecDownPre"))) if (settings.contains(QString("ExecDownPre")))
ui->lineEdit_execDownPre->setText(settings[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.contains(QString("ForceConnect")))
if (settings[QString("ForceConnect")] == QString("yes")) if (settings[QString("ForceConnect")] == QString("yes"))
ui->checkBox_forceConnect->setCheckState(Qt::Checked); ui->checkBox_forceConnect->setCheckState(Qt::Checked);

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>550</width> <width>550</width>
<height>452</height> <height>479</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_4">
@ -417,6 +417,36 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="layout_exclude">
<item>
<widget class="QLabel" name="label_exclude">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_exclude">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Whether or not to exclude this profile from automatic profile selection</string>
</property>
<property name="text">
<string>Exclude auto</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<layout class="QHBoxLayout" name="layout_forceConnect"> <layout class="QHBoxLayout" name="layout_forceConnect">
<item> <item>

View File

@ -94,8 +94,10 @@ void MainWidget::update()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
updateMainTab(); if (mainWindow->currentTab() == 0) {
updateMenuMain(); updateMainTab();
updateMenuMain();
}
if (timer.interval() != 0) return timer.start(); if (timer.interval() != 0) return timer.start();
} }

View File

@ -111,6 +111,14 @@ MainWindow::~MainWindow()
} }
int MainWindow::currentTab()
{
if (debug) qDebug() << PDEBUG;
return ui->stackedWidget->currentIndex();
}
Qt::ToolBarArea MainWindow::getToolBarArea() Qt::ToolBarArea MainWindow::getToolBarArea()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;

View File

@ -42,11 +42,12 @@ class MainWindow : public QMainWindow
Q_OBJECT Q_OBJECT
public: public:
explicit MainWindow(QWidget *parent = 0, explicit MainWindow(QWidget *parent = nullptr,
const QVariantMap args = QVariantMap(), const QVariantMap args = QVariantMap(),
QTranslator *qtAppTranslator = 0, QTranslator *qtAppTranslator = nullptr,
QTranslator *appTranslator = 0); QTranslator *appTranslator = nullptr);
~MainWindow(); ~MainWindow();
int currentTab();
Qt::ToolBarArea getToolBarArea(); Qt::ToolBarArea getToolBarArea();
void emitNeedToBeConfigured(); void emitNeedToBeConfigured();
QStringList printSettings(); QStringList printSettings();

View File

@ -46,9 +46,11 @@ void MobileWidget::clear()
ui->lineEdit_apn->clear(); ui->lineEdit_apn->clear();
ui->lineEdit_pin->clear(); ui->lineEdit_pin->clear();
ui->comboBox_mode->setCurrentIndex(0); ui->comboBox_mode->setCurrentIndex(0);
ui->spinBox_fail->setValue(5);
ui->checkBox_route->setCheckState(Qt::Checked); ui->checkBox_route->setCheckState(Qt::Checked);
ui->checkBox_dns->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->lineEdit_options->clear();
ui->pushButton_mobileAdvanced->setChecked(false);; ui->pushButton_mobileAdvanced->setChecked(false);;
@ -59,10 +61,22 @@ void MobileWidget::clear()
void MobileWidget::createActions() void MobileWidget::createActions()
{ {
connect(ui->pushButton_mobileAdvanced, SIGNAL(clicked(bool)), this, SLOT(showAdvanced())); 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())); 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() void MobileWidget::selectOptionsFile()
{ {
QString filename = QFileDialog::getOpenFileName(this, QString filename = QFileDialog::getOpenFileName(this,
@ -102,12 +116,16 @@ QMap<QString, QString> MobileWidget::getSettings()
else else
settings[QString("PIN")] = QString("None"); settings[QString("PIN")] = QString("None");
settings[QString("Mode")] = ui->comboBox_mode->currentText(); 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) if (ui->checkBox_route->checkState() == Qt::Unchecked)
settings[QString("DefaultRoute")] = QString("false"); settings[QString("DefaultRoute")] = QString("false");
if (ui->checkBox_dns->checkState() == Qt::Unchecked) if (ui->checkBox_dns->checkState() == Qt::Unchecked)
settings[QString("UsePeerDNS")] = QString("false"); 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()) if (!ui->lineEdit_options->text().isEmpty())
settings[QString("OptionsFile")] = QString("'%1'").arg(ui->lineEdit_options->text()); settings[QString("OptionsFile")] = QString("'%1'").arg(ui->lineEdit_options->text());
@ -143,14 +161,18 @@ void MobileWidget::setSettings(const QMap<QString, QString> settings)
int index = ui->comboBox_mode->findText(settings[QString("Mode")]); int index = ui->comboBox_mode->findText(settings[QString("Mode")]);
ui->comboBox_mode->setCurrentIndex(index); 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.contains(QString("DefaultRoute")))
if (settings[QString("DefaultRoute")] == QString("false")) if (settings[QString("DefaultRoute")] == QString("false"))
ui->checkBox_route->setCheckState(Qt::Unchecked); ui->checkBox_route->setCheckState(Qt::Unchecked);
if (settings.contains(QString("UsePeerDNS"))) if (settings.contains(QString("UsePeerDNS")))
if (settings[QString("UsePeerDNS")] == QString("false")) if (settings[QString("UsePeerDNS")] == QString("false"))
ui->checkBox_dns->setCheckState(Qt::Unchecked); 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"))) if (settings.contains(QString("OptionsFile")))
ui->lineEdit_options->setText(settings[QString("OptionsFile")]); ui->lineEdit_options->setText(settings[QString("OptionsFile")]);
} }

View File

@ -40,6 +40,7 @@ public slots:
void clear(); void clear();
private slots: private slots:
void selectChatFile();
void selectOptionsFile(); void selectOptionsFile();
void showAdvanced(); void showAdvanced();

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>445</width> <width>445</width>
<height>314</height> <height>376</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@ -89,9 +89,6 @@
<property name="toolTip"> <property name="toolTip">
<string>The username and password to connect with</string> <string>The username and password to connect with</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -125,9 +122,6 @@
<property name="toolTip"> <property name="toolTip">
<string>The access point (apn) to connect on</string> <string>The access point (apn) to connect on</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -319,6 +313,39 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="layout_init">
<item>
<widget class="QLabel" name="label_init">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Init</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_init">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>An initialization string sent to the modem before dialing</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<layout class="QHBoxLayout" name="layout_fail"> <layout class="QHBoxLayout" name="layout_fail">
<item> <item>
@ -358,6 +385,52 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="layout_chat">
<item>
<widget class="QLabel" name="label_chat">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>7</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Chat script</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_chat">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>10</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Path to a chat file</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_chat">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>4</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Browse</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<layout class="QHBoxLayout" name="layout_options"> <layout class="QHBoxLayout" name="layout_options">
<item> <item>

View File

@ -25,8 +25,9 @@
#include <pdebug/pdebug.h> #include <pdebug/pdebug.h>
#include <task/taskadds.h> #include <task/taskadds.h>
#include "calls.h" #include "bondwidget.h"
#include "bridgewidget.h" #include "bridgewidget.h"
#include "calls.h"
#include "commonfunctions.h" #include "commonfunctions.h"
#include "dbusoperation.h" #include "dbusoperation.h"
#include "errorwindow.h" #include "errorwindow.h"
@ -60,6 +61,8 @@ NewProfileWidget::NewProfileWidget(QWidget *parent, const QMap<QString, QString>
ui->scrollAreaWidgetContents->layout()->addWidget(generalWid); ui->scrollAreaWidgetContents->layout()->addWidget(generalWid);
ipWid = new IpWidget(this); ipWid = new IpWidget(this);
ui->scrollAreaWidgetContents->layout()->addWidget(ipWid); ui->scrollAreaWidgetContents->layout()->addWidget(ipWid);
bondWid = new BondWidget(this);
ui->scrollAreaWidgetContents->layout()->addWidget(bondWid);
bridgeWid = new BridgeWidget(this); bridgeWid = new BridgeWidget(this);
ui->scrollAreaWidgetContents->layout()->addWidget(bridgeWid); ui->scrollAreaWidgetContents->layout()->addWidget(bridgeWid);
ethernetWid = new EthernetWidget(this); ethernetWid = new EthernetWidget(this);
@ -87,6 +90,7 @@ NewProfileWidget::~NewProfileWidget()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (bondWid != nullptr) delete bondWid;
if (bridgeWid != nullptr) delete bridgeWid; if (bridgeWid != nullptr) delete bridgeWid;
if (ethernetWid != nullptr) delete ethernetWid; if (ethernetWid != nullptr) delete ethernetWid;
if (generalWid != nullptr) delete generalWid; if (generalWid != nullptr) delete generalWid;
@ -168,6 +172,7 @@ void NewProfileWidget::updateProfileTab()
generalWid->clear(); generalWid->clear();
ipWid->clear(); ipWid->clear();
bondWid->clear();
bridgeWid->clear(); bridgeWid->clear();
ethernetWid->clear(); ethernetWid->clear();
macvlanWid->clear(); macvlanWid->clear();
@ -192,6 +197,7 @@ void NewProfileWidget::profileTabChangeState(const QString current)
generalWid->setVisible(true); generalWid->setVisible(true);
ipWid->setVisible((current != QString("pppoe")) && (current != QString("mobile_ppp"))); ipWid->setVisible((current != QString("pppoe")) && (current != QString("mobile_ppp")));
bondWid->setVisible(current == QString("bond"));
bridgeWid->setVisible(current == QString("bridge")); bridgeWid->setVisible(current == QString("bridge"));
ethernetWid->setVisible((current == QString("ethernet")) || ethernetWid->setVisible((current == QString("ethernet")) ||
(current == QString("vlan")) || (current == QString("vlan")) ||
@ -250,6 +256,7 @@ void NewProfileWidget::profileTabCreateProfile()
return ErrorWindow::showWindow(7, QString(PDEBUG), debug); return ErrorWindow::showWindow(7, QString(PDEBUG), debug);
else if (wirelessWid->isOk() == 5) else if (wirelessWid->isOk() == 5)
return ErrorWindow::showWindow(11, QString(PDEBUG), debug); 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("bridge")) {
} else if (generalWid->connectionType->currentText() == QString("pppoe")) { } else if (generalWid->connectionType->currentText() == QString("pppoe")) {
if (pppoeWid->isOk() == 1) if (pppoeWid->isOk() == 1)
@ -269,11 +276,13 @@ void NewProfileWidget::profileTabCreateProfile()
else if (generalWid->connectionType->currentText() == QString("tunnel")) { else if (generalWid->connectionType->currentText() == QString("tunnel")) {
if (tunnelWid->isOk() == 1) if (tunnelWid->isOk() == 1)
return ErrorWindow::showWindow(20, QString(PDEBUG), debug); 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")) { else if (generalWid->connectionType->currentText() == QString("tuntap")) {
if (tuntapWid->isOk() == 1) if (tuntapWid->isOk() == 1)
return ErrorWindow::showWindow(15, QString(PDEBUG), debug); return ErrorWindow::showWindow(15, QString(PDEBUG), debug);
if (tuntapWid->isOk() == 2) else if (tuntapWid->isOk() == 2)
return ErrorWindow::showWindow(15, QString(PDEBUG), debug); return ErrorWindow::showWindow(15, QString(PDEBUG), debug);
} }
else if (generalWid->connectionType->currentText() == QString("vlan")) { else if (generalWid->connectionType->currentText() == QString("vlan")) {
@ -304,17 +313,23 @@ void NewProfileWidget::profileTabCreateProfile()
addSettings = wirelessWid->getSettings(); addSettings = wirelessWid->getSettings();
for (int i=0; i<addSettings.keys().count(); i++) for (int i=0; i<addSettings.keys().count(); i++)
settings.insert(addSettings.keys()[i], addSettings[addSettings.keys()[i]]); settings.insert(addSettings.keys()[i], addSettings[addSettings.keys()[i]]);
} else if ((generalWid->connectionType->currentText() == QString("bond")) || } else if ((generalWid->connectionType->currentText() == QString("dummy")) ||
(generalWid->connectionType->currentText() == QString("dummy")) ||
(generalWid->connectionType->currentText() == QString("openvswitch"))) { (generalWid->connectionType->currentText() == QString("openvswitch"))) {
QMap<QString, QString> addSettings = ipWid->getSettings(); QMap<QString, QString> addSettings = ipWid->getSettings();
for (int i=0; i<addSettings.keys().count(); i++) for (int i=0; i<addSettings.keys().count(); i++)
settings.insert(addSettings.keys()[i], addSettings[addSettings.keys()[i]]); settings.insert(addSettings.keys()[i], addSettings[addSettings.keys()[i]]);
} else if (generalWid->connectionType->currentText() == QString("bond")) {
QMap<QString, QString> addSettings = ipWid->getSettings();
for (int i=0; i<addSettings.keys().count(); i++)
settings.insert(addSettings.keys()[i], addSettings[addSettings.keys()[i]]);
addSettings = bondWid->getSettings();
for (int i=0; i<addSettings.keys().count(); i++)
settings.insert(addSettings.keys()[i], addSettings[addSettings.keys()[i]]);
} else if (generalWid->connectionType->currentText() == QString("bridge")) { } else if (generalWid->connectionType->currentText() == QString("bridge")) {
QMap<QString, QString> addSettings = ipWid->getSettings(); QMap<QString, QString> addSettings = ipWid->getSettings();
for (int i=0; i<addSettings.keys().count(); i++) for (int i=0; i<addSettings.keys().count(); i++)
settings.insert(addSettings.keys()[i], addSettings[addSettings.keys()[i]]); settings.insert(addSettings.keys()[i], addSettings[addSettings.keys()[i]]);
addSettings = bridgeWid->getSettings(); addSettings = bridgeWid->getSettings();
for (int i=0; i<addSettings.keys().count(); i++) for (int i=0; i<addSettings.keys().count(); i++)
settings.insert(addSettings.keys()[i], addSettings[addSettings.keys()[i]]); settings.insert(addSettings.keys()[i], addSettings[addSettings.keys()[i]]);
} else if (generalWid->connectionType->currentText() == QString("pppoe")) { } else if (generalWid->connectionType->currentText() == QString("pppoe")) {
@ -388,13 +403,15 @@ void NewProfileWidget::profileTabLoadProfile()
} else if (generalWid->connectionType->currentText() == QString("wireless")) { } else if (generalWid->connectionType->currentText() == QString("wireless")) {
ipWid->setSettings(settings); ipWid->setSettings(settings);
wirelessWid->setSettings(settings); wirelessWid->setSettings(settings);
} else if ((generalWid->connectionType->currentText() == QString("bond")) || } else if ((generalWid->connectionType->currentText() == QString("dummy")) ||
(generalWid->connectionType->currentText() == QString("dummy")) ||
(generalWid->connectionType->currentText() == QString("openvswitch"))) { (generalWid->connectionType->currentText() == QString("openvswitch"))) {
ipWid->setSettings(settings); ipWid->setSettings(settings);
} else if (generalWid->connectionType->currentText() == QString("bridge")) { } else if (generalWid->connectionType->currentText() == QString("bridge")) {
ipWid->setSettings(settings); ipWid->setSettings(settings);
bridgeWid->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")) { } else if (generalWid->connectionType->currentText() == QString("pppoe")) {
pppoeWid->setSettings(settings); pppoeWid->setSettings(settings);
} else if (generalWid->connectionType->currentText() == QString("mobile_ppp")) { } else if (generalWid->connectionType->currentText() == QString("mobile_ppp")) {

View File

@ -23,6 +23,7 @@
#include <netctlgui/netctlgui.h> #include <netctlgui/netctlgui.h>
class BondWidget;
class BridgeWidget; class BridgeWidget;
class EthernetWidget; class EthernetWidget;
class GeneralWidget; class GeneralWidget;
@ -71,6 +72,7 @@ private:
// ui // ui
MainWindow *mainWindow; MainWindow *mainWindow;
Ui::NewProfileWidget *ui = nullptr; Ui::NewProfileWidget *ui = nullptr;
BondWidget *bondWid = nullptr;
BridgeWidget *bridgeWid = nullptr; BridgeWidget *bridgeWid = nullptr;
EthernetWidget *ethernetWid = nullptr; EthernetWidget *ethernetWid = nullptr;
GeneralWidget *generalWid = nullptr; GeneralWidget *generalWid = nullptr;

View File

@ -42,6 +42,7 @@ void TunnelWidget::clear()
ui->comboBox_mode->setCurrentIndex(0); ui->comboBox_mode->setCurrentIndex(0);
ui->lineEdit_local->clear(); ui->lineEdit_local->clear();
ui->lineEdit_remote->clear(); ui->lineEdit_remote->clear();
ui->lineEdit_key->clear();
} }
@ -62,6 +63,8 @@ QMap<QString, QString> TunnelWidget::getSettings()
if (!IpRegExp::checkString(ui->lineEdit_local->text(), IpRegExp::ip4Regex())) if (!IpRegExp::checkString(ui->lineEdit_local->text(), IpRegExp::ip4Regex()))
settings[QString("Local")] = QString("'%1'").arg(ui->lineEdit_local->text()); settings[QString("Local")] = QString("'%1'").arg(ui->lineEdit_local->text());
settings[QString("Remote")] = QString("'%1'").arg(ui->lineEdit_remote->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; return settings;
} }
@ -71,6 +74,9 @@ int TunnelWidget::isOk()
{ {
// ip is not correct // ip is not correct
if (!IpRegExp::checkString(ui->lineEdit_remote->text(), IpRegExp::ip4Regex())) return 1; 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 // all fine
return 0; return 0;
} }
@ -88,4 +94,6 @@ void TunnelWidget::setSettings(const QMap<QString, QString> settings)
ui->lineEdit_local->setText(settings[QString("Local")]); ui->lineEdit_local->setText(settings[QString("Local")]);
if (settings.contains(QString("Remote"))) if (settings.contains(QString("Remote")))
ui->lineEdit_remote->setText(settings[QString("Remote")]); ui->lineEdit_remote->setText(settings[QString("Remote")]);
if (settings.contains(QString("Key")))
ui->lineEdit_key->setText(settings[QString("Key")]);
} }

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>411</width> <width>411</width>
<height>108</height> <height>137</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@ -166,6 +166,39 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="layout_key">
<item>
<widget class="QLabel" name="label_key">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Key</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit_key">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>A key identifying an individual traffic flow within a tunnel</string>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>

View File

@ -75,8 +75,10 @@ void WiFiMenuWidget::update()
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
updateWifiTab(); if (mainWindow->currentTab() == 2) {
updateMenuWifi(); updateWifiTab();
updateMenuWifi();
}
if (timer.interval() != 0) return timer.start(); if (timer.interval() != 0) return timer.start();
} }

View File

@ -77,7 +77,6 @@ void WirelessWidget::clear()
} }
ui->comboBox_rfkill->setCurrentIndex(0); ui->comboBox_rfkill->setCurrentIndex(0);
ui->spinBox_timeoutWpa->setValue(15); ui->spinBox_timeoutWpa->setValue(15);
ui->checkBox_exclude->setCheckState(Qt::Unchecked);
ui->pushButton_wirelessAdvanced->setChecked(false); ui->pushButton_wirelessAdvanced->setChecked(false);
showAdvanced(); showAdvanced();
@ -231,8 +230,6 @@ QMap<QString, QString> WirelessWidget::getSettings()
settings[QString("RFKill")] = ui->comboBox_rfkill->currentText(); settings[QString("RFKill")] = ui->comboBox_rfkill->currentText();
if (ui->spinBox_timeoutWpa->value() != 15) if (ui->spinBox_timeoutWpa->value() != 15)
settings[QString("TimeoutWPA")] = QString::number(ui->spinBox_timeoutWpa->value()); settings[QString("TimeoutWPA")] = QString::number(ui->spinBox_timeoutWpa->value());
if (ui->checkBox_exclude->checkState() == Qt::Checked)
settings[QString("ExcludeAuto")] = QString("yes");
return settings; return settings;
} }
@ -310,9 +307,6 @@ void WirelessWidget::setSettings(const QMap<QString, QString> settings)
} }
if (settings.contains(QString("TimeoutWPA"))) if (settings.contains(QString("TimeoutWPA")))
ui->spinBox_timeoutWpa->setValue(settings[QString("TimeoutWPA")].toInt()); 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()); changeSecurity(ui->comboBox_security->currentText());
} }

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>584</width> <width>584</width>
<height>697</height> <height>670</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@ -280,17 +280,11 @@
<item> <item>
<layout class="QHBoxLayout" name="layout_wirelessAdvanced"> <layout class="QHBoxLayout" name="layout_wirelessAdvanced">
<item> <item>
<spacer name="spacer_wirelessAdvanced"> <widget class="Line" name="line">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> </widget>
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item> </item>
<item> <item>
<widget class="QToolButton" name="pushButton_wirelessAdvanced"> <widget class="QToolButton" name="pushButton_wirelessAdvanced">
@ -313,36 +307,6 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<item>
<layout class="QHBoxLayout" name="layout_exclude">
<item>
<widget class="QLabel" name="label_exclude">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_exclude">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Whether or not to exclude this profile from automatic profile selection</string>
</property>
<property name="text">
<string>Exclude auto</string>
</property>
</widget>
</item>
</layout>
</item>
<item> <item>
<layout class="QHBoxLayout" name="layout_hidden"> <layout class="QHBoxLayout" name="layout_hidden">
<item> <item>

View File

@ -39,25 +39,25 @@ NetctlAdaptor::~NetctlAdaptor()
// netctlCommand // netctlCommand
QString NetctlAdaptor::ActiveProfile() QStringList NetctlAdaptor::ActiveProfile()
{ {
if (isNetctlAutoActive()) if (isNetctlAutoActive())
return netctlCommand->autoGetActiveProfile(); return netctlCommand->autoGetActiveProfile();
else else
return netctlCommand->getActiveProfile().join(QChar('|')); return netctlCommand->getActiveProfile();
} }
QString NetctlAdaptor::ActiveProfileStatus() QStringList NetctlAdaptor::ActiveProfileStatus()
{ {
if (isNetctlAutoActive()) if (isNetctlAutoActive())
return QString("netctl-auto"); return QStringList() << QString("netctl-auto");
else { else {
QStringList status; QStringList status;
QStringList profiles = ActiveProfile().split(QChar('|')); QStringList profiles = ActiveProfile();
for (int i=0; i<profiles.count(); i++) for (int i=0; i<profiles.count(); i++)
status.append(netctlCommand->getProfileStatus(profiles[i])); status.append(netctlCommand->getProfileStatus(profiles[i]));
return status.join(QChar('|')); return status;
} }
} }
@ -108,9 +108,9 @@ bool NetctlAdaptor::isProfileEnabled(const QString profile)
} }
QString NetctlAdaptor::netctlActiveProfile() QStringList NetctlAdaptor::netctlActiveProfile()
{ {
return netctlCommand->getActiveProfile().join(QChar('|')); return netctlCommand->getActiveProfile();
} }

View File

@ -37,8 +37,8 @@ public:
public slots: public slots:
// netctlCommand // netctlCommand
QString ActiveProfile(); QStringList ActiveProfile();
QString ActiveProfileStatus(); QStringList ActiveProfileStatus();
bool autoIsProfileActive(const QString profile); bool autoIsProfileActive(const QString profile);
bool autoIsProfileEnabled(const QString profile); bool autoIsProfileEnabled(const QString profile);
QStringList Information(); QStringList Information();
@ -46,7 +46,7 @@ public slots:
bool isNetctlAutoEnabled(); bool isNetctlAutoEnabled();
bool isProfileActive(const QString profile); bool isProfileActive(const QString profile);
bool isProfileEnabled(const QString profile); bool isProfileEnabled(const QString profile);
QString netctlActiveProfile(); QStringList netctlActiveProfile();
QStringList netctlProfileList(); QStringList netctlProfileList();
QStringList netctlVerboseProfileList(); QStringList netctlVerboseProfileList();
QStringList ProfileList(); QStringList ProfileList();

View File

@ -30,10 +30,9 @@
#include <QMap> #include <QMap>
#include <QObject> #include <QObject>
#include "version.h"
class NetctlProfile; class NetctlProfile;
struct TaskResult;
/** /**
* @struct netctlProfileInfo * @struct netctlProfileInfo
@ -94,81 +93,75 @@ public:
/** /**
* @brief Netctl class destructor * @brief Netctl class destructor
*/ */
~Netctl(); virtual ~Netctl();
// general information // general information
/** /**
* @brief method which returns active profile name * @brief method which returns active profile name
* @return profile name or "" * @return Netctl::getActiveProfileTemplate()
*/ */
QStringList getActiveProfile(); QStringList getActiveProfile() const;
/** /**
* @brief method which returns active profile name from netctl-auto * @brief method which returns active profile name from netctl-auto
* @return profile name or "" * @return Netctl::getActiveProfileTemplate()
*/ */
QString autoGetActiveProfile(); QStringList autoGetActiveProfile() const;
/** /**
* @brief method which returns profile informations from netctl * @brief method which returns profile informations from netctl
* @return list of profiles * @return Netctl::getProfileListTemplate()
*/ */
QList<netctlProfileInfo> getProfileList(); QList<netctlProfileInfo> getProfileList() const;
/** /**
* @brief method which returns profile informations from netctl-auto * @brief method which returns profile informations from netctl-auto
* @return list of profiles from netctl-auto * @return Netctl::getProfileListTemplate()
*/ */
QList<netctlProfileInfo> getProfileListFromNetctlAuto(); QList<netctlProfileInfo> getProfileListFromNetctlAuto() const;
/**
* @brief method which gets description from profile
* @param profile profile name
* @return profile description or ""
*/
Q_DECL_DEPRECATED QString getProfileDescription(const QString profile);
/** /**
* @brief method which gets profile status * @brief method which gets profile status
* @param profile profile name * @param profile profile name
* @return profile status. It may be "active (enabled)", "active (static)", * @return profile status. It may be "active (enabled)", "active (static)",
* "inactive (enabled)", "inactive (static)" * "inactive (enabled)", "inactive (static)"
*/ */
QString getProfileStatus(const QString profile); QString getProfileStatus(const QString profile) const;
/** /**
* @brief method which checks if profile is active * @brief method which checks if profile is active
* @param profile profile name * @param profile profile name
* @return false if profile is inactive * @return false if profile is inactive
* @return true if profile is active * @return true if profile is active
*/ */
bool isProfileActive(const QString profile); bool isProfileActive(const QString profile) const;
/** /**
* @brief method which checks if profile is enabled * @brief method which checks if profile is enabled
* @param profile profile name * @param profile profile name
* @return false if profile is disabled * @return false if profile is disabled
* @return true if profile is enabled * @return true if profile is enabled
*/ */
bool isProfileEnabled(const QString profile); bool isProfileEnabled(const QString profile) const;
/** /**
* @brief method which checks if profile is active (netctl-auto) * @brief method which checks if profile is active (netctl-auto)
* @param profile profile name * @param profile profile name
* @return false if profile is inactive * @return false if profile is inactive
* @return true if profile is active * @return true if profile is active
*/ */
bool autoIsProfileActive(const QString profile); bool autoIsProfileActive(const QString profile) const;
/** /**
* @brief method which checks if profile is enabled (netctl-auto) * @brief method which checks if profile is enabled (netctl-auto)
* @param profile profile name * @param profile profile name
* @return false if profile is disabled * @return false if profile is disabled
* @return true if profile is enabled * @return true if profile is enabled
*/ */
bool autoIsProfileEnabled(const QString profile); bool autoIsProfileEnabled(const QString profile) const;
/** /**
* @brief method which checks netctl-auto autoload status * @brief method which checks netctl-auto autoload status
* @return false if netctl-auto is disabled * @return false if netctl-auto is disabled
* @return true if netctl-auto is enabled * @return true if netctl-auto is enabled
*/ */
bool isNetctlAutoEnabled(); bool isNetctlAutoEnabled() const;
/** /**
* @brief method which checks netctl-auto status * @brief method which checks netctl-auto status
* @return false if netctl-auto is inactive * @return false if netctl-auto is inactive
* @return true if netctl-auto is active * @return true if netctl-auto is active
*/ */
bool isNetctlAutoRunning(); bool isNetctlAutoRunning() const;
/** /**
* @brief method which check system configuration and return recommended values to keys * @brief method which check system configuration and return recommended values to keys
* @return recommended parametrs * @return recommended parametrs
@ -178,7 +171,7 @@ public:
* @brief method which gets wireless interface list from PREFERED_IFACE and IFACE_DIR * @brief method which gets wireless interface list from PREFERED_IFACE and IFACE_DIR
* @return interface list. If PREFERED_IFACE is not empty it will be first element * @return interface list. If PREFERED_IFACE is not empty it will be first element
*/ */
QStringList getWirelessInterfaceList(); QStringList getWirelessInterfaceList() const;
public slots: public slots:
// functions // functions
@ -189,101 +182,101 @@ public slots:
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool enableProfile(const QString profile); bool enableProfile(const QString profile) const;
/** /**
* @brief method which force starts profile * @brief method which force starts profile
* @param profile profile name * @param profile profile name
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool forceStartProfile(const QString profile); bool forceStartProfile(const QString profile) const;
/** /**
* @brief method which force stops profile * @brief method which force stops profile
* @param profile profile name * @param profile profile name
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool forceStopProfile(const QString profile); bool forceStopProfile(const QString profile) const;
/** /**
* @brief method which reenables profile * @brief method which reenables profile
* @param profile profile name * @param profile profile name
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool reenableProfile(const QString profile); bool reenableProfile(const QString profile) const;
/** /**
* @brief method which restarts profile * @brief method which restarts profile
* @param profile profile name * @param profile profile name
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool restartProfile(const QString profile); bool restartProfile(const QString profile) const;
/** /**
* @brief method which starts or stops profile * @brief method which starts or stops profile
* @param profile profile name * @param profile profile name
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool startProfile(const QString profile); bool startProfile(const QString profile) const;
/** /**
* @brief method which stops all profiles * @brief method which stops all profiles
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool stopAllProfiles(); bool stopAllProfiles() const;
/** /**
* @brief method which starts another profile * @brief method which starts another profile
* @param profile profile name * @param profile profile name
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool switchToProfile(const QString profile); bool switchToProfile(const QString profile) const;
// netctl-auto // netctl-auto
/** /**
* @brief method which sets all profiles disabled (netctl-auto) * @brief method which sets all profiles disabled (netctl-auto)
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool autoDisableAllProfiles(); bool autoDisableAllProfiles() const;
/** /**
* @brief method which sets profile disabled or enabled (netctl-auto) * @brief method which sets profile disabled or enabled (netctl-auto)
* @param profile profile name * @param profile profile name
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool autoEnableProfile(const QString profile); bool autoEnableProfile(const QString profile) const;
/** /**
* @brief method which sets all profiles enabled (netctl-auto) * @brief method which sets all profiles enabled (netctl-auto)
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool autoEnableAllProfiles(); bool autoEnableAllProfiles() const;
/** /**
* @brief method which switchs to profile (netctl-auto) * @brief method which switchs to profile (netctl-auto)
* @param profile profile name * @param profile profile name
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool autoStartProfile(const QString profile); bool autoStartProfile(const QString profile) const;
// netctl-auto service // netctl-auto service
/** /**
* @brief method which sets netctl-auto service enabled or disabled * @brief method which sets netctl-auto service enabled or disabled
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool autoEnableService(); bool autoEnableService() const;
/** /**
* @brief method which restarted netctl-auto service * @brief method which restarted netctl-auto service
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool autoRestartService(); bool autoRestartService() const;
/** /**
* @brief method which starts or stops netctl-auto service * @brief method which starts or stops netctl-auto service
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool autoStartService(); bool autoStartService() const;
private: private:
/** /**
@ -297,7 +290,7 @@ private:
/** /**
* @brief use RootProcess instead of QProcess. Default is true * @brief use RootProcess instead of QProcess. Default is true
*/ */
bool useSuid = true; bool useSuid;
/** /**
* @brief directory with interfaces. Default is "/sys/class/net/" * @brief directory with interfaces. Default is "/sys/class/net/"
*/ */
@ -305,27 +298,27 @@ private:
/** /**
* @brief prefered interface for WiFi. Default is "" * @brief prefered interface for WiFi. Default is ""
*/ */
QString mainInterface = QString(PREFERED_IFACE); QString mainInterface;
/** /**
* @brief path to netctl command. Default is "netctl" * @brief path to netctl command. Default is "netctl"
*/ */
QString netctlCommand = QString(NETCTL_PATH); QString netctlCommand;
/** /**
* @brief path to netctl-auto command. Default is "netctl-auto" * @brief path to netctl-auto command. Default is "netctl-auto"
*/ */
QString netctlAutoCommand = QString(NETCTLAUTO_PATH); QString netctlAutoCommand;
/** /**
* @brief netctl-auto service name. Default is "netctl-auto" * @brief netctl-auto service name. Default is "netctl-auto"
*/ */
QString netctlAutoService = QString(NETCTLAUTO_SERVICE); QString netctlAutoService;
/** /**
* @brief path to sudo command. Default is "kdesu" * @brief path to sudo command. Default is "kdesu"
*/ */
QString sudoCommand = QString(SUDO_PATH); QString sudoCommand;
/** /**
* @brief path to systemctl command. Default is "systemctl" * @brief path to systemctl command. Default is "systemctl"
*/ */
QString systemctlCommand = QString(SYSTEMCTL_PATH); QString systemctlCommand;
// functions // functions
/** /**
* @brief method which calls command * @brief method which calls command
@ -333,21 +326,22 @@ private:
* @param command command which will be called * @param command command which will be called
* @param commandLine command which will be passed to command * @param commandLine command which will be passed to command
* @param argument argument which will be passed to commandLine * @param argument argument which will be passed to commandLine
* @return false if components are not found or command exit code is not equal to 0 * @return process object
* @return true if the method was completed without errors
*/ */
bool cmdCall(const bool sudo, const QString command, TaskResult cmdCall(const bool sudo, const QString command,
const QString commandLine, const QString argument = 0); const QString commandLine, const QString argument = QString()) const;
/** /**
* @brief method which calls command and returns its output * @brief method which parse output for profile data
* @param sudo set true if sudo is needed * @param data profile list data
* @param command command which will be called * @return list of active profiles if any
* @param commandLine command which will be passed to command
* @param argument argument which will be passed to commandLine
* @return command output
*/ */
QString getCmdOutput(const bool sudo, const QString command, QStringList getActiveProfileTemplate(const QList<netctlProfileInfo> data) const;
const QString commandLine, const QString argument = 0); /**
* @brief get profile list from sources
* @param isAuto use netctl-auto instead of netctl
* @return profile list
*/
QList<netctlProfileInfo> getProfileListTemplate(const bool isAuto) const;
}; };

View File

@ -109,7 +109,7 @@ public:
/** /**
* @brief NetctlInterface class destructor * @brief NetctlInterface class destructor
*/ */
~NetctlInterface(); virtual ~NetctlInterface();
// control methods // control methods
/** /**
* @brief method which creates and copies profile * @brief method which creates and copies profile
@ -120,7 +120,7 @@ public:
* @return InterfaceAnswer::True if profile is created * @return InterfaceAnswer::True if profile is created
* @return InterfaceAnswer::Error if an error occurs * @return InterfaceAnswer::Error if an error occurs
*/ */
InterfaceAnswer createProfile(const QString profile, const QMap<QString, QString> settings); InterfaceAnswer createProfile(const QString profile, const QMap<QString, QString> settings) const;
/** /**
* @brief method which connects to ESSID * @brief method which connects to ESSID
* @remark netctl independ * @remark netctl independ
@ -130,7 +130,7 @@ public:
* @return InterfaceAnswer::True if profile is active * @return InterfaceAnswer::True if profile is active
* @return InterfaceAnswer::Error if an error occurs * @return InterfaceAnswer::Error if an error occurs
*/ */
InterfaceAnswer connectToEssid(const QString essid, QMap<QString, QString> settings); InterfaceAnswer connectToEssid(const QString essid, QMap<QString, QString> settings) const;
/** /**
* @brief method which connects to existent profile by ESSID * @brief method which connects to existent profile by ESSID
* @remark netctl independ * @remark netctl independ
@ -139,7 +139,7 @@ public:
* @return InterfaceAnswer::True if profile is active * @return InterfaceAnswer::True if profile is active
* @return InterfaceAnswer::Error if an error occurs * @return InterfaceAnswer::Error if an error occurs
*/ */
InterfaceAnswer connectToKnownEssid(const QString essid); InterfaceAnswer connectToKnownEssid(const QString essid) const;
/** /**
* @brief method which creates wireless profile and connects to it * @brief method which creates wireless profile and connects to it
* @remark netctl independ * @remark netctl independ
@ -149,7 +149,7 @@ public:
* @return InterfaceAnswer::True if profile is active * @return InterfaceAnswer::True if profile is active
* @return InterfaceAnswer::Error if an error occurs * @return InterfaceAnswer::Error if an error occurs
*/ */
InterfaceAnswer connectToUnknownEssid(const QString essid, QMap<QString, QString> settings); InterfaceAnswer connectToUnknownEssid(const QString essid, QMap<QString, QString> settings) const;
/** /**
* @brief method which enables or disables selected profile and returns its status * @brief method which enables or disables selected profile and returns its status
* @remark netctl only * @remark netctl only
@ -158,7 +158,7 @@ public:
* @return InterfaceAnswer::True if profile is enabled * @return InterfaceAnswer::True if profile is enabled
* @return InterfaceAnswer::Error if an error occurs * @return InterfaceAnswer::Error if an error occurs
*/ */
InterfaceAnswer enableProfile(const QString profile); InterfaceAnswer enableProfile(const QString profile) const;
/** /**
* @brief method which removes selected profile * @brief method which removes selected profile
* @remark netctl independ * @remark netctl independ
@ -166,7 +166,7 @@ public:
* @return InterfaceAnswer::True if profile does not exists anymore * @return InterfaceAnswer::True if profile does not exists anymore
* @return InterfaceAnswer::Error if an error occurs * @return InterfaceAnswer::Error if an error occurs
*/ */
InterfaceAnswer removeProfile(const QString profile); InterfaceAnswer removeProfile(const QString profile) const;
/** /**
* @brief method which restarts selected profile and returns its status * @brief method which restarts selected profile and returns its status
* @remark netctl only * @remark netctl only
@ -175,7 +175,7 @@ public:
* @return InterfaceAnswer::True if profile is active * @return InterfaceAnswer::True if profile is active
* @return InterfaceAnswer::Error if an error occurs * @return InterfaceAnswer::Error if an error occurs
*/ */
InterfaceAnswer restartProfile(const QString profile); InterfaceAnswer restartProfile(const QString profile) const;
/** /**
* @brief method which starts/stops or switchs to selected profile and returns its status * @brief method which starts/stops or switchs to selected profile and returns its status
* @remark netctl only * @remark netctl only
@ -184,14 +184,14 @@ public:
* @return InterfaceAnswer::True if profile is active * @return InterfaceAnswer::True if profile is active
* @return InterfaceAnswer::Error if an error occurs * @return InterfaceAnswer::Error if an error occurs
*/ */
InterfaceAnswer startProfile(const QString profile); InterfaceAnswer startProfile(const QString profile) const;
/** /**
* @brief method which stops all profiles * @brief method which stops all profiles
* @remark netctl only * @remark netctl only
* @return InterfaceAnswer::True if there are no errors * @return InterfaceAnswer::True if there are no errors
* @return InterfaceAnswer::Error if an error occurs * @return InterfaceAnswer::Error if an error occurs
*/ */
InterfaceAnswer stopAllProfiles(); InterfaceAnswer stopAllProfiles() const;
/** /**
* @brief method which switchs to selected profile and returns its status * @brief method which switchs to selected profile and returns its status
* @remark both netctl and netctl-auto * @remark both netctl and netctl-auto
@ -200,26 +200,26 @@ public:
* @return InterfaceAnswer::True if profile is active * @return InterfaceAnswer::True if profile is active
* @return InterfaceAnswer::Error if an error occurs * @return InterfaceAnswer::Error if an error occurs
*/ */
InterfaceAnswer switchToProfile(const QString profile); InterfaceAnswer switchToProfile(const QString profile) const;
// information // information
/** /**
* @brief method which returns general information * @brief method which returns general information
* @remark both netctl and netctl-auto * @remark both netctl and netctl-auto
* @return netctlInformation structure * @return netctlInformation structure
*/ */
netctlInformation information(); netctlInformation information() const;
/** /**
* @brief method which reads settings from profile * @brief method which reads settings from profile
* @param profile profile name * @param profile profile name
* @return settings from profile * @return settings from profile
*/ */
QMap<QString, QString> profileSettings(const QString profile); QMap<QString, QString> profileSettings(const QString profile) const;
/** /**
* @brief method which returns current status * @brief method which returns current status
* @remark both netctl and netctl-auto * @remark both netctl and netctl-auto
* @return netctlCurrent structure * @return netctlCurrent structure
*/ */
netctlCurrent status(); netctlCurrent status() const;
private: private:
/** /**

View File

@ -30,8 +30,6 @@
#include <QMap> #include <QMap>
#include <QObject> #include <QObject>
#include "version.h"
/** /**
* @brief The NetctlProfile class interacts with netctl profiles * @brief The NetctlProfile class interacts with netctl profiles
@ -54,21 +52,21 @@ public:
/** /**
* @brief Netctl class destructor * @brief Netctl class destructor
*/ */
~NetctlProfile(); virtual ~NetctlProfile();
/** /**
* @brief method which copies temporary profile to PROFILE_DIR * @brief method which copies temporary profile to PROFILE_DIR
* @param oldPath path to temprorary profile * @param oldPath path to temprorary profile
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool copyProfile(const QString oldPath); bool copyProfile(const QString oldPath) const;
/** /**
* @brief method which creates temporary profile * @brief method which creates temporary profile
* @param profile profile name * @param profile profile name
* @param settings profile configuration. All available keys will be printed to the profile * @param settings profile configuration. All available keys will be printed to the profile
* @return temporary profile name * @return temporary profile name
*/ */
QString createProfile(const QString profile, const QMap<QString, QString> settings); QString createProfile(const QString profile, const QMap<QString, QString> settings) const;
/** /**
* @brief method which check system configuration and return recommended values to keys * @brief method which check system configuration and return recommended values to keys
* @return recommended parametrs * @return recommended parametrs
@ -79,28 +77,28 @@ public:
* @param profile profile name * @param profile profile name
* @return settings from profile * @return settings from profile
*/ */
QMap<QString, QString> getSettingsFromProfile(const QString profile); QMap<QString, QString> getSettingsFromProfile(const QString profile) const;
/** /**
* @brief method which return value from profile by key * @brief method which return value from profile by key
* @param profile profile name * @param profile profile name
* @param key required key * @param key required key
* @return value by key * @return value by key
*/ */
QString getValueFromProfile(const QString profile, const QString key); QString getValueFromProfile(const QString profile, const QString key) const;
/** /**
* @brief method which return values from profile by keys * @brief method which return values from profile by keys
* @param profile profile name * @param profile profile name
* @param keys required keys * @param keys required keys
* @return values by keys * @return values by keys
*/ */
QStringList getValuesFromProfile(const QString profile, const QStringList keys); QStringList getValuesFromProfile(const QString profile, const QStringList keys) const;
/** /**
* @brief method which removes profile * @brief method which removes profile
* @param profile profile name * @param profile profile name
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool removeProfile(const QString profile); bool removeProfile(const QString profile) const;
private: private:
/** /**
@ -110,7 +108,7 @@ private:
/** /**
* @brief use RootProcess instead of QProcess. Default is true * @brief use RootProcess instead of QProcess. Default is true
*/ */
bool useSuid = true; bool useSuid;
/** /**
* @brief directory which contains profiles. Default is "/etc/netctl" * @brief directory which contains profiles. Default is "/etc/netctl"
*/ */
@ -118,7 +116,7 @@ private:
/** /**
* @brief path to sudo command. Default is "kdesu" * @brief path to sudo command. Default is "kdesu"
*/ */
QString sudoCommand = QString(SUDO_PATH); QString sudoCommand;
}; };

View File

@ -30,8 +30,6 @@
#include <QMap> #include <QMap>
#include <QObject> #include <QObject>
#include "version.h"
class Netctl; class Netctl;
class NetctlProfile; class NetctlProfile;
@ -113,14 +111,14 @@ public:
/** /**
* @brief WpaSup class destructor * @brief WpaSup class destructor
*/ */
~WpaSup(); virtual ~WpaSup();
// general information // general information
/** /**
* @brief method which gets profile name by ESSID * @brief method which gets profile name by ESSID
* @param essid ESSID name * @param essid ESSID name
* @return profile name * @return profile name
*/ */
QString existentProfile(const QString essid); QString existentProfile(const QString essid) const;
/** /**
* @brief method which check system configuration and return recommended values to keys * @brief method which check system configuration and return recommended values to keys
* @return recommended parametrs * @return recommended parametrs
@ -132,14 +130,7 @@ public:
* @return false if profile is inactive * @return false if profile is inactive
* @return true if profile is active * @return true if profile is active
*/ */
bool isProfileActive(const QString essid); bool isProfileActive(const QString essid) const;
/**
* @brief method which checks profile existence by ESSID
* @param essid ESSID name
* @return false if profile does not exist
* @return true if profile exists
*/
Q_DECL_DEPRECATED bool isProfileExists(const QString essid);
public slots: public slots:
// functions // functions
@ -147,24 +138,24 @@ public slots:
* @brief method which returns active point information * @brief method which returns active point information
* @return current point information * @return current point information
*/ */
netctlWifiInfo current(); netctlWifiInfo current() const;
/** /**
* @brief method which scans WiFi networks * @brief method which scans WiFi networks
* @return list of essids * @return list of essids
*/ */
QList<netctlWifiInfo> scanWifi(); QList<netctlWifiInfo> scanWifi() const;
/** /**
* @brief method which calls wpa_supplicant * @brief method which calls wpa_supplicant
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool startWpaSupplicant(); bool startWpaSupplicant() const;
/** /**
* @brief method which send TERMINATE signal to wpa_supplicant * @brief method which send TERMINATE signal to wpa_supplicant
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool stopWpaSupplicant(); bool stopWpaSupplicant() const;
private: private:
/** /**
@ -182,54 +173,54 @@ private:
/** /**
* @brief use RootProcess instead of QProcess. Default is true * @brief use RootProcess instead of QProcess. Default is true
*/ */
bool useSuid = true; bool useSuid;
/** /**
* @brief path to ctrl_directory. Defaults is "/run/wpa_supplicant" * @brief path to ctrl_directory. Defaults is "/run/wpa_supplicant"
*/ */
QString ctrlDir = QString(CTRL_DIR); QString ctrlDir;
/** /**
* @brief group which is owner of CTRL_DIR. Default is "users" * @brief group which is owner of CTRL_DIR. Default is "users"
*/ */
QString ctrlGroup = QString(CTRL_GROUP); QString ctrlGroup;
/** /**
* @brief wpa_supplicant PID file. $i is interface. Default is "/run/wpa_supplicant_$i.pid" * @brief wpa_supplicant PID file. $i is interface. Default is "/run/wpa_supplicant_$i.pid"
*/ */
QString pidFile = QString(PID_FILE); QString pidFile;
/** /**
* @brief path to sudo command. Default is "kdesu" * @brief path to sudo command. Default is "kdesu"
*/ */
QString sudoCommand = QString(SUDO_PATH); QString sudoCommand;
/** /**
* @brief path to wpa_cli command. Default is "wpa_cli" * @brief path to wpa_cli command. Default is "wpa_cli"
*/ */
QString wpaCliPath = QString(WPACLI_PATH); QString wpaCliPath;
/** /**
* @brief wpa_supplicant drivers comma separated. Default is "nl80211,wext" * @brief wpa_supplicant drivers comma separated. Default is "nl80211,wext"
*/ */
QString wpaDrivers = QString(WPA_DRIVERS); QString wpaDrivers;
/** /**
* @brief path to wpa_supplicant command. Default is "wpa_supplicant" * @brief path to wpa_supplicant command. Default is "wpa_supplicant"
*/ */
QString wpaSupPath = QString(WPASUP_PATH); QString wpaSupPath;
// functions // functions
/** /**
* @brief method which calls wpa_cli and returns its output * @brief method which calls wpa_cli and returns its output
* @param commandLine command which will be passed to wpa_cli * @param commandLine command which will be passed to wpa_cli
* @return wpa_cli output * @return wpa_cli output
*/ */
QString getWpaCliOutput(const QString commandLine); QString getWpaCliOutput(const QString commandLine) const;
/** /**
* @brief method which will be called to sleep thread * @brief method which will be called to sleep thread
* @param sec time interval, seconds * @param sec time interval, seconds
*/ */
bool waitForProcess(const int sec); bool waitForProcess(const int sec) const;
/** /**
* @brief method which calls wpa_cli * @brief method which calls wpa_cli
* @param commandLine command which will be passed to wpa_cli * @param commandLine command which will be passed to wpa_cli
* @return false if components are not found or command exit code is not equal to 0 * @return false if components are not found or command exit code is not equal to 0
* @return true if the method was completed without errors * @return true if the method was completed without errors
*/ */
bool wpaCliCall(const QString commandLine); bool wpaCliCall(const QString commandLine) const;
}; };

View File

@ -30,6 +30,8 @@
#include <pdebug/pdebug.h> #include <pdebug/pdebug.h>
#include <task/taskadds.h> #include <task/taskadds.h>
#include "version.h"
/** /**
* @class Netctl * @class Netctl
@ -42,27 +44,16 @@ Netctl::Netctl(const bool debugCmd, const QMap<QString, QString> settings)
{ {
netctlProfile = new NetctlProfile(debug, settings); netctlProfile = new NetctlProfile(debug, settings);
if (settings.contains(QString("IFACE_DIR"))) ifaceDirectory = new QDir(settings.value(QString("IFACE_DIR"), QString(IFACE_DIR)));
ifaceDirectory = new QDir(settings[QString("IFACE_DIR")]); mainInterface = settings.value(QString("PREFERED_IFACE"), QString(PREFERED_IFACE));
else netctlCommand = settings.value(QString("NETCTL_PATH"), QString(NETCTL_PATH));
ifaceDirectory = new QDir(QString(IFACE_DIR)); netctlAutoCommand = settings.value(QString("NETCTLAUTO_PATH"), QString(NETCTLAUTO_PATH));
if (settings.contains(QString("PREFERED_IFACE"))) netctlAutoService = settings.value(QString("NETCTLAUTO_SERVICE"), QString(NETCTLAUTO_SERVICE));
mainInterface = settings[QString("PREFERED_IFACE")]; sudoCommand = settings.value(QString("SUDO_PATH"), QString(SUDO_PATH));
if (settings.contains(QString("NETCTL_PATH"))) systemctlCommand = settings.value(QString("SYSTEMCTL_PATH"), QString(SYSTEMCTL_PATH));
netctlCommand = settings[QString("NETCTL_PATH")]; useSuid = (settings.value(QString("FORCE_SUDO"), QString("true")) != QString("true"));
if (settings.contains(QString("NETCTLAUTO_PATH")))
netctlAutoCommand = settings[QString("NETCTLAUTO_PATH")];
if (settings.contains(QString("NETCTLAUTO_SERVICE")))
netctlAutoService = settings[QString("NETCTLAUTO_SERVICE")];
if (settings.contains(QString("SUDO_PATH")))
sudoCommand = settings[QString("SUDO_PATH")];
if (settings.contains(QString("SYSTEMCTL_PATH")))
systemctlCommand = settings[QString("SYSTEMCTL_PATH")];
if (settings.contains(QString("FORCE_SUDO")))
useSuid = (settings[QString("FORCE_SUDO")] != QString("true"));
if (useSuid) if (useSuid) sudoCommand = QString("");
sudoCommand = QString("");
} }
@ -78,207 +69,61 @@ Netctl::~Netctl()
} }
// functions
/**
* @fn cmdCall
*/
bool Netctl::cmdCall(const bool sudo, const QString command, const QString commandLine, const QString argument)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Command" << command;
if (debug) qDebug() << PDEBUG << ":" << "Command line" << commandLine;
if (debug) qDebug() << PDEBUG << ":" << "Argument" << argument;
if (command.isEmpty()) {
if (debug) qDebug() << PDEBUG << ":" << "Could not find command";
return false;
}
QString cmd = QString("");
if (sudo)
cmd = QString("%1 ").arg(sudoCommand);
cmd += QString("%1 %2").arg(command).arg(commandLine);
if (!argument.isEmpty())
cmd += QString(" \"%1\"").arg(argument);
if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd;
TaskResult process = runTask(cmd, (useSuid && sudo));
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0)
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
return (process.exitCode == 0);
}
/**
* @fn getCmdOutput
*/
QString Netctl::getCmdOutput(const bool sudo, const QString command, const QString commandLine, const QString argument)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Command" << command;
if (debug) qDebug() << PDEBUG << ":" << "Command line" << commandLine;
if (debug) qDebug() << PDEBUG << ":" << "Argument" << argument;
if (command.isEmpty()) {
if (debug) qDebug() << PDEBUG << ":" << "Could not find command";
return QString();
}
QString cmd = QString("");
if (sudo)
cmd = QString("%1 ").arg(sudoCommand);
cmd += QString("%1 %2").arg(command).arg(commandLine);
if (!argument.isEmpty())
cmd += QString(" \"%1\"").arg(argument);
if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd;
TaskResult process = runTask(cmd, (useSuid && sudo));
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0)
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
return process.output;
}
// general information // general information
/** /**
* @fn getActiveProfile * @fn getActiveProfile
*/ */
QStringList Netctl::getActiveProfile() QStringList Netctl::getActiveProfile() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
QStringList profile; return getActiveProfileTemplate(getProfileList());
QList<netctlProfileInfo> fullProfilesInfo = getProfileList();
for (int i=0; i<fullProfilesInfo.count(); i++)
if (fullProfilesInfo[i].active)
profile.append(fullProfilesInfo[i].name);
return profile;
} }
/** /**
* @fn autoGetActiveProfile * @fn autoGetActiveProfile
*/ */
QString Netctl::autoGetActiveProfile() QStringList Netctl::autoGetActiveProfile() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
QString profile = QString(""); return getActiveProfileTemplate(getProfileListFromNetctlAuto());
QList<netctlProfileInfo> fullProfilesInfo = getProfileListFromNetctlAuto();
for (int i=0; i<fullProfilesInfo.count(); i++)
if (fullProfilesInfo[i].active) {
profile = fullProfilesInfo[i].name;
break;
}
return profile;
} }
/** /**
* @fn getProfileList * @fn getProfileList
*/ */
QList<netctlProfileInfo> Netctl::getProfileList() QList<netctlProfileInfo> Netctl::getProfileList() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
QList<netctlProfileInfo> fullProfilesInfo; return getProfileListTemplate(false);
QStringList output = getCmdOutput(false, netctlCommand, QString("list"))
.split(QChar('\n'), QString::SkipEmptyParts);
for (int i=0; i<output.count(); i++) {
netctlProfileInfo profileInfo;
profileInfo.name = output[i].mid(2, -1);
profileInfo.active = (output[i][0] == QChar('*'));
profileInfo.enabled = isProfileEnabled(profileInfo.name);
// external
QStringList keys;
keys.append(QString("Connection"));
keys.append(QString("Description"));
keys.append(QString("ESSID"));
keys.append(QString("Interface"));
QStringList profileValues = netctlProfile->getValuesFromProfile(profileInfo.name,
keys);
profileInfo.description = profileValues[1];
profileInfo.essid = profileValues[2];
profileInfo.interface = profileValues[3];
profileInfo.type = profileValues[0];
profileInfo.netctlAuto = false;
fullProfilesInfo.append(profileInfo);
}
return fullProfilesInfo;
} }
/** /**
* @fn getProfileListFromNetctlAuto * @fn getProfileListFromNetctlAuto
*/ */
QList<netctlProfileInfo> Netctl::getProfileListFromNetctlAuto() QList<netctlProfileInfo> Netctl::getProfileListFromNetctlAuto() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
QList<netctlProfileInfo> fullProfilesInfo; return getProfileListTemplate(true);
QStringList output = getCmdOutput(false, netctlAutoCommand, QString("list"))
.split(QChar('\n'), QString::SkipEmptyParts);
for (int i=0; i<output.count(); i++) {
netctlProfileInfo profileInfo;
profileInfo.name = output[i].mid(2, -1);
profileInfo.active = (output[i][0] == QChar('*'));
profileInfo.enabled = (output[i][0] != QChar('!'));
// external
QStringList keys;
keys.append(QString("Connection"));
keys.append(QString("Description"));
keys.append(QString("ESSID"));
keys.append(QString("Interface"));
QStringList profileValues = netctlProfile->getValuesFromProfile(profileInfo.name,
keys);
profileInfo.description = profileValues[1];
profileInfo.essid = profileValues[2];
profileInfo.interface = profileValues[3];
profileInfo.type = profileValues[0];
profileInfo.netctlAuto = true;
fullProfilesInfo.append(profileInfo);
}
return fullProfilesInfo;
}
/**
* @fn getProfileDescription
*/
QString Netctl::getProfileDescription(const QString profile)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
if (netctlProfile == 0) {
if (debug) qDebug() << PDEBUG << ":" << "Could not find library";
return QString();
}
return netctlProfile->getValueFromProfile(profile, QString("Description"));
} }
/** /**
* @fn getProfileStatus * @fn getProfileStatus
*/ */
QString Netctl::getProfileStatus(const QString profile) QString Netctl::getProfileStatus(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
QString status; QString status = isProfileActive(profile) ? QString("active") : QString("inactive");
if (isProfileActive(profile)) status += isProfileEnabled(profile) ? QString(" (enabled)") : QString(" (static)");
status = QString("active");
else
status = QString("inactive");
if (isProfileEnabled(profile))
status += QString(" (enabled)");
else
status += QString(" (static)");
return status; return status;
} }
@ -287,42 +132,40 @@ QString Netctl::getProfileStatus(const QString profile)
/** /**
* @fn isProfileActive * @fn isProfileActive
*/ */
bool Netctl::isProfileActive(const QString profile) bool Netctl::isProfileActive(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
QString output = getCmdOutput(false, netctlCommand, QString("status"), profile); return cmdCall(false, netctlCommand, QString("status"), profile).status();
return (output.contains(QString("Active: active")));
} }
/** /**
* @fn isProfileEnabled * @fn isProfileEnabled
*/ */
bool Netctl::isProfileEnabled(const QString profile) bool Netctl::isProfileEnabled(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
return cmdCall(false, netctlCommand, QString("is-enabled"), profile); return cmdCall(false, netctlCommand, QString("is-enabled"), profile).output == QString("enabled\n");
} }
/** /**
* @fn autoIsProfileActive * @fn autoIsProfileActive
*/ */
bool Netctl::autoIsProfileActive(const QString profile) bool Netctl::autoIsProfileActive(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
bool status = false; bool status = false;
QList<netctlProfileInfo> profiles = getProfileListFromNetctlAuto(); QList<netctlProfileInfo> profiles = getProfileListFromNetctlAuto();
for (int i=0; i<profiles.count(); i++) { foreach(netctlProfileInfo profileInfo, profiles) {
if (profiles[i].name == profile) continue; if (profileInfo.name != profile) continue;
status = profiles[i].active; status = profileInfo.active;
break; break;
} }
@ -333,16 +176,16 @@ bool Netctl::autoIsProfileActive(const QString profile)
/** /**
* @fn autoIsProfileEnabled * @fn autoIsProfileEnabled
*/ */
bool Netctl::autoIsProfileEnabled(const QString profile) bool Netctl::autoIsProfileEnabled(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
bool status = false; bool status = false;
QList<netctlProfileInfo> profiles = getProfileListFromNetctlAuto(); QList<netctlProfileInfo> profiles = getProfileListFromNetctlAuto();
for (int i=0; i<profiles.count(); i++) { foreach(netctlProfileInfo profileInfo, profiles) {
if (profiles[i].name == profile) continue; if (profileInfo.name != profile) continue;
status = profiles[i].enabled; status = profileInfo.enabled;
break; break;
} }
@ -353,7 +196,7 @@ bool Netctl::autoIsProfileEnabled(const QString profile)
/** /**
* @fn isNetctlAutoEnabled * @fn isNetctlAutoEnabled
*/ */
bool Netctl::isNetctlAutoEnabled() bool Netctl::isNetctlAutoEnabled() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlAutoService.isEmpty()) { if (netctlAutoService.isEmpty()) {
@ -366,16 +209,16 @@ bool Netctl::isNetctlAutoEnabled()
return false; return false;
} }
QString argument = QString("%1@%2.service").arg(netctlAutoService).arg(interfaces[0]); QString argument = QString("%1@%2.service").arg(netctlAutoService).arg(interfaces.first());
return cmdCall(false, systemctlCommand, QString("is-enabled"), argument); return cmdCall(false, systemctlCommand, QString("is-enabled"), argument).status();
} }
/** /**
* @fn isNetctlAutoRunning * @fn isNetctlAutoRunning
*/ */
bool Netctl::isNetctlAutoRunning() bool Netctl::isNetctlAutoRunning() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlAutoService.isEmpty()) { if (netctlAutoService.isEmpty()) {
@ -388,9 +231,9 @@ bool Netctl::isNetctlAutoRunning()
return false; return false;
} }
QString argument = QString("%1@%2.service").arg(netctlAutoService).arg(interfaces[0]); QString argument = QString("%1@%2.service").arg(netctlAutoService).arg(interfaces.first());
return cmdCall(false, systemctlCommand, QString("is-active"), argument); return cmdCall(false, systemctlCommand, QString("is-active"), argument).status();
} }
@ -408,9 +251,9 @@ QMap<QString, QString> Netctl::getRecommendedConfiguration()
recommended.clear(); recommended.clear();
recommended.append(QString("netctlgui-helper")); recommended.append(QString("netctlgui-helper"));
recommended.append(QString("netctlgui-helper-suid")); recommended.append(QString("netctlgui-helper-suid"));
for (int i=0; i<recommended.count(); i++) { foreach(QString rec, recommended) {
process = runTask(QString("which %1").arg(recommended[i]), false); process = runTask(QString("which %1").arg(rec), false);
if (process.exitCode == 0) { if (process.status()) {
settings[QString("FORCE_SUDO")] = QString("false"); settings[QString("FORCE_SUDO")] = QString("false");
break; break;
} }
@ -436,9 +279,9 @@ QMap<QString, QString> Netctl::getRecommendedConfiguration()
settings[QString("NETCTL_PATH")] = QString(""); settings[QString("NETCTL_PATH")] = QString("");
recommended.clear(); recommended.clear();
recommended.append("netctl"); recommended.append("netctl");
for (int i=0; i<recommended.count(); i++) { foreach(QString rec, recommended) {
process = runTask(QString("which %1").arg(recommended[i]), false); process = runTask(QString("which %1").arg(rec), false);
if (process.exitCode == 0) { if (process.status()) {
settings[QString("NETCTL_PATH")] = process.output.trimmed(); settings[QString("NETCTL_PATH")] = process.output.trimmed();
break; break;
} }
@ -448,9 +291,9 @@ QMap<QString, QString> Netctl::getRecommendedConfiguration()
settings[QString("NETCTLAUTO_PATH")] = QString(""); settings[QString("NETCTLAUTO_PATH")] = QString("");
recommended.clear(); recommended.clear();
recommended.append("netctl-auto"); recommended.append("netctl-auto");
for (int i=0; i<recommended.count(); i++) { foreach(QString rec, recommended) {
process = runTask(QString("which %1").arg(recommended[i]), false); process = runTask(QString("which %1").arg(rec), false);
if (process.exitCode == 0) { if (process.status()) {
settings[QString("NETCTLAUTO_PATH")] = process.output.trimmed(); settings[QString("NETCTLAUTO_PATH")] = process.output.trimmed();
break; break;
} }
@ -478,9 +321,9 @@ QMap<QString, QString> Netctl::getRecommendedConfiguration()
recommended.append("sudo"); recommended.append("sudo");
recommended.append("kdesu"); recommended.append("kdesu");
recommended.append("gksu"); recommended.append("gksu");
for (int i=0; i<recommended.count(); i++) { foreach(QString rec, recommended) {
process = runTask(QString("which %1").arg(recommended[i]), false); process = runTask(QString("which %1").arg(rec), false);
if (process.exitCode == 0) { if (process.status()) {
settings[QString("SUDO_PATH")] = process.output.trimmed(); settings[QString("SUDO_PATH")] = process.output.trimmed();
break; break;
} }
@ -490,9 +333,9 @@ QMap<QString, QString> Netctl::getRecommendedConfiguration()
settings[QString("SYSTEMCTL_PATH")] = QString(""); settings[QString("SYSTEMCTL_PATH")] = QString("");
recommended.clear(); recommended.clear();
recommended.append("systemctl"); recommended.append("systemctl");
for (int i=0; i<recommended.count(); i++) { foreach(QString rec, recommended) {
process = runTask(QString("which %1").arg(recommended[i]), false); process = runTask(QString("which %1").arg(rec), false);
if (process.exitCode == 0) { if (process.status()) {
settings[QString("SYSTEMCTL_PATH")] = process.output.trimmed(); settings[QString("SYSTEMCTL_PATH")] = process.output.trimmed();
break; break;
} }
@ -505,7 +348,7 @@ QMap<QString, QString> Netctl::getRecommendedConfiguration()
/** /**
* @fn getWirelessInterfaceList * @fn getWirelessInterfaceList
*/ */
QStringList Netctl::getWirelessInterfaceList() QStringList Netctl::getWirelessInterfaceList() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (ifaceDirectory == nullptr) { if (ifaceDirectory == nullptr) {
@ -517,11 +360,11 @@ QStringList Netctl::getWirelessInterfaceList()
if (!mainInterface.isEmpty()) if (!mainInterface.isEmpty())
interfaces.append(mainInterface); interfaces.append(mainInterface);
QStringList allInterfaces = ifaceDirectory->entryList(QDir::Dirs | QDir::NoDotAndDotDot); QStringList allInterfaces = ifaceDirectory->entryList(QDir::Dirs | QDir::NoDotAndDotDot);
for (int i=0; i<allInterfaces.count(); i++) { foreach(QString interface, allInterfaces) {
QString dir = QString("%1/%2/wireless").arg(ifaceDirectory->path()).arg(allInterfaces[i]); QString dir = QString("%1/%2/wireless").arg(ifaceDirectory->path()).arg(interface);
if (debug) qDebug() << PDEBUG << ":" << "Check directory" << dir; if (debug) qDebug() << PDEBUG << ":" << "Check directory" << dir;
if (QDir(dir).exists()) if (QDir(dir).exists())
interfaces.append(allInterfaces[i]); interfaces.append(interface);
} }
return interfaces; return interfaces;
@ -532,159 +375,156 @@ QStringList Netctl::getWirelessInterfaceList()
/** /**
* @fn enableProfile * @fn enableProfile
*/ */
bool Netctl::enableProfile(const QString profile) bool Netctl::enableProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
if (isProfileEnabled(profile)) return cmdCall(true, netctlCommand,
return cmdCall(true, netctlCommand, QString("disable"), profile); isProfileEnabled(profile) ? QString("disable") : QString("enable"),
else profile).status();
return cmdCall(true, netctlCommand, QString("enable"), profile);
} }
/** /**
* @fn forceStartProfile * @fn forceStartProfile
*/ */
bool Netctl::forceStartProfile(const QString profile) bool Netctl::forceStartProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
return cmdCall(true, netctlCommand, QString("start"), profile); return cmdCall(true, netctlCommand, QString("start"), profile).status();
} }
/** /**
* @fn forceStopProfile * @fn forceStopProfile
*/ */
bool Netctl::forceStopProfile(const QString profile) bool Netctl::forceStopProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
return cmdCall(true, netctlCommand, QString("stop"), profile); return cmdCall(true, netctlCommand, QString("stop"), profile).status();
} }
/** /**
* @fn reenableProfile * @fn reenableProfile
*/ */
bool Netctl::reenableProfile(const QString profile) bool Netctl::reenableProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
return cmdCall(true, netctlCommand, QString("reenable"), profile); return cmdCall(true, netctlCommand, QString("reenable"), profile).status();
} }
/** /**
* @fn restartProfile * @fn restartProfile
*/ */
bool Netctl::restartProfile(const QString profile) bool Netctl::restartProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
return cmdCall(true, netctlCommand, QString("restart"), profile); return cmdCall(true, netctlCommand, QString("restart"), profile).status();
} }
/** /**
* @fn startProfile * @fn startProfile
*/ */
bool Netctl::startProfile(const QString profile) bool Netctl::startProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
if (isProfileActive(profile)) return cmdCall(true, netctlCommand,
return cmdCall(true, netctlCommand, QString("stop"), profile); isProfileActive(profile) ? QString("stop") : QString("start"),
else profile).status();
return cmdCall(true, netctlCommand, QString("start"), profile);
} }
/** /**
* @fn stopAllProfiles * @fn stopAllProfiles
*/ */
bool Netctl::stopAllProfiles() bool Netctl::stopAllProfiles() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
return cmdCall(true, netctlCommand, QString("stop-all")); return cmdCall(true, netctlCommand, QString("stop-all")).status();
} }
/** /**
* @fn switchToProfile * @fn switchToProfile
*/ */
bool Netctl::switchToProfile(const QString profile) bool Netctl::switchToProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
return ((isProfileActive(profile)) || return ((isProfileActive(profile)) ||
(cmdCall(true, netctlCommand, QString("switch-to"), profile))); (cmdCall(true, netctlCommand, QString("switch-to"), profile)).status());
} }
/** /**
* @fn autoDisableAllProfiles * @fn autoDisableAllProfiles
*/ */
bool Netctl::autoDisableAllProfiles() bool Netctl::autoDisableAllProfiles() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
return cmdCall(false, netctlAutoCommand, QString("disable-all")); return cmdCall(false, netctlAutoCommand, QString("disable-all")).status();
} }
/** /**
* @fn autoEnableProfile * @fn autoEnableProfile
*/ */
bool Netctl::autoEnableProfile(const QString profile) bool Netctl::autoEnableProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
if (autoIsProfileEnabled(profile)) return cmdCall(false, netctlAutoCommand,
return cmdCall(false, netctlAutoCommand, QString("disable"), profile); autoIsProfileEnabled(profile) ? QString("disable") : QString("enable"),
else profile).status();
return cmdCall(false, netctlAutoCommand, QString("enable"), profile);
} }
/** /**
* @fn autoEnableAllProfiles * @fn autoEnableAllProfiles
*/ */
bool Netctl::autoEnableAllProfiles() bool Netctl::autoEnableAllProfiles() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
return cmdCall(false, netctlAutoCommand, QString("enable-all")); return cmdCall(false, netctlAutoCommand, QString("enable-all")).status();
} }
/** /**
* @fn autoStartProfile * @fn autoStartProfile
*/ */
bool Netctl::autoStartProfile(const QString profile) bool Netctl::autoStartProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
return ((autoIsProfileActive(profile)) || return ((autoIsProfileActive(profile)) ||
(cmdCall(false, netctlAutoCommand, QString("switch-to"), profile))); (cmdCall(false, netctlAutoCommand, QString("switch-to"), profile)).status());
} }
/** /**
* @fn autoEnableService * @fn autoEnableService
*/ */
bool Netctl::autoEnableService() bool Netctl::autoEnableService() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlAutoService.isEmpty()) { if (netctlAutoService.isEmpty()) {
@ -697,19 +537,18 @@ bool Netctl::autoEnableService()
return false; return false;
} }
QString argument = QString("%1@%2.service").arg(netctlAutoService).arg(interfaces[0]); QString argument = QString("%1@%2.service").arg(netctlAutoService).arg(interfaces.first());
if (isNetctlAutoEnabled()) return cmdCall(true, systemctlCommand,
return cmdCall(true, systemctlCommand, QString("disable"), argument); isNetctlAutoEnabled() ? QString("disable") : QString("enable"),
else argument).status();
return cmdCall(true, systemctlCommand, QString("enable"), argument);
} }
/** /**
* @fn autoRestartService * @fn autoRestartService
*/ */
bool Netctl::autoRestartService() bool Netctl::autoRestartService() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlAutoService.isEmpty()) { if (netctlAutoService.isEmpty()) {
@ -722,17 +561,17 @@ bool Netctl::autoRestartService()
return false; return false;
} }
QString argument = QString("%1@%2.service").arg(netctlAutoService).arg(interfaces[0]); QString argument = QString("%1@%2.service").arg(netctlAutoService).arg(interfaces.first());
return ((!isNetctlAutoRunning()) || return ((!isNetctlAutoRunning()) ||
(cmdCall(true, systemctlCommand, QString("restart"), argument))); (cmdCall(true, systemctlCommand, QString("restart"), argument)).status());
} }
/** /**
* @fn autoStartService * @fn autoStartService
*/ */
bool Netctl::autoStartService() bool Netctl::autoStartService() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlAutoService.isEmpty()) { if (netctlAutoService.isEmpty()) {
@ -745,10 +584,87 @@ bool Netctl::autoStartService()
return false; return false;
} }
QString argument = QString("%1@%2.service").arg(netctlAutoService).arg(interfaces[0]); QString argument = QString("%1@%2.service").arg(netctlAutoService).arg(interfaces.first());
if (isNetctlAutoRunning()) return cmdCall(true, systemctlCommand,
return cmdCall(true, systemctlCommand, QString("stop"), argument); isNetctlAutoRunning() ? QString("stop") : QString("start"),
else argument).status();
return cmdCall(true, systemctlCommand, QString("start"), argument); }
// functions
/**
* @fn cmdCall
*/
TaskResult Netctl::cmdCall(const bool sudo, const QString command,
const QString commandLine, const QString argument) const
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Command" << command;
if (debug) qDebug() << PDEBUG << ":" << "Command line" << commandLine;
if (debug) qDebug() << PDEBUG << ":" << "Argument" << argument;
QString cmd = QString("");
if (sudo) cmd = QString("%1 ").arg(sudoCommand);
cmd += QString("%1 %2").arg(command).arg(commandLine);
if (!argument.isEmpty()) cmd += QString(" \"%1\"").arg(argument);
if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd;
TaskResult process = runTask(cmd, (useSuid && sudo));
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
return process;
};
/**
* @fn getActiveProfileTemplate
*/
QStringList Netctl::getActiveProfileTemplate(const QList<netctlProfileInfo> data) const
{
if (debug) qDebug() << PDEBUG;
QStringList profiles;
foreach(netctlProfileInfo profile, data) {
if (!profile.active) continue;
profiles.append(profile.name);
}
return profiles;
}
/**
* @fn getProfileListTemplate
*/
QList<netctlProfileInfo> Netctl::getProfileListTemplate(const bool isAuto) const
{
if (debug) qDebug() << PDEBUG;
QList<netctlProfileInfo> fullProfilesInfo;
QStringList output = QString(cmdCall(false, isAuto ? netctlAutoCommand : netctlCommand,
QString("list")).output)
.split(QChar('\n'), QString::SkipEmptyParts);
foreach(QString profile, output) {
netctlProfileInfo profileInfo;
profileInfo.name = profile.mid(2, -1);
profileInfo.active = (profile[0] == QChar('*'));
profileInfo.enabled = isAuto ? (profile[0] != QChar('!')) : isProfileEnabled(profileInfo.name);
// external
QStringList keys;
keys.append(QString("Connection"));
keys.append(QString("Description"));
keys.append(QString("ESSID"));
keys.append(QString("Interface"));
QStringList profileValues = netctlProfile->getValuesFromProfile(profileInfo.name,
keys);
profileInfo.description = profileValues[1];
profileInfo.essid = profileValues[2];
profileInfo.interface = profileValues[3];
profileInfo.type = profileValues[0];
profileInfo.netctlAuto = isAuto;
fullProfilesInfo.append(profileInfo);
}
return fullProfilesInfo;
} }

View File

@ -60,7 +60,8 @@ NetctlInterface::~NetctlInterface()
/** /**
* @fn connectToEssid * @fn connectToEssid
*/ */
InterfaceAnswer NetctlInterface::connectToEssid(const QString essid, QMap<QString, QString> settings) InterfaceAnswer NetctlInterface::connectToEssid(const QString essid,
QMap<QString, QString> settings) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlCommand == nullptr) { if (netctlCommand == nullptr) {
@ -83,7 +84,7 @@ InterfaceAnswer NetctlInterface::connectToEssid(const QString essid, QMap<QStrin
/** /**
* @fn connectToKnownEssid * @fn connectToKnownEssid
*/ */
InterfaceAnswer NetctlInterface::connectToKnownEssid(const QString essid) InterfaceAnswer NetctlInterface::connectToKnownEssid(const QString essid) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlCommand == nullptr) { if (netctlCommand == nullptr) {
@ -105,7 +106,8 @@ InterfaceAnswer NetctlInterface::connectToKnownEssid(const QString essid)
/** /**
* @fn connectToUnknownEssid * @fn connectToUnknownEssid
*/ */
InterfaceAnswer NetctlInterface::connectToUnknownEssid(const QString essid, QMap<QString, QString> settings) InterfaceAnswer NetctlInterface::connectToUnknownEssid(const QString essid,
QMap<QString, QString> settings) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlCommand == nullptr) { if (netctlCommand == nullptr) {
@ -121,7 +123,7 @@ InterfaceAnswer NetctlInterface::connectToUnknownEssid(const QString essid, QMap
QStringList interfaces = netctlCommand->getWirelessInterfaceList(); QStringList interfaces = netctlCommand->getWirelessInterfaceList();
if (interfaces.isEmpty()) return InterfaceAnswer::Error; if (interfaces.isEmpty()) return InterfaceAnswer::Error;
settings[QString("Description")] = QString("'Automatically generated profile by Netctl GUI'"); settings[QString("Description")] = QString("'Automatically generated profile by Netctl GUI'");
settings[QString("Interface")] = interfaces[0]; settings[QString("Interface")] = interfaces.first();
settings[QString("Connection")] = QString("wireless"); settings[QString("Connection")] = QString("wireless");
settings[QString("ESSID")] = QString("'%1'").arg(essid); settings[QString("ESSID")] = QString("'%1'").arg(essid);
settings[QString("IP")] = QString("dhcp"); settings[QString("IP")] = QString("dhcp");
@ -139,7 +141,8 @@ InterfaceAnswer NetctlInterface::connectToUnknownEssid(const QString essid, QMap
/** /**
* @fn createProfile * @fn createProfile
*/ */
InterfaceAnswer NetctlInterface::createProfile(const QString profile, const QMap<QString, QString> settings) InterfaceAnswer NetctlInterface::createProfile(const QString profile,
const QMap<QString, QString> settings) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlCommand == nullptr) { if (netctlCommand == nullptr) {
@ -157,7 +160,7 @@ InterfaceAnswer NetctlInterface::createProfile(const QString profile, const QMap
/** /**
* @fn enableProfile * @fn enableProfile
*/ */
InterfaceAnswer NetctlInterface::enableProfile(const QString profile) InterfaceAnswer NetctlInterface::enableProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlCommand == nullptr) { if (netctlCommand == nullptr) {
@ -174,7 +177,7 @@ InterfaceAnswer NetctlInterface::enableProfile(const QString profile)
/** /**
* @fn removeProfile * @fn removeProfile
*/ */
InterfaceAnswer NetctlInterface::removeProfile(const QString profile) InterfaceAnswer NetctlInterface::removeProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlProfile == nullptr) { if (netctlProfile == nullptr) {
@ -189,7 +192,7 @@ InterfaceAnswer NetctlInterface::removeProfile(const QString profile)
/** /**
* @fn restartProfile * @fn restartProfile
*/ */
InterfaceAnswer NetctlInterface::restartProfile(const QString profile) InterfaceAnswer NetctlInterface::restartProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlCommand == nullptr) { if (netctlCommand == nullptr) {
@ -206,7 +209,7 @@ InterfaceAnswer NetctlInterface::restartProfile(const QString profile)
/** /**
* @fn startProfile * @fn startProfile
*/ */
InterfaceAnswer NetctlInterface::startProfile(const QString profile) InterfaceAnswer NetctlInterface::startProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlCommand == nullptr) { if (netctlCommand == nullptr) {
@ -227,7 +230,7 @@ InterfaceAnswer NetctlInterface::startProfile(const QString profile)
/** /**
* @fn stopAllProfiles * @fn stopAllProfiles
*/ */
InterfaceAnswer NetctlInterface::stopAllProfiles() InterfaceAnswer NetctlInterface::stopAllProfiles() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlCommand == nullptr) { if (netctlCommand == nullptr) {
@ -242,7 +245,7 @@ InterfaceAnswer NetctlInterface::stopAllProfiles()
/** /**
* @fn switchToProfile * @fn switchToProfile
*/ */
InterfaceAnswer NetctlInterface::switchToProfile(const QString profile) InterfaceAnswer NetctlInterface::switchToProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlCommand == nullptr) { if (netctlCommand == nullptr) {
@ -267,7 +270,7 @@ InterfaceAnswer NetctlInterface::switchToProfile(const QString profile)
/** /**
* @fn information * @fn information
*/ */
netctlInformation NetctlInterface::information() netctlInformation NetctlInterface::information() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlCommand == nullptr) { if (netctlCommand == nullptr) {
@ -288,7 +291,7 @@ netctlInformation NetctlInterface::information()
/** /**
* @fn profileSettings * @fn profileSettings
*/ */
QMap<QString, QString> NetctlInterface::profileSettings(const QString profile) QMap<QString, QString> NetctlInterface::profileSettings(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlProfile == nullptr) { if (netctlProfile == nullptr) {
@ -303,7 +306,7 @@ QMap<QString, QString> NetctlInterface::profileSettings(const QString profile)
/** /**
* @fn status * @fn status
*/ */
netctlCurrent NetctlInterface::status() netctlCurrent NetctlInterface::status() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (netctlCommand == nullptr) { if (netctlCommand == nullptr) {
@ -318,11 +321,11 @@ netctlCurrent NetctlInterface::status()
profiles = netctlCommand->getProfileListFromNetctlAuto(); profiles = netctlCommand->getProfileListFromNetctlAuto();
else else
profiles = netctlCommand->getProfileList(); profiles = netctlCommand->getProfileList();
for (int i=0; i<profiles.count(); i++) { foreach(netctlProfileInfo profile, profiles) {
current.profiles.append(profiles[i].name); current.profiles.append(profile.name);
if (!profiles[i].active) continue; if (!profile.active) continue;
current.current.append(profiles[i].name); current.current.append(profile.name);
current.enables.append(profiles[i].enabled); current.enables.append(profile.enabled);
} }
return current; return current;

View File

@ -33,6 +33,8 @@
#include <pdebug/pdebug.h> #include <pdebug/pdebug.h>
#include <task/taskadds.h> #include <task/taskadds.h>
#include "version.h"
/** /**
* @class NetctlProfile * @class NetctlProfile
@ -43,17 +45,11 @@
NetctlProfile::NetctlProfile(const bool debugCmd, const QMap<QString, QString> settings) NetctlProfile::NetctlProfile(const bool debugCmd, const QMap<QString, QString> settings)
: debug(debugCmd) : debug(debugCmd)
{ {
if (settings.contains(QString("PROFILE_DIR"))) profileDirectory = new QDir(settings.value(QString("PROFILE_DIR"), QString(PROFILE_DIR)));
profileDirectory = new QDir(settings[QString("PROFILE_DIR")]); sudoCommand = settings.value(QString("SUDO_PATH"), QString(SUDO_PATH));
else useSuid = (settings.value(QString("FORCE_SUDO"), QString("true")) != QString("true"));
profileDirectory = new QDir(QString(PROFILE_DIR));
if (settings.contains(QString("SUDO_PATH")))
sudoCommand = settings[QString("SUDO_PATH")];
if (settings.contains(QString("FORCE_SUDO")))
useSuid = (settings[QString("FORCE_SUDO")] != QString("true"));
if (useSuid) if (useSuid) sudoCommand = QString("");
sudoCommand = QString("");
} }
@ -71,7 +67,7 @@ NetctlProfile::~NetctlProfile()
/** /**
* @fn copyProfile * @fn copyProfile
*/ */
bool NetctlProfile::copyProfile(const QString oldPath) bool NetctlProfile::copyProfile(const QString oldPath) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Path" << oldPath; if (debug) qDebug() << PDEBUG << ":" << "Path" << oldPath;
@ -87,17 +83,16 @@ bool NetctlProfile::copyProfile(const QString oldPath)
if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd;
TaskResult process = runTask(cmd, useSuid); TaskResult process = runTask(cmd, useSuid);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0) if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
return (process.exitCode == 0); return process.status();
} }
/** /**
* @fn createProfile * @fn createProfile
*/ */
QString NetctlProfile::createProfile(const QString profile, const QMap<QString, QString> settings) QString NetctlProfile::createProfile(const QString profile, const QMap<QString, QString> settings) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
@ -108,22 +103,22 @@ QString NetctlProfile::createProfile(const QString profile, const QMap<QString,
if (!profileFile.open(QIODevice::WriteOnly | QIODevice::Text)) if (!profileFile.open(QIODevice::WriteOnly | QIODevice::Text))
return profileTempName; return profileTempName;
QTextStream out(&profileFile); QTextStream out(&profileFile);
for (int i=0; i<settings.keys().count(); i++) { foreach(QString key, settings.keys()) {
out << settings.keys()[i] << QString("="); out << key << QString("=");
if ((settings.keys()[i] == QString("BindsToInterfaces")) || if ((key == QString("BindsToInterfaces")) ||
(settings.keys()[i] == QString("After")) || (key == QString("After")) ||
(settings.keys()[i] == QString("Address")) || (key == QString("Address")) ||
(settings.keys()[i] == QString("Routes")) || (key == QString("Routes")) ||
(settings.keys()[i] == QString("Address6")) || (key == QString("Address6")) ||
(settings.keys()[i] == QString("Routes6")) || (key == QString("Routes6")) ||
(settings.keys()[i] == QString("IPCustom")) || (key == QString("IPCustom")) ||
(settings.keys()[i] == QString("DNS")) || (key == QString("DNS")) ||
(settings.keys()[i] == QString("DNSOptions")) || (key == QString("DNSOptions")) ||
(settings.keys()[i] == QString("ScanFrequencies")) || (key == QString("ScanFrequencies")) ||
(settings.keys()[i] == QString("WPAConfigSection"))) (key == QString("WPAConfigSection")))
out << QString("(%1)").arg(settings[settings.keys()[i]]) << endl; out << QString("(%1)").arg(settings[key]) << endl;
else else
out << settings[settings.keys()[i]] << endl; out << settings[key] << endl;
} }
profileFile.close(); profileFile.close();
@ -145,9 +140,9 @@ QMap<QString, QString> NetctlProfile::getRecommendedConfiguration()
recommended.clear(); recommended.clear();
recommended.append(QString("netctlgui-helper")); recommended.append(QString("netctlgui-helper"));
recommended.append(QString("netctlgui-helper-suid")); recommended.append(QString("netctlgui-helper-suid"));
for (int i=0; i<recommended.count(); i++) { foreach(QString rec, recommended) {
process = runTask(QString("which %1").arg(recommended[i]), false); process = runTask(QString("which %1").arg(rec), false);
if (process.exitCode == 0) { if (process.status()) {
settings[QString("FORCE_SUDO")] = QString("false"); settings[QString("FORCE_SUDO")] = QString("false");
break; break;
} }
@ -172,9 +167,9 @@ QMap<QString, QString> NetctlProfile::getRecommendedConfiguration()
recommended.append("sudo"); recommended.append("sudo");
recommended.append("kdesu"); recommended.append("kdesu");
recommended.append("gksu"); recommended.append("gksu");
for (int i=0; i<recommended.count(); i++) { foreach(QString rec, recommended) {
process = runTask(QString("which %1").arg(recommended[i]), false); process = runTask(QString("which %1").arg(rec), false);
if (process.exitCode == 0) { if (process.status()) {
settings[QString("SUDO_PATH")] = process.output.trimmed(); settings[QString("SUDO_PATH")] = process.output.trimmed();
break; break;
} }
@ -187,7 +182,7 @@ QMap<QString, QString> NetctlProfile::getRecommendedConfiguration()
/** /**
* @fn getSettingsFromProfile * @fn getSettingsFromProfile
*/ */
QMap<QString, QString> NetctlProfile::getSettingsFromProfile(const QString profile) QMap<QString, QString> NetctlProfile::getSettingsFromProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
@ -202,13 +197,12 @@ QMap<QString, QString> NetctlProfile::getSettingsFromProfile(const QString profi
if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd;
TaskResult process = runTask(cmd, false); TaskResult process = runTask(cmd, false);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0) if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
QStringList output = QString(process.output).trimmed().split(QChar('\n')); QStringList output = QString(process.output).trimmed().split(QChar('\n'));
QStringList systemVariables; QStringList systemVariables;
systemVariables.append(QString("PIPESTATUS")); systemVariables.append(QString("PIPESTATUS"));
for (int i=0; i<output.count(); i++) foreach(QString str, output)
systemVariables.append(output[i].split(QChar('='))[0]); systemVariables.append(str.split(QChar('=')).first());
// profile variables // profile variables
QMap<QString, QString> settings; QMap<QString, QString> settings;
QString profileUrl = QString("%1/%2").arg(profileDirectory->absolutePath()).arg(QFileInfo(profile).fileName()); QString profileUrl = QString("%1/%2").arg(profileDirectory->absolutePath()).arg(QFileInfo(profile).fileName());
@ -216,20 +210,19 @@ QMap<QString, QString> NetctlProfile::getSettingsFromProfile(const QString profi
if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd;
process = runTask(cmd, false); process = runTask(cmd, false);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0) if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
output = QString(process.output).trimmed().split(QChar('\n')); output = QString(process.output).trimmed().split(QChar('\n'));
// read variables // read variables
QStringList keys; QStringList keys;
for (int i=0; i<output.count(); i++) foreach(QString str, output)
if (!systemVariables.contains(output[i].split(QChar('='))[0])) if (!systemVariables.contains(str.split(QChar('=')).first()))
keys.append(output[i].split(QChar('='))[0]); keys.append(str.split(QChar('=')).first());
for (int i=0; i<keys.count(); i++){ foreach(QString key, keys) {
cmd = QString("env -i bash -c \"source '%1'; for i in ${!%2[@]}; do echo ${%2[$i]}; done\"").arg(profileUrl).arg(keys[i]); cmd = QString("env -i bash -c \"source '%1'; for i in ${!%2[@]}; do echo ${%2[$i]}; done\"").arg(profileUrl).arg(key);
process = runTask(cmd, false); process = runTask(cmd, false);
settings[keys[i]] = process.output.trimmed(); settings[key] = process.output.trimmed();
if (debug) qDebug() << PDEBUG << ":" << keys[i] << "=" << settings[keys[i]]; if (debug) qDebug() << PDEBUG << ":" << key << "=" << settings[key];
} }
return settings; return settings;
@ -239,20 +232,20 @@ QMap<QString, QString> NetctlProfile::getSettingsFromProfile(const QString profi
/** /**
* @fn getValueFromProfile * @fn getValueFromProfile
*/ */
QString NetctlProfile::getValueFromProfile(const QString profile, const QString key) QString NetctlProfile::getValueFromProfile(const QString profile, const QString key) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
if (debug) qDebug() << PDEBUG << ":" << "Key" << key; if (debug) qDebug() << PDEBUG << ":" << "Key" << key;
return getValuesFromProfile(profile, QStringList() << key)[0]; return getValuesFromProfile(profile, QStringList() << key).first();
} }
/** /**
* @fn getValuesFromProfile * @fn getValuesFromProfile
*/ */
QStringList NetctlProfile::getValuesFromProfile(const QString profile, const QStringList keys) QStringList NetctlProfile::getValuesFromProfile(const QString profile, const QStringList keys) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
@ -260,8 +253,8 @@ QStringList NetctlProfile::getValuesFromProfile(const QString profile, const QSt
QMap<QString, QString> settings = getSettingsFromProfile(profile); QMap<QString, QString> settings = getSettingsFromProfile(profile);
QStringList values; QStringList values;
for (int i=0; i<keys.count(); i++) foreach(QString key, keys)
values.append(settings[keys[i]]); values.append(settings[key]);
return values; return values;
} }
@ -270,7 +263,7 @@ QStringList NetctlProfile::getValuesFromProfile(const QString profile, const QSt
/** /**
* @fn removeProfile * @fn removeProfile
*/ */
bool NetctlProfile::removeProfile(const QString profile) bool NetctlProfile::removeProfile(const QString profile) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile; if (debug) qDebug() << PDEBUG << ":" << "Profile" << profile;
@ -284,8 +277,7 @@ bool NetctlProfile::removeProfile(const QString profile)
if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd;
TaskResult process = runTask(cmd, useSuid); TaskResult process = runTask(cmd, useSuid);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0) if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
return (process.exitCode == 0); return process.status();
} }

View File

@ -30,6 +30,8 @@
#include <pdebug/pdebug.h> #include <pdebug/pdebug.h>
#include <task/taskadds.h> #include <task/taskadds.h>
#include "version.h"
/** /**
* @class WpaSup * @class WpaSup
@ -43,25 +45,16 @@ WpaSup::WpaSup(const bool debugCmd, const QMap<QString, QString> settings)
netctlCommand = new Netctl(debug, settings); netctlCommand = new Netctl(debug, settings);
netctlProfile = new NetctlProfile(debug, settings); netctlProfile = new NetctlProfile(debug, settings);
if (settings.contains(QString("CTRL_DIR"))) ctrlDir = settings.value(QString("CTRL_DIR"), QString(CTRL_DIR));
ctrlDir = settings[QString("CTRL_DIR")]; ctrlGroup = settings.value(QString("CTRL_GROUP"), QString(CTRL_GROUP));
if (settings.contains(QString("CTRL_GROUP"))) pidFile = settings.value(QString("PID_FILE"), QString(PID_FILE));
ctrlGroup = settings[QString("CTRL_GROUP")]; sudoCommand = settings.value(QString("SUDO_PATH"), QString(SUDO_PATH));
if (settings.contains(QString("PID_FILE"))) wpaCliPath = settings.value(QString("WPACLI_PATH"), QString(WPACLI_PATH));
pidFile = settings[QString("PID_FILE")]; wpaDrivers = settings.value(QString("WPA_DRIVERS"), QString(WPA_DRIVERS));
if (settings.contains(QString("SUDO_PATH"))) wpaSupPath = settings.value(QString("WPASUP_PATH"), QString(WPASUP_PATH));
sudoCommand = settings[QString("SUDO_PATH")]; useSuid = (settings.value(QString("FORCE_SUDO"), QString("true")) != QString("true"));
if (settings.contains(QString("WPACLI_PATH")))
wpaCliPath = settings[QString("WPACLI_PATH")];
if (settings.contains(QString("WPA_DRIVERS")))
wpaDrivers = settings[QString("WPA_DRIVERS")];
if (settings.contains(QString("WPASUP_PATH")))
wpaSupPath = settings[QString("WPASUP_PATH")];
if (settings.contains(QString("FORCE_SUDO")))
useSuid = (settings[QString("FORCE_SUDO")] != QString("true"));
if (useSuid) if (useSuid) sudoCommand = QString("");
sudoCommand = QString("");
} }
@ -81,7 +74,7 @@ WpaSup::~WpaSup()
/** /**
* @fn existentProfile * @fn existentProfile
*/ */
QString WpaSup::existentProfile(const QString essid) QString WpaSup::existentProfile(const QString essid) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "ESSID" << essid; if (debug) qDebug() << PDEBUG << ":" << "ESSID" << essid;
@ -94,11 +87,11 @@ QString WpaSup::existentProfile(const QString essid)
return QString(); return QString();
} }
QString profileFile = QString(""); QString profileFile;
QList<netctlProfileInfo> profileList = netctlCommand->getProfileList(); QList<netctlProfileInfo> profileList = netctlCommand->getProfileList();
for (int i=0; i<profileList.count(); i++) { foreach(netctlProfileInfo profile, profileList) {
if (essid != profileList[i].essid) continue; if (essid != profile.essid) continue;
profileFile = profileList[i].name; profileFile = profile.name;
break; break;
} }
@ -121,16 +114,16 @@ QMap<QString, QString> WpaSup::getRecommendedConfiguration()
// ctrl group // ctrl group
// check group list and find out 'network', 'users', 'root' // check group list and find out 'network', 'users', 'root'
settings[QString("CTRL_GROUP")] = QString(""); settings[QString("CTRL_GROUP")] = QString("");
gid_t gtpList[99]; gid_t gtpList[size];
int grpSize = getgroups(size, gtpList); int grpSize = getgroups(size, gtpList);
recommended.clear(); recommended.clear();
recommended.append("network"); recommended.append("network");
recommended.append("users"); recommended.append("users");
recommended.append("root"); recommended.append("root");
for (int i=0; i<recommended.count(); i++) { foreach(QString rec, recommended) {
for (int j=0; j<grpSize; j++) for (int i=0; i<grpSize; i++)
if (recommended[i] == QString(getgrgid(gtpList[j])->gr_name)) { if (rec == QString(getgrgid(gtpList[i])->gr_name)) {
settings[QString("CTRL_GROUP")] = recommended[i]; settings[QString("CTRL_GROUP")] = rec;
break; break;
} }
if (!settings[QString("CTRL_GROUP")].isEmpty()) break; if (!settings[QString("CTRL_GROUP")].isEmpty()) break;
@ -141,9 +134,9 @@ QMap<QString, QString> WpaSup::getRecommendedConfiguration()
recommended.clear(); recommended.clear();
recommended.append(QString("netctlgui-helper")); recommended.append(QString("netctlgui-helper"));
recommended.append(QString("netctlgui-helper-suid")); recommended.append(QString("netctlgui-helper-suid"));
for (int i=0; i<recommended.count(); i++) { foreach(QString rec, recommended) {
process = runTask(QString("which %1").arg(recommended[i]), false); process = runTask(QString("which %1").arg(rec), false);
if (process.exitCode == 0) { if (process.status()) {
settings[QString("FORCE_SUDO")] = QString("false"); settings[QString("FORCE_SUDO")] = QString("false");
break; break;
} }
@ -158,9 +151,9 @@ QMap<QString, QString> WpaSup::getRecommendedConfiguration()
recommended.append("sudo"); recommended.append("sudo");
recommended.append("kdesu"); recommended.append("kdesu");
recommended.append("gksu"); recommended.append("gksu");
for (int i=0; i<recommended.count(); i++) { foreach(QString rec, recommended) {
process = runTask(QString("which %1").arg(recommended[i]), false); process = runTask(QString("which %1").arg(rec), false);
if (process.exitCode == 0) { if (process.status()) {
settings[QString("SUDO_PATH")] = process.output.trimmed(); settings[QString("SUDO_PATH")] = process.output.trimmed();
break; break;
} }
@ -170,9 +163,9 @@ QMap<QString, QString> WpaSup::getRecommendedConfiguration()
settings[QString("WPACLI_PATH")] = QString("true"); settings[QString("WPACLI_PATH")] = QString("true");
recommended.clear(); recommended.clear();
recommended.append("wpa_cli"); recommended.append("wpa_cli");
for (int i=0; i<recommended.count(); i++) { foreach(QString rec, recommended) {
process = runTask(QString("which %1").arg(recommended[i]), false); process = runTask(QString("which %1").arg(rec), false);
if (process.exitCode == 0) { if (process.status()) {
settings[QString("WPACLI_PATH")] = process.output.trimmed(); settings[QString("WPACLI_PATH")] = process.output.trimmed();
break; break;
} }
@ -185,9 +178,9 @@ QMap<QString, QString> WpaSup::getRecommendedConfiguration()
settings[QString("WPASUP_PATH")] = QString("true"); settings[QString("WPASUP_PATH")] = QString("true");
recommended.clear(); recommended.clear();
recommended.append("wpa_supplicant"); recommended.append("wpa_supplicant");
for (int i=0; i<recommended.count(); i++) { foreach(QString rec, recommended) {
process = runTask(QString("which %1").arg(recommended[i]), false); process = runTask(QString("which %1").arg(rec), false);
if (process.exitCode == 0) { if (process.status()) {
settings[QString("WPASUP_PATH")] = process.output.trimmed(); settings[QString("WPASUP_PATH")] = process.output.trimmed();
break; break;
} }
@ -200,7 +193,7 @@ QMap<QString, QString> WpaSup::getRecommendedConfiguration()
/** /**
* @fn isProfileActive * @fn isProfileActive
*/ */
bool WpaSup::isProfileActive(const QString essid) bool WpaSup::isProfileActive(const QString essid) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "ESSID" << essid; if (debug) qDebug() << PDEBUG << ":" << "ESSID" << essid;
@ -213,50 +206,14 @@ bool WpaSup::isProfileActive(const QString essid)
return false; return false;
} }
QString profileFile; return netctlCommand->isProfileActive(existentProfile(essid));
QList<netctlProfileInfo> profileList = netctlCommand->getProfileList();
for (int i=0; i<profileList.count(); i++) {
if (essid != profileList[i].essid) continue;
profileFile = profileList[i].name;
break;
}
return netctlCommand->isProfileActive(profileFile);
}
/**
* @fn isProfileExists
*/
bool WpaSup::isProfileExists(const QString essid)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "ESSID" << essid;
if (netctlCommand == nullptr) {
if (debug) qDebug() << PDEBUG << ":" << "Could not find library";
return false;
}
if (netctlProfile == nullptr) {
if (debug) qDebug() << PDEBUG << ":" << "Could not find library";
return false;
}
bool exists = false;
QList<netctlProfileInfo> profileList = netctlCommand->getProfileList();
for (int i=0; i<profileList.count(); i++) {
if (essid != profileList[i].essid) continue;
exists = true;
break;
}
return exists;
} }
/** /**
* @fn current * @fn current
*/ */
netctlWifiInfo WpaSup::current() netctlWifiInfo WpaSup::current() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (pidFile.isEmpty()) { if (pidFile.isEmpty()) {
@ -269,7 +226,7 @@ netctlWifiInfo WpaSup::current()
return netctlWifiInfo(); return netctlWifiInfo();
} }
QString _pidFile = pidFile; QString _pidFile = pidFile;
_pidFile.replace(QString("$i"), interfaces[0]); _pidFile.replace(QString("$i"), interfaces.first());
if (debug) qDebug() << PDEBUG << ":" << "PID file" << _pidFile << QFile(_pidFile).exists(); if (debug) qDebug() << PDEBUG << ":" << "PID file" << _pidFile << QFile(_pidFile).exists();
netctlWifiInfo current; netctlWifiInfo current;
@ -278,21 +235,21 @@ netctlWifiInfo WpaSup::current()
if (!rawText.contains(QString("wpa_state=COMPLETED\n"))) return current; if (!rawText.contains(QString("wpa_state=COMPLETED\n"))) return current;
QStringList rawList = rawText.split(QChar('\n'), QString::SkipEmptyParts); QStringList rawList = rawText.split(QChar('\n'), QString::SkipEmptyParts);
for (int i=0; i<rawList.count(); i++) { foreach(QString element, rawList) {
QStringList line = rawList[i].split(QChar('=')); QStringList line = element.split(QChar('='));
if (line.count() != 2) continue; if (line.count() != 2) continue;
if (line[0] == QString("bssid")) if (line.at(0) == QString("bssid"))
current.macs.append(line[1]); current.macs.append(line.at(1));
else if (line[0] == QString("freq")) { else if (line.at(0) == QString("freq")) {
if ((line[1].toInt() >= 5000) && (line[1].toInt() < 6000)) if ((line.at(1).toInt() >= 5000) && (line.at(1).toInt() < 6000))
current.type = PointType::FiveG; current.type = PointType::FiveG;
else if ((line[1].toInt() < 5000) && (line[1].toInt() > 2000)) else if ((line.at(1).toInt() < 5000) && (line.at(1).toInt() > 2000))
current.type = PointType::TwoG; current.type = PointType::TwoG;
current.frequencies.append(line[1].toInt()); current.frequencies.append(line.at(1).toInt());
} else if (line[0] == QString("ssid")) } else if (line.at(0) == QString("ssid"))
current.name = line[1]; current.name = line.at(1);
else if (line[0] == QString("key_mgmt")) { else if (line.at(0) == QString("key_mgmt")) {
QString security = line[1]; QString security = line.at(1);
if (security.contains(QString("WPA2"))) if (security.contains(QString("WPA2")))
security = QString("WPA2"); security = QString("WPA2");
else if (security.contains(QString("WPA"))) else if (security.contains(QString("WPA")))
@ -316,7 +273,7 @@ netctlWifiInfo WpaSup::current()
/** /**
* @fn scanWifi * @fn scanWifi
*/ */
QList<netctlWifiInfo> WpaSup::scanWifi() QList<netctlWifiInfo> WpaSup::scanWifi() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (pidFile.isEmpty()) { if (pidFile.isEmpty()) {
@ -329,7 +286,7 @@ QList<netctlWifiInfo> WpaSup::scanWifi()
return QList<netctlWifiInfo>(); return QList<netctlWifiInfo>();
} }
QString _pidFile = pidFile; QString _pidFile = pidFile;
_pidFile.replace(QString("$i"), interfaces[0]); _pidFile.replace(QString("$i"), interfaces.first());
if (debug) qDebug() << PDEBUG << ":" << "PID file" << _pidFile << QFile(_pidFile).exists(); if (debug) qDebug() << PDEBUG << ":" << "PID file" << _pidFile << QFile(_pidFile).exists();
bool terminateOnExit = (!QFile(_pidFile).exists()); bool terminateOnExit = (!QFile(_pidFile).exists());
@ -353,25 +310,25 @@ QList<netctlWifiInfo> WpaSup::scanWifi()
else else
profiles = netctlCommand->getProfileList(); profiles = netctlCommand->getProfileList();
// iterate by wifi output // iterate by wifi output
for (int i=0; i<rawList.count(); i++) { foreach(QString element, rawList) {
QStringList line = rawList[i].split(QChar('\t')); QStringList line = element.split(QChar('\t'));
if (line.count() != 5) continue; if (line.count() != 5) continue;
QString name = line[4]; QString name = line.at(4);
if (name.isEmpty()) name = QString("<hidden>"); if (name.isEmpty()) name = QString("<hidden>");
// append mac and frequency if exists // append mac and frequency if exists
int index = names.indexOf(name); int index = names.indexOf(name);
if ((name != QString("<hidden>")) && (index > -1)) { if ((name != QString("<hidden>")) && (index > -1)) {
scanResults[index].frequencies.append(line[1].toInt()); scanResults[index].frequencies.append(line.at(1).toInt());
scanResults[index].macs.append(line[0]); scanResults[index].macs.append(line.at(0));
if (scanResults[index].signal < line[2].toInt()) if (scanResults[index].signal < line.at(2).toInt())
scanResults[index].signal = line[2].toInt(); scanResults[index].signal = line.at(2).toInt();
// check type // check type
if ((line[1].toInt() >= 5000) && (line[1].toInt() < 6000)) { if ((line.at(1).toInt() >= 5000) && (line.at(1).toInt() < 6000)) {
if (scanResults[index].type == PointType::None) if (scanResults[index].type == PointType::None)
scanResults[index].type = PointType::FiveG; scanResults[index].type = PointType::FiveG;
else if (scanResults[index].type == PointType::TwoG) else if (scanResults[index].type == PointType::TwoG)
scanResults[index].type = PointType::TwoAndFiveG; scanResults[index].type = PointType::TwoAndFiveG;
} else if ((line[1].toInt() < 5000) && (line[1].toInt() > 2000)) { } else if ((line.at(1).toInt() < 5000) && (line.at(1).toInt() > 2000)) {
if (scanResults[index].type == PointType::None) if (scanResults[index].type == PointType::None)
scanResults[index].type = PointType::TwoG; scanResults[index].type = PointType::TwoG;
else if (scanResults[index].type == PointType::FiveG) else if (scanResults[index].type == PointType::FiveG)
@ -388,28 +345,28 @@ QList<netctlWifiInfo> WpaSup::scanWifi()
netctlProfileInfo profile; netctlProfileInfo profile;
profile.name = QString(""); profile.name = QString("");
profile.active = false; profile.active = false;
for (int j=0; j<profiles.count(); j++) { foreach(netctlProfileInfo pr, profiles) {
if (wifiPoint.name != profiles[j].essid) continue; if (wifiPoint.name != pr.essid) continue;
profile = profiles[j]; profile = pr;
break; break;
} }
wifiPoint.active = profile.active; wifiPoint.active = profile.active;
wifiPoint.exists = (!profile.name.isEmpty()); wifiPoint.exists = (!profile.name.isEmpty());
// mac // mac
wifiPoint.macs.append(line[0]); wifiPoint.macs.append(line.at(0));
// frequencies // frequencies
wifiPoint.frequencies.append(line[1].toInt()); wifiPoint.frequencies.append(line.at(1).toInt());
// type // type
// check type // check type
if ((line[1].toInt() >= 5000) && (line[1].toInt() < 6000)) { if ((line.at(1).toInt() >= 5000) && (line.at(1).toInt() < 6000)) {
wifiPoint.type = PointType::FiveG; wifiPoint.type = PointType::FiveG;
} else if ((line[1].toInt() < 5000) && (line[1].toInt() > 2000)) { } else if ((line.at(1).toInt() < 5000) && (line.at(1).toInt() > 2000)) {
wifiPoint.type = PointType::TwoG; wifiPoint.type = PointType::TwoG;
} }
// point signal // point signal
wifiPoint.signal = line[2].toInt(); wifiPoint.signal = line.at(2).toInt();
// point security // point security
QString security = line[3]; QString security = line.at(3);
if (security.contains(QString("WPA2"))) if (security.contains(QString("WPA2")))
security = QString("WPA2"); security = QString("WPA2");
else if (security.contains(QString("WPA"))) else if (security.contains(QString("WPA")))
@ -433,7 +390,7 @@ QList<netctlWifiInfo> WpaSup::scanWifi()
/** /**
* @fn startWpaSupplicant * @fn startWpaSupplicant
*/ */
bool WpaSup::startWpaSupplicant() bool WpaSup::startWpaSupplicant() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (ctrlDir.isEmpty()) { if (ctrlDir.isEmpty()) {
@ -466,28 +423,27 @@ bool WpaSup::startWpaSupplicant()
return false; return false;
} }
QString _pidFile = pidFile; QString _pidFile = pidFile;
_pidFile.replace(QString("$i"), interfaces[0]); _pidFile.replace(QString("$i"), interfaces.first());
if (debug) qDebug() << PDEBUG << ":" << "PID file" << _pidFile << QFile(_pidFile).exists(); if (debug) qDebug() << PDEBUG << ":" << "PID file" << _pidFile << QFile(_pidFile).exists();
if (QFile(_pidFile).exists()) return (QFileInfo(ctrlDir).group() == ctrlGroup); if (QFile(_pidFile).exists()) return (QFileInfo(ctrlDir).group() == ctrlGroup);
QString cmd = QString("%1 %2 -B -P \"%3\" -i %4 -D %5 -C \"DIR=%6 GROUP=%7\"") QString cmd = QString("%1 %2 -B -P \"%3\" -i %4 -D %5 -C \"DIR=%6 GROUP=%7\"")
.arg(sudoCommand).arg(wpaSupPath).arg(_pidFile).arg(interfaces[0]) .arg(sudoCommand).arg(wpaSupPath).arg(_pidFile).arg(interfaces.first())
.arg(wpaDrivers).arg(ctrlDir).arg(ctrlGroup); .arg(wpaDrivers).arg(ctrlDir).arg(ctrlGroup);
if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd;
TaskResult process = runTask(cmd, useSuid); TaskResult process = runTask(cmd, useSuid);
waitForProcess(1); waitForProcess(1);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0) if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
return (process.exitCode == 0); return process.status();
} }
/** /**
* @fn stopWpaSupplicant * @fn stopWpaSupplicant
*/ */
bool WpaSup::stopWpaSupplicant() bool WpaSup::stopWpaSupplicant() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
@ -499,7 +455,7 @@ bool WpaSup::stopWpaSupplicant()
/** /**
* @fn getWpaCliOutput * @fn getWpaCliOutput
*/ */
QString WpaSup::getWpaCliOutput(const QString commandLine) QString WpaSup::getWpaCliOutput(const QString commandLine) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Command" << commandLine; if (debug) qDebug() << PDEBUG << ":" << "Command" << commandLine;
@ -517,12 +473,11 @@ QString WpaSup::getWpaCliOutput(const QString commandLine)
return QString(); return QString();
} }
QString cmd = QString("%1 -i %2 -p %3 %4").arg(wpaCliPath).arg(interfaces[0]).arg(ctrlDir).arg(commandLine); QString cmd = QString("%1 -i %2 -p %3 %4").arg(wpaCliPath).arg(interfaces.first()).arg(ctrlDir).arg(commandLine);
if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd;
TaskResult process = runTask(cmd); TaskResult process = runTask(cmd);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0) if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
return process.output; return process.output;
} }
@ -531,7 +486,7 @@ QString WpaSup::getWpaCliOutput(const QString commandLine)
/** /**
* @fn waitForProcess * @fn waitForProcess
*/ */
bool WpaSup::waitForProcess(const int sec) bool WpaSup::waitForProcess(const int sec) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Interval" << sec; if (debug) qDebug() << PDEBUG << ":" << "Interval" << sec;
@ -546,7 +501,7 @@ bool WpaSup::waitForProcess(const int sec)
/** /**
* @fn wpaCliCall * @fn wpaCliCall
*/ */
bool WpaSup::wpaCliCall(const QString commandLine) bool WpaSup::wpaCliCall(const QString commandLine) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Command" << commandLine; if (debug) qDebug() << PDEBUG << ":" << "Command" << commandLine;
@ -564,13 +519,12 @@ bool WpaSup::wpaCliCall(const QString commandLine)
return false; return false;
} }
QString cmd = QString("%1 -i %2 -p %3 %4").arg(wpaCliPath).arg(interfaces[0]).arg(ctrlDir).arg(commandLine); QString cmd = QString("%1 -i %2 -p %3 %4").arg(wpaCliPath).arg(interfaces.first()).arg(ctrlDir).arg(commandLine);
if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd;
TaskResult process = runTask(cmd); TaskResult process = runTask(cmd);
waitForProcess(1); waitForProcess(1);
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0) if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error;
return (process.exitCode == 0); return process.status();
} }

View File

@ -12,7 +12,7 @@ X-KDE-PluginInfo-Author=Evgeniy Alekseev
X-KDE-PluginInfo-Email=esalexeev@gmail.com X-KDE-PluginInfo-Email=esalexeev@gmail.com
X-KDE-PluginInfo-Name=netctl X-KDE-PluginInfo-Name=netctl
X-KDE-PluginInfo-Version=@PROJECT_VERSION@ X-KDE-PluginInfo-Version=@PROJECT_VERSION@
X-KDE-PluginInfo-Website=http://arcanis.name/projects/netctl-gui/ X-KDE-PluginInfo-Website=https://arcanis.me/projects/netctl-gui/
X-KDE-PluginInfo-Category=Network X-KDE-PluginInfo-Category=Network
X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPLv3 X-KDE-PluginInfo-License=GPLv3

View File

@ -15,7 +15,7 @@ X-KDE-PluginInfo-Author=Evgeniy Alekseev
X-KDE-PluginInfo-Email=esalexeev@gmail.com X-KDE-PluginInfo-Email=esalexeev@gmail.com
X-KDE-PluginInfo-Name=org.kde.plasma.netctl X-KDE-PluginInfo-Name=org.kde.plasma.netctl
X-KDE-PluginInfo-Version=@PROJECT_VERSION@ X-KDE-PluginInfo-Version=@PROJECT_VERSION@
X-KDE-PluginInfo-Website=http://arcanis.name/projects/netctl-gui X-KDE-PluginInfo-Website=https://arcanis.me/projects/netctl-gui
X-KDE-PluginInfo-Category=Network X-KDE-PluginInfo-Category=Network
X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPLv3 X-KDE-PluginInfo-License=GPLv3

View File

@ -19,17 +19,21 @@ import QtQuick 2.0
import QtQuick.Controls 1.3 as QtControls import QtQuick.Controls 1.3 as QtControls
import QtQuick.Layouts 1.0 as QtLayouts import QtQuick.Layouts 1.0 as QtLayouts
import org.kde.plasma.netctl 1.0 import org.kde.plasma.private.netctl 1.0
Item { Item {
id: aboutPage id: aboutPage
// backend
NetctlAdds {
id: netctlAdds;
}
width: childrenRect.width width: childrenRect.width
height: childrenRect.height height: childrenRect.height
implicitWidth: pageColumn.implicitWidth implicitWidth: pageColumn.implicitWidth
implicitHeight: pageColumn.implicitHeight implicitHeight: pageColumn.implicitHeight
property bool debug: NetctlAdds.isDebugEnabled() property bool debug: netctlAdds.isDebugEnabled()
Column { Column {
id: pageColumn id: pageColumn
@ -44,20 +48,21 @@ Item {
QtControls.Label { QtControls.Label {
QtLayouts.Layout.fillWidth: true QtLayouts.Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: NetctlAdds.getAboutText("header") text: netctlAdds.getAboutText("header")
} }
QtControls.Label { QtControls.Label {
QtLayouts.Layout.fillWidth: true QtLayouts.Layout.fillWidth: true
horizontalAlignment: Text.AlignJustify horizontalAlignment: Text.AlignJustify
text: NetctlAdds.getAboutText("description") text: netctlAdds.getAboutText("description")
} }
QtControls.Label { QtControls.Label {
QtLayouts.Layout.fillWidth: true QtLayouts.Layout.fillWidth: true
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
textFormat: Text.RichText textFormat: Text.RichText
text: NetctlAdds.getAboutText("links") text: netctlAdds.getAboutText("links")
onLinkActivated: Qt.openUrlExternally(link);
} }
QtControls.Label { QtControls.Label {
@ -65,7 +70,7 @@ Item {
font.capitalization: Font.SmallCaps font.capitalization: Font.SmallCaps
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
textFormat: Text.RichText textFormat: Text.RichText
text: NetctlAdds.getAboutText("copy") text: netctlAdds.getAboutText("copy")
} }
} }
} }
@ -77,14 +82,15 @@ Item {
QtControls.Label { QtControls.Label {
QtLayouts.Layout.fillWidth: true QtLayouts.Layout.fillWidth: true
horizontalAlignment: Text.AlignJustify horizontalAlignment: Text.AlignJustify
text: NetctlAdds.getAboutText("translators") text: netctlAdds.getAboutText("translators")
} }
QtControls.Label { QtControls.Label {
QtLayouts.Layout.fillWidth: true QtLayouts.Layout.fillWidth: true
horizontalAlignment: Text.AlignJustify horizontalAlignment: Text.AlignJustify
textFormat: Text.RichText textFormat: Text.RichText
text: NetctlAdds.getAboutText("3rdparty") text: netctlAdds.getAboutText("3rdparty")
onLinkActivated: Qt.openUrlExternally(link);
} }
} }
} }

View File

@ -21,17 +21,21 @@ import QtQuick.Controls.Styles 1.3 as QtStyles
import QtQuick.Dialogs 1.1 as QtDialogs import QtQuick.Dialogs 1.1 as QtDialogs
import QtQuick.Layouts 1.0 as QtLayouts import QtQuick.Layouts 1.0 as QtLayouts
import org.kde.plasma.netctl 1.0 import org.kde.plasma.private.netctl 1.0
Item { Item {
id: appearancePage id: appearancePage
// backend
NetctlAdds {
id: netctlAdds;
}
width: childrenRect.width width: childrenRect.width
height: childrenRect.height height: childrenRect.height
implicitWidth: pageColumn.implicitWidth implicitWidth: pageColumn.implicitWidth
implicitHeight: pageColumn.implicitHeight implicitHeight: pageColumn.implicitHeight
property bool debug: NetctlAdds.isDebugEnabled() property bool debug: netctlAdds.isDebugEnabled()
property variant weight: { property variant weight: {
25: 0, 25: 0,
50: 1, 50: 1,
@ -110,7 +114,10 @@ Item {
id: selectFont id: selectFont
width: parent.width * 2 / 3 width: parent.width * 2 / 3
text: plasmoid.configuration.fontFamily text: plasmoid.configuration.fontFamily
onClicked: fontDialog.visible = true onClicked: {
fontDialog.setFont()
fontDialog.visible = true
}
} }
} }
@ -308,21 +315,28 @@ Item {
id: colorDialog id: colorDialog
title: i18n("Select a color") title: i18n("Select a color")
color: selectColor.text color: selectColor.text
onAccepted: { onAccepted: selectColor.text = colorDialog.color
selectColor.text = colorDialog.color
}
} }
QtDialogs.FontDialog { QtDialogs.FontDialog {
id: fontDialog id: fontDialog
title: i18n("Select a font") title: i18n("Select a font")
font: Qt.font({ family: selectFont.text, pointSize: fontSize.value, weight: Font.Normal }) signal setFont
onAccepted: { onAccepted: {
selectFont.text = fontDialog.font.family selectFont.text = fontDialog.font.family
fontSize.value = fontDialog.font.pointSize fontSize.value = fontDialog.font.pointSize
fontStyle.currentIndex = fontDialog.font.italic ? 1 : 0 fontStyle.currentIndex = fontDialog.font.italic ? 1 : 0
fontWeight.currentIndex = weight[fontDialog.font.weight] fontWeight.currentIndex = weight[fontDialog.font.weight]
} }
onSetFont: {
fontDialog.font = Qt.font({
family: selectFont.text,
pointSize: fontSize.value > 0 ? fontSize.value : 12,
italic: fontStyle.currentIndex == 1,
weight: Font.Normal,
})
}
} }
Component.onCompleted: { Component.onCompleted: {

View File

@ -21,19 +21,23 @@ import QtQuick.Dialogs 1.1 as QtDialogs
import QtQuick.Layouts 1.0 as QtLayouts import QtQuick.Layouts 1.0 as QtLayouts
import QtQuick.Controls.Styles 1.3 as QtStyles import QtQuick.Controls.Styles 1.3 as QtStyles
import org.kde.plasma.netctl 1.0 import org.kde.plasma.private.netctl 1.0
Item { Item {
id: dataenginePage id: dataenginePage
// backend
NetctlAdds {
id: netctlAdds;
}
width: childrenRect.width width: childrenRect.width
height: childrenRect.height height: childrenRect.height
implicitWidth: pageColumn.implicitWidth implicitWidth: pageColumn.implicitWidth
implicitHeight: pageColumn.implicitHeight implicitHeight: pageColumn.implicitHeight
property bool debug: NetctlAdds.isDebugEnabled() property bool debug: netctlAdds.isDebugEnabled()
property variant cfg_dataengine: NetctlAdds.readDataEngineConfiguration() property variant cfg_dataengine: netctlAdds.readDataEngineConfiguration()
Column { Column {
id: pageColumn id: pageColumn
@ -228,6 +232,6 @@ Item {
Component.onDestruction: { Component.onDestruction: {
cfg_dataengine["EXTIP4"] = extIp4.checked ? "true" : "false" cfg_dataengine["EXTIP4"] = extIp4.checked ? "true" : "false"
cfg_dataengine["EXTIP6"] = extIp6.checked ? "true" : "false" cfg_dataengine["EXTIP6"] = extIp6.checked ? "true" : "false"
NetctlAdds.writeDataEngineConfiguration(cfg_dataengine) netctlAdds.writeDataEngineConfiguration(cfg_dataengine)
} }
} }

View File

@ -22,15 +22,19 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.netctl 1.0 import org.kde.plasma.private.netctl 1.0
Item { Item {
id: main id: main
// backend
NetctlAdds {
id: netctlAdds;
}
// variables // variables
// internal // internal
property bool debug: NetctlAdds.isDebugEnabled() property bool debug: netctlAdds.isDebugEnabled()
property variant fontWeight: { property variant fontWeight: {
"light": Font.Light, "light": Font.Light,
"normal": Font.Normal, "normal": Font.Normal,
@ -52,8 +56,9 @@ Item {
} }
property string sudoPath: plasmoid.configuration.useSudo ? plasmoid.configuration.sudoPath : "" property string sudoPath: plasmoid.configuration.useSudo ? plasmoid.configuration.sudoPath : ""
// signals // signals
signal needUpdate signal needIconUpdate(string newIcon)
signal needMenuUpdate signal needTextUpdate(string newText, string newToolTip)
signal needMenuUpdate(string current, string stringStatus, bool status)
// init // init
Plasmoid.icon: iconPath["false"] Plasmoid.icon: iconPath["false"]
@ -71,7 +76,7 @@ Item {
onNewData: { onNewData: {
if (debug) console.log("[main::onNewData] : Update source " + sourceName) if (debug) console.log("[main::onNewData] : Update source " + sourceName)
NetctlAdds.setDataBySource(sourceName, data) netctlAdds.setDataBySource(sourceName, data)
} }
} }
@ -92,6 +97,7 @@ Item {
font.pointSize: plasmoid.configuration.fontSize font.pointSize: plasmoid.configuration.fontSize
font.weight: fontWeight[plasmoid.configuration.fontWeight] font.weight: fontWeight[plasmoid.configuration.fontWeight]
horizontalAlignment: align[plasmoid.configuration.textAlign] horizontalAlignment: align[plasmoid.configuration.textAlign]
renderType: Text.NativeRendering
textFormat: Text.RichText textFormat: Text.RichText
text: "N\\A" text: "N\\A"
} }
@ -109,28 +115,30 @@ Item {
plasmoid.setAction("restartProfile", i18n("Restart profile"), "view-refresh") plasmoid.setAction("restartProfile", i18n("Restart profile"), "view-refresh")
plasmoid.setAction("enableProfile", i18n("Enable profile")) plasmoid.setAction("enableProfile", i18n("Enable profile"))
plasmoid.setAction("startWifi", i18n("Show WiFi menu"), "netctl-gui-wifi") plasmoid.setAction("startWifi", i18n("Show WiFi menu"), "netctl-gui-wifi")
// helper // init submodule
if (plasmoid.configuration.useHelper) { Plasmoid.userConfiguringChanged(false)
NetctlAdds.runCmd(plasmoid.configuration.helperPath)
plasmoid.configuration.useHelper = NetctlAdds.checkHelperStatus()
}
NetctlAdds.needToBeUpdated.connect(needUpdate) netctlAdds.needIconToBeUpdated.connect(needIconUpdate)
netctlAdds.needMenuUpdate.connect(needMenuUpdate)
netctlAdds.needTextToBeUpdated.connect(needTextUpdate)
} }
onNeedUpdate: { onNeedIconUpdate: {
if (debug) console.log("[main::onNeedUpdate]") if (debug) console.log("[main::onNeedIconUpdate]")
var iconStatus = NetctlAdds.valueByKey("active") icon.source = iconPath[newIcon]
icon.source = iconPath[iconStatus] Plasmoid.icon = iconPath[newIcon]
Plasmoid.icon = iconPath[iconStatus] }
text.text = NetctlAdds.parsePattern(plasmoid.configuration.textPattern)
Plasmoid.toolTipSubText = NetctlAdds.valueByKey("info") onNeedTextUpdate: {
needMenuUpdate() if (debug) console.log("[main::onNeedTextUpdate]")
text.text = newText
Plasmoid.toolTipSubText = newToolTip
} }
onNeedMenuUpdate: { onNeedMenuUpdate: {
if (debug) console.log("[main::onNetctlStateChanged]") if (debug) console.log("[main::onNeedMenuUpdate]")
var titleAction = plasmoid.action("titleAction") var titleAction = plasmoid.action("titleAction")
var startAction = plasmoid.action("startProfile") var startAction = plasmoid.action("startProfile")
@ -141,10 +149,6 @@ Item {
var enableAction = plasmoid.action("enableProfile") var enableAction = plasmoid.action("enableProfile")
var wifiAction = plasmoid.action("startWifi") var wifiAction = plasmoid.action("startWifi")
var current = NetctlAdds.valueByKey("current")
var status = NetctlAdds.valueByKey("active") == "true"
var stringStatus = NetctlAdds.valueByKey("status")
titleAction.iconSource = plasmoid.icon titleAction.iconSource = plasmoid.icon
titleAction.text = current + " " + stringStatus titleAction.text = current + " " + stringStatus
@ -186,16 +190,29 @@ Item {
wifiAction.visible = plasmoid.configuration.useWifi wifiAction.visible = plasmoid.configuration.useWifi
} }
Plasmoid.onUserConfiguringChanged: {
if (plasmoid.userConfiguring) return
if (debug) console.log("[main::onUserConfiguringChanged]")
// helper
if (plasmoid.configuration.useHelper) {
netctlAdds.runCmd(plasmoid.configuration.helperPath)
plasmoid.configuration.useHelper = netctlAdds.checkHelperStatus()
}
// init submodule
netctlAdds.setPattern(plasmoid.configuration.textPattern)
}
function action_titleAction() { function action_titleAction() {
if (debug) console.log("[main::action_titleAction]") if (debug) console.log("[main::action_titleAction]")
NetctlAdds.runCmd(plasmoid.configuration.guiPath) netctlAdds.runCmd(plasmoid.configuration.guiPath)
} }
function action_startProfile() { function action_startProfile() {
if (debug) console.log("[main::action_startProfile]") if (debug) console.log("[main::action_startProfile]")
NetctlAdds.startProfileSlot(plasmoid.configuration.useHelper, netctlAdds.startProfileSlot(plasmoid.configuration.useHelper,
plasmoid.configuration.netctlPath, plasmoid.configuration.netctlPath,
sudoPath) sudoPath)
} }
@ -203,7 +220,7 @@ Item {
function action_stopProfile() { function action_stopProfile() {
if (debug) console.log("[main::action_stopProfile]") if (debug) console.log("[main::action_stopProfile]")
NetctlAdds.stopProfileSlot(plasmoid.configuration.useHelper, netctlAdds.stopProfileSlot(plasmoid.configuration.useHelper,
plasmoid.configuration.netctlPath, plasmoid.configuration.netctlPath,
sudoPath) sudoPath)
} }
@ -211,7 +228,7 @@ Item {
function action_stopAllProfiles() { function action_stopAllProfiles() {
if (debug) console.log("[main::action_stopAllProfiles]") if (debug) console.log("[main::action_stopAllProfiles]")
NetctlAdds.stopAllProfilesSlot(plasmoid.configuration.useHelper, netctlAdds.stopAllProfilesSlot(plasmoid.configuration.useHelper,
plasmoid.configuration.netctlPath, plasmoid.configuration.netctlPath,
sudoPath) sudoPath)
} }
@ -219,14 +236,14 @@ Item {
function action_switchToProfile() { function action_switchToProfile() {
if (debug) console.log("[main::action_switchToProfile]") if (debug) console.log("[main::action_switchToProfile]")
NetctlAdds.switchToProfileSlot(plasmoid.configuration.useHelper, netctlAdds.switchToProfileSlot(plasmoid.configuration.useHelper,
plasmoid.configuration.netctlAutoPath) plasmoid.configuration.netctlAutoPath)
} }
function action_restartProfile() { function action_restartProfile() {
if (debug) console.log("[main::action_restartProfile]") if (debug) console.log("[main::action_restartProfile]")
NetctlAdds.restartProfileSlot(plasmoid.configuration.useHelper, netctlAdds.restartProfileSlot(plasmoid.configuration.useHelper,
plasmoid.configuration.netctlPath, plasmoid.configuration.netctlPath,
sudoPath) sudoPath)
} }
@ -234,7 +251,7 @@ Item {
function action_enableProfile() { function action_enableProfile() {
if (debug) console.log("[main::action_enableProfile]") if (debug) console.log("[main::action_enableProfile]")
NetctlAdds.enableProfileSlot(plasmoid.configuration.useHelper, netctlAdds.enableProfileSlot(plasmoid.configuration.useHelper,
plasmoid.configuration.netctlPath, plasmoid.configuration.netctlPath,
sudoPath) sudoPath)
} }
@ -242,6 +259,6 @@ Item {
function action_startWifi() { function action_startWifi() {
if (debug) console.log("[main::action_startWifi]") if (debug) console.log("[main::action_startWifi]")
NetctlAdds.runCmd(plasmoid.configuration.wifiPath) netctlAdds.runCmd(plasmoid.configuration.wifiPath)
} }
} }

View File

@ -21,17 +21,20 @@ import QtQuick.Dialogs 1.1 as QtDialogs
import QtQuick.Layouts 1.0 as QtLayouts import QtQuick.Layouts 1.0 as QtLayouts
import QtQuick.Controls.Styles 1.3 as QtStyles import QtQuick.Controls.Styles 1.3 as QtStyles
import org.kde.plasma.netctl 1.0 import org.kde.plasma.private.netctl 1.0
Item { Item {
id: widgetPage id: widgetPage
NetctlAdds {
id: netctlAdds;
}
width: childrenRect.width width: childrenRect.width
height: childrenRect.height height: childrenRect.height
implicitWidth: pageColumn.implicitWidth implicitWidth: pageColumn.implicitWidth
implicitHeight: pageColumn.implicitHeight implicitHeight: pageColumn.implicitHeight
property bool debug: NetctlAdds.isDebugEnabled() property bool debug: netctlAdds.isDebugEnabled()
property alias cfg_autoUpdateInterval: autoUpdate.value property alias cfg_autoUpdateInterval: autoUpdate.value
property alias cfg_guiPath: guiPath.text property alias cfg_guiPath: guiPath.text

View File

@ -14,8 +14,8 @@ X-Plasma-RemoteLocation=
X-KDE-PluginInfo-Author=Evgeniy Alekseev X-KDE-PluginInfo-Author=Evgeniy Alekseev
X-KDE-PluginInfo-Email=esalexeev@gmail.com X-KDE-PluginInfo-Email=esalexeev@gmail.com
X-KDE-PluginInfo-Name=org.kde.plasma.netctl X-KDE-PluginInfo-Name=org.kde.plasma.netctl
X-KDE-PluginInfo-Version=1.4.7 X-KDE-PluginInfo-Version=1.4.9
X-KDE-PluginInfo-Website=http://arcanis.name/projects/netctl-gui X-KDE-PluginInfo-Website=https://arcanis.me/projects/netctl-gui
X-KDE-PluginInfo-Category=Network X-KDE-PluginInfo-Category=Network
X-KDE-PluginInfo-Depends= X-KDE-PluginInfo-Depends=
X-KDE-PluginInfo-License=GPLv3 X-KDE-PluginInfo-License=GPLv3

View File

@ -21,13 +21,12 @@ include_directories (${CMAKE_SOURCE_DIR}
${Qt_INCLUDE} ${Qt_INCLUDE}
${Kf5_INCLUDE}) ${Kf5_INCLUDE})
file (GLOB_RECURSE SUBPROJECT_SOURCE ${PROJECT_TRDPARTY_DIR}/pdebug/*.cpp file (GLOB_RECURSE SUBPROJECT_SOURCE *.cpp)
*.cpp)
file (GLOB SUBPROJECT_NOTIFY *.notifyrc) file (GLOB SUBPROJECT_NOTIFY *.notifyrc)
add_library (${PLUGIN_NAME} SHARED ${SUBPROJECT_SOURCE}) add_library (${PLUGIN_NAME} SHARED ${SUBPROJECT_SOURCE})
target_link_libraries (${PLUGIN_NAME} ${Qt_LIBRARIES} ${Kf5_LIBRARIES}) target_link_libraries (${PLUGIN_NAME} ${Qt_LIBRARIES} ${Kf5_LIBRARIES})
install (TARGETS ${PLUGIN_NAME} DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/netctl) install (TARGETS ${PLUGIN_NAME} DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/private/netctl)
install (FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/netctl) install (FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/plasma/private/netctl)
install (FILES ${SUBPROJECT_NOTIFY} DESTINATION ${KNOTIFYRC_INSTALL_DIR}) install (FILES ${SUBPROJECT_NOTIFY} DESTINATION ${KNOTIFYRC_INSTALL_DIR})

View File

@ -21,18 +21,9 @@
#include "netctladds.h" #include "netctladds.h"
static QObject *netctl_singletontype_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine);
Q_UNUSED(scriptEngine);
return new NetctlAdds();
}
void NetctlPlugin::registerTypes(const char *uri) void NetctlPlugin::registerTypes(const char *uri)
{ {
Q_ASSERT(uri == QLatin1String("org.kde.plasma.netctl")); Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.netctl"));
qmlRegisterSingletonType<NetctlAdds>(uri, 1, 0, "NetctlAdds", netctl_singletontype_provider); qmlRegisterType<NetctlAdds>(uri, 1, 0, "NetctlAdds");
} }

View File

@ -27,7 +27,6 @@
#include <QStandardPaths> #include <QStandardPaths>
#include <pdebug/pdebug.h> #include <pdebug/pdebug.h>
#include <pdebug/pdebug-time.h>
#include "netctladds.h" #include "netctladds.h"
#include "version.h" #include "version.h"
@ -36,13 +35,13 @@
NetctlAdds::NetctlAdds(QObject *parent) NetctlAdds::NetctlAdds(QObject *parent)
: QObject(parent) : QObject(parent)
{ {
qInstallMessageHandler(debugString);
// debug // debug
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment(); QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
QString debugEnv = environment.value(QString("DEBUG"), QString("no")); QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
debug = (debugEnv == QString("yes")); debug = (debugEnv == QString("yes"));
connect(this, SIGNAL(needToNotify(bool)), this, SLOT(notifyAboutStatusChanging(bool))); connect(this, SIGNAL(needToNotify(bool)), this, SLOT(notifyAboutStatusChanging(bool)));
connect(this, SIGNAL(needToBeUpdated()), this, SLOT(parsePattern()));
} }
@ -52,7 +51,7 @@ NetctlAdds::~NetctlAdds()
} }
void NetctlAdds::notifyAboutStatusChanging(const bool currentStatus) void NetctlAdds::notifyAboutStatusChanging(const bool currentStatus) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Status" << currentStatus; if (debug) qDebug() << PDEBUG << ":" << "Status" << currentStatus;
@ -64,7 +63,21 @@ void NetctlAdds::notifyAboutStatusChanging(const bool currentStatus)
} }
QList<QVariant> NetctlAdds::sendDBusRequest(const QString cmd, const QList<QVariant> args) void NetctlAdds::parsePattern() const
{
if (debug) qDebug() << PDEBUG;
QString parsed = pattern;
foreach(QString value, values.keys())
parsed.replace(QString("$%1").arg(value), values[value]);
// fix newline
parsed.replace(QString("\n"), QString("<br>"));
return emit(needTextToBeUpdated(parsed, values[QString("info")]));
}
QVariantList NetctlAdds::sendDBusRequest(const QString cmd, const QVariantList args) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
@ -73,26 +86,24 @@ QList<QVariant> NetctlAdds::sendDBusRequest(const QString cmd, const QList<QVari
QDBusConnection bus = QDBusConnection::systemBus(); QDBusConnection bus = QDBusConnection::systemBus();
QDBusMessage request = QDBusMessage::createMethodCall(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, QDBusMessage request = QDBusMessage::createMethodCall(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, cmd); DBUS_HELPER_INTERFACE, cmd);
if (!args.isEmpty()) if (!args.isEmpty()) request.setArguments(args);
request.setArguments(args);
QDBusMessage response = bus.call(request, QDBus::BlockWithGui); QDBusMessage response = bus.call(request, QDBus::BlockWithGui);
QList<QVariant> arguments = response.arguments(); QVariantList arguments = response.arguments();
if (arguments.size() == 0) if (debug) qDebug() << PDEBUG << ":" << "Error message" << response.errorMessage();
if (debug) qDebug() << PDEBUG << ":" << "Error message" << response.errorMessage();
return arguments; return arguments;
} }
bool NetctlAdds::checkHelperStatus() bool NetctlAdds::checkHelperStatus() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
return sendDBusRequest(QString("Active"), QList<QVariant>()).isEmpty(); return !sendDBusRequest(QString("Active")).isEmpty();
} }
QString NetctlAdds::getAboutText(const QString type) QString NetctlAdds::getAboutText(const QString type) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Type" << type; if (debug) qDebug() << PDEBUG << ":" << "Type" << type;
@ -120,9 +131,9 @@ QString NetctlAdds::getAboutText(const QString type)
QStringList trdPartyList = QString(TRDPARTY_LICENSE).split(QChar(';'), QString::SkipEmptyParts); QStringList trdPartyList = QString(TRDPARTY_LICENSE).split(QChar(';'), QString::SkipEmptyParts);
for (int i=0; i<trdPartyList.count(); i++) for (int i=0; i<trdPartyList.count(); i++)
trdPartyList[i] = QString("<a href=\"%3\">%1</a> (%2 license)") trdPartyList[i] = QString("<a href=\"%3\">%1</a> (%2 license)")
.arg(trdPartyList[i].split(QChar(','))[0]) .arg(trdPartyList.at(i).split(QChar(',')).at(0))
.arg(trdPartyList[i].split(QChar(','))[1]) .arg(trdPartyList.at(i).split(QChar(',')).at(1))
.arg(trdPartyList[i].split(QChar(','))[2]); .arg(trdPartyList.at(i).split(QChar(',')).at(2));
text = i18n("This software uses: %1", trdPartyList.join(QString(", "))); text = i18n("This software uses: %1", trdPartyList.join(QString(", ")));
} }
@ -130,7 +141,7 @@ QString NetctlAdds::getAboutText(const QString type)
} }
bool NetctlAdds::isDebugEnabled() bool NetctlAdds::isDebugEnabled() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
@ -138,21 +149,7 @@ bool NetctlAdds::isDebugEnabled()
} }
QString NetctlAdds::parsePattern(const QString pattern) void NetctlAdds::runCmd(const QString cmd) const
{
if (debug) qDebug() << PDEBUG;
QString parsed = pattern;
for (int i=0; i<values.keys().count(); i++)
parsed.replace(QString("$%1").arg(values.keys()[i]), valueByKey(values.keys()[i]));
// fix newline
parsed.replace(QString("\n"), QString("<br>"));
return parsed;
}
void NetctlAdds::runCmd(const QString cmd)
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Cmd" << cmd; if (debug) qDebug() << PDEBUG << ":" << "Cmd" << cmd;
@ -174,13 +171,26 @@ void NetctlAdds::setDataBySource(const QString sourceName, const QVariantMap dat
values[sourceName] = data[QString("value")].toString(); values[sourceName] = data[QString("value")].toString();
if (needUpdate) { if (needUpdate) {
emit(needToBeUpdated()); if (sourceName == QString("active")) {
if (sourceName == QString("active"))
emit(needToNotify(values[QString("active")] == QString("true"))); emit(needToNotify(values[QString("active")] == QString("true")));
emit(needIconToBeUpdated(values[QString("active")]));
}
emit(needToBeUpdated());
emit(needMenuUpdate(values[QString("current")], values[QString("status")],
values[QString("active")] == QString("true")));
} }
} }
void NetctlAdds::setPattern(const QString _pattern)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Pattern" << _pattern;
pattern = _pattern;
}
void NetctlAdds::sendNotification(const QString eventId, const QString message) void NetctlAdds::sendNotification(const QString eventId, const QString message)
{ {
// since it is a static method we need to identify is debug enabled again // since it is a static method we need to identify is debug enabled again
@ -197,17 +207,8 @@ void NetctlAdds::sendNotification(const QString eventId, const QString message)
} }
QString NetctlAdds::valueByKey(const QString key)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "Key" << key;
return values[key];
}
// context menu // context menu
void NetctlAdds::enableProfileSlot(const bool useHelper, const QString cmd, const QString sudoCmd) void NetctlAdds::enableProfileSlot(const bool useHelper, const QString cmd, const QString sudoCmd) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
@ -220,82 +221,75 @@ void NetctlAdds::enableProfileSlot(const bool useHelper, const QString cmd, cons
sendNotification(QString("Info"), i18n("Set profile %1 enabled", values[QString("current")])); sendNotification(QString("Info"), i18n("Set profile %1 enabled", values[QString("current")]));
} }
if (useHelper) { if (useHelper) {
QList<QVariant> args; QVariantList args;
args.append(values[QString("current")]); args.append(values[QString("current")]);
sendDBusRequest(QString("Enable"), args); sendDBusRequest(QString("Enable"), args);
} else { } else {
QProcess command; runCmd(QString("%1 %2%3%4").arg(sudoCmd).arg(cmd).arg(enableStatus).arg(values[QString("current")]));
QString commandLine = QString("%1 %2%3%4").arg(sudoCmd).arg(cmd).arg(enableStatus).arg(values[QString("current")]);
command.startDetached(commandLine);
} }
} }
void NetctlAdds::restartProfileSlot(const bool useHelper, const QString cmd, const QString sudoCmd) void NetctlAdds::restartProfileSlot(const bool useHelper, const QString cmd, const QString sudoCmd) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
sendNotification(QString("Info"), i18n("Restart profile %1", values[QString("current")])); sendNotification(QString("Info"), i18n("Restart profile %1", values[QString("current")]));
if (useHelper) { if (useHelper) {
QList<QVariant> args; QVariantList args;
args.append(values[QString("current")]); args.append(values[QString("current")]);
sendDBusRequest(QString("Restart"), args); sendDBusRequest(QString("Restart"), args);
} else { } else {
QProcess command; runCmd(QString("%1 %2 restart %3").arg(sudoCmd).arg(cmd).arg(values[QString("current")]));
QString commandLine = QString("%1 %2 restart %3").arg(sudoCmd).arg(cmd).arg(values[QString("current")]);
command.startDetached(commandLine);
} }
} }
void NetctlAdds::startProfileSlot(const bool useHelper, const QString cmd, const QString sudoCmd) void NetctlAdds::startProfileSlot(const bool useHelper, const QString cmd, const QString sudoCmd) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
QStringList profiles = values[QString("profiles")].split(QChar(',')); QStringList profiles = values[QString("profiles")].split(QChar(','));
bool ok; bool ok;
QString profile = QInputDialog::getItem(0, i18n("Select profile"), i18n("Profile:"), QString profile = QInputDialog::getItem(nullptr, i18n("Select profile"), i18n("Profile:"),
profiles, 0, false, &ok); profiles, 0, false, &ok);
if (!ok || profile.isEmpty()) return; if (!ok || profile.isEmpty()) return;
sendNotification(QString("Info"), i18n("Start profile %1", profile)); sendNotification(QString("Info"), i18n("Start profile %1", profile));
if (useHelper) { if (useHelper) {
QList<QVariant> args; QVariantList args;
args.append(profile); args.append(profile);
if (values[QString("active")] == QString("true")) if (values[QString("active")] == QString("true"))
sendDBusRequest(QString("SwitchTo"), args); sendDBusRequest(QString("SwitchTo"), args);
else else
sendDBusRequest(QString("Start"), args); sendDBusRequest(QString("Start"), args);
} else { } else {
QProcess command;
QString commandLine = QString("%1 %2").arg(sudoCmd).arg(cmd); QString commandLine = QString("%1 %2").arg(sudoCmd).arg(cmd);
if (values[QString("active")] == QString("true")) if (values[QString("active")] == QString("true"))
commandLine += QString(" switch-to %1").arg(profile); commandLine += QString(" switch-to %1").arg(profile);
else else
commandLine += QString(" start %1").arg(profile); commandLine += QString(" start %1").arg(profile);
command.startDetached(commandLine); runCmd(commandLine);
} }
} }
void NetctlAdds::stopProfileSlot(const bool useHelper, const QString cmd, const QString sudoCmd) void NetctlAdds::stopProfileSlot(const bool useHelper, const QString cmd, const QString sudoCmd) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
sendNotification(QString("Info"), i18n("Stop profile %1", values[QString("current")])); sendNotification(QString("Info"), i18n("Stop profile %1", values[QString("current")]));
if (useHelper) { if (useHelper) {
QList<QVariant> args; QVariantList args;
args.append(values[QString("current")]); args.append(values[QString("current")]);
sendDBusRequest(QString("Start"), args); sendDBusRequest(QString("Start"), args);
} else { } else {
QProcess command; runCmd(QString("%1 %2 stop %3").arg(sudoCmd).arg(cmd).arg(values[QString("current")]));
QString commandLine = QString("%1 %2 stop %3").arg(sudoCmd).arg(cmd).arg(values[QString("current")]);
command.startDetached(commandLine);
} }
} }
void NetctlAdds::stopAllProfilesSlot(const bool useHelper, const QString cmd, const QString sudoCmd) void NetctlAdds::stopAllProfilesSlot(const bool useHelper, const QString cmd, const QString sudoCmd) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
@ -303,37 +297,33 @@ void NetctlAdds::stopAllProfilesSlot(const bool useHelper, const QString cmd, co
if (useHelper) if (useHelper)
sendDBusRequest(QString("StopAll"), QList<QVariant>()); sendDBusRequest(QString("StopAll"), QList<QVariant>());
else { else {
QProcess command; runCmd(QString("%1 %2 stop-all").arg(sudoCmd).arg(cmd));
QString commandLine = QString("%1 %2 stop-all").arg(sudoCmd).arg(cmd);
command.startDetached(commandLine);
} }
} }
void NetctlAdds::switchToProfileSlot(const bool useHelper, const QString cmd) void NetctlAdds::switchToProfileSlot(const bool useHelper, const QString cmd) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
QStringList profiles = values[QString("profiles")].split(QChar(',')); QStringList profiles = values[QString("profiles")].split(QChar(','));
bool ok; bool ok;
QString profile = QInputDialog::getItem(0, i18n("Select profile"), i18n("Profile:"), QString profile = QInputDialog::getItem(nullptr, i18n("Select profile"), i18n("Profile:"),
profiles, 0, false, &ok); profiles, 0, false, &ok);
if (!ok || profile.isEmpty()) return; if (!ok || profile.isEmpty()) return;
sendNotification(QString("Info"), i18n("Switch to profile %1", profile)); sendNotification(QString("Info"), i18n("Switch to profile %1", profile));
if (useHelper) { if (useHelper) {
QList<QVariant> args; QVariantList args;
args.append(profile); args.append(profile);
sendDBusRequest(QString("autoStart"), args); sendDBusRequest(QString("autoStart"), args);
} else { } else {
QProcess command; runCmd(QString("%1 switch-to %2").arg(cmd).arg(profile));
QString commandLine = QString("%1 switch-to %2").arg(cmd).arg(profile);
command.startDetached(commandLine);
} }
} }
QVariantMap NetctlAdds::readDataEngineConfiguration() QVariantMap NetctlAdds::readDataEngineConfiguration() const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;
@ -359,7 +349,7 @@ QVariantMap NetctlAdds::readDataEngineConfiguration()
} }
void NetctlAdds::writeDataEngineConfiguration(const QVariantMap configuration) void NetctlAdds::writeDataEngineConfiguration(const QVariantMap configuration) const
{ {
if (debug) qDebug() << PDEBUG; if (debug) qDebug() << PDEBUG;

View File

@ -32,47 +32,52 @@ public:
NetctlAdds(QObject *parent = 0); NetctlAdds(QObject *parent = 0);
~NetctlAdds(); ~NetctlAdds();
Q_INVOKABLE bool checkHelperStatus(); Q_INVOKABLE bool checkHelperStatus() const;
Q_INVOKABLE QString getAboutText(const QString type = "header"); Q_INVOKABLE QString getAboutText(const QString type = QString("header")) const;
Q_INVOKABLE bool isDebugEnabled(); Q_INVOKABLE bool isDebugEnabled() const;
Q_INVOKABLE QString parsePattern(const QString pattern); Q_INVOKABLE void runCmd(const QString cmd) const;
Q_INVOKABLE void runCmd(const QString cmd);
Q_INVOKABLE void setDataBySource(const QString sourceName, const QVariantMap data); Q_INVOKABLE void setDataBySource(const QString sourceName, const QVariantMap data);
Q_INVOKABLE void setPattern(const QString _pattern);
Q_INVOKABLE static void sendNotification(const QString eventId, const QString message); Q_INVOKABLE static void sendNotification(const QString eventId, const QString message);
Q_INVOKABLE QString valueByKey(const QString key);
// context menu // context menu
Q_INVOKABLE void enableProfileSlot(const bool useHelper = true, Q_INVOKABLE void enableProfileSlot(const bool useHelper = true,
const QString cmd = QString("netctl"), const QString cmd = QString("netctl"),
const QString sudoCmd = QString("")); const QString sudoCmd = QString("")) const;
Q_INVOKABLE void restartProfileSlot(const bool useHelper = true, Q_INVOKABLE void restartProfileSlot(const bool useHelper = true,
const QString cmd = QString("netctl"), const QString cmd = QString("netctl"),
const QString sudoCmd = QString("")); const QString sudoCmd = QString("")) const;
Q_INVOKABLE void startProfileSlot(const bool useHelper = true, Q_INVOKABLE void startProfileSlot(const bool useHelper = true,
const QString cmd = QString("netctl"), const QString cmd = QString("netctl"),
const QString sudoCmd = QString("")); const QString sudoCmd = QString("")) const;
Q_INVOKABLE void stopProfileSlot(const bool useHelper = true, Q_INVOKABLE void stopProfileSlot(const bool useHelper = true,
const QString cmd = QString("netctl"), const QString cmd = QString("netctl"),
const QString sudoCmd = QString("")); const QString sudoCmd = QString("")) const;
Q_INVOKABLE void stopAllProfilesSlot(const bool useHelper = true, Q_INVOKABLE void stopAllProfilesSlot(const bool useHelper = true,
const QString cmd = QString("netctl"), const QString cmd = QString("netctl"),
const QString sudoCmd = QString("")); const QString sudoCmd = QString("")) const;
Q_INVOKABLE void switchToProfileSlot(const bool useHelper = true, Q_INVOKABLE void switchToProfileSlot(const bool useHelper = true,
const QString cmd = QString("netctl-auto")); const QString cmd = QString("netctl-auto")) const;
// dataengine // dataengine
Q_INVOKABLE QVariantMap readDataEngineConfiguration(); Q_INVOKABLE QVariantMap readDataEngineConfiguration() const;
Q_INVOKABLE void writeDataEngineConfiguration(const QVariantMap configuration); Q_INVOKABLE void writeDataEngineConfiguration(const QVariantMap configuration) const;
signals: signals:
void needToBeUpdated(); void needIconToBeUpdated(const QString newIcon) const;
void needToNotify(const bool currentStatus); void needMenuUpdate(const QString current, const QString status, const bool isActive) const;
void needTextToBeUpdated(const QString newText, const QString newToolTip) const;
void needToBeUpdated() const;
void needToNotify(const bool currentStatus) const;
private slots: private slots:
void notifyAboutStatusChanging(const bool currentStatus); void notifyAboutStatusChanging(const bool currentStatus) const;
void parsePattern() const;
private: private:
bool debug = false; bool debug = false;
QList<QVariant> sendDBusRequest(const QString cmd, const QList<QVariant> args = QList<QVariant>()); QVariantList sendDBusRequest(const QString cmd,
QMap<QString, QString> values; const QVariantList args = QVariantList()) const;
QString pattern;
QHash<QString, QString> values;
}; };

View File

@ -1,3 +1,3 @@
module org.kde.plasma.netctl module org.kde.plasma.private.netctl
plugin netctlplugin plugin netctlplugin

View File

@ -65,6 +65,21 @@
<translation>This software uses: %1</translation> <translation>This software uses: %1</translation>
</message> </message>
</context> </context>
<context>
<name>BondWidget</name>
<message>
<source>Bond settings</source>
<translation>Bond settings</translation>
</message>
<message>
<source>Mode</source>
<translation>Mode</translation>
</message>
<message>
<source>The bonding policy. See the kernel documentation on bonding for details</source>
<translation>The bonding policy. See the kernel documentation on bonding for details</translation>
</message>
</context>
<context> <context>
<name>BridgeWidget</name> <name>BridgeWidget</name>
<message> <message>
@ -190,6 +205,10 @@
<source>IP address does not match the standard</source> <source>IP address does not match the standard</source>
<translation>IP address does not match the standard</translation> <translation>IP address does not match the standard</translation>
</message> </message>
<message>
<source>Key is required for &apos;gre&apos; mode</source>
<translation>Key is required for &apos;gre&apos; mode</translation>
</message>
</context> </context>
<context> <context>
<name>EthernetWidget</name> <name>EthernetWidget</name>
@ -281,6 +300,14 @@
<source>Maximum time, in seconds, to wait for 802.1x authentication to succeed</source> <source>Maximum time, in seconds, to wait for 802.1x authentication to succeed</source>
<translation>Maximum time, in seconds, to wait for 802.1x authentication to succeed</translation> <translation>Maximum time, in seconds, to wait for 802.1x authentication to succeed</translation>
</message> </message>
<message>
<source>Priority</source>
<translation>Priority</translation>
</message>
<message>
<source>Priority level of the profile. In case of automatic profile selection, profiles are tried in decreasing order of priority</source>
<translation>Priority level of the profile. In case of automatic profile selection, profiles are tried in decreasing order of priority</translation>
</message>
</context> </context>
<context> <context>
<name>GeneralWidget</name> <name>GeneralWidget</name>
@ -376,6 +403,14 @@
<source>A description of the profile</source> <source>A description of the profile</source>
<translation>A description of the profile</translation> <translation>A description of the profile</translation>
</message> </message>
<message>
<source>Whether or not to exclude this profile from automatic profile selection</source>
<translation>Whether or not to exclude this profile from automatic profile selection</translation>
</message>
<message>
<source>Exclude auto</source>
<translation>Exclude auto</translation>
</message>
</context> </context>
<context> <context>
<name>IpWidget</name> <name>IpWidget</name>
@ -1519,6 +1554,30 @@ Should be according to standards</translation>
<source>Browse</source> <source>Browse</source>
<translation>Browse</translation> <translation>Browse</translation>
</message> </message>
<message>
<source>Select chat file</source>
<translation>Select chat file</translation>
</message>
<message>
<source>All (*.*)</source>
<translation>All (*.*)</translation>
</message>
<message>
<source>Init</source>
<translation>Init</translation>
</message>
<message>
<source>An initialization string sent to the modem before dialing</source>
<translation>An initialization string sent to the modem before dialing</translation>
</message>
<message>
<source>Chat script</source>
<translation>Chat script</translation>
</message>
<message>
<source>Path to a chat file</source>
<translation>Path to a chat file</translation>
</message>
</context> </context>
<context> <context>
<name>NetctlAutoWindow</name> <name>NetctlAutoWindow</name>
@ -2467,6 +2526,14 @@ Should be according to standards</translation>
<source>The address of the remote end of the tunnel</source> <source>The address of the remote end of the tunnel</source>
<translation>The address of the remote end of the tunnel</translation> <translation>The address of the remote end of the tunnel</translation>
</message> </message>
<message>
<source>Key</source>
<translation>Key</translation>
</message>
<message>
<source>A key identifying an individual traffic flow within a tunnel</source>
<translation>A key identifying an individual traffic flow within a tunnel</translation>
</message>
</context> </context>
<context> <context>
<name>TuntapWidget</name> <name>TuntapWidget</name>
@ -2809,11 +2876,11 @@ Should be according to standards</translation>
</message> </message>
<message> <message>
<source>Whether or not to exclude this profile from automatic profile selection</source> <source>Whether or not to exclude this profile from automatic profile selection</source>
<translation>Whether or not to exclude this profile from automatic profile selection</translation> <translation type="vanished">Whether or not to exclude this profile from automatic profile selection</translation>
</message> </message>
<message> <message>
<source>Exclude auto</source> <source>Exclude auto</source>
<translation>Exclude auto</translation> <translation type="vanished">Exclude auto</translation>
</message> </message>
<message> <message>
<source>Frequency</source> <source>Frequency</source>

View File

@ -79,6 +79,24 @@
<translation></translation> <translation></translation>
</message> </message>
</context> </context>
<context>
<name>BondWidget</name>
<message>
<location filename="../../../build/gui/src/ui_bondwidget.h" line="91"/>
<source>Bond settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_bondwidget.h" line="92"/>
<source>Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_bondwidget.h" line="94"/>
<source>The bonding policy. See the kernel documentation on bonding for details</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>BridgeWidget</name> <name>BridgeWidget</name>
<message> <message>
@ -125,6 +143,7 @@
<location filename="../../gui/src/errorwindow.cpp" line="120"/> <location filename="../../gui/src/errorwindow.cpp" line="120"/>
<location filename="../../gui/src/errorwindow.cpp" line="124"/> <location filename="../../gui/src/errorwindow.cpp" line="124"/>
<location filename="../../gui/src/errorwindow.cpp" line="128"/> <location filename="../../gui/src/errorwindow.cpp" line="128"/>
<location filename="../../gui/src/errorwindow.cpp" line="132"/>
<source>Error!</source> <source>Error!</source>
<translation></translation> <translation></translation>
</message> </message>
@ -230,11 +249,16 @@
</message> </message>
<message> <message>
<location filename="../../gui/src/errorwindow.cpp" line="129"/> <location filename="../../gui/src/errorwindow.cpp" line="129"/>
<source>Key is required for &apos;gre&apos; mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/src/errorwindow.cpp" line="133"/>
<source>Unknown error</source> <source>Unknown error</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/errorwindow.cpp" line="192"/> <location filename="../../gui/src/errorwindow.cpp" line="197"/>
<source>Sender : %1</source> <source>Sender : %1</source>
<translation>%1</translation> <translation>%1</translation>
</message> </message>
@ -246,7 +270,7 @@
<translation type="obsolete"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="282"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="307"/>
<source>Ethernet options</source> <source>Ethernet options</source>
<translation></translation> <translation></translation>
</message> </message>
@ -255,95 +279,105 @@
<translation type="obsolete"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="284"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="309"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Whether or not the absence of a carrier is acceptable&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Whether or not the absence of a carrier is acceptable&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translatorcomment>I don&apos;t know this translation is exactry correct because of my lack of knowledge in network.</translatorcomment> <translatorcomment>I don&apos;t know this translation is exactry correct because of my lack of knowledge in network.</translatorcomment>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="286"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="311"/>
<source>Skip no carrier</source> <source>Skip no carrier</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="288"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="313"/>
<source>Set to yes to use 802.1x authentication</source> <source>Set to yes to use 802.1x authentication</source>
<translation>802.1.x 使</translation> <translation>802.1.x 使</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="290"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="315"/>
<source>802.1x authentication</source> <source>802.1x authentication</source>
<translation>802.1.x </translation> <translation>802.1.x </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="291"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="316"/>
<source>WPA config file</source> <source>WPA config file</source>
<translation>WPA </translation> <translation>WPA </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="293"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="318"/>
<source>Path to a wpa_supplicant configuration file</source> <source>Path to a wpa_supplicant configuration file</source>
<translation>wpa_supplicant </translation> <translation>wpa_supplicant </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="295"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="320"/>
<source>Browse</source> <source>Browse</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="296"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="321"/>
<source>WPA driver</source> <source>WPA driver</source>
<translation>WPA </translation> <translation>WPA </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="304"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="329"/>
<source>The wpa_supplicant driver to use for 802.1x authentication</source> <source>The wpa_supplicant driver to use for 802.1x authentication</source>
<translation>802.1.x wpa_supplicant </translation> <translation>802.1.x wpa_supplicant </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="299"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="339"/>
<source>Priority</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="341"/>
<source>Priority level of the profile. In case of automatic profile selection, profiles are tried in decreasing order of priority</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="324"/>
<source>wired</source> <source>wired</source>
<translation>wired</translation> <translation>wired</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="300"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="325"/>
<source>nl80211</source> <source>nl80211</source>
<translation>nl80211</translation> <translation>nl80211</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="301"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="326"/>
<source>wext</source> <source>wext</source>
<translation>wext</translation> <translation>wext</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="306"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="331"/>
<source>Timeout carrier</source> <source>Timeout carrier</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="308"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="333"/>
<source>Maximum time, in seconds, to wait for a carrier</source> <source>Maximum time, in seconds, to wait for a carrier</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="310"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="335"/>
<source>Timeout WPA</source> <source>Timeout WPA</source>
<translation>WPA </translation> <translation>WPA </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="312"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="337"/>
<source>Maximum time, in seconds, to wait for 802.1x authentication to succeed</source> <source>Maximum time, in seconds, to wait for 802.1x authentication to succeed</source>
<translation>802.1.x </translation> <translation>802.1.x </translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/wirelesswidget.cpp" line="154"/> <location filename="../../gui/src/wirelesswidget.cpp" line="153"/>
<location filename="../../gui/src/ethernetwidget.cpp" line="68"/> <location filename="../../gui/src/ethernetwidget.cpp" line="69"/>
<source>Select wpa configuration file</source> <source>Select wpa configuration file</source>
<translation>WPA </translation> <translation>WPA </translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/wirelesswidget.cpp" line="156"/> <location filename="../../gui/src/wirelesswidget.cpp" line="155"/>
<location filename="../../gui/src/ethernetwidget.cpp" line="70"/> <location filename="../../gui/src/ethernetwidget.cpp" line="71"/>
<source>Configuration files (*.conf)</source> <source>Configuration files (*.conf)</source>
<translation> (*.conf)</translation> <translation> (*.conf)</translation>
</message> </message>
@ -359,12 +393,12 @@
<translation type="obsolete"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="394"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="419"/>
<source>General</source> <source>General</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="395"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="420"/>
<source>Description</source> <source>Description</source>
<translation></translation> <translation></translation>
</message> </message>
@ -373,98 +407,108 @@
<translation type="obsolete">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> <translation type="obsolete">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="399"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="424"/>
<source>Connection</source> <source>Connection</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="401"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="426"/>
<source>The connection type used by the profile</source> <source>The connection type used by the profile</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="403"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="428"/>
<source>Interface</source> <source>Interface</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="405"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="430"/>
<source>The name of the associated network interface</source> <source>The name of the associated network interface</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="407"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="432"/>
<source>Binds to interfaces</source> <source>Binds to interfaces</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="408"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="433"/>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="413"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="438"/>
<source>Add</source> <source>Add</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="410"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="435"/>
<source>An array of physical network interfaces that this profile needs before it can be started</source> <source>An array of physical network interfaces that this profile needs before it can be started</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/generalwidget.cpp" line="109"/> <location filename="../../gui/src/generalwidget.cpp" line="110"/>
<source>Hide advanced</source> <source>Hide advanced</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="397"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="422"/>
<source>A description of the profile</source> <source>A description of the profile</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="412"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="437"/>
<source>After</source> <source>After</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="415"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="440"/>
<source>An array of profile names that should be started before this profile is started</source> <source>An array of profile names that should be started before this profile is started</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="417"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="442"/>
<source>Command after starting</source> <source>Command after starting</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="419"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="444"/>
<source>A command that is executed after a connection is established</source> <source>A command that is executed after a connection is established</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="421"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="446"/>
<source>Command before stoping</source> <source>Command before stoping</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="423"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="448"/>
<source>A command that is executed before a connection is brought down</source> <source>A command that is executed before a connection is brought down</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="426"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="451"/>
<source>Whether or not to exclude this profile from automatic profile selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="453"/>
<source>Exclude auto</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="455"/>
<source>Set to yes to force connecting even if the interface is up</source> <source>Set to yes to force connecting even if the interface is up</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="428"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="457"/>
<source>Force connect</source> <source>Force connect</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="429"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="458"/>
<source>Debug mode</source> <source>Debug mode</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/generalwidget.cpp" line="112"/> <location filename="../../gui/src/generalwidget.cpp" line="113"/>
<source>Show advanced</source> <source>Show advanced</source>
<translation></translation> <translation></translation>
</message> </message>
@ -1438,12 +1482,12 @@ Should be according to standards</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/main.cpp" line="193"/> <location filename="../../gui/src/main.cpp" line="200"/>
<source>Restore existing session.</source> <source>Restore existing session.</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/main.cpp" line="198"/> <location filename="../../gui/src/main.cpp" line="205"/>
<source>Close existing session.</source> <source>Close existing session.</source>
<translation></translation> <translation></translation>
</message> </message>
@ -1484,78 +1528,78 @@ Should be according to standards</source>
<translation type="obsolete"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="348"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="402"/>
<source>Mobile PPP settings</source> <source>Mobile PPP settings</source>
<translation> PPP </translation> <translation> PPP </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="349"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="403"/>
<source>Username</source> <source>Username</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="351"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="405"/>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="355"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="409"/>
<source>The username and password to connect with</source> <source>The username and password to connect with</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="353"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="407"/>
<source>Password</source> <source>Password</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="357"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="411"/>
<source>Access point name</source> <source>Access point name</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="359"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="413"/>
<source>The access point (apn) to connect on</source> <source>The access point (apn) to connect on</source>
<translation> (APN)</translation> <translation> (APN)</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="361"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="415"/>
<source>PIN</source> <source>PIN</source>
<translation>PIN</translation> <translation>PIN</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="363"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="417"/>
<source>If your modem requires a PIN to unlock, use this option</source> <source>If your modem requires a PIN to unlock, use this option</source>
<translation> PIN 使</translation> <translation> PIN 使</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="365"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="419"/>
<source>Mode</source> <source>Mode</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="375"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="429"/>
<source>This option is used to specify the connection mode</source> <source>This option is used to specify the connection mode</source>
<translation>使</translation> <translation>使</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="368"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="422"/>
<source>None</source> <source>None</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="369"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="423"/>
<source>3Gpref</source> <source>3Gpref</source>
<translation>3Gpref</translation> <translation>3Gpref</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="370"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="424"/>
<source>3Gonly</source> <source>3Gonly</source>
<translation>Gonly</translation> <translation>Gonly</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="371"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="425"/>
<source>GPRSpref</source> <source>GPRSpref</source>
<translation>GPRSpref</translation> <translation>GPRSpref</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="372"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="426"/>
<source>GPRSonly</source> <source>GPRSonly</source>
<translation>GPRSonly</translation> <translation>GPRSonly</translation>
</message> </message>
@ -1564,57 +1608,88 @@ Should be according to standards</source>
<translation type="obsolete"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="385"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="443"/>
<source>Max fail</source> <source>Max fail</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="387"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="445"/>
<source>The number of consecutive failed connection attempts to tolerate</source> <source>The number of consecutive failed connection attempts to tolerate</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="378"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="432"/>
<source>Use the default route provided by the peer</source> <source>Use the default route provided by the peer</source>
<translation>使</translation> <translation>使</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="380"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="434"/>
<source>Default route</source> <source>Default route</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="382"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="436"/>
<source>Use the DNS provided by the peer</source> <source>Use the DNS provided by the peer</source>
<translation> DNS 使</translation> <translation> DNS 使</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="384"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="438"/>
<source>Use peer DNS</source> <source>Use peer DNS</source>
<translation> DNS 使</translation> <translation> DNS 使</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="389"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="439"/>
<source>Init</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="441"/>
<source>An initialization string sent to the modem before dialing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="447"/>
<source>Chat script</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="449"/>
<source>Path to a chat file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="452"/>
<source>Options file</source> <source>Options file</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="391"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="454"/>
<source>A file to read additional pppd options from</source> <source>A file to read additional pppd options from</source>
<translation> PPPD </translation> <translation> PPPD </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="393"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="451"/>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="456"/>
<source>Browse</source> <source>Browse</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/mobilewidget.cpp" line="69"/> <location filename="../../gui/src/mobilewidget.cpp" line="72"/>
<source>Select chat file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/src/mobilewidget.cpp" line="74"/>
<source>All (*.*)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/src/mobilewidget.cpp" line="83"/>
<source>Select options file</source> <source>Select options file</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/mobilewidget.cpp" line="71"/> <location filename="../../gui/src/mobilewidget.cpp" line="85"/>
<source>Configuration files (*.conf)</source> <source>Configuration files (*.conf)</source>
<translation> (*.conf)</translation> <translation> (*.conf)</translation>
</message> </message>
@ -2687,80 +2762,90 @@ Should be according to standards</source>
<translation type="obsolete"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="143"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="166"/>
<source>Tunnel settings</source> <source>Tunnel settings</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="144"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="167"/>
<source>Mode</source> <source>Mode</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="157"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="180"/>
<source>The tunnel type</source> <source>The tunnel type</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="147"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="170"/>
<source>ipip</source> <source>ipip</source>
<translation>ipip</translation> <translation>ipip</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="148"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="171"/>
<source>gre</source> <source>gre</source>
<translation>gre</translation> <translation>gre</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="149"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="172"/>
<source>sit</source> <source>sit</source>
<translation>sit</translation> <translation>sit</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="150"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="173"/>
<source>isatap</source> <source>isatap</source>
<translation>isatap</translation> <translation>isatap</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="151"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="174"/>
<source>ip6ip6</source> <source>ip6ip6</source>
<translation>ip6ip6</translation> <translation>ip6ip6</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="152"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="175"/>
<source>ipip6</source> <source>ipip6</source>
<translation>ipip6</translation> <translation>ipip6</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="153"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="176"/>
<source>ip6gre</source> <source>ip6gre</source>
<translation>ip6gre</translation> <translation>ip6gre</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="154"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="177"/>
<source>any</source> <source>any</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="159"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="182"/>
<source>Local</source> <source>Local</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="161"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="184"/>
<source>The address of the local end of the tunnel</source> <source>The address of the local end of the tunnel</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="163"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="186"/>
<source>Remote</source> <source>Remote</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="165"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="188"/>
<source>The address of the remote end of the tunnel</source> <source>The address of the remote end of the tunnel</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="190"/>
<source>Key</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="192"/>
<source>A key identifying an individual traffic flow within a tunnel</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>TuntapWidget</name> <name>TuntapWidget</name>
@ -2988,109 +3073,109 @@ Should be according to standards</source>
<translation type="obsolete"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="608"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="589"/>
<source>Wireless options</source> <source>Wireless options</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="609"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="590"/>
<source>Security</source> <source>Security</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="612"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="593"/>
<source>none</source> <source>none</source>
<translation>none</translation> <translation>none</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="613"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="594"/>
<source>wep</source> <source>wep</source>
<translation>wep</translation> <translation>wep</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="614"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="595"/>
<source>wpa</source> <source>wpa</source>
<translation>wpa</translation> <translation>wpa</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="615"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="596"/>
<source>wpa-configsection</source> <source>wpa-configsection</source>
<translation>wpa-configsection</translation> <translation>wpa-configsection</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="616"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="597"/>
<source>wpa-config</source> <source>wpa-config</source>
<translation>wpa-config</translation> <translation>wpa-config</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="618"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="599"/>
<source>ESSID</source> <source>ESSID</source>
<translation>ESSID</translation> <translation>ESSID</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="620"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="601"/>
<source>The name of the network to connect to</source> <source>The name of the network to connect to</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="622"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="603"/>
<source>Wpa config section</source> <source>Wpa config section</source>
<translation>WPA </translation> <translation>WPA </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="623"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="604"/>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="649"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="626"/>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="676"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="653"/>
<source>Add</source> <source>Add</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="625"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="606"/>
<source>Array of lines that form a network block for wpa_supplicant</source> <source>Array of lines that form a network block for wpa_supplicant</source>
<translation>wpa_supplicant </translation> <translation>wpa_supplicant </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="627"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="608"/>
<source>Wpa config file</source> <source>Wpa config file</source>
<translation>WPA </translation> <translation>WPA </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="629"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="610"/>
<source>Path to a wpa_supplicant configuration file</source> <source>Path to a wpa_supplicant configuration file</source>
<translation>wpa_supplicant </translation> <translation>wpa_supplicant </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="631"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="612"/>
<source>Browse</source> <source>Browse</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="632"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="613"/>
<source>Key</source> <source>Key</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="634"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="615"/>
<source>The secret key to a WEP, or WPA encrypted network</source> <source>The secret key to a WEP, or WPA encrypted network</source>
<translation>WEP WPA </translation> <translation>WEP WPA </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="641"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="618"/>
<source>Whether or not the specified network is a hidden network</source> <source>Whether or not the specified network is a hidden network</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="643"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="620"/>
<source>Hidden</source> <source>Hidden</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="645"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="622"/>
<source>Whether or not to use ad-hoc mode</source> <source>Whether or not to use ad-hoc mode</source>
<translation>使</translation> <translation>使</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="647"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="624"/>
<source>Ad-hoc</source> <source>Ad-hoc</source>
<translation></translation> <translation></translation>
</message> </message>
@ -3099,105 +3184,103 @@ Should be according to standards</source>
<translation type="obsolete"></translation> <translation type="obsolete"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="648"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="625"/>
<source>Scan frequencies</source> <source>Scan frequencies</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="651"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="628"/>
<source>A space-separated list of frequencies in MHz to scan when searching for the network</source> <source>A space-separated list of frequencies in MHz to scan when searching for the network</source>
<translation> (MHz) </translation> <translation> (MHz) </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="653"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="630"/>
<source>Frequency</source> <source>Frequency</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="655"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="632"/>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="659"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="636"/>
<source>Priority group for the network</source> <source>Priority group for the network</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="657"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="634"/>
<source>Priority</source> <source>Priority</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="661"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="638"/>
<source>Country</source> <source>Country</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="663"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="640"/>
<source>The country for which frequency regulations will be enforced</source> <source>The country for which frequency regulations will be enforced</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="665"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="642"/>
<source>WPA group</source> <source>WPA group</source>
<translation>WPA </translation> <translation>WPA </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="667"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="644"/>
<source>Group that has the authority to configure wpa_supplicant via its control interface</source> <source>Group that has the authority to configure wpa_supplicant via its control interface</source>
<translation>wpa_supplicant </translation> <translation>wpa_supplicant </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="669"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="646"/>
<source>Drivers</source> <source>Drivers</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="672"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="649"/>
<source>west</source> <source>west</source>
<translation>west</translation> <translation>west</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="673"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="650"/>
<source>nl80211</source> <source>nl80211</source>
<translation>nl80211</translation> <translation>nl80211</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="674"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="651"/>
<source>wired</source> <source>wired</source>
<translation>wired</translation> <translation>wired</translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="678"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="655"/>
<source>The wpa_supplicant driver to use</source> <source>The wpa_supplicant driver to use</source>
<translation>使 wpa_supplicant </translation> <translation>使 wpa_supplicant </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="680"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="657"/>
<source>RFkill device</source> <source>RFkill device</source>
<translation>RFkill </translation> <translation>RFkill </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="682"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="659"/>
<source>The name of an rfkill device</source> <source>The name of an rfkill device</source>
<translation>Rfkill </translation> <translation>Rfkill </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="684"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="661"/>
<source>Timeout WPA</source> <source>Timeout WPA</source>
<translation>WPA </translation> <translation>WPA </translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="686"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="663"/>
<source>Maximum time, in seconds, to wait for steps in the association and authentication to succeed</source> <source>Maximum time, in seconds, to wait for steps in the association and authentication to succeed</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="637"/>
<source>Whether or not to exclude this profile from automatic profile selection</source> <source>Whether or not to exclude this profile from automatic profile selection</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="639"/>
<source>Exclude auto</source> <source>Exclude auto</source>
<translation></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<source>Hide advanced</source> <source>Hide advanced</source>

View File

@ -78,6 +78,24 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>BondWidget</name>
<message>
<location filename="../../../build/gui/src/ui_bondwidget.h" line="91"/>
<source>Bond settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_bondwidget.h" line="92"/>
<source>Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_bondwidget.h" line="94"/>
<source>The bonding policy. See the kernel documentation on bonding for details</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>BridgeWidget</name> <name>BridgeWidget</name>
<message> <message>
@ -120,6 +138,7 @@
<location filename="../../gui/src/errorwindow.cpp" line="120"/> <location filename="../../gui/src/errorwindow.cpp" line="120"/>
<location filename="../../gui/src/errorwindow.cpp" line="124"/> <location filename="../../gui/src/errorwindow.cpp" line="124"/>
<location filename="../../gui/src/errorwindow.cpp" line="128"/> <location filename="../../gui/src/errorwindow.cpp" line="128"/>
<location filename="../../gui/src/errorwindow.cpp" line="132"/>
<source>Error!</source> <source>Error!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -225,11 +244,16 @@
</message> </message>
<message> <message>
<location filename="../../gui/src/errorwindow.cpp" line="129"/> <location filename="../../gui/src/errorwindow.cpp" line="129"/>
<source>Key is required for &apos;gre&apos; mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/src/errorwindow.cpp" line="133"/>
<source>Unknown error</source> <source>Unknown error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/errorwindow.cpp" line="192"/> <location filename="../../gui/src/errorwindow.cpp" line="197"/>
<source>Sender : %1</source> <source>Sender : %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -237,99 +261,109 @@
<context> <context>
<name>EthernetWidget</name> <name>EthernetWidget</name>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="282"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="307"/>
<source>Ethernet options</source> <source>Ethernet options</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="284"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="309"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Whether or not the absence of a carrier is acceptable&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Whether or not the absence of a carrier is acceptable&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="286"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="311"/>
<source>Skip no carrier</source> <source>Skip no carrier</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="288"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="313"/>
<source>Set to yes to use 802.1x authentication</source> <source>Set to yes to use 802.1x authentication</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="290"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="315"/>
<source>802.1x authentication</source> <source>802.1x authentication</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="291"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="316"/>
<source>WPA config file</source> <source>WPA config file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="293"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="318"/>
<source>Path to a wpa_supplicant configuration file</source> <source>Path to a wpa_supplicant configuration file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="295"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="320"/>
<source>Browse</source> <source>Browse</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="296"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="321"/>
<source>WPA driver</source> <source>WPA driver</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="304"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="329"/>
<source>The wpa_supplicant driver to use for 802.1x authentication</source> <source>The wpa_supplicant driver to use for 802.1x authentication</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="299"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="339"/>
<source>Priority</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="341"/>
<source>Priority level of the profile. In case of automatic profile selection, profiles are tried in decreasing order of priority</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="324"/>
<source>wired</source> <source>wired</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="300"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="325"/>
<source>nl80211</source> <source>nl80211</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="301"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="326"/>
<source>wext</source> <source>wext</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="306"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="331"/>
<source>Timeout carrier</source> <source>Timeout carrier</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="308"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="333"/>
<source>Maximum time, in seconds, to wait for a carrier</source> <source>Maximum time, in seconds, to wait for a carrier</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="310"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="335"/>
<source>Timeout WPA</source> <source>Timeout WPA</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_ethernetwidget.h" line="312"/> <location filename="../../../build/gui/src/ui_ethernetwidget.h" line="337"/>
<source>Maximum time, in seconds, to wait for 802.1x authentication to succeed</source> <source>Maximum time, in seconds, to wait for 802.1x authentication to succeed</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/wirelesswidget.cpp" line="154"/> <location filename="../../gui/src/wirelesswidget.cpp" line="153"/>
<location filename="../../gui/src/ethernetwidget.cpp" line="68"/> <location filename="../../gui/src/ethernetwidget.cpp" line="69"/>
<source>Select wpa configuration file</source> <source>Select wpa configuration file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/wirelesswidget.cpp" line="156"/> <location filename="../../gui/src/wirelesswidget.cpp" line="155"/>
<location filename="../../gui/src/ethernetwidget.cpp" line="70"/> <location filename="../../gui/src/ethernetwidget.cpp" line="71"/>
<source>Configuration files (*.conf)</source> <source>Configuration files (*.conf)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -337,108 +371,118 @@
<context> <context>
<name>GeneralWidget</name> <name>GeneralWidget</name>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="394"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="419"/>
<source>General</source> <source>General</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="395"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="420"/>
<source>Description</source> <source>Description</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="399"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="424"/>
<source>Connection</source> <source>Connection</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="401"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="426"/>
<source>The connection type used by the profile</source> <source>The connection type used by the profile</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="403"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="428"/>
<source>Interface</source> <source>Interface</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="405"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="430"/>
<source>The name of the associated network interface</source> <source>The name of the associated network interface</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="407"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="432"/>
<source>Binds to interfaces</source> <source>Binds to interfaces</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="408"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="433"/>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="413"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="438"/>
<source>Add</source> <source>Add</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="410"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="435"/>
<source>An array of physical network interfaces that this profile needs before it can be started</source> <source>An array of physical network interfaces that this profile needs before it can be started</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/generalwidget.cpp" line="109"/> <location filename="../../gui/src/generalwidget.cpp" line="110"/>
<source>Hide advanced</source> <source>Hide advanced</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="397"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="422"/>
<source>A description of the profile</source> <source>A description of the profile</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="412"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="437"/>
<source>After</source> <source>After</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="415"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="440"/>
<source>An array of profile names that should be started before this profile is started</source> <source>An array of profile names that should be started before this profile is started</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="417"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="442"/>
<source>Command after starting</source> <source>Command after starting</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="419"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="444"/>
<source>A command that is executed after a connection is established</source> <source>A command that is executed after a connection is established</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="421"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="446"/>
<source>Command before stoping</source> <source>Command before stoping</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="423"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="448"/>
<source>A command that is executed before a connection is brought down</source> <source>A command that is executed before a connection is brought down</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="426"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="451"/>
<source>Whether or not to exclude this profile from automatic profile selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="453"/>
<source>Exclude auto</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="455"/>
<source>Set to yes to force connecting even if the interface is up</source> <source>Set to yes to force connecting even if the interface is up</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="428"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="457"/>
<source>Force connect</source> <source>Force connect</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_generalwidget.h" line="429"/> <location filename="../../../build/gui/src/ui_generalwidget.h" line="458"/>
<source>Debug mode</source> <source>Debug mode</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/generalwidget.cpp" line="112"/> <location filename="../../gui/src/generalwidget.cpp" line="113"/>
<source>Show advanced</source> <source>Show advanced</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -1236,12 +1280,12 @@ Should be according to standards</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/main.cpp" line="193"/> <location filename="../../gui/src/main.cpp" line="200"/>
<source>Restore existing session.</source> <source>Restore existing session.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/main.cpp" line="198"/> <location filename="../../gui/src/main.cpp" line="205"/>
<source>Close existing session.</source> <source>Close existing session.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -1270,133 +1314,164 @@ Should be according to standards</source>
<context> <context>
<name>MobileWidget</name> <name>MobileWidget</name>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="348"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="402"/>
<source>Mobile PPP settings</source> <source>Mobile PPP settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="349"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="403"/>
<source>Username</source> <source>Username</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="351"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="405"/>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="355"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="409"/>
<source>The username and password to connect with</source> <source>The username and password to connect with</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="353"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="407"/>
<source>Password</source> <source>Password</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="357"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="411"/>
<source>Access point name</source> <source>Access point name</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="359"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="413"/>
<source>The access point (apn) to connect on</source> <source>The access point (apn) to connect on</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="361"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="415"/>
<source>PIN</source> <source>PIN</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="363"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="417"/>
<source>If your modem requires a PIN to unlock, use this option</source> <source>If your modem requires a PIN to unlock, use this option</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="365"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="419"/>
<source>Mode</source> <source>Mode</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="375"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="429"/>
<source>This option is used to specify the connection mode</source> <source>This option is used to specify the connection mode</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="368"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="422"/>
<source>None</source> <source>None</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="369"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="423"/>
<source>3Gpref</source> <source>3Gpref</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="370"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="424"/>
<source>3Gonly</source> <source>3Gonly</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="371"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="425"/>
<source>GPRSpref</source> <source>GPRSpref</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="372"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="426"/>
<source>GPRSonly</source> <source>GPRSonly</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="385"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="439"/>
<source>Init</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="441"/>
<source>An initialization string sent to the modem before dialing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="443"/>
<source>Max fail</source> <source>Max fail</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="387"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="445"/>
<source>The number of consecutive failed connection attempts to tolerate</source> <source>The number of consecutive failed connection attempts to tolerate</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="378"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="432"/>
<source>Use the default route provided by the peer</source> <source>Use the default route provided by the peer</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="380"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="434"/>
<source>Default route</source> <source>Default route</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="382"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="436"/>
<source>Use the DNS provided by the peer</source> <source>Use the DNS provided by the peer</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="384"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="438"/>
<source>Use peer DNS</source> <source>Use peer DNS</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="389"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="447"/>
<source>Chat script</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="449"/>
<source>Path to a chat file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="452"/>
<source>Options file</source> <source>Options file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="391"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="454"/>
<source>A file to read additional pppd options from</source> <source>A file to read additional pppd options from</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="393"/> <location filename="../../../build/gui/src/ui_mobilewidget.h" line="451"/>
<location filename="../../../build/gui/src/ui_mobilewidget.h" line="456"/>
<source>Browse</source> <source>Browse</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/mobilewidget.cpp" line="69"/> <location filename="../../gui/src/mobilewidget.cpp" line="72"/>
<source>Select chat file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/src/mobilewidget.cpp" line="74"/>
<source>All (*.*)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/src/mobilewidget.cpp" line="83"/>
<source>Select options file</source> <source>Select options file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../gui/src/mobilewidget.cpp" line="71"/> <location filename="../../gui/src/mobilewidget.cpp" line="85"/>
<source>Configuration files (*.conf)</source> <source>Configuration files (*.conf)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -2397,80 +2472,90 @@ Should be according to standards</source>
<context> <context>
<name>TunnelWidget</name> <name>TunnelWidget</name>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="143"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="166"/>
<source>Tunnel settings</source> <source>Tunnel settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="144"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="167"/>
<source>Mode</source> <source>Mode</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="157"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="180"/>
<source>The tunnel type</source> <source>The tunnel type</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="147"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="170"/>
<source>ipip</source> <source>ipip</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="148"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="171"/>
<source>gre</source> <source>gre</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="149"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="172"/>
<source>sit</source> <source>sit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="150"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="173"/>
<source>isatap</source> <source>isatap</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="151"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="174"/>
<source>ip6ip6</source> <source>ip6ip6</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="152"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="175"/>
<source>ipip6</source> <source>ipip6</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="153"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="176"/>
<source>ip6gre</source> <source>ip6gre</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="154"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="177"/>
<source>any</source> <source>any</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="159"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="182"/>
<source>Local</source> <source>Local</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="161"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="184"/>
<source>The address of the local end of the tunnel</source> <source>The address of the local end of the tunnel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="163"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="186"/>
<source>Remote</source> <source>Remote</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="165"/> <location filename="../../../build/gui/src/ui_tunnelwidget.h" line="188"/>
<source>The address of the remote end of the tunnel</source> <source>The address of the remote end of the tunnel</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="190"/>
<source>Key</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_tunnelwidget.h" line="192"/>
<source>A key identifying an individual traffic flow within a tunnel</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>TuntapWidget</name> <name>TuntapWidget</name>
@ -2686,212 +2771,202 @@ Should be according to standards</source>
<context> <context>
<name>WirelessWidget</name> <name>WirelessWidget</name>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="608"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="589"/>
<source>Wireless options</source> <source>Wireless options</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="609"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="590"/>
<source>Security</source> <source>Security</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="612"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="593"/>
<source>none</source> <source>none</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="613"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="594"/>
<source>wep</source> <source>wep</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="614"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="595"/>
<source>wpa</source> <source>wpa</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="615"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="596"/>
<source>wpa-configsection</source> <source>wpa-configsection</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="616"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="597"/>
<source>wpa-config</source> <source>wpa-config</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="618"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="599"/>
<source>ESSID</source> <source>ESSID</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="620"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="601"/>
<source>The name of the network to connect to</source> <source>The name of the network to connect to</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="622"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="603"/>
<source>Wpa config section</source> <source>Wpa config section</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="623"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="604"/>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="649"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="626"/>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="676"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="653"/>
<source>Add</source> <source>Add</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="625"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="606"/>
<source>Array of lines that form a network block for wpa_supplicant</source> <source>Array of lines that form a network block for wpa_supplicant</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="627"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="608"/>
<source>Wpa config file</source> <source>Wpa config file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="629"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="610"/>
<source>Path to a wpa_supplicant configuration file</source> <source>Path to a wpa_supplicant configuration file</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="631"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="612"/>
<source>Browse</source> <source>Browse</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="632"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="613"/>
<source>Key</source> <source>Key</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="634"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="615"/>
<source>The secret key to a WEP, or WPA encrypted network</source> <source>The secret key to a WEP, or WPA encrypted network</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="641"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="618"/>
<source>Whether or not the specified network is a hidden network</source> <source>Whether or not the specified network is a hidden network</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="643"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="620"/>
<source>Hidden</source> <source>Hidden</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="645"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="622"/>
<source>Whether or not to use ad-hoc mode</source> <source>Whether or not to use ad-hoc mode</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="647"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="624"/>
<source>Ad-hoc</source> <source>Ad-hoc</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="648"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="625"/>
<source>Scan frequencies</source> <source>Scan frequencies</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="651"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="628"/>
<source>A space-separated list of frequencies in MHz to scan when searching for the network</source> <source>A space-separated list of frequencies in MHz to scan when searching for the network</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="653"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="630"/>
<source>Frequency</source> <source>Frequency</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="655"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="632"/>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="659"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="636"/>
<source>Priority group for the network</source> <source>Priority group for the network</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="657"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="634"/>
<source>Priority</source> <source>Priority</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="661"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="638"/>
<source>Country</source> <source>Country</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="663"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="640"/>
<source>The country for which frequency regulations will be enforced</source> <source>The country for which frequency regulations will be enforced</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="665"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="642"/>
<source>WPA group</source> <source>WPA group</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="667"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="644"/>
<source>Group that has the authority to configure wpa_supplicant via its control interface</source> <source>Group that has the authority to configure wpa_supplicant via its control interface</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="669"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="646"/>
<source>Drivers</source> <source>Drivers</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="672"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="649"/>
<source>west</source> <source>west</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="673"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="650"/>
<source>nl80211</source> <source>nl80211</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="674"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="651"/>
<source>wired</source> <source>wired</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="678"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="655"/>
<source>The wpa_supplicant driver to use</source> <source>The wpa_supplicant driver to use</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="680"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="657"/>
<source>RFkill device</source> <source>RFkill device</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="682"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="659"/>
<source>The name of an rfkill device</source> <source>The name of an rfkill device</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="684"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="661"/>
<source>Timeout WPA</source> <source>Timeout WPA</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="686"/> <location filename="../../../build/gui/src/ui_wirelesswidget.h" line="663"/>
<source>Maximum time, in seconds, to wait for steps in the association and authentication to succeed</source> <source>Maximum time, in seconds, to wait for steps in the association and authentication to succeed</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="637"/>
<source>Whether or not to exclude this profile from automatic profile selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build/gui/src/ui_wirelesswidget.h" line="639"/>
<source>Exclude auto</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
</TS> </TS>

View File

@ -65,6 +65,21 @@
<translation>Данное приложение использует: %1</translation> <translation>Данное приложение использует: %1</translation>
</message> </message>
</context> </context>
<context>
<name>BondWidget</name>
<message>
<source>Bond settings</source>
<translation>Настройки bond соединения</translation>
</message>
<message>
<source>Mode</source>
<translation>Режим</translation>
</message>
<message>
<source>The bonding policy. See the kernel documentation on bonding for details</source>
<translation>Политка соединения. Обратитесь к документации ядра для более подробной информации</translation>
</message>
</context>
<context> <context>
<name>BridgeWidget</name> <name>BridgeWidget</name>
<message> <message>
@ -190,6 +205,10 @@
<source>IP address does not match the standard</source> <source>IP address does not match the standard</source>
<translation>IP адрес не соответствует стандартам</translation> <translation>IP адрес не соответствует стандартам</translation>
</message> </message>
<message>
<source>Key is required for &apos;gre&apos; mode</source>
<translation>Необходимо указать ключ для &apos;gre&apos; режима</translation>
</message>
</context> </context>
<context> <context>
<name>EthernetWidget</name> <name>EthernetWidget</name>
@ -281,6 +300,14 @@
<source>Maximum time, in seconds, to wait for 802.1x authentication to succeed</source> <source>Maximum time, in seconds, to wait for 802.1x authentication to succeed</source>
<translation>Максимальное время в секундах для ожидания выполнения 802.1x авторизации</translation> <translation>Максимальное время в секундах для ожидания выполнения 802.1x авторизации</translation>
</message> </message>
<message>
<source>Priority</source>
<translation>Приоритет</translation>
</message>
<message>
<source>Priority level of the profile. In case of automatic profile selection, profiles are tried in decreasing order of priority</source>
<translation>Приоритет профиля. В случае автоматического выбора профиля, профили будут выбираться по уменьшению приоритета</translation>
</message>
</context> </context>
<context> <context>
<name>GeneralWidget</name> <name>GeneralWidget</name>
@ -376,6 +403,14 @@
<source>A description of the profile</source> <source>A description of the profile</source>
<translation>Описание профиля</translation> <translation>Описание профиля</translation>
</message> </message>
<message>
<source>Whether or not to exclude this profile from automatic profile selection</source>
<translation>Исключить ли профиль из автоматического выбора</translation>
</message>
<message>
<source>Exclude auto</source>
<translation>Исключить профиль</translation>
</message>
</context> </context>
<context> <context>
<name>IpWidget</name> <name>IpWidget</name>
@ -1518,6 +1553,30 @@ Should be according to standards</source>
<source>Browse</source> <source>Browse</source>
<translation>Обзор</translation> <translation>Обзор</translation>
</message> </message>
<message>
<source>Select chat file</source>
<translation>Выберете скрипт с настройками чата</translation>
</message>
<message>
<source>All (*.*)</source>
<translation>Все (*.*)</translation>
</message>
<message>
<source>Init</source>
<translation>Инициализация</translation>
</message>
<message>
<source>An initialization string sent to the modem before dialing</source>
<translation>Команда, которая будет послана при инициализации модема</translation>
</message>
<message>
<source>Chat script</source>
<translation>Скрипт</translation>
</message>
<message>
<source>Path to a chat file</source>
<translation>Путь к скрипту с настройками чата</translation>
</message>
</context> </context>
<context> <context>
<name>NetctlAutoWindow</name> <name>NetctlAutoWindow</name>
@ -2466,6 +2525,14 @@ Should be according to standards</source>
<source>The address of the remote end of the tunnel</source> <source>The address of the remote end of the tunnel</source>
<translation>Адрес удаленного конца туннеля</translation> <translation>Адрес удаленного конца туннеля</translation>
</message> </message>
<message>
<source>Key</source>
<translation>Ключ</translation>
</message>
<message>
<source>A key identifying an individual traffic flow within a tunnel</source>
<translation>Ключ, указывающий на отдельные потоки трафика в туннеле</translation>
</message>
</context> </context>
<context> <context>
<name>TuntapWidget</name> <name>TuntapWidget</name>
@ -2808,11 +2875,11 @@ Should be according to standards</source>
</message> </message>
<message> <message>
<source>Whether or not to exclude this profile from automatic profile selection</source> <source>Whether or not to exclude this profile from automatic profile selection</source>
<translation>Исключить ли профиль из автоматического выбора</translation> <translation type="vanished">Исключить ли профиль из автоматического выбора</translation>
</message> </message>
<message> <message>
<source>Exclude auto</source> <source>Exclude auto</source>
<translation>Исключить профиль</translation> <translation type="vanished">Исключить профиль</translation>
</message> </message>
<message> <message>
<source>Frequency</source> <source>Frequency</source>

View File

@ -133,7 +133,7 @@ void TestNetctl::test_getActiveProfile()
QStringList result = netctl->getActiveProfile(); QStringList result = netctl->getActiveProfile();
QStringList dbus; QStringList dbus;
if (helper) if (helper)
dbus = sendDBusRequest(QString("/netctl"), QString("netctlActiveProfile"))[0].toString().split(QChar('|')); dbus = sendDBusRequest(QString("/netctl"), QString("netctlActiveProfile"))[0].toStringList();
netctl->startProfile(QString("netctlgui-test-dummy")); netctl->startProfile(QString("netctlgui-test-dummy"));
delete netctl; delete netctl;

View File

@ -12,7 +12,7 @@
#define DOCS_PATH "@CMAKE_INSTALL_PREFIX@/share/doc/netctl-gui/" #define DOCS_PATH "@CMAKE_INSTALL_PREFIX@/share/doc/netctl-gui/"
// links // links
#define HOMEPAGE "http://arcanis.name/projects/netctl-gui/" #define HOMEPAGE "https://arcanis.me/projects/netctl-gui/"
#define REPOSITORY "https://github.com/arcan1s/netctl-gui" #define REPOSITORY "https://github.com/arcan1s/netctl-gui"
#define BUGTRACKER "https://github.com/arcan1s/netctl-gui/issues" #define BUGTRACKER "https://github.com/arcan1s/netctl-gui/issues"
#define TRANSLATION "https://github.com/arcan1s/netctl-gui/issues/3" #define TRANSLATION "https://github.com/arcan1s/netctl-gui/issues/3"