attempt to load different page set for containments
This commit is contained in:
parent
d2d4faaa3e
commit
b88339cb4a
@ -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()
|
||||
|
@ -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<QAction*> 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...
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user