implement actions

This commit is contained in:
arcan1s committed 2015-01-04 02:01:07 +03:00
1 parent a830fc9372
commit 924beacc23
7 files changed
+112 -1411

No files matched your search

+3 -5
View File
@@ -49,16 +49,14 @@ bool NetctlAdds::checkHelperStatus(const bool useHelper)
{
if (debug) qDebug() << PDEBUG;
if (useHelper)
return !sendDBusRequest(QString("Active"), QList<QVariant>()).isEmpty();
else
return useHelper;
return (useHelper && !sendDBusRequest(QString("Active"), QList<QVariant>()).isEmpty());
}
void NetctlAdds::startHelper(const QString cmd)
void NetctlAdds::startApplication(const QString cmd)
{
if (debug) qDebug() << PDEBUG;
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd;
QProcess command;
+1 -1
View File
@@ -65,7 +65,7 @@ private:
bool debug = false;
// helper
bool checkHelperStatus(const bool useHelper = true);
void startHelper(const QString cmd = QString("/usr/bin/netctlgui-helper"));
void startApplication(const QString cmd = QString("/usr/bin/true"));
// dbus
QList<QVariant> sendDBusRequest(const QString cmd, const QList<QVariant> args = QList<QVariant>());
};