Merge lp:~mardy/ubuntu-system-settings-online-accounts/apl-1651183 into lp:ubuntu-system-settings-online-accounts

Proposed by Alberto Mardegan
Status: Merged
Approved by: Alberto Mardegan
Approved revision: 412
Merged at revision: 411
Proposed branch: lp:~mardy/ubuntu-system-settings-online-accounts/apl-1651183
Merge into: lp:ubuntu-system-settings-online-accounts
Diff against target: 111 lines (+20/-11)
6 files modified
system-settings-plugin/AccountEditPage.qml (+4/-2)
system-settings-plugin/AccountItem.qml (+2/-2)
system-settings-plugin/AccountsPage.qml (+1/-1)
system-settings-plugin/MainPage.qml (+1/-1)
system-settings-plugin/NewAccountPage.qml (+8/-2)
tests/autopilot/online_accounts_ui/tests/test_online_accounts_ui.py (+4/-3)
To merge this branch: bzr merge lp:~mardy/ubuntu-system-settings-online-accounts/apl-1651183
Reviewer Review Type Date Requested Status
Jonas G. Drange (community) Approve
Online Accounts Pending
Review via email: mp+313611@code.launchpad.net

Commit message

Use AdaptivePageLayout and new header in SystemSettings plugin

Description of the change

Use AdaptivePageLayout and new header in SystemSettings plugin

To post a comment you must log in.
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

Very good, thank you.

review: Approve
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

if you merge it, let's assume you approved that last version. :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'system-settings-plugin/AccountEditPage.qml'
2--- system-settings-plugin/AccountEditPage.qml 2016-02-12 10:11:53 +0000
3+++ system-settings-plugin/AccountEditPage.qml 2017-01-09 07:48:52 +0000
4@@ -28,8 +28,10 @@
5
6 signal finished
7
8- title: account.provider.displayName
9- flickable: flick
10+ header: PageHeader {
11+ title: account.provider.displayName
12+ flickable: flick
13+ }
14
15 Account {
16 id: account
17
18=== modified file 'system-settings-plugin/AccountItem.qml'
19--- system-settings-plugin/AccountItem.qml 2015-10-22 08:33:20 +0000
20+++ system-settings-plugin/AccountItem.qml 2017-01-09 07:48:52 +0000
21@@ -47,14 +47,14 @@
22 __editPage = accountEditPage.createObject(null, {
23 "accountHandle": accountHandle })
24 __editPage.finished.connect(__onEditFinished)
25- pageStack.push(__editPage)
26+ pageStack.addPageToNextColumn(mainAccountsPage, __editPage)
27 running = true;
28 }
29
30 function __onEditFinished() {
31 __editPage.destroy(1000)
32+ pageStack.removePages(__editPage)
33 __editPage = null
34- pageStack.pop()
35 running = false
36 }
37 }
38
39=== modified file 'system-settings-plugin/AccountsPage.qml'
40--- system-settings-plugin/AccountsPage.qml 2015-10-22 08:33:20 +0000
41+++ system-settings-plugin/AccountsPage.qml 2017-01-09 07:48:52 +0000
42@@ -50,7 +50,7 @@
43 control: Button {
44 text: i18n.dtr(domain, "Add account…")
45 width: parent.width - units.gu(4)
46- onClicked: pageStack.push(newAccountPage)
47+ onClicked: pageStack.addPageToNextColumn(mainAccountsPage, newAccountPage)
48 }
49 showDivider: false
50 }
51
52=== modified file 'system-settings-plugin/MainPage.qml'
53--- system-settings-plugin/MainPage.qml 2015-11-12 08:12:13 +0000
54+++ system-settings-plugin/MainPage.qml 2017-01-09 07:48:52 +0000
55@@ -23,7 +23,7 @@
56 import Ubuntu.OnlineAccounts 0.1
57
58 ItemPage {
59- id: root
60+ id: mainAccountsPage
61
62 property string domain: "ubuntu-system-settings-online-accounts"
63
64
65=== modified file 'system-settings-plugin/NewAccountPage.qml'
66--- system-settings-plugin/NewAccountPage.qml 2015-10-22 08:33:20 +0000
67+++ system-settings-plugin/NewAccountPage.qml 2017-01-09 07:48:52 +0000
68@@ -20,9 +20,15 @@
69 import Ubuntu.Components 1.3
70
71 Page {
72- title: i18n.dtr(domain, "Add account")
73+ id: root
74+
75+ header: PageHeader {
76+ title: i18n.dtr(domain, "Add account")
77+ flickable: flick
78+ }
79
80 Flickable {
81+ id: flick
82 anchors.fill: parent
83 contentHeight: contentItem.childrenRect.height
84 boundsBehavior: Flickable.StopAtBounds
85@@ -30,7 +36,7 @@
86 ProviderPluginList {
87 onCreationFinished: {
88 if (created) {
89- pageStack.pop()
90+ pageStack.removePages(root)
91 }
92 }
93 }
94
95=== modified file 'tests/autopilot/online_accounts_ui/tests/test_online_accounts_ui.py'
96--- tests/autopilot/online_accounts_ui/tests/test_online_accounts_ui.py 2014-08-19 09:16:44 +0000
97+++ tests/autopilot/online_accounts_ui/tests/test_online_accounts_ui.py 2017-01-09 07:48:52 +0000
98@@ -35,9 +35,10 @@
99 def test_title(self):
100 """Checks whether the Online Accounts window title is correct."""
101 # TODO turn this into a QML test. --elopio - 2014-07-03
102- header = self.application.main_view.get_header()
103- self.assertTrue(header.visible)
104- self.assertEquals(header.title, 'Accounts')
105+ title = self.application.main_view.select_single(
106+ objectName='accountsPage'
107+ ).title
108+ self.assertEquals(title, 'Accounts')
109
110
111 class AvailableProvidersTestCase(tests.BaseOnlineAccountsUITestCase):

Subscribers

People subscribed via source and target branches