Remove X-KWin-Exclude-Listing metadata flag

We only have one KWin script making use of this and that one is shown
regardless. The issue with this flag is that it will hide scripts from
the user without a possibility to see them.

For effects, we have quite a few internal ones and a possibility to show
even hidden ones. But we can not reuse this logic for the scripts.

BUG: 458572
FIXED-IN: 6.0
This commit is contained in:
Alexander Lohnau 2023-07-14 07:03:32 +02:00
parent 1502fa9ab1
commit 33e32f293b
3 changed files with 1 additions and 10 deletions

View file

@ -20,12 +20,8 @@ KWinScriptsData::KWinScriptsData(QObject *parent)
QVector<KPluginMetaData> KWinScriptsData::pluginMetaDataList() const
{
auto filter = [](const KPluginMetaData &md) {
return md.isValid() && !md.rawData().value("X-KWin-Exclude-Listing").toBool();
};
const QString scriptFolder = QStringLiteral("kwin/scripts/");
return KPackage::PackageLoader::self()->findPackages(QStringLiteral("KWin/Script"), scriptFolder, filter).toVector();
return KPackage::PackageLoader::self()->findPackages(QStringLiteral("KWin/Script"), scriptFolder);
}
bool KWinScriptsData::isDefaults() const

View file

@ -170,10 +170,6 @@ void KWinTabBoxConfig::initLayoutLists()
if (offer.value("X-Plasma-API") != "declarativeappletscript") {
continue;
}
// we don't have a proper servicetype
if (offer.value("X-KWin-Exclude-Listing") == QStringLiteral("true")) {
continue;
}
const QString scriptName = offer.value("X-Plasma-MainScript");
const QString scriptFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
QLatin1String("kwin/tabbox/") + pluginName + QLatin1String("/contents/")

View file

@ -108,7 +108,6 @@
"Name[zh_TW]": "桌面變更時的螢幕顯示",
"Version": "1.0"
},
"X-KWin-Exclude-Listing": "true",
"X-Plasma-API": "declarativescript",
"X-Plasma-MainScript": "ui/main.qml"
}