example without a wallpaper

This commit is contained in:
Marco Martin 2015-11-24 12:15:11 +01:00
parent ff83c3ac99
commit 4e143813b4
2 changed files with 6 additions and 0 deletions

View File

@ -31,6 +31,7 @@ CustomCorona::CustomCorona(QObject *parent)
: Plasma::Corona(parent) : Plasma::Corona(parent)
{ {
KPackage::Package package = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Plasma/Shell")); KPackage::Package package = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Plasma/Shell"));
//applications that want to load a plasma scene would have to load their own shell.. TODO: have a simple shell in plasma-framework for this purpose?
package.setPath(QStringLiteral("org.kde.plasma.desktop")); package.setPath(QStringLiteral("org.kde.plasma.desktop"));
setKPackage(package); setKPackage(package);
@ -75,6 +76,8 @@ void CustomCorona::load()
//don't let containments to be removed //don't let containments to be removed
for (auto c : containments()) { for (auto c : containments()) {
if (c->containmentType() == Plasma::Types::DesktopContainment) { if (c->containmentType() == Plasma::Types::DesktopContainment) {
//example of a shell without a wallpaper
c->setWallpaper("null");
m_view->setContainment(c); m_view->setContainment(c);
QAction *removeAction = c->actions()->action(QStringLiteral("remove")); QAction *removeAction = c->actions()->action(QStringLiteral("remove"));
if(removeAction) { if(removeAction) {

View File

@ -66,6 +66,9 @@ Type=QString
[PropertyDef::X-Plasma-DBusActivationService] [PropertyDef::X-Plasma-DBusActivationService]
Type=QString Type=QString
[PropertyDef::X-Plasma-ParentApp]
Type=QString
[PropertyDef::X-Plasma-Provides] [PropertyDef::X-Plasma-Provides]
Type=QStringList Type=QStringList