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;
57 // In case wallpaper fails to load or is undefined
66 source: root.required ? root.background : ""
67 fillMode: Image.PreserveAspectCrop
76 objectName: "pinPadLoader"
80 verticalCenter: parent.verticalCenter
81 verticalCenterOffset: root.alphaNumeric ? -units.gu(10) : -units.gu(4)
83 property bool resetting: false
85 source: (!resetting && root.required) ? (root.alphaNumeric ? "PassphraseLockscreen.qml" : "PinLockscreen.qml") : ""
88 target: pinPadLoader.item
91 LightDM.Greeter.respond(passphrase);
100 target: pinPadLoader.item
101 property: "pinLength"
102 value: root.pinLength
105 target: pinPadLoader.item
106 property: "placeholderText"
107 value: root.placeholderText
110 target: pinPadLoader.item
119 bottom: parent.bottom
120 bottomMargin: units.gu(4)
123 height: childrenRect.height
127 objectName: "emergencyCallIcon"
130 anchors.horizontalCenter: parent.horizontalCenter
131 name: "phone-app-call-symbolic"
137 onClicked: root.emergencyCall()
142 text: i18n.tr("Emergency Call")
146 anchors.horizontalCenter: parent.horizontalCenter
151 target: LightDM.Greeter
153 onAuthenticationComplete: {
154 if (LightDM.Greeter.promptless) {
157 if (LightDM.Greeter.authenticated) {
160 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