From c950ec20e3798c6aab877b100382e8dbee3ff532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 16 Feb 2012 09:56:36 +0100 Subject: [PATCH] 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. --- kcmkwin/kwintabbox/layoutconfig.cpp | 3 +++ tabbox/kwinwindowswitcher.desktop | 3 +++ tabbox/qml/clients/window_strip/metadata.desktop | 1 + 3 files changed, 7 insertions(+) diff --git a/kcmkwin/kwintabbox/layoutconfig.cpp b/kcmkwin/kwintabbox/layoutconfig.cpp index d982bcf564..b2a426685a 100644 --- a/kcmkwin/kwintabbox/layoutconfig.cpp +++ b/kcmkwin/kwintabbox/layoutconfig.cpp @@ -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()) { diff --git a/tabbox/kwinwindowswitcher.desktop b/tabbox/kwinwindowswitcher.desktop index 4a575280f6..69df113ce5 100644 --- a/tabbox/kwinwindowswitcher.desktop +++ b/tabbox/kwinwindowswitcher.desktop @@ -9,3 +9,6 @@ Type=QString [PropertyDef::X-Plasma-MainScript] Type=QString + +[PropertyDef::X-KWin-Exclude-Listing] +Type=bool diff --git a/tabbox/qml/clients/window_strip/metadata.desktop b/tabbox/qml/clients/window_strip/metadata.desktop index d25cc54b92..a33ded874e 100644 --- a/tabbox/qml/clients/window_strip/metadata.desktop +++ b/tabbox/qml/clients/window_strip/metadata.desktop @@ -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