diff options
author | Chris Robinson <[email protected]> | 2016-02-27 19:18:57 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-02-27 19:18:57 -0800 |
commit | a12c420c591ef90dd50aabd435a9e995681232a2 (patch) | |
tree | 5813431d07e180eb031b7242ab861ef45835e46e /utils/alsoft-config/mainwindow.cpp | |
parent | 0e1edc151d410a73be29f01f2320812ab916a62b (diff) |
Reorganize the Backends tab and add a PulseAudio section
Diffstat (limited to 'utils/alsoft-config/mainwindow.cpp')
-rw-r--r-- | utils/alsoft-config/mainwindow.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index 63a29714..f1516e4b 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -306,6 +306,13 @@ MainWindow::MainWindow(QWidget *parent) : connect(ui->enableModulatorCheck, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(ui->enableDedicatedCheck, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(ui->pulseAutospawnCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(ui->pulseAllowMovesCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + connect(ui->pulseFixRateCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); + + ui->backendListWidget->setCurrentRow(0); + ui->tabWidget->setCurrentIndex(0); + loadConfig(getDefaultConfigName()); } @@ -631,6 +638,10 @@ void MainWindow::loadConfig(const QString &fname) ui->enableModulatorCheck->setChecked(!excludefx.contains("modulator", Qt::CaseInsensitive)); ui->enableDedicatedCheck->setChecked(!excludefx.contains("dedicated", Qt::CaseInsensitive)); + ui->pulseAutospawnCheckBox->setChecked(settings.value("pulse/spawn-server", true).toBool()); + ui->pulseAllowMovesCheckBox->setChecked(settings.value("pulse/allow-moves", false).toBool()); + ui->pulseFixRateCheckBox->setChecked(settings.value("pulse/fix-rate", false).toBool()); + ui->applyButton->setEnabled(false); ui->closeCancelButton->setText(tr("Close")); mNeedsSave = false; @@ -772,7 +783,7 @@ void MainWindow::saveConfig(const QString &fname) const if(ui->emulateEaxCheckBox->isChecked()) settings.setValue("reverb/emulate-eax", "true"); else - settings.setValue("reverb/emulate-eax", QString()/*"false"*/); + settings.remove("reverb/emulate-eax"/*, "false"*/); strlist.clear(); if(!ui->enableEaxReverbCheck->isChecked()) @@ -807,6 +818,19 @@ void MainWindow::saveConfig(const QString &fname) const if(str == QString()) settings.remove(key); } + + if(ui->pulseAutospawnCheckBox->isChecked()) + settings.remove("pulse/spawn-server"/*, "true"*/); + else + settings.setValue("pulse/spawn-server", "false"); + if(ui->pulseAllowMovesCheckBox->isChecked()) + settings.setValue("pulse/allow-moves", "true"); + else + settings.remove("pulse/allow-moves"/*, "false"*/); + if(ui->pulseFixRateCheckBox->isChecked()) + settings.setValue("pulse/fix-rate", "true"); + else + settings.remove("pulse/fix-rate"/*, "false"*/); } |