diff options
Diffstat (limited to 'lumina-config/mainUI.cpp')
-rw-r--r-- | lumina-config/mainUI.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lumina-config/mainUI.cpp b/lumina-config/mainUI.cpp index 110149f2..c366b07c 100644 --- a/lumina-config/mainUI.cpp +++ b/lumina-config/mainUI.cpp @@ -189,7 +189,7 @@ void MainUI::setupConnections(){ connect(ui->tool_session_rmapp, SIGNAL(clicked()), this, SLOT(rmsessionstartitem()) ); connect(ui->combo_session_wfocus, SIGNAL(currentIndexChanged(int)), this, SLOT(sessionoptchanged()) ); connect(ui->combo_session_wloc, SIGNAL(currentIndexChanged(int)), this, SLOT(sessionoptchanged()) ); - connect(ui->combo_session_wtheme, SIGNAL(currentIndexChanged(int)), this, SLOT(sessionoptchanged()) ); + connect(ui->combo_session_wtheme, SIGNAL(currentIndexChanged(int)), this, SLOT(sessionthemechanged()) ); connect(ui->check_session_numlock, SIGNAL(stateChanged(int)), this, SLOT(sessionoptchanged()) ); connect(ui->check_session_playloginaudio, SIGNAL(stateChanged(int)), this, SLOT(sessionoptchanged()) ); connect(ui->check_session_playlogoutaudio, SIGNAL(stateChanged(int)), this, SLOT(sessionoptchanged()) ); @@ -1428,6 +1428,18 @@ void MainUI::sessionoptchanged(){ } } +void MainUI::sessionthemechanged(){ + //Update the Fluxbox Theme preview + QString previewfile = ui->combo_session_wtheme->itemData( ui->combo_session_wtheme->currentIndex() ).toString(); + previewfile.append( (previewfile.endsWith("/") ? "preview.jpg": "/preview.jpg") ); + if(QFile::exists(previewfile)){ + ui->label_session_wpreview->setPixmap(QPixmap(previewfile)); + }else{ + ui->label_session_wpreview->setText(tr("No Preview Available")); + } + sessionoptchanged(); +} + void MainUI::sessionstartchanged(){ ui->tool_session_rmapp->setEnabled( ui->list_session_start->currentRow()>=0 ); } |