remove add and remove ToolBoxAction
This commit is contained in:
parent
79ebeb0a37
commit
5b8ee2a834
@ -166,18 +166,6 @@ void Containment::init()
|
||||
d->actions()->addAction("configure shortcuts", act);
|
||||
}
|
||||
}
|
||||
|
||||
if (d->type == DesktopContainment) {
|
||||
addToolBoxAction(action("add widgets"));
|
||||
|
||||
//TODO: do we need some way to allow this be overridden?
|
||||
// it's always available because shells rely on this
|
||||
// to offer their own custom configuration as well
|
||||
QAction *configureContainment = action("configure");
|
||||
if (configureContainment) {
|
||||
addToolBoxAction(configureContainment);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -576,16 +564,6 @@ void Containment::enableAction(const QString &name, bool enable)
|
||||
}
|
||||
}
|
||||
|
||||
void Containment::addToolBoxAction(QAction *action)
|
||||
{
|
||||
d->toolBoxActions << action;
|
||||
}
|
||||
|
||||
void Containment::removeToolBoxAction(QAction *action)
|
||||
{
|
||||
d->toolBoxActions.removeAll(action);
|
||||
}
|
||||
|
||||
void Containment::addAssociatedWidget(QWidget *widget)
|
||||
{
|
||||
//TODO: move this whole method in the c++ part of the QML implementation
|
||||
|
@ -247,16 +247,6 @@ class PLASMA_EXPORT Containment : public Applet
|
||||
*/
|
||||
void enableAction(const QString &name, bool enable);
|
||||
|
||||
/**
|
||||
* Add an action to the toolbox
|
||||
*/
|
||||
void addToolBoxAction(QAction *action);
|
||||
|
||||
/**
|
||||
* Remove an action from the toolbox
|
||||
*/
|
||||
void removeToolBoxAction(QAction *action);
|
||||
|
||||
/**
|
||||
* associate actions with this widget, including ones added after this call.
|
||||
* needed to make keyboard shortcuts work.
|
||||
|
@ -313,7 +313,7 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra
|
||||
return;
|
||||
}
|
||||
|
||||
//kDebug() << "got containmentConstraintsEvent" << constraints << (QObject*)toolBox;
|
||||
//kDebug() << "got containmentConstraintsEvent" << constraints;
|
||||
if (constraints & Plasma::ImmutableConstraint) {
|
||||
//update actions
|
||||
checkRemoveAction();
|
||||
@ -344,7 +344,6 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra
|
||||
}
|
||||
|
||||
if (constraints & Plasma::StartupCompletedConstraint && type < Containment::CustomContainment) {
|
||||
q->addToolBoxAction(q->action("remove"));
|
||||
checkRemoveAction();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user