diff options
author | Christopher Roy Bratusek <nano@jpberlin.de> | 2014-10-06 19:27:57 +0200 |
---|---|---|
committer | Christopher Roy Bratusek <nano@jpberlin.de> | 2014-10-06 19:27:57 +0200 |
commit | b4803118c5e22e7a00d313698868a0ebbe5188ba (patch) | |
tree | b5e1ca893e40ed571cbea5abf055ec2018dc4a83 /lumina-config/mainUI.cpp | |
parent | Clean up the new global.h usage in all the Lumina subprojects. (diff) | |
download | lumina-b4803118c5e22e7a00d313698868a0ebbe5188ba.tar.gz lumina-b4803118c5e22e7a00d313698868a0ebbe5188ba.tar.bz2 lumina-b4803118c5e22e7a00d313698868a0ebbe5188ba.zip |
make window manager selectable from lumina-config>settings>general
Diffstat (limited to 'lumina-config/mainUI.cpp')
-rw-r--r-- | lumina-config/mainUI.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lumina-config/mainUI.cpp b/lumina-config/mainUI.cpp index eb29ee8f..f6a8b1f3 100644 --- a/lumina-config/mainUI.cpp +++ b/lumina-config/mainUI.cpp @@ -117,6 +117,7 @@ void MainUI::setupIcons(){ ui->tool_session_addapp->setIcon( LXDG::findIcon("system-run","") ); ui->tool_session_addbin->setIcon( LXDG::findIcon("system-search","") ); ui->tool_session_addfile->setIcon( LXDG::findIcon("run-build-file","") ); + ui->tool_session_findwm->setIcon( LXDG::findIcon("system-search","") ); } @@ -193,6 +194,8 @@ void MainUI::setupConnections(){ 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()) ); + connect(ui->tool_session_findwm, SIGNAL(clicked()), this, SLOT(findsessionwindowmanager()) ); + connect(ui->line_session_windowmanager, SIGNAL(textChanged(QString)), this, SLOT(sessionoptchanged()) ); connect(ui->spin_session_wkspaces, SIGNAL(valueChanged(int)), this, SLOT(sessionoptchanged()) ); connect(ui->list_session_start, SIGNAL(currentRowChanged(int)), this, SLOT(sessionstartchanged()) ); } @@ -1343,10 +1346,25 @@ void MainUI::loadSessionSettings(){ ui->check_session_numlock->setChecked( sessionsettings->value("EnableNumlock", true).toBool() ); ui->check_session_playloginaudio->setChecked( sessionsettings->value("PlayStartupAudio",true).toBool() ); ui->check_session_playlogoutaudio->setChecked( sessionsettings->value("PlayLogoutAudio",true).toBool() ); + ui->line_session_windowmanager->setText( sessionsettings->value("WindowManager","fluxbox").toString() ); sessionstartchanged(); //make sure to update buttons } +void MainUI::findsessionwindowmanager(){ + QString chkpath = LOS::AppPrefix() + "bin"; + if(!QFile::exists(chkpath)){ chkpath = QDir::homePath(); } + QString bin = QFileDialog::getOpenFileName(this, tr("Set Default Window Manager"), chkpath, tr("Application Binaries (*)") ); + if( bin.isEmpty() || !QFile::exists(bin) ){ return; } //cancelled + if( !QFileInfo(bin).isExecutable() ){ + QMessageBox::warning(this, tr("Invalid Binary"), tr("The selected file is not executable!")); + return; + } + ui->line_session_windowmanager->setText(bin); + ui->push_save->setEnabled(true); + modmenu = true; +} + void MainUI::saveSessionSettings(){ //Do the fluxbox settings first QStringList FB = readFile(QDir::homePath()+"/.lumina/fluxbox-init"); @@ -1386,6 +1404,7 @@ void MainUI::saveSessionSettings(){ sessionsettings->setValue("EnableNumlock", ui->check_session_numlock->isChecked()); sessionsettings->setValue("PlayStartupAudio", ui->check_session_playloginaudio->isChecked()); sessionsettings->setValue("PlayLogoutAudio", ui->check_session_playlogoutaudio->isChecked()); + sessionsettings->setValue("WindowManager", ui->line_session_windowmanager->text() ); } void MainUI::rmsessionstartitem(){ |