diff options
author | Weblate <noreply@weblate.org> | 2017-07-31 00:17:09 +0000 |
---|---|---|
committer | Weblate <noreply@weblate.org> | 2017-07-31 00:17:09 +0000 |
commit | d66ba357a8154aad3b803cbd9f38ab3c4691eb60 (patch) | |
tree | 2e2b3a56243b96141e05f2b5d3f855bb1836407c /src-qt5/core-utils | |
parent | Translated using Weblate (Danish) (diff) | |
parent | apply ui patch from slicer69 (diff) | |
download | lumina-d66ba357a8154aad3b803cbd9f38ab3c4691eb60.tar.gz lumina-d66ba357a8154aad3b803cbd9f38ab3c4691eb60.tar.bz2 lumina-d66ba357a8154aad3b803cbd9f38ab3c4691eb60.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core-utils')
4 files changed, 71 insertions, 5 deletions
diff --git a/src-qt5/core-utils/lumina-config/i18n/lumina-config_fr.ts b/src-qt5/core-utils/lumina-config/i18n/lumina-config_fr.ts index 61783c40..4ce7d4f7 100644 --- a/src-qt5/core-utils/lumina-config/i18n/lumina-config_fr.ts +++ b/src-qt5/core-utils/lumina-config/i18n/lumina-config_fr.ts @@ -346,7 +346,7 @@ Voulez-vous l'écraser ?</translation> <message> <location filename="../LPlugins.cpp" line="67"/> <source>Start menu alternative focusing on the user's files, directories, and favorites.</source> - <translation type="unfinished"></translation> + <translation type="unfinished">Menu de démarrage alternatif qui se concentre sur les fichiers d'utilisateurs, les répertoires d'utilisateurs, et les favoris d'utilisateurs.</translation> </message> <message> <location filename="../LPlugins.cpp" line="73"/> @@ -356,7 +356,7 @@ Voulez-vous l'écraser ?</translation> <message> <location filename="../LPlugins.cpp" line="74"/> <source>Start menu alternative which focuses on launching applications.</source> - <translation type="unfinished"></translation> + <translation>Menu de démarrage alternatif qui se concentre sur le lancement d'applications.</translation> </message> <message> <location filename="../LPlugins.cpp" line="94"/> 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..44a67c3a 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(); } @@ -54,6 +55,18 @@ void page_session_options::SaveSettings(){ sessionsettings.setValue("DateFormat", ui->line_session_date->text()); sessionsettings.setValue("DateTimeOrder", ui->combo_session_datetimeorder->currentData().toString()); + QString my_win = ui->mywindowmanager->currentText(); + // Warn user if they select a non-default window manager + if (! my_win.contains("Lumina") ) + QMessageBox::information(this, tr("Window manager"), "Warning: Please note window managers other than Lumina are not supported." ); + // If we selected "Lumina" as the window manager, leave the field blank to get default + if (! my_win.compare("Lumina")) + sessionsettings.remove("WindowManager"); + else + sessionsettings.setValue("WindowManager", my_win); + + + QString lopenWatchFile = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/nowatch"; if(QFile::exists(lopenWatchFile) && ui->check_watch_app_procs->isChecked()){ QFile::remove(lopenWatchFile); @@ -91,6 +104,25 @@ void page_session_options::LoadSettings(int){ int index = ui->combo_session_datetimeorder->findData( sessionsettings.value("DateTimeOrder","timeonly").toString() ); ui->combo_session_datetimeorder->setCurrentIndex(index); + FindWindowManagerOptions(); // check system for available options + QString old_wm = sessionsettings.value("WindowManager").toString(); + + // Check to see if old window manager is in our list and, if not, add it + if ( old_wm.length() > 0 ) + { + index = ui->mywindowmanager->findText( old_wm ); + if (index == -1) // did not find existing option in list, so add it + { + ui->mywindowmanager->addItem( old_wm ); + // Past window manager is now in list so we can select it, even if it did not exist before + index = ui->mywindowmanager->findText( old_wm ); + } + } + else // there was no "old" window manager, default to using Lumina/default + index = ui->mywindowmanager->findText( "Lumina" ); + + ui->mywindowmanager->setCurrentIndex(index); + QString lopenWatchFile = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/nowatch"; ui->check_watch_app_procs->setChecked( !QFile::exists(lopenWatchFile) ); @@ -111,6 +143,25 @@ 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(); + ui->mywindowmanager->addItem("Lumina"); // make sure there is a default + 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..8e3805a6 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..1e0e37ba 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 @@ -204,10 +204,24 @@ </property> </widget> </item> - <item row="4" column="1"> - <widget class="QComboBox" name="combo_session_datetimeorder"/> + <item row="4" column="1"> + <widget class="QComboBox" name="combo_session_datetimeorder"/> + </item> + <item row="5" column="1"> + <widget class="QComboBox" name="mywindowmanager"> + <property name="toolTip"> + <string/> + </property> + </widget> </item> - </layout> + <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"> <spacer name="verticalSpacer_2"> |