mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 15:37:23 +00:00
parent
69f6a3135b
commit
b65ba2ebe2
@ -1,6 +1,15 @@
|
|||||||
|
Ver.1.4.6
|
||||||
|
---------
|
||||||
|
* all
|
||||||
|
+ implement time logging feature
|
||||||
* gui
|
* gui
|
||||||
+ implement autoupdate feature
|
+ implement autoupdate feature
|
||||||
- fix invalid profile path for the external editor
|
- fix invalid profile path for the external editor
|
||||||
|
* library
|
||||||
|
+ implement netctl-auto support to scanWiFi() method (#44)
|
||||||
|
- fix bug with invalid data in netctl-auto profile list output
|
||||||
|
* plasmoid
|
||||||
|
- fix plasma crash on status updates (#43)
|
||||||
|
|
||||||
Ver.1.4.5
|
Ver.1.4.5
|
||||||
---------
|
---------
|
||||||
|
@ -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 5)
|
set (PROJECT_VERSION_PATCH 6)
|
||||||
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")
|
||||||
|
@ -238,7 +238,6 @@ QList<netctlProfileInfo> Netctl::getProfileListFromNetctlAuto()
|
|||||||
profileInfo.essid = profileValues[2];
|
profileInfo.essid = profileValues[2];
|
||||||
profileInfo.interface = profileValues[3];
|
profileInfo.interface = profileValues[3];
|
||||||
profileInfo.type = profileValues[0];
|
profileInfo.type = profileValues[0];
|
||||||
profileInfo.essid = profileValues[1];
|
|
||||||
profileInfo.netctlAuto = true;
|
profileInfo.netctlAuto = true;
|
||||||
fullProfilesInfo.append(profileInfo);
|
fullProfilesInfo.append(profileInfo);
|
||||||
}
|
}
|
||||||
|
@ -346,7 +346,13 @@ QList<netctlWifiInfo> WpaSup::scanWifi()
|
|||||||
rawList.removeFirst();
|
rawList.removeFirst();
|
||||||
QStringList names;
|
QStringList names;
|
||||||
|
|
||||||
QList<netctlProfileInfo> profiles = netctlCommand->getProfileList();
|
// init profile list
|
||||||
|
QList<netctlProfileInfo> profiles;
|
||||||
|
if (netctlCommand->isNetctlAutoRunning())
|
||||||
|
profiles = netctlCommand->getProfileListFromNetctlAuto();
|
||||||
|
else
|
||||||
|
profiles = netctlCommand->getProfileList();
|
||||||
|
// iterate by wifi output
|
||||||
for (int i=0; i<rawList.count(); i++) {
|
for (int i=0; i<rawList.count(); i++) {
|
||||||
QStringList line = rawList[i].split(QChar('\t'));
|
QStringList line = rawList[i].split(QChar('\t'));
|
||||||
if (line.count() != 5) continue;
|
if (line.count() != 5) continue;
|
||||||
|
@ -14,7 +14,7 @@ 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.5
|
X-KDE-PluginInfo-Version=1.4.6
|
||||||
X-KDE-PluginInfo-Website=http://arcanis.name/projects/netctl-gui
|
X-KDE-PluginInfo-Website=http://arcanis.name/projects/netctl-gui
|
||||||
X-KDE-PluginInfo-Category=Network
|
X-KDE-PluginInfo-Category=Network
|
||||||
X-KDE-PluginInfo-Depends=
|
X-KDE-PluginInfo-Depends=
|
||||||
|
@ -41,6 +41,8 @@ NetctlAdds::NetctlAdds(QObject *parent)
|
|||||||
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)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -50,6 +52,18 @@ NetctlAdds::~NetctlAdds()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void NetctlAdds::notifyAboutStatusChanging(const bool currentStatus)
|
||||||
|
{
|
||||||
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
if (debug) qDebug() << PDEBUG << ":" << "Status" << currentStatus;
|
||||||
|
|
||||||
|
if (currentStatus)
|
||||||
|
return NetctlAdds::sendNotification(QString("Info"), i18n("Network status has been changed to active"));
|
||||||
|
else
|
||||||
|
return NetctlAdds::sendNotification(QString("Info"), i18n("Network status has been changed to inactive"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QList<QVariant> NetctlAdds::sendDBusRequest(const QString cmd, const QList<QVariant> args)
|
QList<QVariant> NetctlAdds::sendDBusRequest(const QString cmd, const QList<QVariant> args)
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
@ -158,28 +172,30 @@ void NetctlAdds::setDataBySource(const QString sourceName, const QVariantMap dat
|
|||||||
|
|
||||||
bool needUpdate = (values[sourceName] != data[QString("value")].toString());
|
bool needUpdate = (values[sourceName] != data[QString("value")].toString());
|
||||||
values[sourceName] = data[QString("value")].toString();
|
values[sourceName] = data[QString("value")].toString();
|
||||||
// if ((needUpdate) && (sourceName == QString("active"))) {
|
|
||||||
// if (values[sourceName] == QString("true"))
|
|
||||||
// sendNotification(QString("Info"), i18n("Network status has been changed to active"));
|
|
||||||
// else
|
|
||||||
// sendNotification(QString("Info"), i18n("Network status has been changed to inactive"));
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (needUpdate) emit(needToBeUpdated());
|
if (needUpdate) {
|
||||||
|
emit(needToBeUpdated());
|
||||||
|
// if (sourceName == QString("active"))
|
||||||
|
// emit(needToNotify(values[QString("active")] == QString("true")));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
|
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
|
||||||
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
|
QString debugEnv = environment.value(QString("DEBUG"), QString("no"));
|
||||||
bool debugLocal = (debugEnv == QString("yes"));
|
bool debugLocal = (debugEnv == QString("yes"));
|
||||||
|
|
||||||
if (debugLocal) qDebug() << PDEBUG;
|
if (debugLocal) qDebug() << PDEBUG;
|
||||||
if (debugLocal) qDebug() << PDEBUG << ":" << "Event" << eventId;
|
if (debugLocal) qDebug() << PDEBUG << ":" << "Event" << eventId;
|
||||||
if (debugLocal) qDebug() << PDEBUG << ":" << "Message" << message;
|
if (debugLocal) qDebug() << PDEBUG << ":" << "Message" << message;
|
||||||
|
|
||||||
KNotification *notification = KNotification::event(eventId, QString("Netctl ::: %1").arg(eventId), message);
|
KNotification *notification = KNotification::event(eventId, QString("Netctl ::: %1").arg(eventId), message);
|
||||||
notification->setComponentName(QString("plasma-applet-org.kde.plasma.netctl"));
|
notification->setComponentName(QString("plasma-applet-org.kde.plasma.netctl"));
|
||||||
|
|
||||||
|
notification->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,6 +64,10 @@ public:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void needToBeUpdated();
|
void needToBeUpdated();
|
||||||
|
void needToNotify(const bool currentStatus);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void notifyAboutStatusChanging(const bool currentStatus);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool debug = false;
|
bool debug = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user