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
=== modified file 'system-settings-plugin/AccountEditPage.qml'
--- system-settings-plugin/AccountEditPage.qml 2016-02-12 10:11:53 +0000
+++ system-settings-plugin/AccountEditPage.qml 2017-01-09 07:48:52 +0000
@@ -28,8 +28,10 @@
2828
29 signal finished29 signal finished
3030
31 title: account.provider.displayName31 header: PageHeader {
32 flickable: flick32 title: account.provider.displayName
33 flickable: flick
34 }
3335
34 Account {36 Account {
35 id: account37 id: account
3638
=== modified file 'system-settings-plugin/AccountItem.qml'
--- system-settings-plugin/AccountItem.qml 2015-10-22 08:33:20 +0000
+++ system-settings-plugin/AccountItem.qml 2017-01-09 07:48:52 +0000
@@ -47,14 +47,14 @@
47 __editPage = accountEditPage.createObject(null, {47 __editPage = accountEditPage.createObject(null, {
48 "accountHandle": accountHandle })48 "accountHandle": accountHandle })
49 __editPage.finished.connect(__onEditFinished)49 __editPage.finished.connect(__onEditFinished)
50 pageStack.push(__editPage)50 pageStack.addPageToNextColumn(mainAccountsPage, __editPage)
51 running = true;51 running = true;
52 }52 }
5353
54 function __onEditFinished() {54 function __onEditFinished() {
55 __editPage.destroy(1000)55 __editPage.destroy(1000)
56 pageStack.removePages(__editPage)
56 __editPage = null57 __editPage = null
57 pageStack.pop()
58 running = false58 running = false
59 }59 }
60}60}
6161
=== modified file 'system-settings-plugin/AccountsPage.qml'
--- system-settings-plugin/AccountsPage.qml 2015-10-22 08:33:20 +0000
+++ system-settings-plugin/AccountsPage.qml 2017-01-09 07:48:52 +0000
@@ -50,7 +50,7 @@
50 control: Button {50 control: Button {
51 text: i18n.dtr(domain, "Add account…")51 text: i18n.dtr(domain, "Add account…")
52 width: parent.width - units.gu(4)52 width: parent.width - units.gu(4)
53 onClicked: pageStack.push(newAccountPage)53 onClicked: pageStack.addPageToNextColumn(mainAccountsPage, newAccountPage)
54 }54 }
55 showDivider: false55 showDivider: false
56 }56 }
5757
=== modified file 'system-settings-plugin/MainPage.qml'
--- system-settings-plugin/MainPage.qml 2015-11-12 08:12:13 +0000
+++ system-settings-plugin/MainPage.qml 2017-01-09 07:48:52 +0000
@@ -23,7 +23,7 @@
23import Ubuntu.OnlineAccounts 0.123import Ubuntu.OnlineAccounts 0.1
2424
25ItemPage {25ItemPage {
26 id: root26 id: mainAccountsPage
2727
28 property string domain: "ubuntu-system-settings-online-accounts"28 property string domain: "ubuntu-system-settings-online-accounts"
2929
3030
=== modified file 'system-settings-plugin/NewAccountPage.qml'
--- system-settings-plugin/NewAccountPage.qml 2015-10-22 08:33:20 +0000
+++ system-settings-plugin/NewAccountPage.qml 2017-01-09 07:48:52 +0000
@@ -20,9 +20,15 @@
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
2121
22Page {22Page {
23 title: i18n.dtr(domain, "Add account")23 id: root
24
25 header: PageHeader {
26 title: i18n.dtr(domain, "Add account")
27 flickable: flick
28 }
2429
25 Flickable {30 Flickable {
31 id: flick
26 anchors.fill: parent32 anchors.fill: parent
27 contentHeight: contentItem.childrenRect.height33 contentHeight: contentItem.childrenRect.height
28 boundsBehavior: Flickable.StopAtBounds34 boundsBehavior: Flickable.StopAtBounds
@@ -30,7 +36,7 @@
30 ProviderPluginList {36 ProviderPluginList {
31 onCreationFinished: {37 onCreationFinished: {
32 if (created) {38 if (created) {
33 pageStack.pop()39 pageStack.removePages(root)
34 }40 }
35 }41 }
36 }42 }
3743
=== modified file 'tests/autopilot/online_accounts_ui/tests/test_online_accounts_ui.py'
--- tests/autopilot/online_accounts_ui/tests/test_online_accounts_ui.py 2014-08-19 09:16:44 +0000
+++ tests/autopilot/online_accounts_ui/tests/test_online_accounts_ui.py 2017-01-09 07:48:52 +0000
@@ -35,9 +35,10 @@
35 def test_title(self):35 def test_title(self):
36 """Checks whether the Online Accounts window title is correct."""36 """Checks whether the Online Accounts window title is correct."""
37 # TODO turn this into a QML test. --elopio - 2014-07-0337 # TODO turn this into a QML test. --elopio - 2014-07-03
38 header = self.application.main_view.get_header()38 title = self.application.main_view.select_single(
39 self.assertTrue(header.visible)39 objectName='accountsPage'
40 self.assertEquals(header.title, 'Accounts')40 ).title
41 self.assertEquals(title, 'Accounts')
4142
4243
43class AvailableProvidersTestCase(tests.BaseOnlineAccountsUITestCase):44class AvailableProvidersTestCase(tests.BaseOnlineAccountsUITestCase):

Subscribers

People subscribed via source and target branches