diff options
author | Ken Moore <ken@ixsystems.com> | 2018-11-19 15:25:56 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2018-11-19 15:25:56 -0500 |
commit | 51dcc7e7d85c96af7be0dd8fb292d6df138acbe9 (patch) | |
tree | 2dadc0b6fa7e1653c45ccc7a2947e8de35348719 /src-qt5/core-utils | |
parent | Fix a trailing slash in the desktop-utils.pro (diff) | |
download | lumina-51dcc7e7d85c96af7be0dd8fb292d6df138acbe9.tar.gz lumina-51dcc7e7d85c96af7be0dd8fb292d6df138acbe9.tar.bz2 lumina-51dcc7e7d85c96af7be0dd8fb292d6df138acbe9.zip |
Make sure that the time to rotate wallpapers is enabled if a single directory is setup.
Diffstat (limited to 'src-qt5/core-utils')
-rw-r--r-- | src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp b/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp index c2737084..7dc9f8f8 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp +++ b/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp @@ -137,14 +137,18 @@ void page_wallpaper::updateMenus(){ void page_wallpaper::deskbgchanged(){ //Load the new image preview + bool allow_time_set = true; if(ui->combo_desk_bg->count()==0){ ui->label_desk_bgview->setPixmap(QPixmap()); ui->label_desk_bgview->setText(tr("No Background")+"\n"+tr("(use system default)")); ui->label_desk_bgview->setStyleSheet(""); + allow_time_set = false; }else{ + allow_time_set = (ui->combo_desk_bg->count()>1); QString path = ui->combo_desk_bg->itemData( ui->combo_desk_bg->currentIndex() ).toString(); if(path=="default"){ path = DEFAULTBG; } if(QFileInfo(path).isDir()){ + allow_time_set = true; //always allow setting the time if a directory is set QDir dir(path); //Got a directory - go ahead and get all the valid image files QStringList imgs = LUtils::imageExtensions(); @@ -185,11 +189,10 @@ void page_wallpaper::deskbgchanged(){ if(ui->combo_desk_bg->count()<2){ ui->radio_desk_single->setChecked(true); ui->radio_desk_multi->setEnabled(false); - ui->spin_desk_min->setEnabled(false); }else{ ui->radio_desk_multi->setEnabled(true); - ui->spin_desk_min->setEnabled(ui->radio_desk_multi->isChecked()); } + ui->spin_desk_min->setEnabled(allow_time_set); //Disable the bg remove button if no backgrounds loaded ui->tool_desk_rmbg->setEnabled(ui->combo_desk_bg->count()>0); @@ -197,7 +200,7 @@ void page_wallpaper::deskbgchanged(){ } void page_wallpaper::desktimechanged(){ - ui->spin_desk_min->setEnabled(ui->radio_desk_multi->isChecked()); + //ui->spin_desk_min->setEnabled(ui->radio_desk_multi->isChecked()); if(!loading){ emit HasPendingChanges(true); } } |