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/>.
17import AccountsService 0.1
19import LightDM 0.1 as LightDM
22import SessionBroadcast 0.1
23import Ubuntu.Components 0.1
24import Unity.Application 0.1
25import Unity.Launcher 0.1
34 function activateApplication(appId) {
35 SessionBroadcast.requestApplicationStart(LightDM.Greeter.authenticationUser, appId)
40 id: backgroundSettings
41 schema.id: "org.gnome.desktop.background"
43 backgroundFallbackSource: backgroundSettings.pictureUri // for ease of customization by system builders
44 backgroundSource: AccountsService.backgroundFile
48 objectName: "lockscreen"
50 hides: [launcher, panel.indicators]
53 showAnimation: StandardAnimation { property: "opacity"; to: 1 }
54 hideAnimation: StandardAnimation { property: "opacity"; to: 0 }
56 x: required ? 0 : - width
58 height: parent.height - panel.panelHeight
60 onUnlocked: lockscreen.hide()
61 onCancel: greeter.show()
63 Component.onCompleted: {
64 if (LightDM.Users.count == 1) {
65 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole))
72 target: LightDM.Greeter
75 if (LightDM.Users.count == 1) {
76 // TODO: There's no better way for now to determine if its a PIN or a passphrase.
78 lockscreen.alphaNumeric = false
80 lockscreen.alphaNumeric = true
82 lockscreen.placeholderText = i18n.tr("Please enter %1").arg(text);
93 hides: [launcher, panel.indicators]
95 background: shell.background
99 height: parent.height - panel.panelHeight
101 dragHandleWidth: shell.edgeSize
105 LightDM.Greeter.startSessionSync();
111 // If there is only one user, we start authenticating with that one here.
112 // If there are more users, the Greeter will handle that
113 if (LightDM.Users.count == 1) {
114 LightDM.Greeter.authenticate(LightDM.Users.data(0, LightDM.UserRoles.NameRole));
117 greeter.forceActiveFocus();
121 onShowProgressChanged: if (LightDM.Greeter.promptless && showProgress == 0) login()
125 // Update launcher items for new user
126 var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole);
127 AccountsService.user = user;
128 LauncherModel.setUser(user);
131 onLeftTeaserPressedChanged: {
132 if (leftTeaserPressed) {
145 objectName: "greeterRevealer"
147 property real animatedProgress: MathUtils.clamp(-dragPosition / closedValue, 0, 1)
150 height: greeter.height
151 handleSize: shell.edgeSize
152 orientation: Qt.Horizontal
153 enabled: !greeter.locked
163 anchors.fill: parent //because this draws indicator menus
164 indicatorsMenuWidth: parent.width > units.gu(60) ? units.gu(40) : parent.width
167 available: !edgeDemo.active
169 fullscreenMode: false
176 anchors.top: parent.top
177 anchors.bottom: parent.bottom
179 dragAreaWidth: shell.edgeSize
180 available: greeter.narrowMode && !edgeDemo.active
181 onLauncherApplicationSelected: {
182 shell.activateApplication(appId)
186 panel.indicators.hide()
189 onDashItemSelected: greeter.show()
197 onDisplayPowerStateChange: {
198 if (status == Powerd.Off) {
200 edgeDemo.paused = true;
201 } else if (status == Powerd.On) {
202 edgeDemo.paused = false;
209 target: applicationManager
210 ignoreUnknownSignals: true
211 // If any app is focused when greeter is open, it's due to a user action
212 // like a snap decision (say, an incoming call).
213 // TODO: these should be protected to only unlock for certain applications / certain usecases
214 // potentially only in connection with a notification.
215 // TODO: what about the app the shell will restore focus to by itself?
216 onMainStageFocusedApplicationChanged: greeter.hide()
217 onSideStageFocusedApplicationChanged: greeter.hide()
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