Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/lockscreen/MainBlock.qml
Context not available. | |||||
34 | */ | 34 | */ | ||
---|---|---|---|---|---|
35 | signal loginRequest(string password) | 35 | signal loginRequest(string password) | ||
36 | 36 | | |||
37 | /* | | |||
38 | */ | | |||
39 | signal newSession() | | |||
40 | | ||||
41 | function startLogin() { | 37 | function startLogin() { | ||
42 | if (userListCurrentIndex == 1) { | | |||
43 | newSession() | | |||
44 | return; | | |||
45 | } | | |||
46 | | ||||
47 | var password = passwordBox.text | 38 | var password = passwordBox.text | ||
48 | 39 | | |||
49 | //this is partly because it looks nicer | 40 | //this is partly because it looks nicer | ||
Context not available. | |||||
64 | 55 | | |||
65 | onAccepted: startLogin() | 56 | onAccepted: startLogin() | ||
66 | 57 | | |||
67 | visible: userListCurrentIndex == 0 | | |||
68 | | ||||
69 | //if empty and left or right is pressed change selection in user switch | 58 | //if empty and left or right is pressed change selection in user switch | ||
70 | //this cannot be in keys.onLeftPressed as then it doesn't reach the password box | 59 | //this cannot be in keys.onLeftPressed as then it doesn't reach the password box | ||
71 | Keys.onPressed: { | 60 | Keys.onPressed: { | ||
Context not available. | |||||
92 | id: loginButton | 81 | id: loginButton | ||
93 | Layout.fillWidth: true | 82 | Layout.fillWidth: true | ||
94 | 83 | | |||
95 | text: userListCurrentIndex == 0 ? i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Unlock") : i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Start New Session") | 84 | text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Unlock") | ||
96 | onClicked: startLogin() | 85 | onClicked: startLogin() | ||
97 | } | 86 | } | ||
98 | } | 87 | } | ||
Context not available. |