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">