small update

This commit is contained in:
arcan1s 2015-02-18 16:23:07 +03:00
parent a73968f98b
commit 4c20a54d7e
7 changed files with 88 additions and 49 deletions

View File

@ -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=

View File

@ -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!");

View File

@ -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));
}

View File

@ -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<QString, QString> 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();

View File

@ -303,6 +303,24 @@
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="layout_group">
<item>
<widget class="QLabel" name="label_group">
<property name="text">
<string>Control group</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBox_group">
<property name="toolTip">
<string>Select a language</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="layout_helperPath">
<item>
@ -388,8 +406,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>436</width>
<height>173</height>
<width>462</width>
<height>330</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
@ -575,8 +593,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>436</width>
<height>45</height>
<width>462</width>
<height>330</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
@ -645,8 +663,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>277</width>
<height>194</height>
<width>462</width>
<height>330</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
@ -842,8 +860,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>436</width>
<height>107</height>
<width>462</width>
<height>330</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">

View File

@ -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=

View File

@ -144,6 +144,7 @@ QMap<QString, QString> 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();