Merge lp:~ubuntu-sdk-team/ubuntu-ui-extras/ubuntu-ui-extras-share-popover into lp:~ubuntu-sdk-team/ubuntu-ui-extras/trunk

Proposed by Ugo Riboni
Status: Merged
Approved by: Günter Schwann
Approved revision: 48
Merged at revision: 50
Proposed branch: lp:~ubuntu-sdk-team/ubuntu-ui-extras/ubuntu-ui-extras-share-popover
Merge into: lp:~ubuntu-sdk-team/ubuntu-ui-extras/trunk
Diff against target: 167 lines (+132/-0)
6 files modified
modules/Ubuntu/Components/Extras/CMakeLists.txt (+1/-0)
modules/Ubuntu/Components/Extras/Share/CMakeLists.txt (+2/-0)
modules/Ubuntu/Components/Extras/Share/ShareMenu.qml (+73/-0)
modules/Ubuntu/Components/Extras/Share/SharePopover.qml (+41/-0)
modules/Ubuntu/Components/Extras/qmldir (+1/-0)
ubuntu-ui-extras.qmlproject (+14/-0)
To merge this branch: bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-extras/ubuntu-ui-extras-share-popover
Reviewer Review Type Date Requested Status
Günter Schwann (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+181034@code.launchpad.net

Commit message

Add a SharePopover component that apps can use to let the user chose to which service to share.

Description of the change

Add a SharePopover component that apps can use to let the user chose to which service to share.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
48. By Ugo Riboni

Merge changes from trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Günter Schwann (schwann) wrote :

looks good, and works

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'modules/Ubuntu/Components/Extras/CMakeLists.txt'
--- modules/Ubuntu/Components/Extras/CMakeLists.txt 2013-08-19 09:15:31 +0000
+++ modules/Ubuntu/Components/Extras/CMakeLists.txt 2013-08-21 11:26:55 +0000
@@ -21,3 +21,4 @@
2121
22add_subdirectory(plugin)22add_subdirectory(plugin)
23add_subdirectory(Example)23add_subdirectory(Example)
24add_subdirectory(Share)
2425
=== added file 'modules/Ubuntu/Components/Extras/Share/CMakeLists.txt'
--- modules/Ubuntu/Components/Extras/Share/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ modules/Ubuntu/Components/Extras/Share/CMakeLists.txt 2013-08-21 11:26:55 +0000
@@ -0,0 +1,2 @@
1file(GLOB QML_FILES *.qml)
2install(FILES ${QML_FILES} DESTINATION ${PLUGIN_DIR}/Share)
03
=== added file 'modules/Ubuntu/Components/Extras/Share/ShareMenu.qml'
--- modules/Ubuntu/Components/Extras/Share/ShareMenu.qml 1970-01-01 00:00:00 +0000
+++ modules/Ubuntu/Components/Extras/Share/ShareMenu.qml 2013-08-21 11:26:55 +0000
@@ -0,0 +1,73 @@
1/*
2 * Copyright (C) 2012-2013 Canonical Ltd
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 */
17
18import QtQuick 2.0
19import Ubuntu.Components.ListItems 0.1 as ListItem
20import Ubuntu.OnlineAccounts 0.1
21
22/*!
23*/
24Item {
25 id: sharemenu
26
27 height: childrenRect.height
28
29 signal selected(string accountId)
30
31 ListView {
32 anchors {
33 top: parent.top
34 left: parent.left
35 right: parent.right
36 }
37 height: childrenRect.height
38 interactive: false
39
40 model: AccountServiceModel {
41 serviceType: "microblogging"
42 includeDisabled: true
43 }
44
45 delegate: Item {
46 width: parent.width
47 height: childrenRect.height
48 visible: serviceName == "Facebook"
49
50 AccountService {
51 id: service
52 objectHandle: accountService
53 }
54
55 ListItem.Subtitled {
56 text: service.provider.displayName
57 subText: displayName
58 icon: "image://gicon/" + service.provider.iconName
59 __iconHeight: units.gu(5)
60 __iconWidth: units.gu(5)
61
62 onClicked: {
63 if (service.provider.displayName == "Facebook") {
64 sharemenu.selected(accountId);
65 } else {
66 console.log("Sharing to this service is not supported yet.");
67 sharemenu.selected(null);
68 }
69 }
70 }
71 }
72 }
73}
074
=== added file 'modules/Ubuntu/Components/Extras/Share/SharePopover.qml'
--- modules/Ubuntu/Components/Extras/Share/SharePopover.qml 1970-01-01 00:00:00 +0000
+++ modules/Ubuntu/Components/Extras/Share/SharePopover.qml 2013-08-21 11:26:55 +0000
@@ -0,0 +1,41 @@
1/*
2 * Copyright (C) 2012-2013 Canonical Ltd
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import Ubuntu.Components.Popups 0.1
19import Ubuntu.Components.ListItems 0.1 as ListItem
20
21/*!
22*/
23Popover {
24 id: sharePopover
25
26 signal selected(string accountId)
27
28 ShareMenu {
29 anchors {
30 left: parent.left
31 right: parent.right
32 top: parent.top
33 }
34 onSelected: {
35 if (accountId !== null) {
36 sharePopover.selected(accountId)
37 }
38 sharePopover.hide()
39 }
40 }
41}
042
=== modified file 'modules/Ubuntu/Components/Extras/qmldir'
--- modules/Ubuntu/Components/Extras/qmldir 2013-08-12 11:10:11 +0000
+++ modules/Ubuntu/Components/Extras/qmldir 2013-08-21 11:26:55 +0000
@@ -2,3 +2,4 @@
2plugin ubuntu-ui-extras-plugin2plugin ubuntu-ui-extras-plugin
3Example 0.1 Example.qml3Example 0.1 Example.qml
4Share 0.1 Share.qml4Share 0.1 Share.qml
5SharePopover 0.1 Share/SharePopover.qml
56
=== added file 'ubuntu-ui-extras.qmlproject'
--- ubuntu-ui-extras.qmlproject 1970-01-01 00:00:00 +0000
+++ ubuntu-ui-extras.qmlproject 2013-08-21 11:26:55 +0000
@@ -0,0 +1,14 @@
1import QmlProject 1.1
2
3Project {
4 QmlFiles {
5 directory: "modules"
6 }
7 JavaScriptFiles {
8 directory: "modules"
9 }
10 Files {
11 filter: ["modules/Ubuntu/Components/Extras/qmldir"]
12 }
13}
14

Subscribers

People subscribed via source and target branches

to all changes: