hide remove action for desktop containments

they can only be removed by killing the activity itself
This commit is contained in:
Marco Martin 2013-10-30 15:33:56 +01:00
parent 1c435c56a4
commit b71f307ed6

View File

@ -20,12 +20,14 @@
#include "shellcorona.h"
#include "kidenticongenerator.h"
#include <QAction>
#include <QDebug>
#include <QPixmap>
#include <QString>
#include <QSize>
#include <QFile>
#include <kactioncollection.h>
#include <kconfig.h>
#include <kicon.h>
#include <kstandarddirs.h>
@ -211,6 +213,12 @@ Plasma::Containment* Activity::containmentForScreen(int screen)
containment->setScreen(screen);
}
QAction *closeAction = containment->actions()->action("remove");
if (closeAction) {
closeAction->setEnabled(false);
closeAction->setVisible(false);
}
return containment;
}