mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-06 18:45:46 +00:00
update man pagesand translations
This commit is contained in:
@ -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();
|
||||
|
@ -59,6 +59,7 @@ public:
|
||||
QString printInformation();
|
||||
QStringList printSettings();
|
||||
bool isHelperActive();
|
||||
bool isHelperServiceActive();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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">
|
||||
|
Reference in New Issue
Block a user