on xenial help sign in
Re-enable swiping for tablets if the password isn't needed; fix some autopilot issues
commitf789695869f9f67984a49fd449e0c6cc2d848b4a authorMichael Terry <michael.terry@canonical.com> dateMon 29 Jul 2013, 18:16 (13 years ago) parent1263a72
4 files changed+9−13
Greeter/Greeter.qml+2−3 Greeter/GreeterContent.qml−1 tests/autopilot/unity8/shell/tests/test_hud.py+5−5 tests/mocks/LightDM/single/GreeterPrivate.cpp+2−4
Greeter/Greeter.qml+2−3
@@ -34,7 +34,7 @@ Showable {
3434
3535 property alias dragHandleWidth: dragHandle.width
3636 property alias model: greeterContentLoader.model
37− property bool locked: shown && !greeterContentLoader.promptless
37+ property bool locked: shown && !LightDM.Greeter.promptless
3838
3939 readonly property bool narrowMode: !multiUser && width <= units.gu(60)
4040 readonly property bool multiUser: LightDM.Users.count > 1
@@ -59,7 +59,6 @@ Showable {
5959 anchors.fill: parent
6060 property var model: LightDM.Users
6161 property int currentIndex: 0
62− property bool promptless: item ? item.promptless : false
6362 property var infographicModel: LightDM.Infographic
6463
6564 source: required ? "GreeterContent.qml" : ""
@@ -113,7 +112,7 @@ Showable {
113112 // UI element)
114113 distanceThreshold: 0
115114
116− enabled: greeter.narrowMode
115+ enabled: greeter.narrowMode || !greeter.locked
117116
118117 direction: Direction.Leftwards
119118 }
Greeter/GreeterContent.qml−1
@@ -23,7 +23,6 @@ MouseArea {
2323 id: root
2424 anchors.fill: parent
2525
26− property bool promptless: loginLoader.status == Loader.Ready && LightDM.Greeter.promptless
2726 property bool ready: wallpaper.status == Image.Ready
2827 property bool leftTeaserPressed: teasingMouseArea.pressed &&
2928 teasingMouseArea.mouseX < teasingMouseArea.width / 2
tests/autopilot/unity8/shell/tests/test_hud.py+5−5
@@ -37,7 +37,7 @@ class TestHud(UnityTestCase):
3737
3838 """
3939 self.launch_unity()
40− self.main_window.get_greeter().unlock()
40+ self.main_window.get_greeter().swipe()
4141 window = self.main_window.get_qml_view()
4242 hud_show_button = self.main_window.get_hud_show_button()
4343 hud = self.main_window.get_hud()
@@ -58,7 +58,7 @@ class TestHud(UnityTestCase):
5858
5959 """
6060 self.launch_unity()
61− self.main_window.get_greeter().unlock()
61+ self.main_window.get_greeter().swipe()
6262 window = self.main_window.get_qml_view()
6363 hud_show_button = self.main_window.get_hud_show_button()
6464 hud = self.main_window.get_hud()
@@ -81,7 +81,7 @@ class TestHud(UnityTestCase):
8181 def test_hide_hud_click(self):
8282 """Tapping the close button of the Hud must dismiss it."""
8383 self.launch_unity()
84− self.main_window.get_greeter().unlock()
84+ self.main_window.get_greeter().swipe()
8585 hud = self.main_window.get_hud()
8686
8787 self._launch_test_app_from_app_screen()
@@ -97,7 +97,7 @@ class TestHud(UnityTestCase):
9797
9898 """
9999 self.launch_unity()
100− self.main_window.get_greeter().unlock()
100+ self.main_window.get_greeter().swipe()
101101 hud = self.main_window.get_hud()
102102 window = self.main_window.get_qml_view()
103103
@@ -114,7 +114,7 @@ class TestHud(UnityTestCase):
114114 def test_launcher_hides_hud(self):
115115 """Opening the Launcher while the Hud is active must close the Hud."""
116116 self.launch_unity()
117− self.main_window.get_greeter().unlock()
117+ self.main_window.get_greeter().swipe()
118118 hud = self.main_window.get_hud()
119119 launcher = self.main_window.get_launcher()
120120
tests/mocks/LightDM/single/GreeterPrivate.cpp+2−4
@@ -34,10 +34,8 @@ void GreeterPrivate::handleAuthenticate()
3434{
3535 Q_Q(Greeter);
3636
37− if (authenticationUser == "one") {
38− authenticated = true;
39− Q_EMIT q->authenticationComplete();
40− }
37+ authenticated = true;
38+ Q_EMIT q->authenticationComplete();
4139}
4240
4341void GreeterPrivate::handleRespond(QString const &response)