Add property to not show window strip in the layouts ui
Window Strip is only for Plasma Active, so we don't want to see it in the UI for Window Switcher Layouts as it would not properly work on the desktop anyway. Accomplished by a simple property definition on the service file.
This commit is contained in:
parent
9297a8a9b2
commit
c950ec20e3
3 changed files with 7 additions and 0 deletions
|
@ -216,6 +216,9 @@ void LayoutModel::init()
|
|||
if (service->property("X-Plasma-API").toString() != "declarativeappletscript") {
|
||||
continue;
|
||||
}
|
||||
if (service->property("X-KWin-Exclude-Listing").toBool()) {
|
||||
continue;
|
||||
}
|
||||
const QString scriptName = service->property("X-Plasma-MainScript").toString();
|
||||
const QString scriptFile = KStandardDirs::locate("data", "kwin/tabbox/" + pluginName + "/contents/" + scriptName);
|
||||
if (scriptFile.isNull()) {
|
||||
|
|
|
@ -9,3 +9,6 @@ Type=QString
|
|||
|
||||
[PropertyDef::X-Plasma-MainScript]
|
||||
Type=QString
|
||||
|
||||
[PropertyDef::X-KWin-Exclude-Listing]
|
||||
Type=bool
|
||||
|
|
|
@ -5,6 +5,7 @@ Icon=preferences-system-windows-switcher-window-strip
|
|||
|
||||
X-Plasma-API=declarativeappletscript
|
||||
X-Plasma-MainScript=ui/main.qml
|
||||
X-KWin-Exclude-Listing=true
|
||||
|
||||
X-KDE-PluginInfo-Author=Martin Gräßlin
|
||||
X-KDE-PluginInfo-Email=mgraesslin@kde.org
|
||||
|
|
Loading…
Reference in a new issue