Load radio settings after core startup and apply from dialog

This commit is contained in:
evgeny committed 2026-10-03 13:12:17 +03:00
1 parent 9f41415dc7
commit afbce0efeb
3 files changed
+9 -1

No files matched your search

+7 -1
View File
@@ -26,6 +26,7 @@ extern "C" {
#include <QComboBox>
#include <QFile>
#include <QTextStream>
#include <QMessageBox>
SettingsDialog::SettingsDialog(const QString& configPath, DbManager* db, UtunNode* node,
AudioRecorder* recorder, QWidget* parent)
@@ -221,6 +222,7 @@ void SettingsDialog::onCategoryChanged(int row) {
if (row == 6) m_nodesPage->refreshNodes();
if (row == 7) m_soundPage->loadFromDb();
if (row == 8) m_audioDevicePage->loadFromDb();
if (row == 9) m_radioPage->loadFromDb();
}
void SettingsDialog::onSave() {
@@ -295,7 +297,11 @@ void SettingsDialog::onSave() {
m_soundPage->applyAndSave();
m_audioDevicePage->applyAndSave();
m_storagePage->applyAndSave();
m_radioPage->apply();
if (!m_radioPage->apply()) {
QMessageBox::warning(this, QStringLiteral("Настройки рации"), QStringLiteral("Не удалось применить настройки рации. "
"Проверьте доступность ядра и файла конфигурации; подробности в логе radio."));
return;
}
/* Физические сочетания сохраняем в БД; Wayland-хоткеями владеет системный портал. */
if (!PttHotkeyManager::usesPortal()) {