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
[ options ]
.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
.TP
--daemon
.IP "--daemon"
run as daemon
.TP
--maximized
.IP "--maximized"
run maximized
.TP
--minimized
.IP "--minimized"
run to system tray if it is available
.TP
--about
.IP "--about"
show about window
.TP
--netctl-auto
.IP "--netctl-auto"
show netctl-auto window
.TP
--settings
.IP "--settings"
show settings window
.TP
-e, --essid ESSID
select ESSID ESSID. This option will set tab to 3 automatically
.TP
-o, --open PROFILE
open profile PROFILE. This option will set tab to 2 automatically
.TP
-s, --select PROFILE
select profile PROFILE. This option will set tab to 1 automatically
.TP
-c, --config FILE
read configuration from file FILE
.TP
-d, --debug
.IP "-e, --essid ESSID"
select ESSID
.I ESSID
This option will set tab to 3 automatically
.IP "-o, --open PROFILE"
open profile
.I PROFILE
This option will set tab to 2 automatically
.IP "-s, --select PROFILE"
select profile
.I PROFILE
This option will set tab to 1 automatically
.IP "-c, --config FILE"
read configuration from file
.I FILE
.IP "-d, --debug"
print debug information
.TP
--default
.IP "--default"
start with default settings
.TP
--set-opts OPTIONS
set options OPTIONS for this run, comma separated. Example "LANGUAGE=en,NETCTL_PATH=/usr/bin/netctl"
.TP
-t, --tab NUM
open a tab with number NUM
.TP
-v, --version
.IP "--set-opts OPTIONS"
set options
.I OPTIONS
for this run, comma separated. Example:
.nf
LANGUAGE=en,NETCTL_PATH=/path/to/ponies
.fi
.IP "-t, --tab NUM"
open a tab with number
.I NUM
.IP "-v, --version"
show version and exit
.TP
-i, --info
.IP "-i, --info"
show build information and exit
.TP
-h, --help
.IP "-h, --help"
show this help and exit
.SH FILES
.TP
$HOME/.config/netctl-gui.conf
.I $HOME/.config/netctl-gui.conf
.RS
Configuration file
.RE
.SH SEE ALSO
.BR netctl-gui (1)
.SH AUTHOR
@PROJECT_AUTHOR@ <\fI@PROJECT_CONTACT@\fR>
.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"))
{
if (debug) qDebug() << "[MainWindow]" << "[checkExternalApps]";
@ -436,11 +453,15 @@ void MainWindow::updateConfiguration(const QMap<QString, QVariant> args)
delete settingsWin;
createObjects();
// some helper fixs
if (useHelper) useHelper = isHelperActive();
if (useHelper)
sendDBusRequest(DBUS_HELPER_SERVICE, DBUS_CTRL_PATH,
DBUS_HELPER_INTERFACE, QString("Update"),
QList<QVariant>(), true, debug);
if (isHelperServiceActive())
configuration[QString("CLOSE_HELPER")] = QString("false");
// update ui
setTab(args[QString("tab")].toInt() - 1);
createActions();
setIconsToTabs();

View File

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

View File

@ -489,14 +489,22 @@ void 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->pushButton_status->setText(QApplication::translate("SettingsWindow", "Stop"));
ui->pushButton_status->setIcon(QIcon::fromTheme("process-stop"));
ui->pushButton_status->setEnabled(true);
}
else {
ui->label_status->setText(QApplication::translate("SettingsWindow", "Inactive"));
ui->pushButton_status->setText(QApplication::translate("SettingsWindow", "Start"));
ui->pushButton_status->setIcon(QIcon::fromTheme("system-run"));
ui->pushButton_status->setEnabled(true);
}
}

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>656</width>
<height>317</height>
<width>654</width>
<height>315</height>
</rect>
</property>
<property name="windowTitle">
@ -136,8 +136,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>440</width>
<height>256</height>
<width>438</width>
<height>254</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
@ -211,11 +211,21 @@
<rect>
<x>0</x>
<y>0</y>
<width>440</width>
<height>256</height>
<width>438</width>
<height>254</height>
</rect>
</property>
<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>
<layout class="QHBoxLayout" name="layout_status">
<item>
@ -282,7 +292,7 @@
<item>
<widget class="QCheckBox" name="checkBox_helperClose">
<property name="text">
<string>Close helper after exit</string>
<string>Close helper after exit (doesn't work while systemd service is active)</string>
</property>
</widget>
</item>
@ -342,12 +352,6 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>104</height>
</size>
</property>
</spacer>
</item>
</layout>
@ -371,8 +375,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>440</width>
<height>256</height>
<width>436</width>
<height>165</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
@ -825,8 +829,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>436</width>
<height>103</height>
<width>438</width>
<height>254</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">

View File

@ -5,36 +5,60 @@ netctlgui-helper is a helper daemon for netctl-gui
.B netctlgui-helper
[ options ]
.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
.TP
--nodaemon
.IP "--nodaemon"
do not run as daemon
.TP
-c, --config FILE
read configuration from file FILE
.TP
-d, --debug
.IP "-c, --config FILE"
read configuration from file
.I FILE
.IP "-d, --debug"
print debug information
.TP
-v, --version
.IP "-v, --version"
show version and exit
.TP
-i, --info
.IP "-i, --info"
show build information and exit
.TP
-h, --help
.IP "-h, --help"
show this help and exit
.SH FILES
.TP
$HOME/.config/netctl-gui.conf
.I $HOME/.config/netctl-gui.conf
.RS
Configuration file
.TP
/usr/lib/systemd/system/netctlgui-helper.service
.RE
.I /usr/lib/systemd/system/netctlgui-helper.service
.RS
Systemd service file
.TP
/etc/dbus-1/system.d/org.netctlgui.helper.conf
.RE
.I /etc/dbus-1/system.d/org.netctlgui.helper.conf
.RS
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
@PROJECT_AUTHOR@ <\fI@PROJECT_CONTACT@\fR>
.SH LICENSE

View File

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

View File

@ -167,6 +167,10 @@
<source>Sender : %1</source>
<translation>Sender : %1</translation>
</message>
<message>
<source>Could not run helper</source>
<translation>Could not run helper</translation>
</message>
</context>
<context>
<name>EthernetWidget</name>
@ -938,7 +942,7 @@
</message>
<message>
<source>Build date: %1</source>
<translation>Build date: %1</translation>
<translation type="vanished">Build date: %1</translation>
</message>
<message>
<source>cmake flags:</source>
@ -1064,11 +1068,11 @@
</message>
<message>
<source>cmake flags</source>
<translation>cmake flags</translation>
<translation type="vanished">cmake flags</translation>
</message>
<message>
<source>DBus configuration</source>
<translation>DBus configuration</translation>
<translation type="vanished">DBus configuration</translation>
</message>
</context>
<context>
@ -1325,6 +1329,21 @@
<translation>Profile</translation>
</message>
</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>
<name>PasswdWidget</name>
<message>
@ -1721,6 +1740,70 @@
<source>Start minimized to tray</source>
<translation>Start minimized to tray</translation>
</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>
<name>TrayIcon</name>

File diff suppressed because it is too large Load Diff

View File

@ -167,6 +167,10 @@
<source>Sender : %1</source>
<translation>Отправитель : %1</translation>
</message>
<message>
<source>Could not run helper</source>
<translation>Не могу запустить хелпер</translation>
</message>
</context>
<context>
<name>EthernetWidget</name>
@ -937,7 +941,7 @@
</message>
<message>
<source>Build date: %1</source>
<translation>Дата сборки: %1</translation>
<translation type="vanished">Дата сборки: %1</translation>
</message>
<message>
<source>cmake flags:</source>
@ -1063,11 +1067,11 @@
</message>
<message>
<source>cmake flags</source>
<translation>Флаги cmake</translation>
<translation type="vanished">Флаги cmake</translation>
</message>
<message>
<source>DBus configuration</source>
<translation>Настройка DBus</translation>
<translation type="vanished">Настройка DBus</translation>
</message>
</context>
<context>
@ -1324,6 +1328,21 @@
<translation>Профиль</translation>
</message>
</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>
<name>PasswdWidget</name>
<message>
@ -1720,6 +1739,70 @@
<source>Start minimized to tray</source>
<translation>Запускать свернутым в трей</translation>
</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>
<name>TrayIcon</name>