diff options
author | Ken Moore <moorekou@gmail.com> | 2015-09-28 14:13:31 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-09-28 14:13:31 -0400 |
commit | 32ce4568da9ea61b4dafaf8022d48bdda57ec5b2 (patch) | |
tree | 2d9c0126f7a7a245e4043925060607f877761d8e /lumina-config/mainUI.cpp | |
parent | Change which MoveResize calculation is used for window geometry check/verific... (diff) | |
download | lumina-32ce4568da9ea61b4dafaf8022d48bdda57ec5b2.tar.gz lumina-32ce4568da9ea61b4dafaf8022d48bdda57ec5b2.tar.bz2 lumina-32ce4568da9ea61b4dafaf8022d48bdda57ec5b2.zip |
Add support for local Fluxbox theme files (~/.fluxbox/styles) into lumina-config.
Diffstat (limited to 'lumina-config/mainUI.cpp')
-rw-r--r-- | lumina-config/mainUI.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lumina-config/mainUI.cpp b/lumina-config/mainUI.cpp index 9c528fb6..6c4abd3d 100644 --- a/lumina-config/mainUI.cpp +++ b/lumina-config/mainUI.cpp @@ -226,12 +226,20 @@ void MainUI::setupMenus(){ ui->combo_session_wloc->addItem( tr("Cascade"), "CascadePlacement"); ui->combo_session_wloc->addItem( tr("Underneath Mouse"), "UnderMousePlacement"); ui->combo_session_wtheme->clear(); - QDir fbdir(LOS::AppPrefix()+"share/fluxbox/styles"); - QStringList fbstyles = fbdir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name); + QStringList dirs; dirs << LOS::AppPrefix()+"share/fluxbox/styles" << QDir::homePath()+"/.fluxbox/styles"; + QFileInfoList fbstyles; + for(int i=0; i<dirs.length(); i++){ + QDir fbdir(dirs[i]); + fbstyles << fbdir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name); + } + QString lastdir; for(int i=0; i<fbstyles.length(); i++){ - ui->combo_session_wtheme->addItem(fbstyles[i], fbdir.absoluteFilePath(fbstyles[i])); + if(lastdir!=fbstyles[i].absolutePath()){ + lastdir = fbstyles[i].absolutePath(); //save for checking later + if(ui->combo_session_wtheme->count()>0){ ui->combo_session_wtheme->insertSeparator(ui->combo_session_wtheme->count()); } + } + ui->combo_session_wtheme->addItem(fbstyles[i].fileName(), fbstyles[i].absoluteFilePath()); } - //Display formats for panel clock ui->combo_session_datetimeorder->clear(); ui->combo_session_datetimeorder->addItem( tr("Time (Date as tooltip)"), "timeonly"); @@ -1534,8 +1542,8 @@ void MainUI::loadSessionSettings(){ if(!val.isEmpty()){ ui->spin_session_wkspaces->setValue(val.toInt()); } //Now do the startup applications - QStringList STARTUP = readFile(QDir::homePath()+"/.lumina/startapps"); - STARTAPPS = LXDG::findAutoStartFiles(true); //also want invalid/disabled items + //STARTUP = readFile(QDir::homePath()+"/.lumina/startapps"); + QList<XDGDesktop> STARTAPPS = LXDG::findAutoStartFiles(true); //also want invalid/disabled items //qDebug() << "StartApps:"; ui->list_session_start->clear(); for(int i=0; i<STARTAPPS.length(); i++){ |