Commit 8fb84c2f authored by Noah Davis's avatar Noah Davis 🌵
Browse files

Remove obsolete_kickoffrc.js

It was broken by a609b639

Eike Hein, the original author of the script said it was OK to remove this:

> Should be fine. This script was written when Kickoff (the old menu UI)
> was ported to the backend of Kicker (the newer cacasing menu).
> This happened early in the Plasma 5 series and at least one or two
> LTS branches ago. I don't think it's worth keeping alive anymore.
parent 85438ea3
Pipeline #123500 passed with stage
in 4 minutes and 50 seconds
var kickoffConfig = ConfigFile("kickoffrc");
kickoffConfig.group = "Favorites";
var favorites = kickoffConfig.readEntry("FavoriteURLs");
var haveFavorites = (favorites.length > 0);
if (haveFavorites) {
favorites = favorites.split(',');
}
kickoffConfig.group = "SystemApplications";
var systemApplications = kickoffConfig.readEntry("DesktopFiles");
var haveSystemApplications = (systemApplications.length > 0);
if (haveSystemApplications) {
systemApplications = systemApplications.split(',');
// This used to be hardcoded in Kickoff C++ code; it's now the KConfigXT
// default but needs to be added in when migrating from the rc file.
systemApplications.unshift("systemsettings.desktop");
}
if (haveFavorites || haveSystemApplications) {
for (var i in panels()) {
var panel = panels()[i];
for (var j in panel.widgetIds) {
var widget = panel.widgetById(panel.widgetIds[j]);
if (widget.type == "org.kde.plasma.kickoff") {
widget.currentConfigGroup = ["General"];
if (haveFavorites) {
widget.writeConfig("favorites", favorites);
}
if (haveSystemApplications) {
widget.writeConfig("systemApplications", systemApplications);
}
}
}
}
for (var i in desktops()) {
var desktop = desktops()[i];
for (var j in desktop.widgetIds) {
var widget = desktop.widgetById(desktop.widgetIds[j]);
if (widget.type == "org.kde.plasma.kickoff") {
widget.currentConfigGroup = ["General"];
if (haveFavorites) {
widget.writeConfig("favorites", favorites);
}
if (haveSystemApplications) {
widget.writeConfig("systemApplications", systemApplications);
}
}
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment