diff options
author | Ken Moore <moorekou@gmail.com> | 2016-08-18 14:07:43 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-08-18 14:07:43 -0400 |
commit | bb1bc88360bd84d7e7aeb61babfb1978aee7bd0b (patch) | |
tree | 8eac7fb700818f839617241312a83f46e8ce7875 /src-qt5/core-utils/lumina-config/pages/page_compton.cpp | |
parent | Add a configuration option to lumina-config for enabling/disabling the automa... (diff) | |
download | lumina-bb1bc88360bd84d7e7aeb61babfb1978aee7bd0b.tar.gz lumina-bb1bc88360bd84d7e7aeb61babfb1978aee7bd0b.tar.bz2 lumina-bb1bc88360bd84d7e7aeb61babfb1978aee7bd0b.zip |
Add a checkbox to the compton page for enabling/disabling compositing.
Diffstat (limited to 'src-qt5/core-utils/lumina-config/pages/page_compton.cpp')
-rw-r--r-- | src-qt5/core-utils/lumina-config/pages/page_compton.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src-qt5/core-utils/lumina-config/pages/page_compton.cpp b/src-qt5/core-utils/lumina-config/pages/page_compton.cpp index fcbd3e41..0003c9c8 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_compton.cpp +++ b/src-qt5/core-utils/lumina-config/pages/page_compton.cpp @@ -14,6 +14,7 @@ page_compton::page_compton(QWidget *parent) : PageWidget(parent), ui(new Ui::page_compton()){ ui->setupUi(this); connect(ui->text_file, SIGNAL(textChanged()), this, SLOT(settingChanged()) ); + connect(ui->check_disablecompton, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) ); updateIcons(); } @@ -25,8 +26,9 @@ page_compton::~page_compton(){ // PUBLIC SLOTS //================ void page_compton::SaveSettings(){ - emit HasPendingChanges(false); + QSettings settings("lumina-desktop","sessionsettings"); + settings.setValue("enableCompositing", !ui->check_disablecompton->isChecked()); QString set = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/compton.conf"; LUtils::writeFile(set, ui->text_file->toPlainText().split("\n"),true); } @@ -34,6 +36,8 @@ void page_compton::SaveSettings(){ void page_compton::LoadSettings(int){ emit HasPendingChanges(false); emit ChangePageTitle( tr("Compositor Settings") ); + QSettings settings("lumina-desktop","sessionsettings"); + ui->check_disablecompton->setChecked( !settings.value("enableCompositing", true).toBool() ); QString set = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/compton.conf"; qDebug() << "Load Compton settings:" << set; ui->text_file->setPlainText( LUtils::readFile(set).join("\n") ); |