Merge lp:~mardy/ubuntu-system-settings-online-accounts/popups-1428591 into lp:ubuntu-system-settings-online-accounts

Proposed by Alberto Mardegan
Status: Merged
Approved by: David Barth
Approved revision: 350
Merged at revision: 356
Proposed branch: lp:~mardy/ubuntu-system-settings-online-accounts/popups-1428591
Merge into: lp:ubuntu-system-settings-online-accounts
Diff against target: 85 lines (+38/-12)
3 files modified
plugins/module/ChromedWebView.qml (+18/-0)
plugins/module/WebView.qml (+19/-12)
plugins/module/module.pro (+1/-0)
To merge this branch: bzr merge lp:~mardy/ubuntu-system-settings-online-accounts/popups-1428591
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Pending
Online Accounts Pending
Review via email: mp+295478@code.launchpad.net

Commit message

Open popups in an overlaid webview

Description of the change

Open popups in an overlaid wabview

To post a comment you must log in.
347. By Alberto Mardegan

Install new QML file

348. By Alberto Mardegan

skip tests on arm64

349. By Alberto Mardegan

Add missing import

350. By Alberto Mardegan

Revert arm64 change, will be fixed in a separate MP

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'plugins/module/ChromedWebView.qml'
--- plugins/module/ChromedWebView.qml 1970-01-01 00:00:00 +0000
+++ plugins/module/ChromedWebView.qml 2016-06-06 12:10:41 +0000
@@ -0,0 +1,18 @@
1import QtQuick 2.0
2import Ubuntu.Components 1.3
3import Ubuntu.Web 0.2
4
5WebView {
6 id: root
7
8 /* Taken from webbrowser-app */
9 ProgressBar {
10 anchors.top: parent.top
11 anchors.left: parent.left
12 anchors.right: parent.right
13 height: units.dp(3)
14 showProgressPercentage: false
15 visible: root.loading
16 value: root.loadProgress / 100
17 }
18}
019
=== modified file 'plugins/module/WebView.qml'
--- plugins/module/WebView.qml 2016-02-24 10:29:24 +0000
+++ plugins/module/WebView.qml 2016-06-06 12:10:41 +0000
@@ -2,11 +2,29 @@
2import Ubuntu.Components 1.32import Ubuntu.Components 1.3
3import Ubuntu.Web 0.23import Ubuntu.Web 0.2
44
5WebView {5ChromedWebView {
6 id: root6 id: root
77
8 property QtObject signonRequest8 property QtObject signonRequest
99
10 onNewViewRequested: {
11 var popup = popupComponent.createObject(root, {
12 "context": context,
13 "request": request,
14 })
15 popup.closeRequested.connect(function() {
16 console.log("Close requested!")
17 popup.destroy()
18 })
19 }
20
21 Component {
22 id: popupComponent
23 ChromedWebView {
24 anchors.fill: parent
25 }
26 }
27
10 onSignonRequestChanged: if (signonRequest) {28 onSignonRequestChanged: if (signonRequest) {
11 signonRequest.authenticated.connect(onAuthenticated)29 signonRequest.authenticated.connect(onAuthenticated)
12 url = signonRequest.startUrl30 url = signonRequest.startUrl
@@ -39,15 +57,4 @@
39 function onGotCookies(requestId, cookies) {57 function onGotCookies(requestId, cookies) {
40 signonRequest.setCookies(cookies)58 signonRequest.setCookies(cookies)
41 }59 }
42
43 /* Taken from webbrowser-app */
44 ProgressBar {
45 anchors.top: parent.top
46 anchors.left: parent.left
47 anchors.right: parent.right
48 height: units.dp(3)
49 showProgressPercentage: false
50 visible: root.loading
51 value: root.loadProgress / 100
52 }
53}60}
5461
=== modified file 'plugins/module/module.pro'
--- plugins/module/module.pro 2016-03-08 08:48:26 +0000
+++ plugins/module/module.pro 2016-06-06 12:10:41 +0000
@@ -34,6 +34,7 @@
34LIBS += -lonline-accounts-plugin34LIBS += -lonline-accounts-plugin
3535
36QML_SOURCES = \36QML_SOURCES = \
37 ChromedWebView.qml \
37 DuplicateAccount.qml \38 DuplicateAccount.qml \
38 ErrorItem.qml \39 ErrorItem.qml \
39 KeyboardRectangle.qml \40 KeyboardRectangle.qml \

Subscribers

People subscribed via source and target branches