aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-01-15 15:52:44 -0500
committerKen Moore <ken@pcbsd.org>2015-01-15 15:52:44 -0500
commit86aaef0cf48fc69220b59a2c860260ce78c0566b (patch)
tree301518c6d7fcaefb044a1da68f4df8c533498c21
parentSet the "Does not accept focus" Qt flag on the base Lumina Panel window. (diff)
downloadlumina-86aaef0cf48fc69220b59a2c860260ce78c0566b.tar.gz
lumina-86aaef0cf48fc69220b59a2c860260ce78c0566b.tar.bz2
lumina-86aaef0cf48fc69220b59a2c860260ce78c0566b.zip
Fix a bug with removing desktop plugins.
-rw-r--r--lumina-desktop/LDesktop.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp
index 16d74f9d..48cc2abd 100644
--- a/lumina-desktop/LDesktop.cpp
+++ b/lumina-desktop/LDesktop.cpp
@@ -360,31 +360,21 @@ void LDesktop::AlignDesktopPlugins(){
}
void LDesktop::DesktopPluginRemoved(QString ID){
- //Close down that plugin instance
+ //Close down that plugin instance (NOTE: the container was already closed by the user)
+
//qDebug() << "PLUGINS:" << PLUGINS.length() << ID;
for(int i=0; i<PLUGINS.length(); i++){
if(PLUGINS[i]->ID() == ID){
//qDebug() << "- found ID";
- //Delete the plugin container first
- QList<QMdiSubWindow*> wins = bgDesktop->subWindowList();
- for(int j=0; j<wins.length(); j++){
- if(wins[j]->whatsThis()==ID || wins[j]->whatsThis().isEmpty()){
- //wins[i]->setWhatsThis(""); //clear this so it knows it is being temporarily removed
- bgDesktop->removeSubWindow(wins[j]->widget()); //unhook plugin from container
- bgDesktop->removeSubWindow(wins[j]); //remove container from screen
- delete wins[j]; //delete old container
- }
- }
- //Now delete the plugin itself
delete PLUGINS.takeAt(i);
break;
}
}
- //Now remove that plugin from the internal list
+
+ //Now remove that plugin from the internal list (then let the plugin system remove the actual plugin)
QStringList plugins = settings->value(DPREFIX+"pluginlist",QStringList()).toStringList();
-
- plugins.removeAll(ID);
changingsettings=true; //don't let the change cause a refresh
+ plugins.removeAll(ID);
settings->setValue(DPREFIX+"pluginlist", plugins);
settings->sync();
changingsettings=false; //finished changing setting
bgstack15