update man pagesand translations

This commit is contained in:
arcan1s 2014-08-09 23:27:58 +04:00
parent 41f58c1448
commit d44979e95e
10 changed files with 634 additions and 326 deletions

View File

@ -5,63 +5,65 @@ netctl-gui is a graphical interface for netctl
.B netctl-gui .B netctl-gui
[ options ] [ options ]
.SH DESCRIPTION .SH DESCRIPTION
Graphical user interface for netctl written on C++ using Qt toolkit. Provides shared library for interaction with netctl and Plasmoid and DataEngine for KDE. .B netctl-gui
is a project which provides graphical user interface for
.B netctl
written on C++ using Qt toolkit. It provides shared library and DBus API (through helper daemon) and Plasmoid and DataEngine for KDE.
.SH OPTIONS .SH OPTIONS
.TP .IP "--daemon"
--daemon
run as daemon run as daemon
.TP .IP "--maximized"
--maximized
run maximized run maximized
.TP .IP "--minimized"
--minimized
run to system tray if it is available run to system tray if it is available
.TP .IP "--about"
--about
show about window show about window
.TP .IP "--netctl-auto"
--netctl-auto
show netctl-auto window show netctl-auto window
.TP .IP "--settings"
--settings
show settings window show settings window
.TP .IP "-e, --essid ESSID"
-e, --essid ESSID select ESSID
select ESSID ESSID. This option will set tab to 3 automatically .I ESSID
.TP This option will set tab to 3 automatically
-o, --open PROFILE .IP "-o, --open PROFILE"
open profile PROFILE. This option will set tab to 2 automatically open profile
.TP .I PROFILE
-s, --select PROFILE This option will set tab to 2 automatically
select profile PROFILE. This option will set tab to 1 automatically .IP "-s, --select PROFILE"
.TP select profile
-c, --config FILE .I PROFILE
read configuration from file FILE This option will set tab to 1 automatically
.TP .IP "-c, --config FILE"
-d, --debug read configuration from file
.I FILE
.IP "-d, --debug"
print debug information print debug information
.TP .IP "--default"
--default
start with default settings start with default settings
.TP .IP "--set-opts OPTIONS"
--set-opts OPTIONS set options
set options OPTIONS for this run, comma separated. Example "LANGUAGE=en,NETCTL_PATH=/usr/bin/netctl" .I OPTIONS
.TP for this run, comma separated. Example:
-t, --tab NUM .nf
open a tab with number NUM LANGUAGE=en,NETCTL_PATH=/path/to/ponies
.TP .fi
-v, --version .IP "-t, --tab NUM"
open a tab with number
.I NUM
.IP "-v, --version"
show version and exit show version and exit
.TP .IP "-i, --info"
-i, --info
show build information and exit show build information and exit
.TP .IP "-h, --help"
-h, --help
show this help and exit show this help and exit
.SH FILES .SH FILES
.TP .I $HOME/.config/netctl-gui.conf
$HOME/.config/netctl-gui.conf .RS
Configuration file Configuration file
.RE
.SH SEE ALSO
.BR netctl-gui (1)
.SH AUTHOR .SH AUTHOR
@PROJECT_AUTHOR@ <\fI@PROJECT_CONTACT@\fR> @PROJECT_AUTHOR@ <\fI@PROJECT_CONTACT@\fR>
.SH LICENSE .SH LICENSE

View File

@ -171,6 +171,23 @@ bool MainWindow::isHelperActive()
} }
bool MainWindow::isHelperServiceActive()
{
if (debug) qDebug() << "[MainWindow]" << "[isHelperServiceActive]";
QString cmd = configuration[QString("SYSTEMCTL_PATH")] + QString(" is-active ") +
configuration[QString("HELPER_SERVICE")];
if (debug) qDebug() << "[MainWindow]" << "[isHelperServiceActive]" << ":" << "Run cmd" << cmd;
TaskResult process = runTask(cmd, false);
if (debug) qDebug() << "[MainWindow]" << "[isHelperServiceActive]" << ":" << "Cmd returns" << process.exitCode;
if (process.exitCode != 0)
return false;
else
return true;
}
bool MainWindow::checkExternalApps(const QString apps = QString("all")) bool MainWindow::checkExternalApps(const QString apps = QString("all"))
{ {
if (debug) qDebug() << "[MainWindow]" << "[checkExternalApps]"; if (debug) qDebug() << "[MainWindow]" << "[checkExternalApps]";
@ -436,11 +453,15 @@ void MainWindow::updateConfiguration(const QMap<QString, QVariant> args)
delete settingsWin; delete settingsWin;
createObjects(); createObjects();
// some helper fixs
if (useHelper) useHelper = isHelperActive(); if (useHelper) useHelper = isHelperActive();
if (useHelper) if (useHelper)
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH, sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("Update"), DBUS_HELPER_INTERFACE, QString("Update"),
QList<QVariant>(), true, debug); QList<QVariant>(), true, debug);
if (isHelperServiceActive())
configuration[QString("CLOSE_HELPER")] = QString("false");
// update ui
setTab(args[QString("tab")].toInt() - 1); setTab(args[QString("tab")].toInt() - 1);
createActions(); createActions();
setIconsToTabs(); setIconsToTabs();

View File

@ -59,6 +59,7 @@ public:
QString printInformation(); QString printInformation();
QStringList printSettings(); QStringList printSettings();
bool isHelperActive(); bool isHelperActive();
bool isHelperServiceActive();
protected: protected:
void closeEvent(QCloseEvent *event); void closeEvent(QCloseEvent *event);

View File

@ -489,14 +489,22 @@ void SettingsWindow::updateHelper()
{ {
if (debug) qDebug() << "[SettingsWindow]" << "[updateHelper]"; if (debug) qDebug() << "[SettingsWindow]" << "[updateHelper]";
if (((MainWindow *)parent())->isHelperActive()) { if (((MainWindow *)parent())->isHelperServiceActive()) {
ui->label_status->setText(QApplication::translate("SettingsWindow", "Active (systemd)"));
ui->pushButton_status->setText(QApplication::translate("SettingsWindow", "Stop"));
ui->pushButton_status->setIcon(QIcon::fromTheme("process-stop"));
ui->pushButton_status->setDisabled(true);
}
else if (((MainWindow *)parent())->isHelperActive()) {
ui->label_status->setText(QApplication::translate("SettingsWindow", "Active")); ui->label_status->setText(QApplication::translate("SettingsWindow", "Active"));
ui->pushButton_status->setText(QApplication::translate("SettingsWindow", "Stop")); ui->pushButton_status->setText(QApplication::translate("SettingsWindow", "Stop"));
ui->pushButton_status->setIcon(QIcon::fromTheme("process-stop")); ui->pushButton_status->setIcon(QIcon::fromTheme("process-stop"));
ui->pushButton_status->setEnabled(true);
} }
else { else {
ui->label_status->setText(QApplication::translate("SettingsWindow", "Inactive")); ui->label_status->setText(QApplication::translate("SettingsWindow", "Inactive"));
ui->pushButton_status->setText(QApplication::translate("SettingsWindow", "Start")); ui->pushButton_status->setText(QApplication::translate("SettingsWindow", "Start"));
ui->pushButton_status->setIcon(QIcon::fromTheme("system-run")); ui->pushButton_status->setIcon(QIcon::fromTheme("system-run"));
ui->pushButton_status->setEnabled(true);
} }
} }

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>656</width> <width>654</width>
<height>317</height> <height>315</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -136,8 +136,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>440</width> <width>438</width>
<height>256</height> <height>254</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_7"> <layout class="QVBoxLayout" name="verticalLayout_7">
@ -211,11 +211,21 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>440</width> <width>438</width>
<height>256</height> <height>254</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_13"> <layout class="QVBoxLayout" name="verticalLayout_13">
<item>
<widget class="QLabel" name="label_helperInfo">
<property name="text">
<string>It is recommended to use systemd integration. See `man 1 netctlgui-helper` for more details.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item> <item>
<layout class="QHBoxLayout" name="layout_status"> <layout class="QHBoxLayout" name="layout_status">
<item> <item>
@ -282,7 +292,7 @@
<item> <item>
<widget class="QCheckBox" name="checkBox_helperClose"> <widget class="QCheckBox" name="checkBox_helperClose">
<property name="text"> <property name="text">
<string>Close helper after exit</string> <string>Close helper after exit (doesn't work while systemd service is active)</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -342,12 +352,6 @@
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>104</height>
</size>
</property>
</spacer> </spacer>
</item> </item>
</layout> </layout>
@ -371,8 +375,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>440</width> <width>436</width>
<height>256</height> <height>165</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
@ -825,8 +829,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>436</width> <width>438</width>
<height>103</height> <height>254</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_11"> <layout class="QVBoxLayout" name="verticalLayout_11">

View File

@ -5,36 +5,60 @@ netctlgui-helper is a helper daemon for netctl-gui
.B netctlgui-helper .B netctlgui-helper
[ options ] [ options ]
.SH DESCRIPTION .SH DESCRIPTION
Qt based helper daemon which provides a DBus interface for interaction with netctl without any additional permissions. .B netctlgui-helper
is a Qt based helper daemon which provides a DBus interface for interaction with
.B netctl
without any additional permissions. To have access to DBus interface user should have group
.B network
.SH OPTIONS .SH OPTIONS
.TP .IP "--nodaemon"
--nodaemon
do not run as daemon do not run as daemon
.TP .IP "-c, --config FILE"
-c, --config FILE read configuration from file
read configuration from file FILE .I FILE
.TP .IP "-d, --debug"
-d, --debug
print debug information print debug information
.TP .IP "-v, --version"
-v, --version
show version and exit show version and exit
.TP .IP "-i, --info"
-i, --info
show build information and exit show build information and exit
.TP .IP "-h, --help"
-h, --help
show this help and exit show this help and exit
.SH FILES .SH FILES
.TP .I $HOME/.config/netctl-gui.conf
$HOME/.config/netctl-gui.conf .RS
Configuration file Configuration file
.TP .RE
/usr/lib/systemd/system/netctlgui-helper.service .I /usr/lib/systemd/system/netctlgui-helper.service
.RS
Systemd service file Systemd service file
.TP .RE
/etc/dbus-1/system.d/org.netctlgui.helper.conf .I /etc/dbus-1/system.d/org.netctlgui.helper.conf
.RS
DBus policy configuration file DBus policy configuration file
.RE
.SH USAGE WITH SYSTEMD
It is a recommended way to use this daemon. To start helper as systemd daemon type:
.nf
# systemctl start netctlgui-helper
.fi
If you want to setup non-standard configuration file edit source service file and replace the following line:
.nf
ExecStart=/usr/bin/netctlgui-helper
.fi
to
.nf
ExecStart=/usr/bin/netctlgui-helper -c /path/to/your/file
.fi
By the way it is highly recommended to copy source service file before to
.B /etc/systemd/system
and edit copied file to avoid upgrade problems.
.SH SEE ALSO
.BR netctl-gui (1)
.SH STANDARDS
Some text will be here
.SH SECURITY CONSIDERATIONS
Some text will be here.
.SH AUTHOR .SH AUTHOR
@PROJECT_AUTHOR@ <\fI@PROJECT_CONTACT@\fR> @PROJECT_AUTHOR@ <\fI@PROJECT_CONTACT@\fR>
.SH LICENSE .SH LICENSE

View File

@ -8,8 +8,8 @@
<allow own="org.netctlgui.helper"/> <allow own="org.netctlgui.helper"/>
</policy> </policy>
<!-- allow everything to users of the group "users" --> <!-- allow everything to users of the group "network" -->
<policy group="users"> <policy group="network">
<allow send_destination="org.netctlgui.helper"/> <allow send_destination="org.netctlgui.helper"/>
<allow receive_sender="org.netctlgui.helper"/> <allow receive_sender="org.netctlgui.helper"/>
</policy> </policy>

View File

@ -167,6 +167,10 @@
<source>Sender : %1</source> <source>Sender : %1</source>
<translation>Sender : %1</translation> <translation>Sender : %1</translation>
</message> </message>
<message>
<source>Could not run helper</source>
<translation>Could not run helper</translation>
</message>
</context> </context>
<context> <context>
<name>EthernetWidget</name> <name>EthernetWidget</name>
@ -938,7 +942,7 @@
</message> </message>
<message> <message>
<source>Build date: %1</source> <source>Build date: %1</source>
<translation>Build date: %1</translation> <translation type="vanished">Build date: %1</translation>
</message> </message>
<message> <message>
<source>cmake flags:</source> <source>cmake flags:</source>
@ -1064,11 +1068,11 @@
</message> </message>
<message> <message>
<source>cmake flags</source> <source>cmake flags</source>
<translation>cmake flags</translation> <translation type="vanished">cmake flags</translation>
</message> </message>
<message> <message>
<source>DBus configuration</source> <source>DBus configuration</source>
<translation>DBus configuration</translation> <translation type="vanished">DBus configuration</translation>
</message> </message>
</context> </context>
<context> <context>
@ -1325,6 +1329,21 @@
<translation>Profile</translation> <translation>Profile</translation>
</message> </message>
</context> </context>
<context>
<name>NetctlHelper</name>
<message>
<source>Build date: %1</source>
<translation>Build date: %1</translation>
</message>
<message>
<source>cmake flags</source>
<translation>cmake flags</translation>
</message>
<message>
<source>DBus configuration</source>
<translation>DBus configuration</translation>
</message>
</context>
<context> <context>
<name>PasswdWidget</name> <name>PasswdWidget</name>
<message> <message>
@ -1721,6 +1740,70 @@
<source>Start minimized to tray</source> <source>Start minimized to tray</source>
<translation>Start minimized to tray</translation> <translation>Start minimized to tray</translation>
</message> </message>
<message>
<source>Select helper command</source>
<translation>Select helper command</translation>
</message>
<message>
<source>Active</source>
<translation>Active</translation>
</message>
<message>
<source>Stop</source>
<translation>Stop</translation>
</message>
<message>
<source>Inactive</source>
<translation>Inactive</translation>
</message>
<message>
<source>Start</source>
<translation>Start</translation>
</message>
<message>
<source>Helper</source>
<translation>Helper</translation>
</message>
<message>
<source>Helper status</source>
<translation>Helper status</translation>
</message>
<message>
<source>Use helper</source>
<translation>Use helper</translation>
</message>
<message>
<source>Force use sudo in helper</source>
<translation>Force use sudo in helper</translation>
</message>
<message>
<source>Close helper after exit</source>
<translation type="vanished">Close helper after exit</translation>
</message>
<message>
<source>Helper command</source>
<translation>Helper command</translation>
</message>
<message>
<source>Helper service</source>
<translation>Helper service</translation>
</message>
<message>
<source>Name of netctlgui-helper service</source>
<translation>Name of netctlgui-helper service</translation>
</message>
<message>
<source>Active (systemd)</source>
<translation>Active (systemd)</translation>
</message>
<message>
<source>It is recommended to use systemd integration. See `man 1 netctlgui-helper` for more details.</source>
<translation>It is recommended to use systemd integration. See `man 1 netctlgui-helper` for more details.</translation>
</message>
<message>
<source>Close helper after exit (doesn&apos;t work while systemd service is active)</source>
<translation>Close helper after exit (doesn&apos;t work while systemd service is active)</translation>
</message>
</context> </context>
<context> <context>
<name>TrayIcon</name> <name>TrayIcon</name>

File diff suppressed because it is too large Load Diff

View File

@ -167,6 +167,10 @@
<source>Sender : %1</source> <source>Sender : %1</source>
<translation>Отправитель : %1</translation> <translation>Отправитель : %1</translation>
</message> </message>
<message>
<source>Could not run helper</source>
<translation>Не могу запустить хелпер</translation>
</message>
</context> </context>
<context> <context>
<name>EthernetWidget</name> <name>EthernetWidget</name>
@ -937,7 +941,7 @@
</message> </message>
<message> <message>
<source>Build date: %1</source> <source>Build date: %1</source>
<translation>Дата сборки: %1</translation> <translation type="vanished">Дата сборки: %1</translation>
</message> </message>
<message> <message>
<source>cmake flags:</source> <source>cmake flags:</source>
@ -1063,11 +1067,11 @@
</message> </message>
<message> <message>
<source>cmake flags</source> <source>cmake flags</source>
<translation>Флаги cmake</translation> <translation type="vanished">Флаги cmake</translation>
</message> </message>
<message> <message>
<source>DBus configuration</source> <source>DBus configuration</source>
<translation>Настройка DBus</translation> <translation type="vanished">Настройка DBus</translation>
</message> </message>
</context> </context>
<context> <context>
@ -1324,6 +1328,21 @@
<translation>Профиль</translation> <translation>Профиль</translation>
</message> </message>
</context> </context>
<context>
<name>NetctlHelper</name>
<message>
<source>Build date: %1</source>
<translation>Дата сборки: %1</translation>
</message>
<message>
<source>cmake flags</source>
<translation>Флаги cmake</translation>
</message>
<message>
<source>DBus configuration</source>
<translation>Настройка DBus</translation>
</message>
</context>
<context> <context>
<name>PasswdWidget</name> <name>PasswdWidget</name>
<message> <message>
@ -1720,6 +1739,70 @@
<source>Start minimized to tray</source> <source>Start minimized to tray</source>
<translation>Запускать свернутым в трей</translation> <translation>Запускать свернутым в трей</translation>
</message> </message>
<message>
<source>Select helper command</source>
<translation>Выберете команду для хелпера</translation>
</message>
<message>
<source>Active</source>
<translation>Активен</translation>
</message>
<message>
<source>Stop</source>
<translation>Стоп</translation>
</message>
<message>
<source>Inactive</source>
<translation>Неактивен</translation>
</message>
<message>
<source>Start</source>
<translation>Старт</translation>
</message>
<message>
<source>Helper</source>
<translation>Хелпер</translation>
</message>
<message>
<source>Helper status</source>
<translation>Статус</translation>
</message>
<message>
<source>Use helper</source>
<translation>Использовать хелпер</translation>
</message>
<message>
<source>Force use sudo in helper</source>
<translation>Принудительно использовать sudo</translation>
</message>
<message>
<source>Close helper after exit</source>
<translation type="vanished">Закрыть хелпер после выхода</translation>
</message>
<message>
<source>Helper command</source>
<translation>Команда</translation>
</message>
<message>
<source>Helper service</source>
<translation>Сервис</translation>
</message>
<message>
<source>Name of netctlgui-helper service</source>
<translation>Имя сервиса для netctlgui-helper</translation>
</message>
<message>
<source>Active (systemd)</source>
<translation>Активен (systemd)</translation>
</message>
<message>
<source>It is recommended to use systemd integration. See `man 1 netctlgui-helper` for more details.</source>
<translation>Рекомендуется использовать интеграцию с systemd. Смотри `man 1 netctlgui-helper` для более подробной информации.</translation>
</message>
<message>
<source>Close helper after exit (doesn&apos;t work while systemd service is active)</source>
<translation>Закрыть хелпер после выхода (не работает, если запущен сервис systemd)</translation>
</message>
</context> </context>
<context> <context>
<name>TrayIcon</name> <name>TrayIcon</name>