From c0f53545eb6f4e54dae68ca84be48e904625066a Mon Sep 17 00:00:00 2001 From: Martin Klapetek Date: Thu, 23 Jan 2014 16:23:28 +0100 Subject: [PATCH] Provide look&feel package by ShellCorona REVIEW: 115256 --- src/shell/shellcorona.cpp | 13 +++++++++++++ src/shell/shellcorona.h | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/src/shell/shellcorona.cpp b/src/shell/shellcorona.cpp index 35e91cd14..f565d79ed 100644 --- a/src/shell/shellcorona.cpp +++ b/src/shell/shellcorona.cpp @@ -44,6 +44,7 @@ #include "scripting/desktopscriptengine.h" #include "widgetexplorer/widgetexplorer.h" #include "configview.h" +#include "shellpluginloader.h" static const int s_configSyncDelay = 10000; // 10 seconds @@ -78,6 +79,7 @@ public: QHash > desktopContainments; QAction *addPanelAction; QMenu *addPanelsMenu; + Plasma::Package lookNFeelPackage; QTimer waitingPanelsTimer; QTimer appConfigSyncTimer; @@ -645,6 +647,17 @@ void ShellCorona::insertContainment(const QString &activity, int screenNum, Plas }); } +Plasma::Package ShellCorona::lookAndFeelPackage() const +{ + if (!d->lookNFeelPackage.isValid()) { + d->lookNFeelPackage = ShellPluginLoader::self()->loadPackage("Plasma/LookAndFeel"); + //TODO: make loading from config once we have some UI for setting the package + d->lookNFeelPackage.setPath("org.kde.lookandfeel"); + } + + return d->lookNFeelPackage; +} + // Desktop corona handler diff --git a/src/shell/shellcorona.h b/src/shell/shellcorona.h index becc62534..2094733f8 100644 --- a/src/shell/shellcorona.h +++ b/src/shell/shellcorona.h @@ -23,6 +23,8 @@ #include "plasma/corona.h" +#include + namespace Plasma { class Applet; @@ -64,6 +66,8 @@ public: KActivities::Controller *activityController(); + Plasma::Package lookAndFeelPackage() const; + public Q_SLOTS: /** * Request saving applicationConfig on disk, it's event compressed, not immediate