blob: 9c761bd9aff27c1599efcf8d33df209de8e07508 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
* Hide the desktop toolbox (aka "cashew") when widgets are locked
*
--- plasma/desktop/toolboxes/desktoptoolbox.cpp.orig 2015-06-26 03:17:21 UTC
+++ plasma/desktop/toolboxes/desktoptoolbox.cpp
@@ -177,6 +177,8 @@ void DesktopToolBox::init()
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()),
this, SLOT(updateTheming()));
Plasma::ToolTipManager::self()->registerWidget(this);
+ QObject::connect(m_containment, SIGNAL(immutabilityChanged(Plasma::ImmutabilityType)),
+ this, SLOT(immutabilityChanged(Plasma::ImmutabilityType)));
if (KAuthorized::authorizeKAction("logout")) {
QAction *action = new QAction(i18n("Leave..."), this);
@@ -761,6 +763,11 @@ void DesktopToolBox::toggle()
setShowing(!isShowing());
}
+void DesktopToolBox::immutabilityChanged(Plasma::ImmutabilityType immutability)
+{
+ setVisible(immutability == Plasma::Mutable);
+}
+
void DesktopToolBox::adjustBackgroundBorders() const
{
Plasma::FrameSvg *background = const_cast<Plasma::FrameSvg *>(m_background);
|