aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core-utils
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-08-18 14:07:43 -0400
committerKen Moore <moorekou@gmail.com>2016-08-18 14:07:43 -0400
commitbb1bc88360bd84d7e7aeb61babfb1978aee7bd0b (patch)
tree8eac7fb700818f839617241312a83f46e8ce7875 /src-qt5/core-utils
parentAdd a configuration option to lumina-config for enabling/disabling the automa... (diff)
downloadlumina-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')
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_compton.cpp6
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_compton.ui7
2 files changed, 12 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") );
diff --git a/src-qt5/core-utils/lumina-config/pages/page_compton.ui b/src-qt5/core-utils/lumina-config/pages/page_compton.ui
index 32c153f7..9083a2fb 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_compton.ui
+++ b/src-qt5/core-utils/lumina-config/pages/page_compton.ui
@@ -27,6 +27,13 @@
<number>6</number>
</property>
<item>
+ <widget class="QCheckBox" name="check_disablecompton">
+ <property name="text">
+ <string>Disable Compositing Manager (session restart required)</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="QPlainTextEdit" name="text_file"/>
</item>
</layout>
bgstack15