~lukas-kde/unity8/dashboard

« back to all changes in this revision

Viewing changes to qml/Greeter/WideView.qml

  • Committer: Lukáš Tinkl
  • Date: 2017-01-26 12:13:17 UTC
  • mfrom: (2749.1.49 unity8)
  • Revision ID: lukas.tinkl@canonical.com-20170126121317-qms39s9pikclidbe
merge trunk, fix conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
        loginList.showError();
53
53
    }
54
54
 
55
 
    function reset(forceShow) {
56
 
        loginList.reset();
57
 
    }
58
 
 
59
 
    function showMessage(html) {
60
 
        loginList.showMessage(html);
61
 
    }
62
 
 
63
 
    function showPrompt(text, isSecret, isDefaultPrompt) {
64
 
        loginList.showPrompt(text, isSecret, isDefaultPrompt);
 
55
    function forceShow() {
 
56
        // Nothing to do, we are always fully shown
65
57
    }
66
58
 
67
59
    function tryToUnlock(toTheRight) {
84
76
        coverPage.hide();
85
77
    }
86
78
 
87
 
    function notifyAuthenticationSucceeded(showFakePassword) {
88
 
        if (showFakePassword) {
89
 
            loginList.showFakePassword();
90
 
        }
 
79
    function showFakePassword() {
 
80
        loginList.showFakePassword();
91
81
    }
92
82
 
93
83
    function showLastChance() {
125
115
            id: loginList
126
116
            objectName: "loginList"
127
117
 
128
 
            property int selectedUserIndex: 0
129
 
 
130
118
            width: units.gu(40)
131
119
            anchors {
132
120
                left: parent.left
141
129
            Behavior on boxVerticalOffset { UbuntuNumberAnimation {} }
142
130
 
143
131
            model: root.userModel
144
 
            currentSession: LightDMService.users.data(selectedUserIndex, LightDMService.userRoles.SessionRole);
145
132
            onResponded: root.responded(response)
146
 
            onSelected: {
147
 
                root.selected(index)
148
 
                loginList.selectedUserIndex = index;
149
 
            }
 
133
            onSelected: root.selected(index)
150
134
            onSessionChooserButtonClicked: parent.state = "SessionsList"
 
135
            onCurrentIndexChanged: setCurrentSession()
151
136
 
152
137
            Keys.forwardTo: [sessionChooserLoader.item]
 
138
 
 
139
            Component.onCompleted: setCurrentSession()
 
140
 
 
141
            function setCurrentSession() {
 
142
                currentSession = LightDMService.users.data(currentIndex, LightDMService.userRoles.SessionRole);
 
143
            }
153
144
        }
154
145
 
155
146
        Loader {
177
168
                onSessionSelected: loginList.currentSession = sessionKey
178
169
                onShowLoginList: {
179
170
                    coverPage.state = "LoginList"
180
 
                    loginList.passwordInput.forceActiveFocus();
 
171
                    loginList.tryToUnlock();
181
172
                }
182
173
                ignoreUnknownSignals: true
183
174
            }