some applet and dataengine fixes

This commit is contained in:
arcan1s
2014-08-12 10:17:18 +04:00
parent f4e3848fa7
commit fddd4703cc
9 changed files with 260 additions and 296 deletions

View File

@ -44,7 +44,6 @@ Netctl::Netctl(QObject *parent, const QVariantList &args)
setMinimumPollingInterval(333); setMinimumPollingInterval(333);
readConfiguration(); readConfiguration();
setKeys();
} }
@ -59,42 +58,32 @@ QStringList Netctl::sources() const
if (debug) qDebug() << "[DE]" << "[sources]"; if (debug) qDebug() << "[DE]" << "[sources]";
QStringList sources; QStringList sources;
sources.append(QString("currentProfile")); sources.append(QString("active"));
sources.append(QString("extIp")); sources.append(QString("current"));
sources.append(QString("extIp6")); sources.append(QString("extip4"));
sources.append(QString("extip6"));
sources.append(QString("interfaces")); sources.append(QString("interfaces"));
sources.append(QString("intIp")); sources.append(QString("intip4"));
sources.append(QString("intIp6")); sources.append(QString("intip6"));
sources.append(QString("netctlAuto")); sources.append(QString("netctlauto"));
sources.append(QString("profiles")); sources.append(QString("profiles"));
sources.append(QString("statusBool")); sources.append(QString("status"));
sources.append(QString("statusString"));
return sources; return sources;
} }
void Netctl::setKeys()
{
if (debug) qDebug() << "[DE]" << "[setKeys]";
QStringList sourcesList = sources();
for (int i=0; i<sourcesList.count(); i++)
setData(sourcesList[i], QString("value"), QString(""));
}
void Netctl::readConfiguration() void Netctl::readConfiguration()
{ {
if (debug) qDebug() << "[DE]" << "[readConfiguration]"; if (debug) qDebug() << "[DE]" << "[readConfiguration]";
// default configuration // default configuration
QMap<QString, QString> rawConfig; QMap<QString, QString> rawConfig;
rawConfig[QString("CMD")] = QString("/usr/bin/netctl"); rawConfig[QString("EXTIP4")] = QString("false");
rawConfig[QString("EXTIP")] = QString("false"); rawConfig[QString("EXTIP4CMD")] = QString("curl ip4.telize.com");
rawConfig[QString("EXTIPCMD")] = QString("curl ip4.telize.com");
rawConfig[QString("EXTIP6")] = QString("false"); rawConfig[QString("EXTIP6")] = QString("false");
rawConfig[QString("EXTIP6CMD")] = QString("curl ip6.telize.com"); rawConfig[QString("EXTIP6CMD")] = QString("curl ip6.telize.com");
rawConfig[QString("NETCTLCMD")] = QString("/usr/bin/netctl");
rawConfig[QString("NETCTLAUTOCMD")] = QString("/usr/bin/netctl-auto"); rawConfig[QString("NETCTLAUTOCMD")] = QString("/usr/bin/netctl-auto");
QString fileName = KGlobal::dirs()->findResource("config", "netctl.conf"); QString fileName = KGlobal::dirs()->findResource("config", "netctl.conf");
@ -137,9 +126,9 @@ QMap<QString, QString> Netctl::updateConfiguration(const QMap<QString, QString>
key = rawConfig.keys()[i]; key = rawConfig.keys()[i];
value = rawConfig[key]; value = rawConfig[key];
key.remove(QChar(' ')); key.remove(QChar(' '));
if ((key != QString("CMD")) && if ((key != QString("EXTIP4CMD")) &&
(key != QString("EXTIPCMD")) &&
(key != QString("EXTIP6CMD")) && (key != QString("EXTIP6CMD")) &&
(key != QString("NETCTLCMD")) &&
(key != QString("NETCTLAUTOCMD"))) (key != QString("NETCTLAUTOCMD")))
value.remove(QChar(' ')); value.remove(QChar(' '));
config[key] = value; config[key] = value;
@ -318,32 +307,32 @@ bool Netctl::updateSourceEvent(const QString &source)
if (debug) qDebug() << "[DE]" << "[updateSourceEvent]" << ":" << "Source name" << source; if (debug) qDebug() << "[DE]" << "[updateSourceEvent]" << ":" << "Source name" << source;
QString value = QString("N\\A"); QString value = QString("N\\A");
if (source == QString("currentProfile")) { if (source == QString("active")) {
value = getCurrentProfile(configuration[QString("CMD")], value = getStatus(configuration[QString("NETCTLCMD")],
configuration[QString("NETCTLAUTOCMD")]); configuration[QString("NETCTLAUTOCMD")]);
} else if (source == QString("extIp")) { } else if (source == QString("current")) {
if (configuration[QString("EXTIP")] == QString("true")) value = getCurrentProfile(configuration[QString("NETCTLCMD")],
value = getExtIp(configuration[QString("EXTIPCMD")]); configuration[QString("NETCTLAUTOCMD")]);
} else if (source == QString("extIp6")) { } else if (source == QString("extip4")) {
if (configuration[QString("EXTIP4")] == QString("true"))
value = getExtIp(configuration[QString("EXTIP4CMD")]);
} else if (source == QString("extip6")) {
if (configuration[QString("EXTIP6")] == QString("true")) if (configuration[QString("EXTIP6")] == QString("true"))
value = getExtIp(configuration[QString("EXTIP6CMD")]); value = getExtIp(configuration[QString("EXTIP6CMD")]);
} else if (source == QString("interfaces")) { } else if (source == QString("interfaces")) {
value = getInterfaceList().join(QChar(',')); value = getInterfaceList().join(QChar(','));
} else if (source == QString("intIp")) { } else if (source == QString("intip4")) {
value = getIntIp(QAbstractSocket::IPv4Protocol); value = getIntIp(QAbstractSocket::IPv4Protocol);
} else if (source == QString("intIp6")) { } else if (source == QString("intip6")) {
value = getIntIp(QAbstractSocket::IPv6Protocol); value = getIntIp(QAbstractSocket::IPv6Protocol);
} else if (source == QString("netctlAuto")) { } else if (source == QString("netctlauto")) {
value = getNetctlAutoStatus(configuration[QString("NETCTLAUTOCMD")]); value = getNetctlAutoStatus(configuration[QString("NETCTLAUTOCMD")]);
} else if (source == QString("profiles")) { } else if (source == QString("profiles")) {
value = getProfileList(configuration[QString("CMD")], value = getProfileList(configuration[QString("NETCTLCMD")],
configuration[QString("NETCTLAUTOCMD")]) configuration[QString("NETCTLAUTOCMD")])
.join(QChar(',')); .join(QChar(','));
} else if (source == QString("statusBool")) { } else if (source == QString("status")) {
value = getStatus(configuration[QString("CMD")], value = getProfileStringStatus(configuration[QString("NETCTLCMD")],
configuration[QString("NETCTLAUTOCMD")]);
} else if (source == QString("statusString")) {
value = getProfileStringStatus(configuration[QString("CMD")],
configuration[QString("NETCTLAUTOCMD")]); configuration[QString("NETCTLAUTOCMD")]);
} }
setData(source, QString("value"), value); setData(source, QString("value"), value);

View File

@ -49,7 +49,6 @@ private:
// configuration // configuration
bool debug; bool debug;
QMap<QString, QString> configuration; QMap<QString, QString> configuration;
void setKeys();
void readConfiguration(); void readConfiguration();
QMap<QString, QString> updateConfiguration(const QMap<QString, QString> rawConfig); QMap<QString, QString> updateConfiguration(const QMap<QString, QString> rawConfig);
}; };

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>480</width> <width>480</width>
<height>335</height> <height>333</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
@ -87,9 +87,9 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="layout_extIp"> <layout class="QHBoxLayout" name="layout_extIp4">
<item> <item>
<widget class="QCheckBox" name="checkBox_extIp"> <widget class="QCheckBox" name="checkBox_extIp4">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>150</width> <width>150</width>
@ -105,10 +105,10 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="lineEdit_extIp"/> <widget class="QLineEdit" name="lineEdit_extIp4"/>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pushButton_extIp"> <widget class="QPushButton" name="pushButton_extIp4">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>100</width> <width>100</width>
@ -176,9 +176,9 @@
<tabstops> <tabstops>
<tabstop>lineEdit_netctl</tabstop> <tabstop>lineEdit_netctl</tabstop>
<tabstop>pushButton_netctl</tabstop> <tabstop>pushButton_netctl</tabstop>
<tabstop>checkBox_extIp</tabstop> <tabstop>checkBox_extIp4</tabstop>
<tabstop>lineEdit_extIp</tabstop> <tabstop>lineEdit_extIp4</tabstop>
<tabstop>pushButton_extIp</tabstop> <tabstop>pushButton_extIp4</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>
<connections/> <connections/>

View File

@ -101,13 +101,14 @@ void Netctl::init()
{ {
if (debug) qDebug() << "[PLASMOID]" << "[init]"; if (debug) qDebug() << "[PLASMOID]" << "[init]";
info[QString("name")] = QString("N\\A"); info[QString("current")] = QString("N\\A");
info[QString("status")] = QString("N\\A"); info[QString("extip4")] = QString("N\\A");
info[QString("intIp")] = QString("N\\A"); info[QString("extip6")] = QString("N\\A");
info[QString("intIp6")] = QString("N\\A");
info[QString("extIp")] = QString("N\\A");
info[QString("extIp6")] = QString("N\\A");
info[QString("interfaces")] = QString("N\\A"); info[QString("interfaces")] = QString("N\\A");
info[QString("intip4")] = QString("N\\A");
info[QString("intip6")] = QString("N\\A");
info[QString("profiles")] = QString("N\\A");
info[QString("status")] = QString("N\\A");
netctlEngine = dataEngine(QString("netctl")); netctlEngine = dataEngine(QString("netctl"));
createActions(); createActions();
@ -132,38 +133,11 @@ QString Netctl::parsePattern(const QString rawLine)
if (debug) qDebug() << "[PLASMOID]" << "[parsePattern]"; if (debug) qDebug() << "[PLASMOID]" << "[parsePattern]";
QString line = rawLine; QString line = rawLine;
if (line.contains(QString("$current"))) { for (int i=0; i<info.keys().count(); i++)
if (debug) qDebug() << "[PLASMOID]" << "[parsePattern]" << "Found $current"; if (line.contains(QString("$") + info.keys()[i]))
line = line.split(QString("$current"))[0] + info[QString("name")] + line.split(QString("$current"))[1]; line = line.split(QString("$") + info.keys()[i])[0] +
} info[info.keys()[i]] +
if (line.contains(QString("$extip4"))) { line.split(QString("$") + info.keys()[i])[1];
if (debug) qDebug() << "[PLASMOID]" << "[parsePattern]" << "Found $extip4";
line = line.split(QString("$extip4"))[0] + info[QString("extIp")] + line.split(QString("$extip4"))[1];
}
if (line.contains(QString("$extip6"))) {
if (debug) qDebug() << "[PLASMOID]" << "[parsePattern]" << "Found $extip6";
line = line.split(QString("$extip6"))[0] + info[QString("extIp6")] + line.split(QString("$extip6"))[1];
}
if (line.contains(QString("$interfaces"))) {
if (debug) qDebug() << "[PLASMOID]" << "[parsePattern]" << "Found $interfaces";
line = line.split(QString("$interfaces"))[0] + info[QString("interfaces")] + line.split(QString("$interfaces"))[1];
}
if (line.contains(QString("$intip4"))) {
if (debug) qDebug() << "[PLASMOID]" << "[parsePattern]" << "Found $intip4";
line = line.split(QString("$intip4"))[0] + info[QString("intIp")] + line.split(QString("$intip4"))[1];
}
if (line.contains(QString("$intip6"))) {
if (debug) qDebug() << "[PLASMOID]" << "[parsePattern]" << "Found $intip6";
line = line.split(QString("$intip6"))[0] + info[QString("intIp6")] + line.split(QString("$intip6"))[1];
}
if (line.contains(QString("$profiles"))) {
if (debug) qDebug() << "[PLASMOID]" << "[parsePattern]" << "Found $profiles";
line = line.split(QString("$profiles"))[0] + profileList.join(QChar(',')) + line.split(QString("$profiles"))[1];
}
if (line.contains(QString("$status"))) {
if (debug) qDebug() << "[PLASMOID]" << "[parsePattern]" << "Found $status";
line = line.split(QString("$status"))[0] + info[QString("status")] + line.split(QString("$status"))[1];
}
return line; return line;
} }
@ -174,11 +148,11 @@ QMap<QString, QString> Netctl::readDataEngineConfiguration()
if (debug) qDebug() << "[PLASMOID]" << "[readDataEngineConfiguration]"; if (debug) qDebug() << "[PLASMOID]" << "[readDataEngineConfiguration]";
QMap<QString, QString> rawConfig; QMap<QString, QString> rawConfig;
rawConfig[QString("CMD")] = QString("/usr/bin/netctl"); rawConfig[QString("EXTIP4")] = QString("false");
rawConfig[QString("EXTIP")] = QString("false"); rawConfig[QString("EXTIP4CMD")] = QString("curl ip4.telize.com");
rawConfig[QString("EXTIPCMD")] = QString("curl ip4.telize.com");
rawConfig[QString("EXTIP6")] = QString("false"); rawConfig[QString("EXTIP6")] = QString("false");
rawConfig[QString("EXTIP6CMD")] = QString("curl ip6.telize.com"); rawConfig[QString("EXTIP6CMD")] = QString("curl ip6.telize.com");
rawConfig[QString("NETCTLCMD")] = QString("/usr/bin/netctl");
rawConfig[QString("NETCTLAUTOCMD")] = QString("/usr/bin/netctl-auto"); rawConfig[QString("NETCTLAUTOCMD")] = QString("/usr/bin/netctl-auto");
QString fileName = KGlobal::dirs()->findResource("config", "netctl.conf"); QString fileName = KGlobal::dirs()->findResource("config", "netctl.conf");
@ -235,9 +209,9 @@ QMap<QString, QString> Netctl::updateDataEngineConfiguration(const QMap<QString,
key = rawConfig.keys()[i]; key = rawConfig.keys()[i];
value = rawConfig[key]; value = rawConfig[key];
key.remove(QChar(' ')); key.remove(QChar(' '));
if ((key != QString("CMD")) && if ((key != QString("EXTIP4CMD")) &&
(key != QString("EXTIPCMD")) &&
(key != QString("EXTIP6CMD")) && (key != QString("EXTIP6CMD")) &&
(key != QString("NETCTLCMD")) &&
(key != QString("NETCTLAUTOCMD"))) (key != QString("NETCTLAUTOCMD")))
value.remove(QChar(' ')); value.remove(QChar(' '));
config[key] = value; config[key] = value;
@ -291,21 +265,21 @@ void Netctl::enableProfileSlot()
QString enableStatus = QString(""); QString enableStatus = QString("");
if (info[QString("status")].contains(QString("enabled"))) { if (info[QString("status")].contains(QString("enabled"))) {
enableStatus = QString(" disable "); enableStatus = QString(" disable ");
sendNotification(QString("Info"), i18n("Set profile %1 disabled", info[QString("name")])); sendNotification(QString("Info"), i18n("Set profile %1 disabled", info[QString("current")]));
} else { } else {
enableStatus = QString(" enable "); enableStatus = QString(" enable ");
sendNotification(QString("Info"), i18n("Set profile %1 enabled", info[QString("name")])); sendNotification(QString("Info"), i18n("Set profile %1 enabled", info[QString("current")]));
} }
if (useHelper) { if (useHelper) {
QList<QVariant> args; QList<QVariant> args;
args.append(info[QString("name")]); args.append(info[QString("current")]);
sendDBusRequest(QString("Enable"), args); sendDBusRequest(QString("Enable"), args);
} else { } else {
QProcess command; QProcess command;
QString commandLine = QString(""); QString commandLine = QString("");
if (useSudo) if (useSudo)
commandLine = paths[QString("sudo")] + QString(" "); commandLine = paths[QString("sudo")] + QString(" ");
commandLine += paths[QString("netctl")] + enableStatus + info[QString("name")]; commandLine += paths[QString("netctl")] + enableStatus + info[QString("current")];
command.startDetached(commandLine); command.startDetached(commandLine);
} }
} }
@ -315,17 +289,17 @@ void Netctl::restartProfileSlot()
{ {
if (debug) qDebug() << "[PLASMOID]" << "[restartProfileSlot]"; if (debug) qDebug() << "[PLASMOID]" << "[restartProfileSlot]";
sendNotification(QString("Info"), i18n("Restart profile %1", info[QString("name")])); sendNotification(QString("Info"), i18n("Restart profile %1", info[QString("current")]));
if (useHelper) { if (useHelper) {
QList<QVariant> args; QList<QVariant> args;
args.append(info[QString("name")]); args.append(info[QString("current")]);
sendDBusRequest(QString("Restart"), args); sendDBusRequest(QString("Restart"), args);
} else { } else {
QProcess command; QProcess command;
QString commandLine = QString(""); QString commandLine = QString("");
if (useSudo) if (useSudo)
commandLine = paths[QString("sudo")] + QString(" "); commandLine = paths[QString("sudo")] + QString(" ");
commandLine += paths[QString("netctl")] + QString(" restart ") + info[QString("name")]; commandLine += paths[QString("netctl")] + QString(" restart ") + info[QString("current")];
command.startDetached(commandLine); command.startDetached(commandLine);
} }
} }
@ -362,17 +336,17 @@ void Netctl::stopProfileSlot()
{ {
if (debug) qDebug() << "[PLASMOID]" << "[stopProfileSlot]"; if (debug) qDebug() << "[PLASMOID]" << "[stopProfileSlot]";
sendNotification(QString("Info"), i18n("Stop profile %1", info[QString("name")])); sendNotification(QString("Info"), i18n("Stop profile %1", info[QString("current")]));
if (useHelper) { if (useHelper) {
QList<QVariant> args; QList<QVariant> args;
args.append(info[QString("name")]); args.append(info[QString("current")]);
sendDBusRequest(QString("Start"), args); sendDBusRequest(QString("Start"), args);
} else { } else {
QProcess command; QProcess command;
QString commandLine = QString(""); QString commandLine = QString("");
if (useSudo) if (useSudo)
commandLine = paths[QString("sudo")] + QString(" "); commandLine = paths[QString("sudo")] + QString(" ");
commandLine += paths[QString("netctl")] + QString(" stop ") + info[QString("name")]; commandLine += paths[QString("netctl")] + QString(" stop ") + info[QString("current")];
command.startDetached(commandLine); command.startDetached(commandLine);
} }
} }
@ -426,7 +400,7 @@ QList<QAction*> Netctl::contextualActions()
contextMenu[QString("title")]->setIcon(QIcon(paths[QString("active")])); contextMenu[QString("title")]->setIcon(QIcon(paths[QString("active")]));
else else
contextMenu[QString("title")]->setIcon(QIcon(paths[QString("inactive")])); contextMenu[QString("title")]->setIcon(QIcon(paths[QString("inactive")]));
contextMenu[QString("title")]->setText(info[QString("name")] + QString(" ") + info[QString("status")]); contextMenu[QString("title")]->setText(info[QString("current")] + QString(" ") + info[QString("status")]);
if (info[QString("status")] == QString("(netctl-auto)")) { if (info[QString("status")] == QString("(netctl-auto)")) {
contextMenu[QString("start")]->setVisible(false); contextMenu[QString("start")]->setVisible(false);
@ -447,12 +421,12 @@ QList<QAction*> Netctl::contextualActions()
contextMenu[QString("enable")]->setVisible(status); contextMenu[QString("enable")]->setVisible(status);
if (status) { if (status) {
contextMenu[QString("start")]->setText(i18n("Start another profile")); contextMenu[QString("start")]->setText(i18n("Start another profile"));
contextMenu[QString("stop")]->setText(i18n("Stop %1", info[QString("name")])); contextMenu[QString("stop")]->setText(i18n("Stop %1", info[QString("current")]));
contextMenu[QString("restart")]->setText(i18n("Restart %1", info[QString("name")])); contextMenu[QString("restart")]->setText(i18n("Restart %1", info[QString("current")]));
if (info[QString("status")].contains(QString("enabled"))) if (info[QString("status")].contains(QString("enabled")))
contextMenu[QString("enable")]->setText(i18n("Disable %1", info[QString("name")])); contextMenu[QString("enable")]->setText(i18n("Disable %1", info[QString("current")]));
else else
contextMenu[QString("enable")]->setText(i18n("Enable %1", info[QString("name")])); contextMenu[QString("enable")]->setText(i18n("Enable %1", info[QString("current")]));
} }
else else
contextMenu[QString("start")]->setText(i18n("Start profile")); contextMenu[QString("start")]->setText(i18n("Start profile"));
@ -563,15 +537,15 @@ void Netctl::connectToEngine()
{ {
if (debug) qDebug() << "[PLASMOID]" << "[connectToEngine]"; if (debug) qDebug() << "[PLASMOID]" << "[connectToEngine]";
netctlEngine->connectSource(QString("currentProfile"), this, autoUpdateInterval); netctlEngine->connectSource(QString("active"), this, autoUpdateInterval);
netctlEngine->connectSource(QString("extIp"), this, autoUpdateInterval); netctlEngine->connectSource(QString("current"), this, autoUpdateInterval);
netctlEngine->connectSource(QString("extIp6"), this, autoUpdateInterval); netctlEngine->connectSource(QString("extip4"), this, autoUpdateInterval);
netctlEngine->connectSource(QString("extip6"), this, autoUpdateInterval);
netctlEngine->connectSource(QString("interfaces"), this, autoUpdateInterval); netctlEngine->connectSource(QString("interfaces"), this, autoUpdateInterval);
netctlEngine->connectSource(QString("intIp"), this, autoUpdateInterval); netctlEngine->connectSource(QString("intip4"), this, autoUpdateInterval);
netctlEngine->connectSource(QString("intIp6"), this, autoUpdateInterval); netctlEngine->connectSource(QString("intip6"), this, autoUpdateInterval);
netctlEngine->connectSource(QString("profiles"), this, autoUpdateInterval); netctlEngine->connectSource(QString("profiles"), this, autoUpdateInterval);
netctlEngine->connectSource(QString("statusBool"), this, autoUpdateInterval); netctlEngine->connectSource(QString("status"), this, autoUpdateInterval);
netctlEngine->connectSource(QString("statusString"), this, autoUpdateInterval);
updateInterface(bigInterface); updateInterface(bigInterface);
} }
@ -581,30 +555,14 @@ void Netctl::dataUpdated(const QString &sourceName, const Plasma::DataEngine::Da
if (debug) qDebug() << "[PLASMOID]" << "[dataUpdated]"; if (debug) qDebug() << "[PLASMOID]" << "[dataUpdated]";
if (debug) qDebug() << "[PLASMOID]" << "[dataUpdated]" << ":" << "Source" << sourceName; if (debug) qDebug() << "[PLASMOID]" << "[dataUpdated]" << ":" << "Source" << sourceName;
if (isIconified()) return; if (isPopupShowing()) return;
if (isUserConfiguring()) return;
if (data.isEmpty()) return; if (data.isEmpty()) return;
QString value = data[QString("value")].toString(); QString value = data[QString("value")].toString();
if (value.isEmpty()) if (value.isEmpty())
value = QString("N\\A"); value = QString("N\\A");
if (sourceName == QString("currentProfile")) { if (sourceName == QString("active")) {
info[QString("name")] = value;
// update text
if (bigInterface)
textLabel->setText(formatLine[0] + parsePattern(textPattern) + formatLine[1]);
} else if (sourceName == QString("extIp")) {
info[QString("extIp")] = value;
} else if (sourceName == QString("extIp6")) {
info[QString("extIp6")] = value;
} else if (sourceName == QString("interfaces")) {
info[QString("interfaces")] = value;
} else if (sourceName == QString("intIp")) {
info[QString("intIp")] = value;
} else if (sourceName == QString("intIp6")) {
info[QString("intIp6")] = value;
} else if (sourceName == QString("profiles")) {
profileList = value.split(QChar(','));
} else if (sourceName == QString("statusBool")) {
if (value == QString("true")) { if (value == QString("true")) {
if (!status) if (!status)
sendNotification(QString("Info"), i18n("Network is up")); sendNotification(QString("Info"), i18n("Network is up"));
@ -615,7 +573,25 @@ void Netctl::dataUpdated(const QString &sourceName, const Plasma::DataEngine::Da
status = false; status = false;
} }
updateIcon(); updateIcon();
} else if (sourceName == QString("statusString")) { } else if (sourceName == QString("current")) {
info[QString("current")] = value;
// update text
if (bigInterface)
textLabel->setText(formatLine[0] + parsePattern(textPattern) + formatLine[1]);
} else if (sourceName == QString("extip4")) {
info[QString("extip4")] = value;
} else if (sourceName == QString("extip6")) {
info[QString("extip6")] = value;
} else if (sourceName == QString("interfaces")) {
info[QString("interfaces")] = value;
} else if (sourceName == QString("intip4")) {
info[QString("intip4")] = value;
} else if (sourceName == QString("intip6")) {
info[QString("intip6")] = value;
} else if (sourceName == QString("profiles")) {
profileList = value.split(QChar(','));
info[QString("profiles")] = profileList.join(QChar(','));
} else if (sourceName == QString("status")) {
info[QString("status")] = QString("(") + value + QString(")"); info[QString("status")] = QString("(") + value + QString(")");
} }
@ -628,10 +604,10 @@ void Netctl::disconnectFromEngine()
if (debug) qDebug() << "[PLASMOID]" << "[disconnectFromEngine]"; if (debug) qDebug() << "[PLASMOID]" << "[disconnectFromEngine]";
netctlEngine->disconnectSource(QString("currentProfile"), this); netctlEngine->disconnectSource(QString("currentProfile"), this);
netctlEngine->disconnectSource(QString("extIp"), this); netctlEngine->disconnectSource(QString("extIp4"), this);
netctlEngine->disconnectSource(QString("extIp6"), this); netctlEngine->disconnectSource(QString("extIp6"), this);
netctlEngine->disconnectSource(QString("interfaces"), this); netctlEngine->disconnectSource(QString("interfaces"), this);
netctlEngine->disconnectSource(QString("intIp"), this); netctlEngine->disconnectSource(QString("intIp4"), this);
netctlEngine->disconnectSource(QString("intIp6"), this); netctlEngine->disconnectSource(QString("intIp6"), this);
netctlEngine->disconnectSource(QString("profiles"), this); netctlEngine->disconnectSource(QString("profiles"), this);
netctlEngine->disconnectSource(QString("statusBool"), this); netctlEngine->disconnectSource(QString("statusBool"), this);
@ -686,8 +662,8 @@ void Netctl::selectAbstractSomething()
lineEdit = uiWidConfig.lineEdit_sudo; lineEdit = uiWidConfig.lineEdit_sudo;
else if (sender() == uiWidConfig.pushButton_wifi) else if (sender() == uiWidConfig.pushButton_wifi)
lineEdit = uiWidConfig.lineEdit_wifi; lineEdit = uiWidConfig.lineEdit_wifi;
else if (sender() == uiDEConfig.pushButton_extIp) else if (sender() == uiDEConfig.pushButton_extIp4)
lineEdit = uiDEConfig.lineEdit_extIp; lineEdit = uiDEConfig.lineEdit_extIp4;
else if (sender() == uiDEConfig.pushButton_extIp6) else if (sender() == uiDEConfig.pushButton_extIp6)
lineEdit = uiDEConfig.lineEdit_extIp6; lineEdit = uiDEConfig.lineEdit_extIp6;
else if (sender() == uiDEConfig.pushButton_netctl) else if (sender() == uiDEConfig.pushButton_netctl)
@ -761,14 +737,14 @@ void Netctl::createConfigurationInterface(KConfigDialog *parent)
uiAppConfig.lineEdit_inactiveIcon->setText(paths[QString("inactive")]); uiAppConfig.lineEdit_inactiveIcon->setText(paths[QString("inactive")]);
QMap<QString, QString> deSettings = readDataEngineConfiguration(); QMap<QString, QString> deSettings = readDataEngineConfiguration();
uiDEConfig.lineEdit_netctl->setText(deSettings[QString("CMD")]); uiDEConfig.lineEdit_netctl->setText(deSettings[QString("NETCTLCMD")]);
uiDEConfig.lineEdit_netctlAuto->setText(deSettings[QString("NETCTLAUTOCMD")]); uiDEConfig.lineEdit_netctlAuto->setText(deSettings[QString("NETCTLAUTOCMD")]);
if (deSettings[QString("EXTIP")] == QString("true")) if (deSettings[QString("EXTIP4")] == QString("true"))
uiDEConfig.checkBox_extIp->setCheckState(Qt::Checked); uiDEConfig.checkBox_extIp4->setCheckState(Qt::Checked);
else else
uiDEConfig.checkBox_extIp->setCheckState(Qt::Unchecked); uiDEConfig.checkBox_extIp4->setCheckState(Qt::Unchecked);
uiDEConfig.lineEdit_extIp->setText(deSettings[QString("EXTIPCMD")]); uiDEConfig.lineEdit_extIp4->setText(deSettings[QString("EXTIP4CMD")]);
setDataEngineExternalIp(); setDataEngineExternalIp4();
if (deSettings[QString("EXTIP6")] == QString("true")) if (deSettings[QString("EXTIP6")] == QString("true"))
uiDEConfig.checkBox_extIp6->setCheckState(Qt::Checked); uiDEConfig.checkBox_extIp6->setCheckState(Qt::Checked);
else else
@ -806,7 +782,7 @@ void Netctl::createConfigurationInterface(KConfigDialog *parent)
SLOT(setBigInterface())); SLOT(setBigInterface()));
connect(uiWidConfig.checkBox_sudo, SIGNAL(stateChanged(int)), this, SLOT(setSudo())); connect(uiWidConfig.checkBox_sudo, SIGNAL(stateChanged(int)), this, SLOT(setSudo()));
connect(uiWidConfig.checkBox_wifi, SIGNAL(stateChanged(int)), this, SLOT(setWifi())); connect(uiWidConfig.checkBox_wifi, SIGNAL(stateChanged(int)), this, SLOT(setWifi()));
connect(uiDEConfig.checkBox_extIp, SIGNAL(stateChanged(int)), this, SLOT(setDataEngineExternalIp())); connect(uiDEConfig.checkBox_extIp4, SIGNAL(stateChanged(int)), this, SLOT(setDataEngineExternalIp4()));
connect(uiDEConfig.checkBox_extIp6, SIGNAL(stateChanged(int)), this, SLOT(setDataEngineExternalIp6())); connect(uiDEConfig.checkBox_extIp6, SIGNAL(stateChanged(int)), this, SLOT(setDataEngineExternalIp6()));
connect(uiWidConfig.pushButton_gui, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); connect(uiWidConfig.pushButton_gui, SIGNAL(clicked()), this, SLOT(selectAbstractSomething()));
@ -817,7 +793,7 @@ void Netctl::createConfigurationInterface(KConfigDialog *parent)
connect(uiWidConfig.pushButton_wifi, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); connect(uiWidConfig.pushButton_wifi, SIGNAL(clicked()), this, SLOT(selectAbstractSomething()));
connect(uiAppConfig.pushButton_activeIcon, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); connect(uiAppConfig.pushButton_activeIcon, SIGNAL(clicked()), this, SLOT(selectAbstractSomething()));
connect(uiAppConfig.pushButton_inactiveIcon, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); connect(uiAppConfig.pushButton_inactiveIcon, SIGNAL(clicked()), this, SLOT(selectAbstractSomething()));
connect(uiDEConfig.pushButton_extIp, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); connect(uiDEConfig.pushButton_extIp4, SIGNAL(clicked()), this, SLOT(selectAbstractSomething()));
connect(uiDEConfig.pushButton_extIp6, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); connect(uiDEConfig.pushButton_extIp6, SIGNAL(clicked()), this, SLOT(selectAbstractSomething()));
connect(uiDEConfig.pushButton_netctl, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); connect(uiDEConfig.pushButton_netctl, SIGNAL(clicked()), this, SLOT(selectAbstractSomething()));
connect(uiDEConfig.pushButton_netctlAuto, SIGNAL(clicked()), this, SLOT(selectAbstractSomething())); connect(uiDEConfig.pushButton_netctlAuto, SIGNAL(clicked()), this, SLOT(selectAbstractSomething()));
@ -871,13 +847,13 @@ void Netctl::configAccepted()
cg.writeEntry("inactiveIconPath", uiAppConfig.lineEdit_inactiveIcon->text()); cg.writeEntry("inactiveIconPath", uiAppConfig.lineEdit_inactiveIcon->text());
QMap<QString, QString> deSettings; QMap<QString, QString> deSettings;
deSettings[QString("CMD")] = uiDEConfig.lineEdit_netctl->text(); deSettings[QString("NETCTLCMD")] = uiDEConfig.lineEdit_netctl->text();
deSettings[QString("NETCTLAUTOCMD")] = uiDEConfig.lineEdit_netctlAuto->text(); deSettings[QString("NETCTLAUTOCMD")] = uiDEConfig.lineEdit_netctlAuto->text();
if (uiDEConfig.checkBox_extIp->checkState() == 0) if (uiDEConfig.checkBox_extIp4->checkState() == 0)
deSettings[QString("EXTIP")] = QString("false"); deSettings[QString("EXTIP4")] = QString("false");
else else
deSettings[QString("EXTIP")] = QString("true"); deSettings[QString("EXTIP4")] = QString("true");
deSettings[QString("EXTIPCMD")] = uiDEConfig.lineEdit_extIp->text(); deSettings[QString("EXTIP4CMD")] = uiDEConfig.lineEdit_extIp4->text();
if (uiDEConfig.checkBox_extIp6->checkState() == 0) if (uiDEConfig.checkBox_extIp6->checkState() == 0)
deSettings[QString("EXTIP6")] = QString("false"); deSettings[QString("EXTIP6")] = QString("false");
else else
@ -946,16 +922,16 @@ void Netctl::setBigInterface()
} }
void Netctl::setDataEngineExternalIp() void Netctl::setDataEngineExternalIp4()
{ {
if (debug) qDebug() << "[PLASMOID]" << "[setDataEngineExternalIp]"; if (debug) qDebug() << "[PLASMOID]" << "[setDataEngineExternalIp4]";
if (uiDEConfig.checkBox_extIp->checkState() == 0) { if (uiDEConfig.checkBox_extIp4->checkState() == 0) {
uiDEConfig.lineEdit_extIp->setDisabled(true); uiDEConfig.lineEdit_extIp4->setDisabled(true);
uiDEConfig.pushButton_extIp->setDisabled(true); uiDEConfig.pushButton_extIp4->setDisabled(true);
} else if (uiDEConfig.checkBox_extIp->checkState() == 2) { } else if (uiDEConfig.checkBox_extIp4->checkState() == 2) {
uiDEConfig.lineEdit_extIp->setEnabled(true); uiDEConfig.lineEdit_extIp4->setEnabled(true);
uiDEConfig.pushButton_extIp->setEnabled(true); uiDEConfig.pushButton_extIp4->setEnabled(true);
} }
} }

View File

@ -70,7 +70,7 @@ public slots:
void configAccepted(); void configAccepted();
void configChanged(); void configChanged();
void setBigInterface(); void setBigInterface();
void setDataEngineExternalIp(); void setDataEngineExternalIp4();
void setDataEngineExternalIp6(); void setDataEngineExternalIp6();
void setHelper(); void setHelper();
void setSudo(); void setSudo();

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: http://kde-look.org/content/show.php?content=98925\n" "Report-Msgid-Bugs-To: http://kde-look.org/content/show.php?content=98925\n"
"POT-Creation-Date: 2014-08-12 00:24+0400\n" "POT-Creation-Date: 2014-08-12 10:06+0400\n"
"PO-Revision-Date: 2014-08-10 22:32+0400\n" "PO-Revision-Date: 2014-08-12 10:06+0400\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n" "Language-Team: Russian <kde-russian@lists.kde.ru>\n"
"Language: ru\n" "Language: ru\n"
@ -18,95 +18,95 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n" "X-Generator: Lokalize 1.5\n"
#: netctl.cpp:294 #: netctl.cpp:268
msgid "Set profile %1 disabled" msgid "Set profile %1 disabled"
msgstr "Set profile %1 disabled" msgstr "Set profile %1 disabled"
#: netctl.cpp:297 #: netctl.cpp:271
msgid "Set profile %1 enabled" msgid "Set profile %1 enabled"
msgstr "Set profile %1 enabled" msgstr "Set profile %1 enabled"
#: netctl.cpp:318 #: netctl.cpp:292
msgid "Restart profile %1" msgid "Restart profile %1"
msgstr "Restart profile %1" msgstr "Restart profile %1"
#: netctl.cpp:339 #: netctl.cpp:313
msgid "Start profile %1" msgid "Start profile %1"
msgstr "Start profile %1" msgstr "Start profile %1"
#: netctl.cpp:365 #: netctl.cpp:339
msgid "Stop profile %1" msgid "Stop profile %1"
msgstr "Stop profile %1" msgstr "Stop profile %1"
#: netctl.cpp:387 #: netctl.cpp:361
msgid "Switch to profile %1" msgid "Switch to profile %1"
msgstr "Switch to profile %1" msgstr "Switch to profile %1"
#: netctl.cpp:449 #: netctl.cpp:423
msgid "Start another profile" msgid "Start another profile"
msgstr "Start another profile" msgstr "Start another profile"
#: netctl.cpp:450 #: netctl.cpp:424
msgid "Stop %1" msgid "Stop %1"
msgstr "Stop %1" msgstr "Stop %1"
#: netctl.cpp:451 #: netctl.cpp:425
msgid "Restart %1" msgid "Restart %1"
msgstr "Restart %1" msgstr "Restart %1"
#: netctl.cpp:453 #: netctl.cpp:427
msgid "Disable %1" msgid "Disable %1"
msgstr "Disable %1" msgstr "Disable %1"
#: netctl.cpp:455 #: netctl.cpp:429
msgid "Enable %1" msgid "Enable %1"
msgstr "Enable %1" msgstr "Enable %1"
#: netctl.cpp:458 netctl.cpp:481 #: netctl.cpp:432 netctl.cpp:455
msgid "Start profile" msgid "Start profile"
msgstr "Start profile" msgstr "Start profile"
#: netctl.cpp:489 #: netctl.cpp:463
msgid "Stop profile" msgid "Stop profile"
msgstr "Stop profile" msgstr "Stop profile"
#: netctl.cpp:494 #: netctl.cpp:468
msgid "Switch to profile" msgid "Switch to profile"
msgstr "Switch to profile" msgstr "Switch to profile"
#: netctl.cpp:502 #: netctl.cpp:476
msgid "Restart profile" msgid "Restart profile"
msgstr "Restart profile" msgstr "Restart profile"
#: netctl.cpp:507 #: netctl.cpp:481
msgid "Enable profile" msgid "Enable profile"
msgstr "Enable profile" msgstr "Enable profile"
#: netctl.cpp:511 #: netctl.cpp:485
msgid "Show netctl-gui" msgid "Show netctl-gui"
msgstr "Show netctl-gui" msgstr "Show netctl-gui"
#: netctl.cpp:516 #: netctl.cpp:490
msgid "Show WiFi menu" msgid "Show WiFi menu"
msgstr "Show WiFi menu" msgstr "Show WiFi menu"
#: netctl.cpp:543 #: netctl.cpp:517
msgid "Start GUI" msgid "Start GUI"
msgstr "Start GUI" msgstr "Start GUI"
#: netctl.cpp:554 #: netctl.cpp:528
msgid "Start WiFi menu" msgid "Start WiFi menu"
msgstr "Start WiFi menu" msgstr "Start WiFi menu"
#: netctl.cpp:610 #: netctl.cpp:567
msgid "Network is up" msgid "Network is up"
msgstr "Network is up" msgstr "Network is up"
#: netctl.cpp:614 #: netctl.cpp:571
msgid "Network is down" msgid "Network is down"
msgstr "Network is down" msgstr "Network is down"
#: netctl.cpp:786 #: netctl.cpp:761
msgid "" msgid ""
"Version %1\n" "Version %1\n"
"(build date %2)" "(build date %2)"
@ -114,59 +114,59 @@ msgstr ""
"Version %1\n" "Version %1\n"
"(build date %2)" "(build date %2)"
#: netctl.cpp:787 #: netctl.cpp:762
msgid "KDE widget which interacts with netctl." msgid "KDE widget which interacts with netctl."
msgstr "KDE widget which interacts with netctl." msgstr "KDE widget which interacts with netctl."
#: netctl.cpp:788 #: netctl.cpp:763
msgid "Translators: %1" msgid "Translators: %1"
msgstr "Translators: %1" msgstr "Translators: %1"
#: netctl.cpp:789 #: netctl.cpp:764
msgid "Links:" msgid "Links:"
msgstr "Links:" msgstr "Links:"
#: netctl.cpp:790 #: netctl.cpp:765
msgid "Homepage" msgid "Homepage"
msgstr "Homepage" msgstr "Homepage"
#: netctl.cpp:791 #: netctl.cpp:766
msgid "Repository" msgid "Repository"
msgstr "Repository" msgstr "Repository"
#: netctl.cpp:792 #: netctl.cpp:767
msgid "Bugtracker" msgid "Bugtracker"
msgstr "Bugtracker" msgstr "Bugtracker"
#: netctl.cpp:793 #: netctl.cpp:768
msgid "Translation issue" msgid "Translation issue"
msgstr "Translation issue" msgstr "Translation issue"
#: netctl.cpp:794 #: netctl.cpp:769
msgid "AUR packages" msgid "AUR packages"
msgstr "AUR packages" msgstr "AUR packages"
#: netctl.cpp:796 #: netctl.cpp:771
msgid "This software is licensed under %1" msgid "This software is licensed under %1"
msgstr "This software is licensed under %1" msgstr "This software is licensed under %1"
#: netctl.cpp:797 #: netctl.cpp:772
msgid "This software uses: %1" msgid "This software uses: %1"
msgstr "This software uses: %1" msgstr "This software uses: %1"
#: netctl.cpp:799 #: netctl.cpp:774
msgid "Netctl plasmoid" msgid "Netctl plasmoid"
msgstr "Netctl plasmoid" msgstr "Netctl plasmoid"
#: netctl.cpp:800 #: netctl.cpp:775
msgid "Appearance" msgid "Appearance"
msgstr "Appearance" msgstr "Appearance"
#: netctl.cpp:801 #: netctl.cpp:776
msgid "DataEngine" msgid "DataEngine"
msgstr "DataEngine" msgstr "DataEngine"
#: netctl.cpp:802 #: netctl.cpp:777
msgid "About" msgid "About"
msgstr "About" msgstr "About"
@ -185,7 +185,7 @@ msgstr "Inactive icon"
#. i18n: file: dataengine.ui:83 #. i18n: file: dataengine.ui:83
#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) #. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto)
#. i18n: file: dataengine.ui:119 #. i18n: file: dataengine.ui:119
#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp) #. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4)
#. i18n: file: dataengine.ui:155 #. i18n: file: dataengine.ui:155
#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) #. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6)
#. i18n: file: widget.ui:108 #. i18n: file: widget.ui:108
@ -209,7 +209,7 @@ msgstr "Inactive icon"
#. i18n: file: dataengine.ui:83 #. i18n: file: dataengine.ui:83
#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) #. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto)
#. i18n: file: dataengine.ui:119 #. i18n: file: dataengine.ui:119
#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp) #. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4)
#. i18n: file: dataengine.ui:155 #. i18n: file: dataengine.ui:155
#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) #. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6)
#. i18n: file: widget.ui:108 #. i18n: file: widget.ui:108
@ -335,7 +335,7 @@ msgid "Path to netctl-auto"
msgstr "Path to netctl-auto" msgstr "Path to netctl-auto"
#. i18n: file: dataengine.ui:100 #. i18n: file: dataengine.ui:100
#. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp) #. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp4)
#: po/rc.cpp:63 rc.cpp:63 #: po/rc.cpp:63 rc.cpp:63
msgid "Check external IPv4" msgid "Check external IPv4"
msgstr "Check external IPv4" msgstr "Check external IPv4"
@ -387,19 +387,19 @@ msgstr "Show more detailed interface"
#: po/rc.cpp:117 rc.cpp:117 #: po/rc.cpp:117 rc.cpp:117
msgid "" msgid ""
"$current - current profile name\n" "$current - current profile name\n"
"$extip - external IPv4\n" "$extip4 - external IPv4\n"
"$extip6 - external IPv6\n" "$extip6 - external IPv6\n"
"$interfaces - list of the network interfaces\n" "$interfaces - list of the network interfaces\n"
"$intip - internal IPv4\n" "$intip4 - internal IPv4\n"
"$intip6 - internal IPv6\n" "$intip6 - internal IPv6\n"
"$profiles - list of the netctl profiles\n" "$profiles - list of the netctl profiles\n"
"$status - current profile status (static/enabled)" "$status - current profile status (static/enabled)"
msgstr "" msgstr ""
"$current - current profile name\n" "$current - current profile name\n"
"$extip - external IPv4\n" "$extip4 - external IPv4\n"
"$extip6 - external IPv6\n" "$extip6 - external IPv6\n"
"$interfaces - list of the network interfaces\n" "$interfaces - list of the network interfaces\n"
"$intip - internal IPv4\n" "$intip4 - internal IPv4\n"
"$intip6 - internal IPv6\n" "$intip6 - internal IPv6\n"
"$profiles - list of the netctl profiles\n" "$profiles - list of the netctl profiles\n"
"$status - current profile status (static/enabled)" "$status - current profile status (static/enabled)"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: http://kde-look.org/content/show.php?content=98925\n" "Report-Msgid-Bugs-To: http://kde-look.org/content/show.php?content=98925\n"
"POT-Creation-Date: 2014-08-12 00:24+0400\n" "POT-Creation-Date: 2014-08-12 10:06+0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,153 +17,153 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: netctl.cpp:294 #: netctl.cpp:268
msgid "Set profile %1 disabled" msgid "Set profile %1 disabled"
msgstr "" msgstr ""
#: netctl.cpp:297 #: netctl.cpp:271
msgid "Set profile %1 enabled" msgid "Set profile %1 enabled"
msgstr "" msgstr ""
#: netctl.cpp:318 #: netctl.cpp:292
msgid "Restart profile %1" msgid "Restart profile %1"
msgstr "" msgstr ""
#: netctl.cpp:339 #: netctl.cpp:313
msgid "Start profile %1" msgid "Start profile %1"
msgstr "" msgstr ""
#: netctl.cpp:365 #: netctl.cpp:339
msgid "Stop profile %1" msgid "Stop profile %1"
msgstr "" msgstr ""
#: netctl.cpp:387 #: netctl.cpp:361
msgid "Switch to profile %1" msgid "Switch to profile %1"
msgstr "" msgstr ""
#: netctl.cpp:449 #: netctl.cpp:423
msgid "Start another profile" msgid "Start another profile"
msgstr "" msgstr ""
#: netctl.cpp:450 #: netctl.cpp:424
msgid "Stop %1" msgid "Stop %1"
msgstr "" msgstr ""
#: netctl.cpp:451 #: netctl.cpp:425
msgid "Restart %1" msgid "Restart %1"
msgstr "" msgstr ""
#: netctl.cpp:453 #: netctl.cpp:427
msgid "Disable %1" msgid "Disable %1"
msgstr "" msgstr ""
#: netctl.cpp:455 #: netctl.cpp:429
msgid "Enable %1" msgid "Enable %1"
msgstr "" msgstr ""
#: netctl.cpp:458 netctl.cpp:481 #: netctl.cpp:432 netctl.cpp:455
msgid "Start profile" msgid "Start profile"
msgstr "" msgstr ""
#: netctl.cpp:489 #: netctl.cpp:463
msgid "Stop profile" msgid "Stop profile"
msgstr "" msgstr ""
#: netctl.cpp:494 #: netctl.cpp:468
msgid "Switch to profile" msgid "Switch to profile"
msgstr "" msgstr ""
#: netctl.cpp:502 #: netctl.cpp:476
msgid "Restart profile" msgid "Restart profile"
msgstr "" msgstr ""
#: netctl.cpp:507 #: netctl.cpp:481
msgid "Enable profile" msgid "Enable profile"
msgstr "" msgstr ""
#: netctl.cpp:511 #: netctl.cpp:485
msgid "Show netctl-gui" msgid "Show netctl-gui"
msgstr "" msgstr ""
#: netctl.cpp:516 #: netctl.cpp:490
msgid "Show WiFi menu" msgid "Show WiFi menu"
msgstr "" msgstr ""
#: netctl.cpp:543 #: netctl.cpp:517
msgid "Start GUI" msgid "Start GUI"
msgstr "" msgstr ""
#: netctl.cpp:554 #: netctl.cpp:528
msgid "Start WiFi menu" msgid "Start WiFi menu"
msgstr "" msgstr ""
#: netctl.cpp:610 #: netctl.cpp:567
msgid "Network is up" msgid "Network is up"
msgstr "" msgstr ""
#: netctl.cpp:614 #: netctl.cpp:571
msgid "Network is down" msgid "Network is down"
msgstr "" msgstr ""
#: netctl.cpp:786 #: netctl.cpp:761
msgid "" msgid ""
"Version %1\n" "Version %1\n"
"(build date %2)" "(build date %2)"
msgstr "" msgstr ""
#: netctl.cpp:787 #: netctl.cpp:762
msgid "KDE widget which interacts with netctl." msgid "KDE widget which interacts with netctl."
msgstr "" msgstr ""
#: netctl.cpp:788 #: netctl.cpp:763
msgid "Translators: %1" msgid "Translators: %1"
msgstr "" msgstr ""
#: netctl.cpp:789 #: netctl.cpp:764
msgid "Links:" msgid "Links:"
msgstr "" msgstr ""
#: netctl.cpp:790 #: netctl.cpp:765
msgid "Homepage" msgid "Homepage"
msgstr "" msgstr ""
#: netctl.cpp:791 #: netctl.cpp:766
msgid "Repository" msgid "Repository"
msgstr "" msgstr ""
#: netctl.cpp:792 #: netctl.cpp:767
msgid "Bugtracker" msgid "Bugtracker"
msgstr "" msgstr ""
#: netctl.cpp:793 #: netctl.cpp:768
msgid "Translation issue" msgid "Translation issue"
msgstr "" msgstr ""
#: netctl.cpp:794 #: netctl.cpp:769
msgid "AUR packages" msgid "AUR packages"
msgstr "" msgstr ""
#: netctl.cpp:796 #: netctl.cpp:771
msgid "This software is licensed under %1" msgid "This software is licensed under %1"
msgstr "" msgstr ""
#: netctl.cpp:797 #: netctl.cpp:772
msgid "This software uses: %1" msgid "This software uses: %1"
msgstr "" msgstr ""
#: netctl.cpp:799 #: netctl.cpp:774
msgid "Netctl plasmoid" msgid "Netctl plasmoid"
msgstr "" msgstr ""
#: netctl.cpp:800 #: netctl.cpp:775
msgid "Appearance" msgid "Appearance"
msgstr "" msgstr ""
#: netctl.cpp:801 #: netctl.cpp:776
msgid "DataEngine" msgid "DataEngine"
msgstr "" msgstr ""
#: netctl.cpp:802 #: netctl.cpp:777
msgid "About" msgid "About"
msgstr "" msgstr ""
@ -182,7 +182,7 @@ msgstr ""
#. i18n: file: dataengine.ui:83 #. i18n: file: dataengine.ui:83
#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) #. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto)
#. i18n: file: dataengine.ui:119 #. i18n: file: dataengine.ui:119
#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp) #. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4)
#. i18n: file: dataengine.ui:155 #. i18n: file: dataengine.ui:155
#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) #. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6)
#. i18n: file: widget.ui:108 #. i18n: file: widget.ui:108
@ -206,7 +206,7 @@ msgstr ""
#. i18n: file: dataengine.ui:83 #. i18n: file: dataengine.ui:83
#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) #. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto)
#. i18n: file: dataengine.ui:119 #. i18n: file: dataengine.ui:119
#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp) #. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4)
#. i18n: file: dataengine.ui:155 #. i18n: file: dataengine.ui:155
#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) #. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6)
#. i18n: file: widget.ui:108 #. i18n: file: widget.ui:108
@ -332,7 +332,7 @@ msgid "Path to netctl-auto"
msgstr "" msgstr ""
#. i18n: file: dataengine.ui:100 #. i18n: file: dataengine.ui:100
#. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp) #. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp4)
#: po/rc.cpp:63 rc.cpp:63 #: po/rc.cpp:63 rc.cpp:63
msgid "Check external IPv4" msgid "Check external IPv4"
msgstr "" msgstr ""
@ -384,10 +384,10 @@ msgstr ""
#: po/rc.cpp:117 rc.cpp:117 #: po/rc.cpp:117 rc.cpp:117
msgid "" msgid ""
"$current - current profile name\n" "$current - current profile name\n"
"$extip - external IPv4\n" "$extip4 - external IPv4\n"
"$extip6 - external IPv6\n" "$extip6 - external IPv6\n"
"$interfaces - list of the network interfaces\n" "$interfaces - list of the network interfaces\n"
"$intip - internal IPv4\n" "$intip4 - internal IPv4\n"
"$intip6 - internal IPv6\n" "$intip6 - internal IPv6\n"
"$profiles - list of the netctl profiles\n" "$profiles - list of the netctl profiles\n"
"$status - current profile status (static/enabled)" "$status - current profile status (static/enabled)"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: http://kde-look.org/content/show.php?content=98925\n" "Report-Msgid-Bugs-To: http://kde-look.org/content/show.php?content=98925\n"
"POT-Creation-Date: 2014-08-12 00:24+0400\n" "POT-Creation-Date: 2014-08-12 10:06+0400\n"
"PO-Revision-Date: 2014-08-10 22:33+0400\n" "PO-Revision-Date: 2014-08-12 10:06+0400\n"
"Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n" "Last-Translator: Evgeniy Alekseev <esalexeev@gmail.com>\n"
"Language-Team: Russian <kde-russian@lists.kde.ru>\n" "Language-Team: Russian <kde-russian@lists.kde.ru>\n"
"Language: ru\n" "Language: ru\n"
@ -18,95 +18,95 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n" "X-Generator: Lokalize 1.5\n"
#: netctl.cpp:294 #: netctl.cpp:268
msgid "Set profile %1 disabled" msgid "Set profile %1 disabled"
msgstr "Выключение автозагрузки профиля %1" msgstr "Выключение автозагрузки профиля %1"
#: netctl.cpp:297 #: netctl.cpp:271
msgid "Set profile %1 enabled" msgid "Set profile %1 enabled"
msgstr "Включение автозагрузки профиля %1" msgstr "Включение автозагрузки профиля %1"
#: netctl.cpp:318 #: netctl.cpp:292
msgid "Restart profile %1" msgid "Restart profile %1"
msgstr "Перезапуск профиля %1" msgstr "Перезапуск профиля %1"
#: netctl.cpp:339 #: netctl.cpp:313
msgid "Start profile %1" msgid "Start profile %1"
msgstr "Запуск профиля %1" msgstr "Запуск профиля %1"
#: netctl.cpp:365 #: netctl.cpp:339
msgid "Stop profile %1" msgid "Stop profile %1"
msgstr "Остановка профиля %1" msgstr "Остановка профиля %1"
#: netctl.cpp:387 #: netctl.cpp:361
msgid "Switch to profile %1" msgid "Switch to profile %1"
msgstr "Переключение на профиль %1" msgstr "Переключение на профиль %1"
#: netctl.cpp:449 #: netctl.cpp:423
msgid "Start another profile" msgid "Start another profile"
msgstr "Запустить другой профиль" msgstr "Запустить другой профиль"
#: netctl.cpp:450 #: netctl.cpp:424
msgid "Stop %1" msgid "Stop %1"
msgstr "Остановить %1" msgstr "Остановить %1"
#: netctl.cpp:451 #: netctl.cpp:425
msgid "Restart %1" msgid "Restart %1"
msgstr "Перезапустить %1" msgstr "Перезапустить %1"
#: netctl.cpp:453 #: netctl.cpp:427
msgid "Disable %1" msgid "Disable %1"
msgstr "Отключить %1" msgstr "Отключить %1"
#: netctl.cpp:455 #: netctl.cpp:429
msgid "Enable %1" msgid "Enable %1"
msgstr "Включить %1" msgstr "Включить %1"
#: netctl.cpp:458 netctl.cpp:481 #: netctl.cpp:432 netctl.cpp:455
msgid "Start profile" msgid "Start profile"
msgstr "Запустить профиль" msgstr "Запустить профиль"
#: netctl.cpp:489 #: netctl.cpp:463
msgid "Stop profile" msgid "Stop profile"
msgstr "Остановить профиль" msgstr "Остановить профиль"
#: netctl.cpp:494 #: netctl.cpp:468
msgid "Switch to profile" msgid "Switch to profile"
msgstr "Переключить профиль" msgstr "Переключить профиль"
#: netctl.cpp:502 #: netctl.cpp:476
msgid "Restart profile" msgid "Restart profile"
msgstr "Перезапустить профиль" msgstr "Перезапустить профиль"
#: netctl.cpp:507 #: netctl.cpp:481
msgid "Enable profile" msgid "Enable profile"
msgstr "Включить профиль" msgstr "Включить профиль"
#: netctl.cpp:511 #: netctl.cpp:485
msgid "Show netctl-gui" msgid "Show netctl-gui"
msgstr "Показать netctl-gui" msgstr "Показать netctl-gui"
#: netctl.cpp:516 #: netctl.cpp:490
msgid "Show WiFi menu" msgid "Show WiFi menu"
msgstr "Запустить WiFi-menu" msgstr "Запустить WiFi-menu"
#: netctl.cpp:543 #: netctl.cpp:517
msgid "Start GUI" msgid "Start GUI"
msgstr "Запуск GUI" msgstr "Запуск GUI"
#: netctl.cpp:554 #: netctl.cpp:528
msgid "Start WiFi menu" msgid "Start WiFi menu"
msgstr "Запуск WiFi-menu" msgstr "Запуск WiFi-menu"
#: netctl.cpp:610 #: netctl.cpp:567
msgid "Network is up" msgid "Network is up"
msgstr "Сеть работает" msgstr "Сеть работает"
#: netctl.cpp:614 #: netctl.cpp:571
msgid "Network is down" msgid "Network is down"
msgstr "Сеть не работает" msgstr "Сеть не работает"
#: netctl.cpp:786 #: netctl.cpp:761
msgid "" msgid ""
"Version %1\n" "Version %1\n"
"(build date %2)" "(build date %2)"
@ -114,59 +114,59 @@ msgstr ""
"Версия %1\n" "Версия %1\n"
"(дата сборки %2)" "(дата сборки %2)"
#: netctl.cpp:787 #: netctl.cpp:762
msgid "KDE widget which interacts with netctl." msgid "KDE widget which interacts with netctl."
msgstr "Виджет KDE, который взаимодействует с netctl." msgstr "Виджет KDE, который взаимодействует с netctl."
#: netctl.cpp:788 #: netctl.cpp:763
msgid "Translators: %1" msgid "Translators: %1"
msgstr "Переводчики: %1" msgstr "Переводчики: %1"
#: netctl.cpp:789 #: netctl.cpp:764
msgid "Links:" msgid "Links:"
msgstr "Ссылки:" msgstr "Ссылки:"
#: netctl.cpp:790 #: netctl.cpp:765
msgid "Homepage" msgid "Homepage"
msgstr "Домашняя страница" msgstr "Домашняя страница"
#: netctl.cpp:791 #: netctl.cpp:766
msgid "Repository" msgid "Repository"
msgstr "Репозиторий" msgstr "Репозиторий"
#: netctl.cpp:792 #: netctl.cpp:767
msgid "Bugtracker" msgid "Bugtracker"
msgstr "Багтрекер" msgstr "Багтрекер"
#: netctl.cpp:793 #: netctl.cpp:768
msgid "Translation issue" msgid "Translation issue"
msgstr "Тикет перевода" msgstr "Тикет перевода"
#: netctl.cpp:794 #: netctl.cpp:769
msgid "AUR packages" msgid "AUR packages"
msgstr "Пакеты в AUR" msgstr "Пакеты в AUR"
#: netctl.cpp:796 #: netctl.cpp:771
msgid "This software is licensed under %1" msgid "This software is licensed under %1"
msgstr "Данное приложение лицензировано под %1" msgstr "Данное приложение лицензировано под %1"
#: netctl.cpp:797 #: netctl.cpp:772
msgid "This software uses: %1" msgid "This software uses: %1"
msgstr "Данное приложение использует: %1" msgstr "Данное приложение использует: %1"
#: netctl.cpp:799 #: netctl.cpp:774
msgid "Netctl plasmoid" msgid "Netctl plasmoid"
msgstr "Netctl plasmoid" msgstr "Netctl plasmoid"
#: netctl.cpp:800 #: netctl.cpp:775
msgid "Appearance" msgid "Appearance"
msgstr "Внешний вид" msgstr "Внешний вид"
#: netctl.cpp:801 #: netctl.cpp:776
msgid "DataEngine" msgid "DataEngine"
msgstr "DataEngine" msgstr "DataEngine"
#: netctl.cpp:802 #: netctl.cpp:777
msgid "About" msgid "About"
msgstr "О программе" msgstr "О программе"
@ -185,7 +185,7 @@ msgstr "Иконка неактивного подключения"
#. i18n: file: dataengine.ui:83 #. i18n: file: dataengine.ui:83
#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) #. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto)
#. i18n: file: dataengine.ui:119 #. i18n: file: dataengine.ui:119
#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp) #. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4)
#. i18n: file: dataengine.ui:155 #. i18n: file: dataengine.ui:155
#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) #. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6)
#. i18n: file: widget.ui:108 #. i18n: file: widget.ui:108
@ -209,7 +209,7 @@ msgstr "Иконка неактивного подключения"
#. i18n: file: dataengine.ui:83 #. i18n: file: dataengine.ui:83
#. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto) #. i18n: ectx: property (text), widget (QPushButton, pushButton_netctlAuto)
#. i18n: file: dataengine.ui:119 #. i18n: file: dataengine.ui:119
#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp) #. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp4)
#. i18n: file: dataengine.ui:155 #. i18n: file: dataengine.ui:155
#. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6) #. i18n: ectx: property (text), widget (QPushButton, pushButton_extIp6)
#. i18n: file: widget.ui:108 #. i18n: file: widget.ui:108
@ -335,7 +335,7 @@ msgid "Path to netctl-auto"
msgstr "Путь к netctl-auto" msgstr "Путь к netctl-auto"
#. i18n: file: dataengine.ui:100 #. i18n: file: dataengine.ui:100
#. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp) #. i18n: ectx: property (text), widget (QCheckBox, checkBox_extIp4)
#: po/rc.cpp:63 rc.cpp:63 #: po/rc.cpp:63 rc.cpp:63
msgid "Check external IPv4" msgid "Check external IPv4"
msgstr "Проверять внешний IPv4" msgstr "Проверять внешний IPv4"
@ -387,19 +387,19 @@ msgstr "Показать более детальный интерфейс"
#: po/rc.cpp:117 rc.cpp:117 #: po/rc.cpp:117 rc.cpp:117
msgid "" msgid ""
"$current - current profile name\n" "$current - current profile name\n"
"$extip - external IPv4\n" "$extip4 - external IPv4\n"
"$extip6 - external IPv6\n" "$extip6 - external IPv6\n"
"$interfaces - list of the network interfaces\n" "$interfaces - list of the network interfaces\n"
"$intip - internal IPv4\n" "$intip4 - internal IPv4\n"
"$intip6 - internal IPv6\n" "$intip6 - internal IPv6\n"
"$profiles - list of the netctl profiles\n" "$profiles - list of the netctl profiles\n"
"$status - current profile status (static/enabled)" "$status - current profile status (static/enabled)"
msgstr "" msgstr ""
"$current - имя текущего профиля\n" "$current - имя текущего профиля\n"
"$extip - внешний IPv4\n" "$extip4 - внешний IPv4\n"
"$extip6 - внешний IPv6\n" "$extip6 - внешний IPv6\n"
"$interfaces - список сетевых интерфейсов\n" "$interfaces - список сетевых интерфейсов\n"
"$intip - внутренний IPv4\n" "$intip4 - внутренний IPv4\n"
"$intip6 - внутренний IPv6\n" "$intip6 - внутренний IPv6\n"
"$profiles - список профилей netctl\n" "$profiles - список профилей netctl\n"
"$status - статус текущего профиля (static/enabled)" "$status - статус текущего профиля (static/enabled)"

View File

@ -299,10 +299,10 @@
<widget class="QPlainTextEdit" name="textEdit"> <widget class="QPlainTextEdit" name="textEdit">
<property name="toolTip"> <property name="toolTip">
<string>$current - current profile name <string>$current - current profile name
$extip - external IPv4 $extip4 - external IPv4
$extip6 - external IPv6 $extip6 - external IPv6
$interfaces - list of the network interfaces $interfaces - list of the network interfaces
$intip - internal IPv4 $intip4 - internal IPv4
$intip6 - internal IPv6 $intip6 - internal IPv6
$profiles - list of the netctl profiles $profiles - list of the netctl profiles
$status - current profile status (static/enabled)</string> $status - current profile status (static/enabled)</string>