aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core-utils
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2016-10-05 17:56:20 -0400
committerKen Moore <ken@pcbsd.org>2016-10-05 17:56:20 -0400
commit8ff34b38ac1f8f7be5967670978ff35b7da1f9d7 (patch)
treeb59d94a503da058a34bb15c2467b844749567a1e /src-qt5/core-utils
parentAdd a new Lumina project: desktop-utils/lumina-calculator (diff)
parentConvert over the desktop/panel settings to be based on screen ID instead of s... (diff)
downloadlumina-8ff34b38ac1f8f7be5967670978ff35b7da1f9d7.tar.gz
lumina-8ff34b38ac1f8f7be5967670978ff35b7da1f9d7.tar.bz2
lumina-8ff34b38ac1f8f7be5967670978ff35b7da1f9d7.zip
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/core-utils')
-rw-r--r--src-qt5/core-utils/lumina-config/PanelWidget.cpp6
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_autostart.cpp10
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_interface_desktop.cpp6
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp6
4 files changed, 19 insertions, 9 deletions
diff --git a/src-qt5/core-utils/lumina-config/PanelWidget.cpp b/src-qt5/core-utils/lumina-config/PanelWidget.cpp
index 8b38f407..aff7bda3 100644
--- a/src-qt5/core-utils/lumina-config/PanelWidget.cpp
+++ b/src-qt5/core-utils/lumina-config/PanelWidget.cpp
@@ -42,7 +42,8 @@ PanelWidget::~PanelWidget(){
void PanelWidget::LoadSettings(QSettings *settings, int Dnum, int Pnum){
pnum = Pnum; dnum = Dnum; //save these for later
ui->label->setText( QString(tr("Panel %1")).arg(QString::number(Pnum+1) ) );
- QString prefix = "panel"+QString::number(Dnum)+"."+QString::number(Pnum)+"/";
+ QString screenID = QApplication::screens().at(Dnum)->name();
+ QString prefix = "panel_"+screenID+"."+QString::number(Pnum)+"/";
qDebug() << "Loading Panel Settings:" << prefix;
//Now load the settings into the GUI
int tmp = ui->combo_align->findData( settings->value(prefix+"pinLocation","center").toString().toLower() );
@@ -78,7 +79,8 @@ void PanelWidget::LoadSettings(QSettings *settings, int Dnum, int Pnum){
}
void PanelWidget::SaveSettings(QSettings *settings){//save the current settings
- QString prefix = "panel"+QString::number(dnum)+"."+QString::number(pnum)+"/";
+ QString screenID = QApplication::screens().at(dnum)->name();
+ QString prefix = "panel_"+screenID+"."+QString::number(pnum)+"/";
qDebug() << "Saving panel settings:" << prefix;
settings->setValue(prefix+"location", ui->combo_edge->currentData().toString() );
settings->setValue(prefix+"pinLocation", ui->combo_align->currentData().toString() );
diff --git a/src-qt5/core-utils/lumina-config/pages/page_autostart.cpp b/src-qt5/core-utils/lumina-config/pages/page_autostart.cpp
index 371791e9..0159d8f5 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_autostart.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_autostart.cpp
@@ -32,7 +32,9 @@ page_autostart::~page_autostart(){
// PUBLIC SLOTS
//================
void page_autostart::SaveSettings(){
+ //qDebug() << "Load AutoStart Files for saving";
QList<XDGDesktop*> STARTAPPS = LXDG::findAutoStartFiles(true); //also want invalid/disabled items
+ //qDebug() << " - done";
//bool newstartapps = false;
for(int i=0; i<ui->list_session_start->count(); i++){
QString file = ui->list_session_start->item(i)->whatsThis();
@@ -57,17 +59,19 @@ void page_autostart::SaveSettings(){
}
} //end loop over GUI items
//Now cleanup all the STARTAPPS data
- for(int i=0; STARTAPPS.length(); i++){ STARTAPPS[i]->deleteLater(); }
+ for(int i=STARTAPPS.length()-1; i>=0; i--){ STARTAPPS[i]->deleteLater(); }
}
void page_autostart::LoadSettings(int){
emit HasPendingChanges(false);
emit ChangePageTitle( tr("Startup Services") );
+ //qDebug() << "Load AutoStart Files";
QList<XDGDesktop*> STARTAPPS = LXDG::findAutoStartFiles(true); //also want invalid/disabled items
+ //qDebug() << " - done:" << STARTAPPS.length();
//qDebug() << "StartApps:";
ui->list_session_start->clear();
for(int i=0; i<STARTAPPS.length(); i++){
- //qDebug() << STARTAPPS[i].filePath +" -> " +STARTAPPS[i].name << STARTAPPS[i].isHidden;
+ //qDebug() << STARTAPPS[i]->filePath +" -> " +STARTAPPS[i]->name << STARTAPPS[i]->isHidden;
if( !STARTAPPS[i]->isValid() || !QFile::exists(STARTAPPS[i]->filePath) ){ continue; }
QListWidgetItem *it = new QListWidgetItem( LXDG::findIcon(STARTAPPS[i]->icon,"application-x-executable"), STARTAPPS[i]->name );
it->setWhatsThis(STARTAPPS[i]->filePath); //keep the file location
@@ -77,7 +81,7 @@ void page_autostart::LoadSettings(int){
ui->list_session_start->addItem(it);
}
//Now cleanup all the STARTAPPS data
- for(int i=0; STARTAPPS.length(); i++){ STARTAPPS[i]->deleteLater(); }
+ for(int i=STARTAPPS.length()-1; i>=0; i--){ STARTAPPS[i]->deleteLater(); }
}
void page_autostart::updateIcons(){
diff --git a/src-qt5/core-utils/lumina-config/pages/page_interface_desktop.cpp b/src-qt5/core-utils/lumina-config/pages/page_interface_desktop.cpp
index fdcde804..f467db36 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_interface_desktop.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_interface_desktop.cpp
@@ -31,7 +31,8 @@ page_interface_desktop::~page_interface_desktop(){
//================
void page_interface_desktop::SaveSettings(){
QSettings settings("lumina-desktop","desktopsettings");
- QString DPrefix = "desktop-"+QString::number(cscreen)+"/";
+ QString screenID = QApplication::screens().at(cscreen)->name();
+ QString DPrefix = "desktop-"+screenID+"/";
settings.setValue(DPrefix+"generateDesktopIcons", ui->check_desktop_autolaunchers->isChecked() );
QStringList plugs;
@@ -53,7 +54,8 @@ void page_interface_desktop::LoadSettings(int screennum){
emit HasPendingChanges(false);
emit ChangePageTitle( tr("Desktop Settings") );
QSettings settings("lumina-desktop","desktopsettings");
- QString DPrefix = "desktop-"+QString::number(cscreen)+"/";
+ QString screenID = QApplication::screens().at(cscreen)->name();
+ QString DPrefix = "desktop-"+screenID+"/";
ui->check_desktop_autolaunchers->setChecked(settings.value(DPrefix+"generateDesktopIcons",false).toBool() );
QStringList dplugs = settings.value(DPrefix+"pluginlist",QStringList()).toStringList();
diff --git a/src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp b/src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp
index 0e486bdd..7d0d3d8c 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp
@@ -30,7 +30,8 @@ page_interface_panels::~page_interface_panels(){
// PUBLIC SLOTS
//================
void page_interface_panels::SaveSettings(){
- QString DPrefix = "desktop-"+QString::number(cscreen)+"/";
+ QString screenID = QApplication::screens().at(cscreen)->name();
+ QString DPrefix = "desktop-"+screenID+"/";
settings->setValue(DPrefix+"panels", PANELS.length());
for(int i=0; i<PANELS.length(); i++){
PANELS[i]->SaveSettings(settings);
@@ -48,7 +49,8 @@ void page_interface_panels::LoadSettings(int screennum){
loading = true;
emit HasPendingChanges(false);
emit ChangePageTitle( tr("Desktop Settings") );
- QString DPrefix = "desktop-"+QString::number(cscreen)+"/";
+ QString screenID = QApplication::screens().at(cscreen)->name();
+ QString DPrefix = "desktop-"+screenID+"/";
int panelnumber = settings->value(DPrefix+"panels",-1).toInt();
//First clean any current panels
bgstack15