From f7b0433c718fb55d73cdd64d11bb09c0d5c12210 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 8 Oct 2015 16:04:22 -0400 Subject: Add the conversion rule for 0.8.7-devel (or older) to 0.8.7-release to automatically update the panel plugins (systemdashboard removed, appmenu/userbutton->systemstart) --- lumina-desktop/LSession.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp index a1caf715..5e344c82 100644 --- a/lumina-desktop/LSession.cpp +++ b/lumina-desktop/LSession.cpp @@ -387,8 +387,21 @@ void LSession::checkUserFiles(){ if(newversion || newrelease){ LUtils::upgradeFavorites(oldversion); } - //Remove/convert any old desktop plugin files (Change occured with 0.8.5) - // - TO-DO + //Convert any "userbutton" and "appmenu" panel plugins to the new "systemstart" plugin (0.8.7) + if(oldversion <= 8007 && (newversion || newrelease)){ + QSettings dset(QSettings::UserScope, "LuminaDE","desktopsettings", this); + QStringList plugKeys = dset.allKeys().filter("panel").filter("/pluginlist"); + for(int i=0; i systemstart conversion + plugs = plugs.join(";;;;").replace("userbutton","systemstart").replace("appmenu","systemstart").split(";;;;"); + //Remove any system dashboard plugins + plugs.removeAll("systemdashboard"); + //Now save that back to the file + dset.setValue(plugKeys[i], plugs); + } + dset.sync(); + } //Convert to the XDG autostart spec as necessary (Change occured with 0.8.5) if(QFile::exists(QDir::homePath()+"/.lumina/startapps") ){ -- cgit