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 AccountsService 0.1
19import Ubuntu.Components 0.1
20import LightDM 0.1 as LightDM
27 property bool ready: background.source == "" || background.status == Image.Ready || background.status == Image.Error
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)
37 // In case background fails to load
43 property url backgroundValue: AccountsService.backgroundFile != undefined && AccountsService.backgroundFile.length > 0 ? AccountsService.backgroundFile : greeter.defaultBackground
44 onBackgroundValueChanged: background.source = backgroundValue
48 objectName: "greeterBackground"
51 topMargin: backgroundTopMargin
53 fillMode: Image.PreserveAspectCrop
56 // See Shell.qml's backgroundSettings treatment for why we need a separate
57 // Image, but it boils down to avoiding binding loop detection.
59 source: background.source
65 if (status == Image.Error && source != greeter.defaultBackground) {
66 background.source = greeter.defaultBackground
84 objectName: "loginLoader"
87 leftMargin: Math.min(parent.width * 0.16, units.gu(20))
88 verticalCenter: parent.verticalCenter
93 // TODO: Once we have a system API for determining which mode we are
94 // in, tablet/phone/desktop, that should be used instead of narrowMode.
95 source: greeter.narrowMode ? "" : "LoginList.qml"
98 item.currentIndex = greeterContentLoader.currentIndex;
99 selected(item.currentIndex);
100 item.resetAuthentication();
104 target: loginLoader.item
106 value: greeterContentLoader.model
110 target: loginLoader.item
120 onCurrentIndexChanged: {
121 if (greeterContentLoader.currentIndex !== loginLoader.item.currentIndex) {
122 greeterContentLoader.currentIndex = loginLoader.item.currentIndex;
130 objectName: "infographics"
131 height: narrowMode ? parent.height : 0.75 * parent.height
132 model: greeterContentLoader.infographicModel
134 property string selectedUser
135 property string infographicUser: AccountsService.statsWelcomeScreen ? selectedUser : ""
136 onInfographicUserChanged: greeterContentLoader.infographicModel.username = infographicUser
138 Component.onCompleted: {
139 selectedUser = greeterContentLoader.model.data(greeterContentLoader.currentIndex, LightDM.UserRoles.NameRole)
140 greeterContentLoader.infographicModel.username = infographicUser
141 greeterContentLoader.infographicModel.readyForDataChange()
146 onSelected: infographics.selectedUser = greeterContentLoader.model.data(uid, LightDM.UserRoles.NameRole)
150 verticalCenter: parent.verticalCenter
151 left: narrowMode ? root.left : loginLoader.right
162 topMargin: units.gu(2)
163 horizontalCenter: parent.horizontalCenter
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