From 5b8ee2a834de0c591d086b7dca478b1afebfea04 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 18 Feb 2013 19:09:57 +0100 Subject: [PATCH] remove add and remove ToolBoxAction --- src/plasma/containment.cpp | 22 ---------------------- src/plasma/containment.h | 10 ---------- src/plasma/private/containment_p.cpp | 3 +-- 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/src/plasma/containment.cpp b/src/plasma/containment.cpp index 4d95c7076..c745681dd 100644 --- a/src/plasma/containment.cpp +++ b/src/plasma/containment.cpp @@ -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 diff --git a/src/plasma/containment.h b/src/plasma/containment.h index dec67b1f3..e62d91d91 100644 --- a/src/plasma/containment.h +++ b/src/plasma/containment.h @@ -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. diff --git a/src/plasma/private/containment_p.cpp b/src/plasma/private/containment_p.cpp index f032f894e..e27989060 100644 --- a/src/plasma/private/containment_p.cpp +++ b/src/plasma/private/containment_p.cpp @@ -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(); } }