aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/LDesktop.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-01-21 15:53:51 -0500
committerKen Moore <ken@pcbsd.org>2015-01-21 15:53:51 -0500
commita059c1fdb254fc5e2dca743597fe96c0a8a09aa3 (patch)
tree126af0492cd60a8c7e71721510f03296aa52531a /lumina-desktop/LDesktop.cpp
parentClean up a couple other session options: (diff)
downloadlumina-a059c1fdb254fc5e2dca743597fe96c0a8a09aa3.tar.gz
lumina-a059c1fdb254fc5e2dca743597fe96c0a8a09aa3.tar.bz2
lumina-a059c1fdb254fc5e2dca743597fe96c0a8a09aa3.zip
Add a completely new background method for a distributor to set per-system defaults for the Lumina desktop. Also fix a bug this exposed in how the Lumina panel removes plugins.
Diffstat (limited to 'lumina-desktop/LDesktop.cpp')
-rw-r--r--lumina-desktop/LDesktop.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp
index 54d4ba11..c99e3472 100644
--- a/lumina-desktop/LDesktop.cpp
+++ b/lumina-desktop/LDesktop.cpp
@@ -243,10 +243,22 @@ void LDesktop::UpdateDesktop(){
//plugins << "sample" << "sample" << "sample";
}
bool changed=false; //in case the plugin list needs to be changed
+ //First make sure all the plugin names are unique
+ for(int i=0; i<plugins.length(); i++){
+ if(!plugins[i].contains("---") ){
+ int num=1;
+ while( plugins.contains(plugins[i]+"---"+QString::number(desktopnumber)+"."+QString::number(num)) ){
+ num++;
+ }
+ plugins[i] = plugins[i]+"---"+QString::number(desktopnumber)+"."+QString::number(num);
+ changed=true;
+ }
+ }
//Go through the plugins and remove any existing ones that do not show up on the current list
for(int i=0; i<PLUGINS.length(); i++){
if(!plugins.contains(PLUGINS[i]->ID())){
//Remove this plugin (with settings) - is not currently listed
+
DesktopPluginRemoved(PLUGINS[i]->ID());
i--;
}
@@ -265,16 +277,6 @@ void LDesktop::UpdateDesktop(){
}
if(plug==0){
//New Plugin
- //Make sure the plugin ID is unique
- if(!plugins[i].contains("---") ){
- int num=1;
- while( plugins.contains(plugins[i]+"---"+QString::number(desktopnumber)+"."+QString::number(num)) ){
- num++;
- }
- plugins[i] = plugins[i]+"---"+QString::number(desktopnumber)+"."+QString::number(num);
- changed=true;
- }
- //Now create the plugin (will load existing settings if possible)
qDebug() << " -- New Plugin:" << plugins[i];
plug = NewDP::createPlugin(plugins[i], bgDesktop);
if(plug != 0){
bgstack15