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
19import LightDM 0.1 as LightDM
26 property bool promptless: loginLoader.status == Loader.Ready && LightDM.Greeter.promptless
27 property bool ready: wallpaper.status == Image.Ready
28 property bool leftTeaserPressed: teasingMouseArea.pressed &&
29 teasingMouseArea.mouseX < teasingMouseArea.width / 2
30 property bool rightTeaserPressed: teasingMouseArea.pressed &&
31 teasingMouseArea.mouseX > teasingMouseArea.width / 2
33 signal selected(int uid)
34 signal unlocked(int uid)
39 source: shell.background
57 topMargin: units.gu(2)
58 horizontalCenter: parent.horizontalCenter
69 objectName: "loginLoader"
72 leftMargin: Math.min(parent.width * 0.16, units.gu(20))
73 verticalCenter: parent.verticalCenter
78 // TODO: Once we have a system API for determining which mode we are
79 // in, tablet/phone/desktop, that should be used instead of narrowMode.
80 source: greeter.narrowMode ? "" : "LoginList.qml"
83 item.currentIndex = greeterContentLoader.currentIndex;
84 selected(item.currentIndex);
85 item.resetAuthentication();
89 target: loginLoader.item
91 value: greeterContentLoader.model
95 target: loginLoader.item
105 onCurrentIndexChanged: {
106 if (greeterContentLoader.currentIndex !== loginLoader.item.currentIndex) {
107 greeterContentLoader.currentIndex = loginLoader.item.currentIndex;
115 height: narrowMode ? parent.height : 0.75 * parent.height
116 model: greeterContentLoader.infographicModel
118 Component.onCompleted: infographics.updateUsername(greeterContentLoader.currentIndex)
122 onSelected: infographics.updateUsername(uid)
125 function updateUsername(uid) {
126 greeterContentLoader.infographicModel.username = greeterContentLoader.model.data(uid, LightDM.UserRoles.NameRole)
130 verticalCenter: parent.verticalCenter
131 left: narrowMode ? root.left : loginLoader.right
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