it helps if I commit *both* halves of the "add activity" button

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=796754
This commit is contained in:
Chani Armitage 2008-04-14 09:23:35 +00:00
parent 70ef9a6dcf
commit 2036ed1670
2 changed files with 19 additions and 0 deletions

View File

@ -280,6 +280,9 @@ void Containment::setContainmentType(Containment::Type type)
i18n("Lock Widgets"));
connect(lockTool, SIGNAL(clicked()), this, SLOT(toggleDesktopImmutability()));
}
Plasma::Widget *activityTool = addToolBoxTool("addSiblingContainment", "list-add", i18n("Add Activity"));
connect(activityTool, SIGNAL(clicked()), this, SLOT(addSiblingContainment()));
}
} else {
delete d->toolbox;
@ -542,6 +545,11 @@ void Containment::zoomIn()
emit zoomIn(this);
}
void Containment::addSiblingContainment()
{
emit addSiblingContainment(this);
}
void Containment::clearApplets()
{
qDeleteAll(d->applets);

View File

@ -337,6 +337,12 @@ class PLASMA_EXPORT Containment : public Applet
*/
void zoomOut();
/**
* Emitted when the containment wants a new containment to be created.
* Usually only used for desktop containments.
*/
void addSiblingContainment(Plasma::Containment *);
/**
* Emitted when the containment requests an add widgets dialog is shown.
* Usually only used for desktop containments.
@ -383,6 +389,11 @@ class PLASMA_EXPORT Containment : public Applet
*/
void zoomIn();
/**
* Tells the corona to create a new desktop containment
*/
void addSiblingContainment();
protected:
/**
* Optionally creates a layout for the Containment for the new