diff --git a/CHANGELOG b/CHANGELOG index eb55bd3..0236c0b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Ver.1.0.4: + added Qt5 gui (by default) + added notifications +* fix run command with sudo from plasmoid Ver.1.0.3: + [plasmoid] edited russian translation diff --git a/PKGBUILD b/PKGBUILD index ba9891a..6e14cfd 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -19,7 +19,7 @@ optdepends=('kdebase-runtime: sudo support' 'wpa_supplicant: wifi support') source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${pkgname}-${pkgver}-src.tar.xz") install="${pkgname}.install" -md5sums=('6bb4897a9244cf5b9c2e45dff43c07b2') +md5sums=('4dc8aa4d357fe6bdbd0a18d778a53187') # flags _cmakekeys="-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release" diff --git a/sources/plasmoid/netctl.cpp b/sources/plasmoid/netctl.cpp index 656c006..ef4df81 100644 --- a/sources/plasmoid/netctl.cpp +++ b/sources/plasmoid/netctl.cpp @@ -116,8 +116,8 @@ void Netctl::enableProfileSlot() sendNotification(QString("Info"), i18n("Set profile %1 enabled", info[QString("name")])); } if (useSudo) - commandLine = paths[QString("sudo")] + QString(" \"") + paths[QString("netctl")] + - enableStatus + info[QString("name")] + QString("\""); + commandLine = paths[QString("sudo")] + QString(" ") + paths[QString("netctl")] + + enableStatus + info[QString("name")]; else commandLine = paths[QString("netctl")] + enableStatus + info[QString("name")]; command.startDetached(commandLine); @@ -134,9 +134,9 @@ void Netctl::startProfileSlot(QAction *profile) commandLine = paths[QString("netctl")] + QString(" stop ") + info[QString("name")] + QString(" && "); if (useSudo) - commandLine = paths[QString("sudo")] + QString(" \"") + commandLine + + commandLine = paths[QString("sudo")] + QString(" ") + commandLine + paths[QString("netctl")] + QString(" start ") + - profile->text().remove(QString("&")) + QString("\""); + profile->text().remove(QString("&")); else commandLine = commandLine + paths[QString("netctl")] + QString(" start ") + profile->text().remove(QString("&")); @@ -150,8 +150,8 @@ void Netctl::stopProfileSlot() QString commandLine; sendNotification(QString("Info"), i18n("Stop profile %1", info[QString("name")])); if (useSudo) - commandLine = paths[QString("sudo")] + QString(" \"") + paths[QString("netctl")] + - QString(" stop ") + info[QString("name")] + QString("\""); + commandLine = paths[QString("sudo")] + QString(" ") + paths[QString("netctl")] + + QString(" stop ") + info[QString("name")]; else commandLine = paths[QString("netctl")] + QString(" stop ") + info[QString("name")]; command.startDetached(commandLine); @@ -164,8 +164,8 @@ void Netctl::restartProfileSlot() QString commandLine; sendNotification(QString("Info"), i18n("Restart profile %1", info[QString("name")])); if (useSudo) - commandLine = paths[QString("sudo")] + QString(" \"") + paths[QString("netctl")] + - QString(" restart ") + info[QString("name")] + QString("\""); + commandLine = paths[QString("sudo")] + QString(" ") + paths[QString("netctl")] + + QString(" restart ") + info[QString("name")]; else commandLine = paths[QString("netctl")] + QString(" restart ") + info[QString("name")]; command.startDetached(commandLine); @@ -492,7 +492,7 @@ void Netctl::configChanged() paths[QString("gui")] = cg.readEntry("guiPath", "/usr/bin/netctl-gui"); paths[QString("netctl")] = cg.readEntry("netctlPath", "/usr/bin/netctl"); useSudo = cg.readEntry("useSudo", true); - paths[QString("sudo")] = cg.readEntry("sudoPath", "/usr/bin/kdesu -c"); + paths[QString("sudo")] = cg.readEntry("sudoPath", "/usr/bin/kdesu"); bigInterface[QString("main")] = cg.readEntry("showBigInterface", true); bigInterface[QString("extIp")] = cg.readEntry("showExtIp", false); bigInterface[QString("netDev")] = cg.readEntry("showNetDev", true);