diff options
author | Ken Moore <ken@pcbsd.org> | 2014-10-01 10:21:53 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-10-01 10:21:53 -0400 |
commit | 9e1d3ed668b9ace2d5d2297f6288906ea181fff9 (patch) | |
tree | 756039dfa38a0c5b7a0e99ff174e8205a90a90d8 /lumina-config/mainUI.cpp | |
parent | Remove the "ONLY_FOR_ARCHS=" line in the makefile for Lumina: there is nothin... (diff) | |
download | lumina-9e1d3ed668b9ace2d5d2297f6288906ea181fff9.tar.gz lumina-9e1d3ed668b9ace2d5d2297f6288906ea181fff9.tar.bz2 lumina-9e1d3ed668b9ace2d5d2297f6288906ea181fff9.zip |
Add a Fluxbox Window theme preview to lumina-config
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 ); } |