diff --git a/src/plasma/containment.cpp b/src/plasma/containment.cpp index 1d7518268..1e707b0e6 100644 --- a/src/plasma/containment.cpp +++ b/src/plasma/containment.cpp @@ -66,7 +66,7 @@ Containment::Containment(QObject *parent, // WARNING: do not access config() OR globalConfig() in this method! // that requires a scene, which is not available at this point setContainmentType(CustomContainment); - setHasConfigurationInterface(false); + setHasConfigurationInterface(true); } Containment::Containment(QObject *parent, const QVariantList &args) @@ -75,7 +75,7 @@ Containment::Containment(QObject *parent, const QVariantList &args) { // WARNING: do not access config() OR globalConfig() in this method! // that requires a scene, which is not available at this point - setHasConfigurationInterface(false); + setHasConfigurationInterface(true); } Containment::Containment(const QString &packagePath, uint appletId) @@ -84,7 +84,7 @@ Containment::Containment(const QString &packagePath, uint appletId) { // WARNING: do not access config() OR globalConfig() in this method! // that requires a scene, which is not available at this point - setHasConfigurationInterface(false); + setHasConfigurationInterface(true); } Containment::~Containment() diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index cc7b4ab94..35ab8555d 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -320,6 +320,8 @@ void ContainmentInterface::addContainmentActions(KMenu &desktopMenu, QEvent *eve Plasma::ContainmentActions *plugin = containment()->containmentActions().value(trigger); if (!plugin) { + //FIXME: this action is here only for testing purposes, remove it when plugins work + desktopMenu.addAction(containment()->actions()->action("configure")); return; } @@ -334,6 +336,7 @@ void ContainmentInterface::addContainmentActions(KMenu &desktopMenu, QEvent *eve QList actions = plugin->contextualActions(); + if (actions.isEmpty()) { //it probably didn't bother implementing the function. give the user a chance to set //a better plugin. note that if the user sets no-plugin this won't happen... diff --git a/src/shell/qmlpackages/desktop/contents/ui/Configuration.qml b/src/shell/qmlpackages/desktop/contents/ui/Configuration.qml index 140083c78..b4e9176a1 100644 --- a/src/shell/qmlpackages/desktop/contents/ui/Configuration.qml +++ b/src/shell/qmlpackages/desktop/contents/ui/Configuration.qml @@ -34,14 +34,28 @@ Rectangle { //END properties //BEGIN model + property ConfigModel globalConfigModel: plasmoid.containmentType !== undefined ? globalContainmentConfigModel : globalAppletConfigModel ConfigModel { - id: globalConfigModel + id: globalAppletConfigModel ConfigCategory { name: "Keyboard shortcuts" icon: "preferences-desktop-keyboard" source: "ConfigurationShortcuts.qml" } } + ConfigModel { + id: globalContainmentConfigModel + ConfigCategory { + name: "Appearance" + icon: "preferences-desktop-wallpaper" + source: "ConfigurationContainmentAppearance.qml" + } + ConfigCategory { + name: "Mouse Actions" + icon: "preferences-desktop-mouse" + source: "ConfigurationContainmentActions.qml" + } + } //END model //BEGIN functions