diff --git a/sources/gui/src/commonfunctions.cpp b/sources/gui/src/commonfunctions.cpp index dff3b22..99807c7 100644 --- a/sources/gui/src/commonfunctions.cpp +++ b/sources/gui/src/commonfunctions.cpp @@ -35,25 +35,7 @@ bool checkExternalApps(const QString apps, const QMap configur cmd.append("which"); // avoid null-lines arguments cmd.append("true"); - if ((apps == QString("helper")) || (apps == QString("all"))) { - cmd.append(configuration[QString("HELPER_PATH")]); - } - if ((apps == QString("netctl")) || (apps == QString("all"))) { - cmd.append(configuration[QString("NETCTL_PATH")]); - cmd.append(configuration[QString("NETCTLAUTO_PATH")]); - cmd.append(configuration[QString("SUDO_PATH")]); - } - if ((apps == QString("sudo")) || (apps == QString("wpasup")) || (apps == QString("all"))) { - cmd.append(configuration[QString("SUDO_PATH")]); - } - if ((apps == QString("systemctl")) || (apps == QString("all"))) { - cmd.append(configuration[QString("SYSTEMCTL_PATH")]); - cmd.append(configuration[QString("SUDO_PATH")]); - } - if ((apps == QString("wpasup")) || (apps == QString("wpasup-only")) || (apps == QString("all"))) { - cmd.append(configuration[QString("WPACLI_PATH")]); - cmd.append(configuration[QString("WPASUP_PATH")]); - } + cmd.append(externalApps(apps, configuration)); if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd.join(QChar(' ')); TaskResult process = runTask(cmd.join(QChar(' ')), false); @@ -77,25 +59,30 @@ QString checkStatus(const bool statusBool, const bool nullFalse) QStringList externalApps(const QString apps, const QMap configuration) { QStringList app; + // editor works always over cmd + if ((apps == QString("editor")) || (apps == QString("all"))) { + app.append(configuration[QString("EDITOR_PATH")]); + app.append(configuration[QString("SUDO_PATH")]); + } if ((apps == QString("helper")) || (apps == QString("all"))) { app.append(configuration[QString("HELPER_PATH")]); } if ((apps == QString("netctl")) || (apps == QString("all"))) { app.append(configuration[QString("NETCTL_PATH")]); app.append(configuration[QString("NETCTLAUTO_PATH")]); - app.append(configuration[QString("SUDO_PATH")]); - } - if ((apps == QString("sudo")) || (apps == QString("wpasup")) || (apps == QString("all"))) { - app.append(configuration[QString("SUDO_PATH")]); } if ((apps == QString("systemctl")) || (apps == QString("all"))) { app.append(configuration[QString("SYSTEMCTL_PATH")]); - app.append(configuration[QString("SUDO_PATH")]); } if ((apps == QString("wpasup")) || (apps == QString("wpasup-only")) || (apps == QString("all"))) { app.append(configuration[QString("WPACLI_PATH")]); app.append(configuration[QString("WPASUP_PATH")]); } + // append sudo + // FORCE_SUDO is always true if helper is not running + if ((apps.contains(QRegExp(QString("(^all$|^editor$|^netctl$|^sudo$|^systemctl$|^wpasup$)")))) && + (configuration[QString("FORCE_SUDO")] == QString("true"))) + app.append(configuration[QString("SUDO_PATH")]); return app; } diff --git a/sources/gui/src/mainwidget.cpp b/sources/gui/src/mainwidget.cpp index dcd7eeb..fe69427 100644 --- a/sources/gui/src/mainwidget.cpp +++ b/sources/gui/src/mainwidget.cpp @@ -316,6 +316,10 @@ void MainWidget::mainTabEnableProfile() void MainWidget::mainTabRemoveProfile() { if (debug) qDebug() << PDEBUG; + if (!checkExternalApps(QString("sudo"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("sudo"), configuration).join(QChar('\n')), debug); + return mainWindow->emitNeedToBeConfigured(); + } if (ui->tableWidget_main->currentItem() == nullptr) return; mainWindow->setDisabled(true); diff --git a/sources/gui/src/mainwindow.cpp b/sources/gui/src/mainwindow.cpp index daa4b6f..ce35e4d 100644 --- a/sources/gui/src/mainwindow.cpp +++ b/sources/gui/src/mainwindow.cpp @@ -464,8 +464,10 @@ bool MainWindow::checkHelperStatus() if (useHelper) useHelper = isHelperActive(); if (useHelper) sendRequestToCtrl(QString("Update"), debug); - else + else { configuration[QString("FORCE_SUDO")] = QString("true"); + configuration[QString("USE_HELPER")] = QString("false"); + } if (isHelperServiceActive()) configuration[QString("CLOSE_HELPER")] = QString("false"); diff --git a/sources/gui/src/mainwindow.ui b/sources/gui/src/mainwindow.ui index 5be2ef9..f83afaf 100644 --- a/sources/gui/src/mainwindow.ui +++ b/sources/gui/src/mainwindow.ui @@ -6,7 +6,7 @@ 0 0 - 550 + 600 497 @@ -33,7 +33,7 @@ 0 0 - 550 + 600 22 diff --git a/sources/gui/src/netctlautowindow.cpp b/sources/gui/src/netctlautowindow.cpp index f73fb5b..b62dafc 100644 --- a/sources/gui/src/netctlautowindow.cpp +++ b/sources/gui/src/netctlautowindow.cpp @@ -25,16 +25,20 @@ #include "calls.h" #include "commonfunctions.h" #include "dbusoperation.h" +#include "errorwindow.h" #include "mainwindow.h" NetctlAutoWindow::NetctlAutoWindow(QWidget *parent, const QMap settings, const bool debugCmd) : QMainWindow(parent), - ui(new Ui::NetctlAutoWindow), - debug(debugCmd) + debug(debugCmd), + configuration(settings) { mainWindow = dynamic_cast(parent); - useHelper = (settings[QString("USE_HELPER")] == QString("true")); + useHelper = (configuration[QString("USE_HELPER")] == QString("true")); + + // ui + ui = new Ui::NetctlAutoWindow; ui->setupUi(this); ui->tableWidget->setColumnHidden(2, true); ui->tableWidget->setColumnHidden(3, true); @@ -165,6 +169,10 @@ void NetctlAutoWindow::netctlAutoContextualMenu(const QPoint &pos) void NetctlAutoWindow::netctlAutoUpdateTable() { if (debug) qDebug() << PDEBUG; + if (!checkExternalApps(QString("netctl"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("netctl"), configuration).join(QChar('\n')), debug); + return mainWindow->emitNeedToBeConfigured(); + } ui->tableWidget->setDisabled(true); netctlInformation info = generalInformation(mainWindow->netctlInterface, @@ -255,6 +263,10 @@ void NetctlAutoWindow::netctlAutoUpdateTable() void NetctlAutoWindow::netctlAutoDisableAllProfiles() { if (debug) qDebug() << PDEBUG; + if (!checkExternalApps(QString("netctl"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("netctl"), configuration).join(QChar('\n')), debug); + return mainWindow->emitNeedToBeConfigured(); + } ui->tableWidget->setDisabled(true); bool responce = false; @@ -274,6 +286,10 @@ void NetctlAutoWindow::netctlAutoDisableAllProfiles() void NetctlAutoWindow::netctlAutoEnableProfile() { if (debug) qDebug() << PDEBUG; + if (!checkExternalApps(QString("netctl"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("netctl"), configuration).join(QChar('\n')), debug); + return mainWindow->emitNeedToBeConfigured(); + } if (ui->tableWidget->currentItem() == nullptr) return; ui->tableWidget->setDisabled(true); @@ -297,6 +313,10 @@ void NetctlAutoWindow::netctlAutoEnableProfile() void NetctlAutoWindow::netctlAutoEnableAllProfiles() { if (debug) qDebug() << PDEBUG; + if (!checkExternalApps(QString("netctl"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("netctl"), configuration).join(QChar('\n')), debug); + return mainWindow->emitNeedToBeConfigured(); + } ui->tableWidget->setDisabled(true); bool responce = false; @@ -316,6 +336,10 @@ void NetctlAutoWindow::netctlAutoEnableAllProfiles() void NetctlAutoWindow::netctlAutoStartProfile() { if (debug) qDebug() << PDEBUG; + if (!checkExternalApps(QString("netctl"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("netctl"), configuration).join(QChar('\n')), debug); + return mainWindow->emitNeedToBeConfigured(); + } if (ui->tableWidget->currentItem() == nullptr) return; ui->tableWidget->setDisabled(true); @@ -339,6 +363,10 @@ void NetctlAutoWindow::netctlAutoStartProfile() void NetctlAutoWindow::netctlAutoEnableService() { if (debug) qDebug() << PDEBUG; + if (!checkExternalApps(QString("netctl"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("netctl"), configuration).join(QChar('\n')), debug); + return mainWindow->emitNeedToBeConfigured(); + } bool responce = false; if (!useHelper) @@ -357,6 +385,10 @@ void NetctlAutoWindow::netctlAutoEnableService() void NetctlAutoWindow::netctlAutoRestartService() { if (debug) qDebug() << PDEBUG; + if (!checkExternalApps(QString("systemctl"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("systemctl"), configuration).join(QChar('\n')), debug); + return mainWindow->emitNeedToBeConfigured(); + } bool responce = false; if (!useHelper) @@ -375,6 +407,10 @@ void NetctlAutoWindow::netctlAutoRestartService() void NetctlAutoWindow::netctlAutoStartService() { if (debug) qDebug() << PDEBUG; + if (!checkExternalApps(QString("systemctl"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("systemctl"), configuration).join(QChar('\n')), debug); + return mainWindow->emitNeedToBeConfigured(); + } bool responce = false; if (!useHelper) @@ -400,9 +436,9 @@ void NetctlAutoWindow::netctlAutoRefreshButtons(QTableWidgetItem *current, QTabl ui->actionSwitch->setEnabled(selected && ui->tableWidget->item(current->row(), 2)->text().isEmpty()); if (selected && !ui->tableWidget->item(current->row(), 3)->text().isEmpty()) { ui->actionEnable->setText(QApplication::translate("NetctlAutoWindow", "Disable")); - ui->actionEnable->setIcon(QIcon::fromTheme("list-add")); + ui->actionEnable->setIcon(QIcon::fromTheme("edit-delete")); } else { ui->actionEnable->setText(QApplication::translate("NetctlAutoWindow", "Enable")); - ui->actionEnable->setIcon(QIcon::fromTheme("edit-delete")); + ui->actionEnable->setIcon(QIcon::fromTheme("list-add")); } } diff --git a/sources/gui/src/netctlautowindow.h b/sources/gui/src/netctlautowindow.h index f8bfd17..6efbad8 100644 --- a/sources/gui/src/netctlautowindow.h +++ b/sources/gui/src/netctlautowindow.h @@ -67,6 +67,7 @@ private: void createActions(); bool debug = false; bool useHelper = true; + QMap configuration; }; diff --git a/sources/gui/src/newprofilewidget.cpp b/sources/gui/src/newprofilewidget.cpp index 981e003..93346b6 100644 --- a/sources/gui/src/newprofilewidget.cpp +++ b/sources/gui/src/newprofilewidget.cpp @@ -23,6 +23,7 @@ #include #include +#include #include "calls.h" #include "bridgewidget.h" @@ -149,6 +150,7 @@ void NewProfileWidget::updateMenuProfile() ui->actionLoad->setEnabled(selected); ui->actionRemove->setEnabled(selected); ui->actionSave->setEnabled(selected); + ui->actionEditor->setEnabled(selected); } @@ -207,6 +209,10 @@ void NewProfileWidget::profileTabChangeState(const QString current) void NewProfileWidget::profileTabCreateProfile() { if (debug) qDebug() << PDEBUG; + if (!checkExternalApps(QString("sudo"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("sudo"), configuration).join(QChar('\n')), debug); + return mainWindow->emitNeedToBeConfigured(); + } // error checking if (ui->comboBox_profile->currentText().isEmpty()) @@ -411,9 +417,35 @@ void NewProfileWidget::profileTabLoadProfile() } +void NewProfileWidget::profileTabOpenInEditor() +{ + if (debug) qDebug() << PDEBUG; + if (!checkExternalApps(QString("editor"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("editor"), configuration).join(QChar('\n')), debug); + return mainWindow->emitNeedToBeConfigured(); + } + + QString profile = QFileInfo(ui->comboBox_profile->currentText()).fileName(); + QString cmd = QString("%1 %2 %3").arg(configuration[QString("SUDO_PATH")]) + .arg(configuration[QString("EDITOR_PATH")]) + .arg(profile); + + if (debug) qDebug() << PDEBUG << ":" << "Run cmd" << cmd; + TaskResult process = runTask(cmd, false); + if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; + if (process.exitCode != 0) + if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error; + mainWindow->showMessage(process.exitCode == 0); +} + + void NewProfileWidget::profileTabRemoveProfile() { if (debug) qDebug() << PDEBUG; + if (!checkExternalApps(QString("sudo"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("sudo"), configuration).join(QChar('\n')), debug); + return mainWindow->emitNeedToBeConfigured(); + } mainWindow->setDisabled(true); QString profile = QFileInfo(ui->comboBox_profile->currentText()).fileName(); @@ -431,6 +463,7 @@ void NewProfileWidget::createActions() // menu actions connect(ui->actionClear, SIGNAL(triggered(bool)), this, SLOT(updateProfileTab())); + connect(ui->actionEditor, SIGNAL(triggered(bool)), this, SLOT(profileTabOpenInEditor())); connect(ui->actionLoad, SIGNAL(triggered(bool)), this, SLOT(profileTabLoadProfile())); connect(ui->actionRemove, SIGNAL(triggered(bool)), this, SLOT(profileTabRemoveProfile())); connect(ui->actionSave, SIGNAL(triggered(bool)), this, SLOT(profileTabCreateProfile())); diff --git a/sources/gui/src/newprofilewidget.h b/sources/gui/src/newprofilewidget.h index 91c8744..6c69dcf 100644 --- a/sources/gui/src/newprofilewidget.h +++ b/sources/gui/src/newprofilewidget.h @@ -64,6 +64,7 @@ private slots: void profileTabChangeState(const QString current); void profileTabCreateProfile(); void profileTabLoadProfile(); + void profileTabOpenInEditor(); void profileTabRemoveProfile(); private: diff --git a/sources/gui/src/newprofilewidget.ui b/sources/gui/src/newprofilewidget.ui index 6114f87..873cb29 100644 --- a/sources/gui/src/newprofilewidget.ui +++ b/sources/gui/src/newprofilewidget.ui @@ -64,7 +64,7 @@ 0 0 - 461 + 459 342 @@ -103,6 +103,7 @@ + @@ -159,6 +160,19 @@ Remove selected profile + + + + + + + + Open in editor + + + Open in an external editor + + diff --git a/sources/gui/src/settingswindow.cpp b/sources/gui/src/settingswindow.cpp index 082e9f6..53ca994 100644 --- a/sources/gui/src/settingswindow.cpp +++ b/sources/gui/src/settingswindow.cpp @@ -67,6 +67,7 @@ void SettingsWindow::createActions() connect(ui->treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(changePage(QTreeWidgetItem *, QTreeWidgetItem *))); // buttons + connect(ui->pushButton_editorPath, SIGNAL(clicked(bool)), this, SLOT(selectAbstractSomething())); connect(ui->pushButton_helperPath, SIGNAL(clicked(bool)), this, SLOT(selectAbstractSomething())); connect(ui->pushButton_interfacesDir, SIGNAL(clicked(bool)), this, SLOT(selectAbstractSomething())); connect(ui->pushButton_netctlPath, SIGNAL(clicked(bool)), this, SLOT(selectAbstractSomething())); @@ -282,6 +283,7 @@ void SettingsWindow::saveSettings() settings.endGroup(); settings.beginGroup(QString("Other")); + settings.setValue(QString("EDITOR_PATH"), config[QString("EDITOR_PATH")]); settings.setValue(QString("IFACE_DIR"), config[QString("IFACE_DIR")]); settings.setValue(QString("RFKILL_DIR"), config[QString("RFKILL_DIR")]); settings.setValue(QString("PREFERED_IFACE"), config[QString("PREFERED_IFACE")]); @@ -365,8 +367,11 @@ void SettingsWindow::selectAbstractSomething() bool isDir = false; QString path = QString("/usr/bin"); QString text = QApplication::translate("SettingsWindow", "Select helper command"); - QLineEdit *lineEdit = ui->lineEdit_helperPath; - if (sender() == ui->pushButton_helperPath) { + QLineEdit *lineEdit = ui->lineEdit_editorPath; + if (sender() == ui->pushButton_editorPath) { + text = QApplication::translate("SettingsWindow", "Select editor command"); + lineEdit = ui->lineEdit_editorPath; + } else if (sender() == ui->pushButton_helperPath) { text = QApplication::translate("SettingsWindow", "Select helper command"); lineEdit = ui->lineEdit_helperPath; } else if (sender() == ui->pushButton_interfacesDir) { @@ -448,6 +453,7 @@ QMap SettingsWindow::readSettings() config[QString("FORCE_SUDO")] = QString("true"); else config[QString("FORCE_SUDO")] = QString("false"); + config[QString("EDITOR_PATH")] = ui->lineEdit_editorPath->text(); config[QString("HELPER_PATH")] = ui->lineEdit_helperPath->text(); config[QString("HELPER_SERVICE")] = ui->lineEdit_helperService->text(); config[QString("IFACE_DIR")] = ui->lineEdit_interfacesDir->text(); @@ -511,6 +517,7 @@ void SettingsWindow::setSettings(const QMap config) ui->checkBox_forceSudo->setCheckState(Qt::Checked); else ui->checkBox_forceSudo->setCheckState(Qt::Unchecked); + ui->lineEdit_editorPath->setText(config[QString("EDITOR_PATH")]); ui->lineEdit_helperPath->setText(config[QString("HELPER_PATH")]); ui->lineEdit_helperService->setText(config[QString("HELPER_SERVICE")]); ui->lineEdit_interfacesDir->setText(config[QString("IFACE_DIR")]); @@ -615,6 +622,7 @@ QMap SettingsWindow::getSettings(QString fileName) settings.endGroup(); settings.beginGroup(QString("Other")); + config[QString("EDITOR_PATH")] = settings.value(QString("EDITOR_PATH"), QString("/usr/bin/gvim")).toString(); config[QString("IFACE_DIR")] = settings.value(QString("IFACE_DIR"), QString("/sys/class/net/")).toString(); config[QString("RFKILL_DIR")] = settings.value(QString("RFKILL_DIR"), QString("/sys/class/rfkill/")).toString(); config[QString("PREFERED_IFACE")] = settings.value(QString("PREFERED_IFACE"), QString("")).toString(); diff --git a/sources/gui/src/settingswindow.ui b/sources/gui/src/settingswindow.ui index 60f4493..76881f6 100644 --- a/sources/gui/src/settingswindow.ui +++ b/sources/gui/src/settingswindow.ui @@ -1252,11 +1252,57 @@ 0 0 - 436 - 107 + 542 + 330 + + + + + + + 7 + 0 + + + + External editor + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 10 + 0 + + + + Path to directory which contains network devices + + + + + + + + 4 + 0 + + + + Browse + + + + + @@ -1413,8 +1459,8 @@ 0 0 - 201 - 177 + 542 + 330 diff --git a/sources/gui/src/wifimenuwidget.cpp b/sources/gui/src/wifimenuwidget.cpp index e582aa0..12e43c4 100644 --- a/sources/gui/src/wifimenuwidget.cpp +++ b/sources/gui/src/wifimenuwidget.cpp @@ -105,6 +105,10 @@ bool WiFiMenuWidget::wifiTabSelectEssidSlot(const QString essid) void WiFiMenuWidget::connectToUnknownEssid(const QString passwd) { if (debug) qDebug() << PDEBUG; + if (!checkExternalApps(QString("netctl"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("netctl"), configuration).join(QChar('\n')), debug); + return mainWindow->emitNeedToBeConfigured(); + } if (ui->tableWidget_wifi->currentItem() == nullptr) return; if (passwdWid != nullptr) delete passwdWid; @@ -183,11 +187,6 @@ void WiFiMenuWidget::updateText(const netctlWifiInfo current) { if (debug) qDebug() << PDEBUG; if (!wifiTabSetEnabled(checkExternalApps(QString("wpasup-only"), configuration, debug))) return; - if (!checkExternalApps(QString("wpasup"), configuration, debug)) { - ErrorWindow::showWindow(1, externalApps(QString("wpasup"), configuration).join(QChar('\n')), debug); - return mainWindow->emitNeedToBeConfigured(); - } - ui->label_wifi->setText(QApplication::translate("WiFiMenuWidget", "Processing...")); QString text = QString(""); text += QString("%1 - %2 - %3 ").arg(current.name).arg(current.security).arg(current.macs[0]); @@ -373,8 +372,8 @@ int WiFiMenuWidget::wifiTabShowInfo() void WiFiMenuWidget::wifiTabStart() { if (debug) qDebug() << PDEBUG; - if (!checkExternalApps(QString("wpasup"), configuration, debug)) { - ErrorWindow::showWindow(1, externalApps(QString("wpasup"), configuration).join(QChar('\n')), debug); + if (!checkExternalApps(QString("netctl"), configuration, debug)) { + ErrorWindow::showWindow(1, externalApps(QString("netctl"), configuration).join(QChar('\n')), debug); return mainWindow->emitNeedToBeConfigured(); } if (ui->tableWidget_wifi->currentItem() == nullptr) return; diff --git a/sources/helper/netctl-gui.conf b/sources/helper/netctl-gui.conf index 0695b9c..f6f9544 100644 --- a/sources/helper/netctl-gui.conf +++ b/sources/helper/netctl-gui.conf @@ -67,6 +67,9 @@ CTRL_DIR=/run/wpa_supplicant CTRL_GROUP=users [Other] +# path to external editor +# This option is not recognized by netctlgui-helper +EDITOR_PATH=/usr/bin/gvim # path to directory which contains interface information IFACE_DIR=/sys/class/net/ # path to directory with rfkill devices. diff --git a/sources/helper/netctl-gui.conf.5 b/sources/helper/netctl-gui.conf.5 index 327bc21..46913e9 100644 --- a/sources/helper/netctl-gui.conf.5 +++ b/sources/helper/netctl-gui.conf.5 @@ -32,6 +32,9 @@ force use for helper instead of using .BR setuid (3) to child processes +.IP "EDITOR_PATH=/usr/bin/gvim" +path to an external editor. This option is not recognized by +.BR netctlgui-helper (1) .IP "HELPER_PATH=/usr/bin/netctlgui-helper" path to .BR netctlgui-helper (1) diff --git a/sources/helper/src/netctlhelper.cpp b/sources/helper/src/netctlhelper.cpp index 532277f..b8838ec 100644 --- a/sources/helper/src/netctlhelper.cpp +++ b/sources/helper/src/netctlhelper.cpp @@ -184,6 +184,7 @@ QMap NetctlHelper::getSettings(const QString file) settings.endGroup(); settings.beginGroup(QString("Other")); + config[QString("EDITOR_PATH")] = settings.value(QString("EDITOR_PATH"), QString("/usr/bin/gvim")).toString(); config[QString("IFACE_DIR")] = settings.value(QString("IFACE_DIR"), QString("/sys/class/net/")).toString(); config[QString("RFKILL_DIR")] = settings.value(QString("RFKILL_DIR"), QString("/sys/class/rfkill/")).toString(); config[QString("PREFERED_IFACE")] = settings.value(QString("PREFERED_IFACE"), QString("")).toString(); diff --git a/sources/resources/translations-helper/en.ts b/sources/resources/translations-helper/en.ts index eab34ce..e6a9a34 100644 --- a/sources/resources/translations-helper/en.ts +++ b/sources/resources/translations-helper/en.ts @@ -1,6 +1,6 @@ - + NetctlHelper diff --git a/sources/resources/translations-helper/ru.ts b/sources/resources/translations-helper/ru.ts index 88f380a..94d0f2a 100644 --- a/sources/resources/translations-helper/ru.ts +++ b/sources/resources/translations-helper/ru.ts @@ -1,6 +1,6 @@ - + NetctlHelper diff --git a/sources/resources/translations/en.ts b/sources/resources/translations/en.ts index 1ea2573..6572c3e 100644 --- a/sources/resources/translations/en.ts +++ b/sources/resources/translations/en.ts @@ -1748,6 +1748,14 @@ Should be according to standards New profile toolbar New profile toolbar + + Open in editor + Open in editor + + + Open in an external editor + Open in an external editor + PasswdWidget @@ -2269,6 +2277,14 @@ Should be according to standards WiFi toolbar WiFi toolbar + + Select editor command + Select editor command + + + External editor + External editor + TrayIcon @@ -2518,7 +2534,7 @@ Should be according to standards Processing... - Processing... + Processing... MHz diff --git a/sources/resources/translations/ja.ts b/sources/resources/translations/ja.ts index 11fc2ba..7964423 100644 --- a/sources/resources/translations/ja.ts +++ b/sources/resources/translations/ja.ts @@ -1,6 +1,6 @@ - + About @@ -234,7 +234,7 @@ 不明なエラーです - + Sender : %1 送信元:%1 @@ -265,7 +265,7 @@ Skip no carrier 存在しないキャリアをスキップ - + Set to ‘yes’ to use 802.1x authentication 802.1.x 認証を使用「する」ように設定する @@ -448,7 +448,7 @@ A command that is executed before a connection is brought down 接続切断前に実行されるコマンド - + Set to ‘yes’ to force connecting even if the interface is up インターフェースが有効であっても強制的に接続「する」ように設定する @@ -513,7 +513,7 @@ Add 追加 - + An array of IP addresses suffixed with ‘/<netmask>’ '</netmask>' が後続するIPアドレスの列 @@ -612,7 +612,7 @@ Timeout DAD DAD のタイムアウト - + Maximum time, in seconds, to wait for IPv6’s Duplicate Address Detection to succeed IPv6 における重複アドレス検出の成功を待機する最大時間(秒) @@ -696,7 +696,7 @@ Should be according to standards Maximum time, in seconds, to wait for DHCP to be successful DHCP が成功するまでの最大待機時間(秒) - + Set to ‘yes’ to release the DHCP lease when the profile is stopped プロファイル停止時に DHCP リースの解放のために 'yes' を設定する @@ -721,7 +721,7 @@ Should be according to standards DNS domain DNS ドメイン - + A ‘domain’ line for /etc/resolv.conf /etc/resolv.conf に対する 'domain' 行 @@ -731,7 +731,7 @@ Should be according to standards DNS search DNS 検索 - + A ‘search’ line for /etc/resolv.conf /etc/resolv.conf に対する 'search' 行 @@ -741,7 +741,7 @@ Should be according to standards DNS options DNS オプション - + An array of ‘options’ lines for /etc/resolv.conf /etc/resolv.conf に対する 'options' 行の列 @@ -1184,12 +1184,12 @@ Should be according to standards 用意 - + yes はい - + no いいえ @@ -1456,22 +1456,22 @@ Should be according to standards 接続の確立に失敗しました。 - + Connection is successfully - + Connection failed - + Do you want to save profile %1? プロファイル%1を保存しますか? - + WiFi menu WiFi メニュー @@ -1671,30 +1671,30 @@ Should be according to standards - + Name 名前 - + Description 説明 - - + + Active 活性化 - + Enabled 有効 - + Disabled 無効 @@ -1714,39 +1714,39 @@ Should be according to standards メニュー - + Ready 用意 - + Disable service サービスを無効化 - + Enable service サービスを有効化 - + netctl-auto is running netctl-auto は実行中です - + Stop service サービスを停止 - + Start service サービスを開始 - + netctl-auto is not running netctl-auto は実行されていません @@ -1759,7 +1759,7 @@ Should be according to standards いいえ - + Profile プロファイル @@ -1768,42 +1768,42 @@ Should be according to standards 最新 - + Enable profile プロファイルを有効化 - + Enable all profiles 全てのプロファイルを有効化 - + Disable all profiles 全てのプロファイルを無効化 - - + + Enable 有効 - - + + Disable 無効 - + Done 完了 - + Error エラー @@ -1812,7 +1812,7 @@ Should be according to standards プロファイルを無効化 - + Switch to profile プロファイルを切り替える @@ -1826,57 +1826,67 @@ Should be according to standards NewProfileWidget - + Clear クリア - + Clear data - + Ctrl+R Ctrl+R - + Load 読み込み - + Load selected profile - + Save 保存 - + Save selected profile - + Remove 削除 - + Remove selected profile - + + Open in editor + + + + + Open in an external editor + + + + Profile プロファイル - + New profile toolbar @@ -1956,7 +1966,7 @@ Should be according to standards Idle timeout アイドル時のタイムアウト - + This option specifies the idle time (in seconds) after which ‘pppd’ should disconnect 'pppd' が切断されるべきアイドル時間(秒)を指定するオプション @@ -2010,7 +2020,7 @@ Should be according to standards LCP echo interval LCP エコー間隔 - + These options override default LCP parameters from ‘/etc/ppp/options’ @@ -2104,322 +2114,328 @@ Should be according to standards SettingsWindow - + Settings 設定 - + General 一般 - + Language 言語 - - + + Select a language 言語を選択 - + netctl netctl - + netctl path netctl のパス - + Path to netctl netctl のパス - - - - - - - - + + + + + + + + + Browse ブラウズ - + Profile path プロファイルのパス - + Path to profile directory プロファイルがあるディレクトリのパス - + sudo sudo - + sudo path sudo path - + Path to sudo sudo へのパス - + wpa_supplicant wpa_supplicant - + Helper ヘルパ - + Enable system tray システムトレイでの表示を有効にする - + Minimize to tray instead of closing ウィンドウを閉じるかわりにシステムトレイへ最小化する - + Start minimized to tray システムトレイへ最小化された状態で起動する - + Skip components checking コンポーネントの確認をスキップする - + It is recommended to use systemd integration. See `man 1 netctlgui-helper` for more details. systemd へ統合された機能の仕様が推奨されます。詳細は `man 1 netctlgui-helper` を参照して下さい。 - + Helper status ヘルパの状態 - + Use helper ヘルパを使用する - + Force use sudo in helper ヘルパにて sudo の使用を強制する - + Helper command コマンド - + Helper service サービス - + Name of netctlgui-helper service Netctl GUIヘルパのサービス名 - + systemctl path systemctl path - + Path to systemctl systemctl へのパス - + netctl-auto path netctl-auto へのパス - + Path to netctl-auto netctl-auto へのパス - + netctl-auto service netctl-auto サービスへのパス - + Toolbars - + Close helper after exit - + Control group - + Name of netctl-auto systemd service netctl-auto サービスの名前 - + wpa_supplicant path wpa_supplicant へのパス - + Path to wpa_supplicant wpa_supplicant へのパス - + wpa_cli path wpa_cli path - + Path to wpa_cli wpa_cli へのパス - + PID file PID ファイル - + wpa_supplicant PID file wpa_supplicant の PID ファイル - + wpa_supplicant drivers wpa_supplicant drivers - + wpa_supplicant drivers comma separated wpa_suppricant のドライバ(コンマで区切る) - + ctrl_interface directory ctrl_interface のディレクトリ - + Path to control directory Netctl GUI で管理するディレクトリのパス - + ctrl_interface group ctrl_interface 群 - + Group of control directory Netctl GUI で管理しているディレクトリ群 - - Main toolbar - - - - - - - - - Left - - - - - - - - - Right - - - - - - - - - Top - - - - - - - - - Bottom - - - - - - - - - Disabled - 無効 - - - - netctl toolbar - - - - - netctl-auto toolbar - - - - - Profiles toolbar + + External editor + Main toolbar + + + + + + + + + Left + + + + + + + + + Right + + + + + + + + + Top + + + + + + + + + Bottom + + + + + + + + + Disabled + 無効 + + + + netctl toolbar + + + + + netctl-auto toolbar + + + + + Profiles toolbar + + + + WiFi toolbar - + Other その他 @@ -2428,111 +2444,117 @@ Should be according to standards 終了後にヘルパを閉じる(systemd のサービスが有効となるまで機能しません) - + Path to interface list インターフェースリストのパス - + + Path to directory which contains network devices ネットワークインターフェースがあるディレクトリへのパス - + Path to rfkill device list Rfkill デバイスリストのパス - + Path to directory which contains rfkill devices Rfkill デバイスがあるディレクトリのパス - - + + Prefered wireless interface 優先する無線インターフェース - + Select path to directory with interfaces ネットワークインターフェースがあるディレクトリへのパス - + Select netctl command netctl コマンドを選択 - + All files (*) 全てのファイル (*) - - + + Select helper command ヘルパのコマンドを選択 - + + Select editor command + + + + Select netctl-auto command netctl-auto コマンドを選択 - + Select path to profile directory プロファイルがあるディレクトリのパス - + Select path to directory with rfkill devices Rfkill デバイスがあるディレクトリのパス - + Select sudo command sudo コマンドを選択 - + Select systemctl command systemctl コマンドを選択 - + Select wpa_cli command wpa_cli コマンドを選択 - + Select wpa_supplicant command wpa_supplicant コマンドを選択 - + Active (systemd) 有効 (systemd) - + Active 有効 - - + + Stop 停止 - + Inactive 無効 - - + + Start 開始 @@ -2746,7 +2768,7 @@ Should be according to standards Mode モード - + Either ‘tun’, or ‘tap’ 'TUN' 又は 'TAP' のどれか @@ -2807,124 +2829,119 @@ Should be according to standards WiFiMenuWidget - + Start 開始 - + Stop 停止 - - Processing... - - - - - + + MHz - + Name 名前 - - + + Type - + # of points - + Signal 信号 - + Security セキュリティ - - + + Active - - + + Exists 存在 - + 2GHz - + 5GHz - + 2GHz and 5GHz - + N\A - + Point - + Refresh 再読み込み - - + + Start WiFi WiFiを開始 - + Stop WiFi WiFiを停止 - + Please install 'wpa_supplicant' before use it 使用前に 'wpa_supplicant' をインストールして下さい - + Information - + This isn't the functionality you're looking for diff --git a/sources/resources/translations/netctl-gui.ts b/sources/resources/translations/netctl-gui.ts index 7f57e89..abeae9a 100644 --- a/sources/resources/translations/netctl-gui.ts +++ b/sources/resources/translations/netctl-gui.ts @@ -229,7 +229,7 @@ - + Sender : %1 @@ -1030,12 +1030,12 @@ Should be according to standards - + yes - + no @@ -1246,22 +1246,22 @@ Should be according to standards - + Connection is successfully - + Connection failed - + Do you want to save profile %1? - + WiFi menu @@ -1449,30 +1449,30 @@ Should be according to standards - + Name - + Description - - + + Active - + Enabled - + Disabled @@ -1492,89 +1492,89 @@ Should be according to standards - + Ready - + Disable service - + Enable service - + netctl-auto is running - + Stop service - + Start service - + netctl-auto is not running - + Profile - + Enable profile - + Enable all profiles - + Disable all profiles - - + + Enable - - + + Disable - + Done - + Error - + Switch to profile @@ -1588,57 +1588,67 @@ Should be according to standards NewProfileWidget - + Clear - + Clear data - + Ctrl+R - + Load - + Load selected profile - + Save - + Save selected profile - + Remove - + Remove selected profile - + + Open in editor + + + + + Open in an external editor + + + + Profile - + New profile toolbar @@ -1850,431 +1860,443 @@ Should be according to standards SettingsWindow - + Settings - + General - + Language - - + + Select a language - + netctl - + netctl path - + Path to netctl - - - - - - - - + + + + + + + + + Browse - + Profile path - + Path to profile directory - + sudo - + sudo path - + Path to sudo - + wpa_supplicant - + Helper - + Enable system tray - + Minimize to tray instead of closing - + Start minimized to tray - + Skip components checking - + It is recommended to use systemd integration. See `man 1 netctlgui-helper` for more details. - + Helper status - + Use helper - + Force use sudo in helper - + Helper command - + Helper service - + Name of netctlgui-helper service - + systemctl path - + Path to systemctl - + netctl-auto path - + Path to netctl-auto - + netctl-auto service - + Toolbars - + Close helper after exit - + Control group - + Name of netctl-auto systemd service - + wpa_supplicant path - + Path to wpa_supplicant - + wpa_cli path - + Path to wpa_cli - + PID file - + wpa_supplicant PID file - + wpa_supplicant drivers - + wpa_supplicant drivers comma separated - + ctrl_interface directory - + Path to control directory - + ctrl_interface group - + Group of control directory - - Main toolbar - - - - - - - - - Left - - - - - - - - - Right - - - - - - - - - Top - - - - - - - - - Bottom - - - - - - - - - Disabled - - - - - netctl toolbar - - - - - netctl-auto toolbar - - - - - Profiles toolbar + + External editor + Main toolbar + + + + + + + + + Left + + + + + + + + + Right + + + + + + + + + Top + + + + + + + + + Bottom + + + + + + + + + Disabled + + + + + netctl toolbar + + + + + netctl-auto toolbar + + + + + Profiles toolbar + + + + WiFi toolbar - + Other - + Path to interface list - + + Path to directory which contains network devices - + Path to rfkill device list - + Path to directory which contains rfkill devices - - + + Prefered wireless interface - + Select path to directory with interfaces - + Select netctl command - + All files (*) - - + + Select helper command - + + Select editor command + + + + Select netctl-auto command - + Select path to profile directory - + Select path to directory with rfkill devices - + Select sudo command - + Select systemctl command - + Select wpa_cli command - + Select wpa_supplicant command - + Active (systemd) - + Active - - + + Stop - + Inactive - - + + Start @@ -2509,124 +2531,119 @@ Should be according to standards WiFiMenuWidget - + Start - + Stop - - Processing... - - - - - + + MHz - + Name - - + + Type - + # of points - + Signal - + Security - - + + Active - - + + Exists - + 2GHz - + 5GHz - + 2GHz and 5GHz - + N\A - + Point - + Refresh - - + + Start WiFi - + Stop WiFi - + Please install 'wpa_supplicant' before use it - + Information - + This isn't the functionality you're looking for diff --git a/sources/resources/translations/ru.ts b/sources/resources/translations/ru.ts index 78884e7..e31704c 100644 --- a/sources/resources/translations/ru.ts +++ b/sources/resources/translations/ru.ts @@ -1747,6 +1747,14 @@ Should be according to standards New profile toolbar Управление профилями + + Open in editor + Открыть в редакторе + + + Open in an external editor + Открыть во внешнем редакторе + PasswdWidget @@ -2268,6 +2276,14 @@ Should be according to standards WiFi toolbar Управление WiFi + + Select editor command + Выберете внешний редактор + + + External editor + Внешний редактор + TrayIcon @@ -2517,7 +2533,7 @@ Should be according to standards Processing... - Обработка + Обработка MHz