mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-15 06:45:49 +00:00
implement actions
This commit is contained in:
@ -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;
|
||||
|
||||
|
@ -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>());
|
||||
};
|
||||
|
Reference in New Issue
Block a user