hook up the containment configuration interface to the generic containment configuration mechanism; now it shows in the toolbox too! whee!
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=859593
This commit is contained in:
parent
bf942582e8
commit
c633c8ac57
@ -1078,7 +1078,7 @@ void Applet::setHasConfigurationInterface(bool hasInterface)
|
|||||||
//TODO respect security when it's implemented (4.2)
|
//TODO respect security when it's implemented (4.2)
|
||||||
QAction *configAction = d->actions.action("configure");
|
QAction *configAction = d->actions.action("configure");
|
||||||
if (hasInterface) {
|
if (hasInterface) {
|
||||||
if (! configAction) { //should be always true
|
if (!configAction) { //should be always true
|
||||||
configAction = new QAction(i18n("%1 Settings", name()), this);
|
configAction = new QAction(i18n("%1 Settings", name()), this);
|
||||||
configAction->setIcon(KIcon("configure"));
|
configAction->setIcon(KIcon("configure"));
|
||||||
configAction->setShortcutContext(Qt::WidgetShortcut); //don't clash with other views
|
configAction->setShortcutContext(Qt::WidgetShortcut); //don't clash with other views
|
||||||
@ -1182,6 +1182,7 @@ void Applet::showConfigurationInterface()
|
|||||||
if (!hasConfigurationInterface()) {
|
if (!hasConfigurationInterface()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (immutability() != Mutable && !KAuthorized::authorize("PlasmaAllowConfigureWhenLocked")) {
|
if (immutability() != Mutable && !KAuthorized::authorize("PlasmaAllowConfigureWhenLocked")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1391,6 +1391,12 @@ void Containment::destroy(bool confirm)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Containment::showConfigurationInterface()
|
||||||
|
{
|
||||||
|
if (isContainment()) {
|
||||||
|
emit configureRequested();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Private class implementation
|
// Private class implementation
|
||||||
|
|
||||||
|
@ -426,6 +426,10 @@ class PLASMA_EXPORT Containment : public Applet
|
|||||||
*/
|
*/
|
||||||
void destroy(bool confirm);
|
void destroy(bool confirm);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @reimplemented from Plasma::Applet
|
||||||
|
*/
|
||||||
|
void showConfigurationInterface();
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* Sets the type of this containment.
|
* Sets the type of this containment.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user