hide remove action for desktop containments
This commit is contained in:
parent
515f9a352f
commit
003cbf8317
@ -346,6 +346,12 @@ void ShellCorona::screenAdded(QScreen *screen)
|
|||||||
if (!containment) {
|
if (!containment) {
|
||||||
containment = createContainmentForActivity(currentActivity, screenNum);
|
containment = createContainmentForActivity(currentActivity, screenNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QAction *removeAction = containment->actions()->action("remove");
|
||||||
|
if (removeAction) {
|
||||||
|
removeAction->setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
view->setContainment(containment);
|
view->setContainment(containment);
|
||||||
|
|
||||||
connect(screen, SIGNAL(destroyed(QObject*)), SLOT(screenRemoved(QObject*)));
|
connect(screen, SIGNAL(destroyed(QObject*)), SLOT(screenRemoved(QObject*)));
|
||||||
@ -358,6 +364,7 @@ Plasma::Containment* ShellCorona::createContainmentForActivity(const QString& ac
|
|||||||
Plasma::Containment* containment = createContainment(d->desktopDefaultsConfig.readEntry("Containment", "org.kde.desktopcontainment"));
|
Plasma::Containment* containment = createContainment(d->desktopDefaultsConfig.readEntry("Containment", "org.kde.desktopcontainment"));
|
||||||
containment->setActivity(activity);
|
containment->setActivity(activity);
|
||||||
insertContainment(activity, screenNum, containment);
|
insertContainment(activity, screenNum, containment);
|
||||||
|
|
||||||
return containment;
|
return containment;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -486,6 +493,10 @@ void ShellCorona::currentActivityChanged(const QString &newActivity)
|
|||||||
if (!c) {
|
if (!c) {
|
||||||
c = createContainmentForActivity(newActivity, i);
|
c = createContainmentForActivity(newActivity, i);
|
||||||
}
|
}
|
||||||
|
QAction *removeAction = c->actions()->action("remove");
|
||||||
|
if (removeAction) {
|
||||||
|
removeAction->setVisible(false);
|
||||||
|
}
|
||||||
d->views[i]->setContainment(c);
|
d->views[i]->setContainment(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user