aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core-utils
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2018-03-10 15:09:31 +0000
committerWeblate <noreply@weblate.org>2018-03-10 15:09:31 +0000
commite823783499a7b2f8c3cbfb24ae428b39311bee5e (patch)
tree74138f1e34b8f090f62bd5412f38b8e185209302 /src-qt5/core-utils
parentTranslated using Weblate (Italian) (diff)
parentAdd the beginnings of the new window frame (widgets-based) (diff)
downloadlumina-e823783499a7b2f8c3cbfb24ae428b39311bee5e.tar.gz
lumina-e823783499a7b2f8c3cbfb24ae428b39311bee5e.tar.bz2
lumina-e823783499a7b2f8c3cbfb24ae428b39311bee5e.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5/core-utils')
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp6
-rw-r--r--src-qt5/core-utils/lumina-xconfig/MainUI.cpp16
-rw-r--r--src-qt5/core-utils/lumina-xconfig/MainUI.h2
3 files changed, 17 insertions, 7 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 aef0493f..c2737084 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_wallpaper.cpp
@@ -209,7 +209,7 @@ void page_wallpaper::deskbgremoved(){
void page_wallpaper::deskbgadded(){
//Prompt the user to find an image file to use for a background
- QString dir = LOS::LuminaShare().section("/lumina-desktop",0,0)+"/wallpapers/Lumina-DE";
+ QString dir = LOS::LuminaShare().section("/lumina-desktop",0,0)+"/wallpapers";
qDebug() << "Looking for wallpaper dir:" << dir;
if( !QFile::exists(dir) ){ dir = QDir::homePath(); }
QStringList imgs = LUtils::imageExtensions();
@@ -242,7 +242,7 @@ void page_wallpaper::deskbgcoloradded(){
void page_wallpaper::deskbgdiradded(){
//Add the files from a single directory
- QString dir = LOS::LuminaShare().section("/lumina-desktop",0,0)+"/wallpapers/Lumina-DE";
+ QString dir = LOS::LuminaShare().section("/lumina-desktop",0,0)+"/wallpapers";
qDebug() << "Looking for wallpaper dir:" << dir;
if( !QFile::exists(dir) ){ dir = QDir::homePath(); }
dir = QFileDialog::getExistingDirectory(this, tr("Find Background Image Directory"), dir, QFileDialog::ReadOnly);
@@ -260,7 +260,7 @@ void page_wallpaper::deskbgdiradded(){
void page_wallpaper::deskbgdirradded(){
//Recursively add files from a directory
- QString dir = LOS::LuminaShare().section("/lumina-desktop",0,0)+"/wallpapers/Lumina-DE";
+ QString dir = LOS::LuminaShare().section("/lumina-desktop",0,0)+"/wallpapers";
qDebug() << "Looking for wallpaper dir:" << dir;
if( !QFile::exists(dir) ){ dir = QDir::homePath(); }
dir = QFileDialog::getExistingDirectory(this, tr("Find Background Image Directory"), dir, QFileDialog::ReadOnly);
diff --git a/src-qt5/core-utils/lumina-xconfig/MainUI.cpp b/src-qt5/core-utils/lumina-xconfig/MainUI.cpp
index aecc5122..cbec6443 100644
--- a/src-qt5/core-utils/lumina-xconfig/MainUI.cpp
+++ b/src-qt5/core-utils/lumina-xconfig/MainUI.cpp
@@ -13,6 +13,7 @@
#include <QTimer>
#include <QInputDialog>
#include <QLineEdit>
+#include <QMessageBox>
MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
ui->setupUi(this);
@@ -403,9 +404,15 @@ void MainUI::ApplyChanges(){
QTimer::singleShot(1000, this, SLOT(RestartFluxbox()) );
}
-void MainUI::SaveSettings(){
+void MainUI::SaveSettings(bool quiet){
SyncBackend();
- RRSettings::SaveScreens(SCREENS);
+ bool ok = RRSettings::SaveScreens(SCREENS);
+ if(quiet){ return; } //do not show the popup info boxes.
+ if(ok){
+ QMessageBox::information(this, tr("Settings Saved"), tr("Screen configuration saved as the default for future use"));
+ }else{
+ QMessageBox::warning(this, tr("Settings Error"), tr("Screen configuration could not be saved. Please check file permissions and try again."));
+ }
}
void MainUI::RestartFluxbox(){
@@ -452,6 +459,9 @@ void MainUI::saveAsProfile(QAction *act){
if(!ok || profile.isEmpty()){ return; } //cancelled
}
}
- RRSettings::SaveScreens(SCREENS, profile);
+ bool ok = RRSettings::SaveScreens(SCREENS, profile);
updateProfiles();
+ if(ok){
+ QMessageBox::information(this, tr("Profile Created"), tr("Current screen configuration saved as profile:")+"\n\n"+profile);
+ }
}
diff --git a/src-qt5/core-utils/lumina-xconfig/MainUI.h b/src-qt5/core-utils/lumina-xconfig/MainUI.h
index 53bf06db..97124d32 100644
--- a/src-qt5/core-utils/lumina-xconfig/MainUI.h
+++ b/src-qt5/core-utils/lumina-xconfig/MainUI.h
@@ -62,7 +62,7 @@ private slots:
void DeactivateScreen();
void ActivateScreen();
void ApplyChanges(); //config changes
- void SaveSettings();
+ void SaveSettings(bool quiet = false);
void RestartFluxbox();
void removeProfile();
bgstack15