2 * Copyright (C) 2013 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18import Ubuntu.Components 0.1
20import LightDM 0.1 as LightDM
25 // Determine if a numeric or alphanumeric pad is used.
26 property bool alphaNumeric: false
29 property string placeholderText: ""
31 // In case the Lockscreen can show a greeter message, this is the username
32 property string username: ""
34 // As the numeric PIN pad doesn't have a OK button by design, we need to auto-confirm on a certain length.
35 // This is ignored by the alphaNumeric lockscreen as that one is confirmed with pressing enter on the OSK.
36 property int pinLength: 4
38 property url background: ""
42 signal emergencyCall()
45 if (required && pinPadLoader.item) {
46 pinPadLoader.item.clear(false);
51 // This causes the loader below to destry and recreate the source
52 pinPadLoader.resetting = true;
53 pinPadLoader.resetting = false;
58 source: root.required ? root.background : ""
59 fillMode: Image.PreserveAspectCrop
68 objectName: "pinPadLoader"
72 verticalCenter: parent.verticalCenter
73 verticalCenterOffset: root.alphaNumeric ? -units.gu(10) : -units.gu(4)
75 property bool resetting: false
77 source: (!resetting && root.required) ? (root.alphaNumeric ? "PassphraseLockscreen.qml" : "PinLockscreen.qml") : ""
80 target: pinPadLoader.item
83 LightDM.Greeter.respond(passphrase);
92 target: pinPadLoader.item
97 target: pinPadLoader.item
98 property: "placeholderText"
99 value: root.placeholderText
102 target: pinPadLoader.item
111 bottom: parent.bottom
112 bottomMargin: units.gu(4)
115 height: childrenRect.height
119 objectName: "emergencyCallIcon"
122 anchors.horizontalCenter: parent.horizontalCenter
123 name: "phone-app-call-symbolic"
129 onClicked: root.emergencyCall()
134 text: i18n.tr("Emergency Call")
138 anchors.horizontalCenter: parent.horizontalCenter
143 target: LightDM.Greeter
145 onAuthenticationComplete: {
146 if (LightDM.Greeter.promptless) {
149 if (LightDM.Greeter.authenticated) {
152 pinPadLoader.item.clear(true);
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list