diff --git a/sources/.kdev4/sources.kdev4 b/sources/.kdev4/sources.kdev4 index 587b19d..d7d83c5 100644 --- a/sources/.kdev4/sources.kdev4 +++ b/sources/.kdev4/sources.kdev4 @@ -8,7 +8,7 @@ ProjectRootRelative=./ [CMake][CMake Build Directory 0] Build Directory Path=file:///home/arcanis/Documents/github/netctl-gui/build -Build Type=Debug +Build Type=Release CMake Binary=file:///usr/bin/cmake Environment Profile= Extra Arguments= diff --git a/sources/gui/src/errorwindow.cpp b/sources/gui/src/errorwindow.cpp index 8a9f2a6..7250093 100644 --- a/sources/gui/src/errorwindow.cpp +++ b/sources/gui/src/errorwindow.cpp @@ -99,7 +99,7 @@ QStringList ErrorWindow::getMessage(const int mess, const QString custom) break; case 14: title = QApplication::translate("ErrorWindow", "Error!"); - message = QApplication::translate("ErrorWindow", "APN is not set"); + message = QApplication::translate("ErrorWindow", "User is not in network group, helper will not be started"); break; case 15: title = QApplication::translate("ErrorWindow", "Error!"); diff --git a/sources/gui/src/mainprivateslots.cpp b/sources/gui/src/mainprivateslots.cpp index 38abb66..b4edeab 100644 --- a/sources/gui/src/mainprivateslots.cpp +++ b/sources/gui/src/mainprivateslots.cpp @@ -809,7 +809,7 @@ void MainWindow::profileTabCreateProfile() return errorWin->showWindow(12, QString(PDEBUG)); } else if (generalWid->connectionType->currentText() == QString("mobile_ppp")) { if (mobileWid->isOk() == 1) - return errorWin->showWindow(14, QString(PDEBUG)); + return errorWin->showWindow(15, QString(PDEBUG)); if (mobileWid->isOk() == 2) return errorWin->showWindow(7, QString(PDEBUG)); } diff --git a/sources/gui/src/settingswindow.cpp b/sources/gui/src/settingswindow.cpp index 18b1310..411f2b5 100644 --- a/sources/gui/src/settingswindow.cpp +++ b/sources/gui/src/settingswindow.cpp @@ -135,6 +135,7 @@ void SettingsWindow::saveSettings() settings.beginGroup(QString("Helper")); settings.setValue(QString("USE_HELPER"), config[QString("USE_HELPER")]); + settings.setValue(QString("HELPER_GROUP"), config[QString("HELPER_GROUP")]); settings.setValue(QString("FORCE_SUDO"), config[QString("FORCE_SUDO")]); settings.setValue(QString("CLOSE_HELPER"), config[QString("CLOSE_HELPER")]); settings.setValue(QString("HELPER_PATH"), config[QString("HELPER_PATH")]); @@ -422,6 +423,7 @@ QMap SettingsWindow::getSettings(QString fileName) settings.beginGroup(QString("Helper")); config[QString("USE_HELPER")] = settings.value(QString("USE_HELPER"), QString("true")).toString(); + config[QString("HELPER_GROUP")] = settings.value(QString("HELPER_GROUP"), QString("network")).toString(); config[QString("FORCE_SUDO")] = settings.value(QString("FORCE_SUDO"), QString("false")).toString(); config[QString("CLOSE_HELPER")] = settings.value(QString("CLOSE_HELPER"), QString("false")).toString(); config[QString("HELPER_PATH")] = settings.value(QString("HELPER_PATH"), QString("/usr/bin/netctlgui-helper")).toString(); diff --git a/sources/gui/src/settingswindow.ui b/sources/gui/src/settingswindow.ui index 2f19661..aeca2ba 100644 --- a/sources/gui/src/settingswindow.ui +++ b/sources/gui/src/settingswindow.ui @@ -303,6 +303,24 @@ + + + + + + Control group + + + + + + + Select a language + + + + + @@ -388,8 +406,8 @@ 0 0 - 436 - 173 + 462 + 330 @@ -575,8 +593,8 @@ 0 0 - 436 - 45 + 462 + 330 @@ -645,8 +663,8 @@ 0 0 - 277 - 194 + 462 + 330 @@ -842,8 +860,8 @@ 0 0 - 436 - 107 + 462 + 330 diff --git a/sources/helper/netctl-gui.conf b/sources/helper/netctl-gui.conf index 53be7d1..3077f9a 100644 --- a/sources/helper/netctl-gui.conf +++ b/sources/helper/netctl-gui.conf @@ -1,63 +1,81 @@ # Configuration file for Netctl GUI project +# man 5 netctl-gui.conf # /etc/netctl-gui.conf - system-wide configuration # $HOME/.config/netctl-gui.conf - user configuration +[General] +# application language +LANGUAGE=en +# create system tray icon. +# This option is not recognized by netctlgui-helper +SYSTRAY=true # close helper after GUI application quit. # This option is not recognized by netctlgui-helper CLOSETOTRAY=true +# start netctl-gui minimized to tray if it is available. +# This option is not recognized by netctlgui-helper +STARTTOTRAY=false +# skip external components checking +# This option is not recognized by netctlgui-helper +SKIPCOMPONENTS=false + +[Helper] +# use netctlgui-helper if it is available. +# This option is not recognized by netctlgui-helper +USE_HELPER=true +# group which allows to control helper, refer to DBus configuration +# This option is not recognized by netctlgui-helper +HELPER_GROUP=network +# force use SUDO_PATH for helper instead of using setuid(3) to child processes +FORCE_SUDO=false # hide application to tray on exit if tray is available. # This option is not recognized by netctlgui-helper CLOSE_HELPER=false -# path to control directory which is required by wpa_supplicant -CTRL_DIR=/run/wpa_supplicant_netctl-gui -# group which is owner of CTRL_DIR -CTRL_GROUP=users -# force use SUDO_PATH for helper instead of using setuid(3) to child processes -FORCE_SUDO=false # path to netctlgui-helper. # This option is not recognized by netctlgui-helper HELPER_PATH=/usr/bin/netctlgui-helper # netctlgui-helper service name. # This option is not recognized by netctlgui-helper HELPER_SERVICE=netctlgui-helper.service -# path to directory which contains interface information -IFACE_DIR=/sys/class/net/ -# application language -LANGUAGE=en + +[netctl] +# path to systemctl +SYSTEMCTL_PATH=/usr/bin/systemctl +# path to netctl +NETCTL_PATH=/usr/bin/netctl # path to netctl-auto NETCTLAUTO_PATH=/usr/bin/netctl-auto # netctl-auto service name without .service suffix NETCTLAUTO_SERVICE=netctl-auto -# path to netctl -NETCTL_PATH=/usr/bin/netctl -# wpa_supplicant PID file -PID_FILE=/run/wpa_supplicant_netctl-gui.pid -# prefered wireless interface -PREFERED_IFACE= # path to netctl profile directory PROFILE_DIR=/etc/netctl/ + +[sudo] +# path to sudo frontend +SUDO_PATH=/usr/bin/sudo + +[wpa_supplicant] +# path to wpa_supplicant +WPASUP_PATH=/usr/bin/wpa_supplicant +# path to wpa_cli +WPACLI_PATH=/usr/bin/wpa_cli +# wpa_supplicant PID file +PID_FILE=/run/wpa_supplicant_netctl-gui.pid +# wpa_supplicant drivers for wireless interface comma separated +WPA_DRIVERS=nl80211,wext +# path to control directory which is required by wpa_supplicant +CTRL_DIR=/run/wpa_supplicant_netctl-gui +# group which is owner of CTRL_DIR +CTRL_GROUP=users + +[Other] +# path to directory which contains interface information +IFACE_DIR=/sys/class/net/ # path to directory with rfkill devices. # This option is not recognized by netctlgui-helper RFKILL_DIR=/sys/class/rfkill/ -# skip external components checking -# This option is not recognized by netctlgui-helper -SKIPCOMPONENTS=false -# start netctl-gui minimized to tray if it is available. -# This option is not recognized by netctlgui-helper -STARTTOTRAY=false -# path to sudo frontend -SUDO_PATH=/usr/bin/sudo -# path to systemctl -SYSTEMCTL_PATH=/usr/bin/systemctl -# create system tray icon. -# This option is not recognized by netctlgui-helper -SYSTRAY=true -# use netctlgui-helper if it is available. -# This option is not recognized by netctlgui-helper -USE_HELPER=true -# path to wpa_cli -WPACLI_PATH=/usr/bin/wpa_cli -# path to wpa_supplicant -WPASUP_PATH=/usr/bin/wpa_supplicant -# wpa_supplicant drivers for wireless interface comma separated -WPA_DRIVERS=nl80211,wext +# prefered wireless interface +PREFERED_IFACE= + + + diff --git a/sources/helper/src/netctlhelper.cpp b/sources/helper/src/netctlhelper.cpp index 1b462dd..3607a1a 100644 --- a/sources/helper/src/netctlhelper.cpp +++ b/sources/helper/src/netctlhelper.cpp @@ -144,6 +144,7 @@ QMap NetctlHelper::getSettings(const QString file) settings.beginGroup(QString("Helper")); config[QString("USE_HELPER")] = settings.value(QString("USE_HELPER"), QString("true")).toString(); + config[QString("HELPER_GROUP")] = settings.value(QString("HELPER_GROUP"), QString("network")).toString(); config[QString("FORCE_SUDO")] = settings.value(QString("FORCE_SUDO"), QString("false")).toString(); config[QString("CLOSE_HELPER")] = settings.value(QString("CLOSE_HELPER"), QString("false")).toString(); config[QString("HELPER_PATH")] = settings.value(QString("HELPER_PATH"), QString("/usr/bin/netctlgui-helper")).toString();