aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-04-19 09:17:20 -0400
committerKen Moore <ken@ixsystems.com>2017-04-19 09:17:20 -0400
commit3c077da3151397ea371cdf9e26a5826c7824366e (patch)
tree1e47cf7c1aecec279b54682f7b0e8fca02160926 /src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp
parentFix up the icons used for the battery notifications. (diff)
downloadlumina-3c077da3151397ea371cdf9e26a5826c7824366e.tar.gz
lumina-3c077da3151397ea371cdf9e26a5826c7824366e.tar.bz2
lumina-3c077da3151397ea371cdf9e26a5826c7824366e.zip
Add the ability to change the libao audio driver as needed.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp
index 09fe485d..5bf65cb0 100644
--- a/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-mediaplayer/mainUI.cpp
@@ -104,10 +104,15 @@ void MainUI::setupPandora(){
ui->combo_pandora_quality->addItem(tr("Low"),"low");
ui->combo_pandora_quality->addItem(tr("Medium"), "medium");
ui->combo_pandora_quality->addItem(tr("High"),"high");
+ ui->combo_pandora_driver->clear();
+ ui->combo_pandora_driver->addItems( PANDORA->availableAudioDrivers() );
//Now load the current settings into the UI
int qual = ui->combo_pandora_quality->findData(PANDORA->audioQuality());
if(qual>=0){ ui->combo_pandora_quality->setCurrentIndex(qual); }
else{ ui->combo_pandora_quality->setCurrentIndex(1); } //medium quality by default
+ qual = ui->combo_pandora_driver->findText(PANDORA->currentAudioDriver());
+ if(qual>=0){ ui->combo_pandora_driver->setCurrentIndex(qual); }
+ else{ ui->combo_pandora_driver->setCurrentIndex(0); } //automatic (always first in list)
ui->line_pandora_email->setText( PANDORA->email() );
ui->line_pandora_pass->setText( PANDORA->password() );
ui->line_pandora_proxy->setText( PANDORA->proxy() );
@@ -147,6 +152,7 @@ void MainUI::setupConnections(){
connect(ui->push_pandora_apply, SIGNAL(clicked()), this, SLOT(applyPandoraSettings()) );
connect(ui->combo_pandora_station, SIGNAL(activated(QString)), this, SLOT(changePandoraStation(QString)) );
+ connect(ui->combo_pandora_driver, SIGNAL(activated(QString)), this, SLOT(checkPandoraSettings()) );
connect(ui->tool_pandora_ban, SIGNAL(clicked()), PANDORA, SLOT(banSong()) );
connect(ui->tool_pandora_love, SIGNAL(clicked()), PANDORA, SLOT(loveSong()) );
connect(ui->tool_pandora_tired, SIGNAL(clicked()), PANDORA, SLOT(tiredSong()) );
@@ -475,7 +481,8 @@ void MainUI::checkPandoraSettings(){
|| (PANDORA->password() != ui->line_pandora_pass->text())
|| (PANDORA->audioQuality() != ui->combo_pandora_quality->currentData().toString())
|| (PANDORA->proxy() != ui->line_pandora_proxy->text())
- || (PANDORA->controlProxy() != ui->line_pandora_cproxy->text());
+ || (PANDORA->controlProxy() != ui->line_pandora_cproxy->text())
+ || (PANDORA->currentAudioDriver() != ui->combo_pandora_driver->currentText());
ui->push_pandora_apply->setEnabled(changes);
}
@@ -484,6 +491,7 @@ void MainUI::applyPandoraSettings(){
PANDORA->setAudioQuality(ui->combo_pandora_quality->currentData().toString());
PANDORA->setProxy(ui->line_pandora_proxy->text());
PANDORA->setControlProxy(ui->line_pandora_cproxy->text());
+ PANDORA->setAudioDriver(ui->combo_pandora_driver->currentText());
if(PANDORA->isSetup()){
//Go ahead and (re)start the Pandora process so it is aware of the new changes
if(PANDORA->currentState()!=PianoBarProcess::Stopped){ PANDORA->closePianoBar(); }
bgstack15