aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_session_options.cpp34
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_session_options.h1
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_session_options.ui10
3 files changed, 44 insertions, 1 deletions
diff --git a/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp b/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp
index 3aba502f..3bde47f4 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_session_options.cpp
@@ -33,6 +33,7 @@ page_session_options::page_session_options(QWidget *parent) : PageWidget(parent)
connect(ui->check_session_playlogoutaudio, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) );
connect(ui->check_autoapplinks, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) );
connect(ui->check_watch_app_procs, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) );
+ connect(ui->mywindowmanager, SIGNAL(currentIndexChanged(int)), this, SLOT(settingChanged()));
updateIcons();
}
@@ -53,6 +54,11 @@ void page_session_options::SaveSettings(){
sessionsettings.setValue("TimeFormat", ui->line_session_time->text());
sessionsettings.setValue("DateFormat", ui->line_session_date->text());
sessionsettings.setValue("DateTimeOrder", ui->combo_session_datetimeorder->currentData().toString());
+ sessionsettings.setValue("WindowManager", ui->mywindowmanager->currentText());
+
+ // Warn user if they select a non-default window manager
+ if (! ui->mywindowmanager->currentText().contains("fluxbox") )
+ QMessageBox::information(this, tr("Window manager"), "Warning: Please note window managers other than Fluxbox are not supported." );
QString lopenWatchFile = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/nowatch";
if(QFile::exists(lopenWatchFile) && ui->check_watch_app_procs->isChecked()){
@@ -89,7 +95,16 @@ void page_session_options::LoadSettings(int){
ui->line_session_time->setText( sessionsettings.value("TimeFormat","").toString() );
ui->line_session_date->setText( sessionsettings.value("DateFormat","").toString() );
int index = ui->combo_session_datetimeorder->findData( sessionsettings.value("DateTimeOrder","timeonly").toString() );
- ui->combo_session_datetimeorder->setCurrentIndex(index);
+ FindWindowManagerOptions(); // check system for available options
+ index = ui->mywindowmanager->findText( sessionsettings.value("WindowManager").toString() );
+ if (index == -1) // did not find existing option in list, so add it
+ {
+ ui->mywindowmanager->addItem( sessionsettings.value("WindowManager").toString() );
+ // Past window manager is now in list so we can select it, even itf it did not exist before
+ index = ui->mywindowmanager->findText( sessionsettings.value("WindowManager").toString() );
+ }
+
+ui->combo_session_datetimeorder->setCurrentIndex(index);
QString lopenWatchFile = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/nowatch";
ui->check_watch_app_procs->setChecked( !QFile::exists(lopenWatchFile) );
@@ -111,6 +126,23 @@ void page_session_options::updateIcons(){
// PRIVATE
//=================
+void page_session_options::FindWindowManagerOptions(){
+ // Try to find all available window managers and add them to drop-down box.
+ ui->mywindowmanager->clear();
+ if (QFileInfo::exists("/usr/bin/fluxbox"))
+ ui->mywindowmanager->addItem("/usr/bin/fluxbox");
+ else if (QFileInfo::exists("/usr/local/bin/fluxbox"))
+ ui->mywindowmanager->addItem("/usr/local/bin/fluxbox");
+ if (QFileInfo::exists("/usr/bin/kwin"))
+ ui->mywindowmanager->addItem("/usr/bin/kwin");
+ else if (QFileInfo::exists("/usr/local/bin/kwin"))
+ ui->mywindowmanager->addItem("/usr/local/bin/kwin");
+ if (QFileInfo::exists("/usr/bin/openbox"))
+ ui->mywindowmanager->addItem("/usr/bin/openbox");
+ else if (QFileInfo::exists("/usr/local/bin/openbox"))
+ ui->mywindowmanager->addItem("/usr/local/bin/openbox");
+}
+
//=================
// PRIVATE SLOTS
//=================
diff --git a/src-qt5/core-utils/lumina-config/pages/page_session_options.h b/src-qt5/core-utils/lumina-config/pages/page_session_options.h
index d28cb7e9..d44f540b 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_session_options.h
+++ b/src-qt5/core-utils/lumina-config/pages/page_session_options.h
@@ -30,6 +30,7 @@ public slots:
private:
Ui::page_session_options *ui;
bool loading;
+ void FindWindowManagerOptions();
private slots:
void sessionChangeUserIcon();
diff --git a/src-qt5/core-utils/lumina-config/pages/page_session_options.ui b/src-qt5/core-utils/lumina-config/pages/page_session_options.ui
index 255166de..f869b273 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_session_options.ui
+++ b/src-qt5/core-utils/lumina-config/pages/page_session_options.ui
@@ -207,6 +207,16 @@
<item row="4" column="1">
<widget class="QComboBox" name="combo_session_datetimeorder"/>
</item>
+ <item row="5" column="1">
+ <widget class="QComboBox" name="mywindowmanager"/>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Window Manager</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item row="1" column="0">
bgstack15