summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <[email protected]>2016-11-07 10:57:07 +0100
committerKai Uwe Broulik <[email protected]>2016-11-07 10:57:59 +0100
commit15af622ef333c112e3ae94767fc5e4c24865c23c (patch)
treef1226b8a1f8def3a0bc49c203dbb365e8b841803
parentdb36f1afe8af46159616ae1bf24a486d9d9598ba (diff)
[Lock Screen] Show "Switch User" button only if allowed
Only show the button if there's a session to switch to and/or the user is allowed to launch a new session. Differential Revision: https://phabricator.kde.org/D3231
-rw-r--r--lookandfeel/contents/lockscreen/LockScreenUi.qml3
1 files changed, 2 insertions, 1 deletions
diff --git a/lookandfeel/contents/lockscreen/LockScreenUi.qml b/lookandfeel/contents/lockscreen/LockScreenUi.qml
index a4c5f9f..0369036 100644
--- a/lookandfeel/contents/lockscreen/LockScreenUi.qml
+++ b/lookandfeel/contents/lockscreen/LockScreenUi.qml
@@ -163,7 +163,8 @@ PlasmaCore.ColorScope {
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Switch User")
iconSource: "system-switch-user"
onClicked: mainStack.push(switchSessionPage)
- visible: sessionsModel.canSwitchUser
+ // the current session isn't listed in the model, hence a check for greater than zero, not one
+ visible: (sessionsModel.count > 0 || sessionsModel.canStartNewSession) && sessionsModel.canSwitchUser
}
]
}