Merge lp:~mardy/account-plugins/qml into lp:account-plugins

Proposed by Alberto Mardegan
Status: Merged
Approved by: Ken VanDine
Approved revision: 119
Merged at revision: 117
Proposed branch: lp:~mardy/account-plugins/qml
Merge into: lp:account-plugins
Diff against target: 278 lines (+125/-11)
13 files modified
Makefile.am (+4/-0)
configure.ac (+30/-4)
debian/account-plugin-facebook.install (+1/-0)
debian/account-plugin-flickr.install (+1/-0)
debian/account-plugin-google.install (+1/-0)
debian/account-plugin-twitter.install (+1/-0)
debian/control (+4/-6)
debian/rules (+2/-1)
qml/Makefile.am (+5/-0)
qml/facebook/Main.qml (+33/-0)
qml/flickr/Main.qml (+9/-0)
qml/google/Main.qml (+31/-0)
qml/twitter/Main.qml (+3/-0)
To merge this branch: bzr merge lp:~mardy/account-plugins/qml
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Ken VanDine Approve
Review via email: mp+168035@code.launchpad.net

Commit message

Add a few QML plugins

Add facebook, flickr, google and twitter QML plugins for Ubuntu Touch.

Description of the change

Add a few QML plugins

Add facebook, flickr, google and twitter QML plugins for Ubuntu Touch.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mardy/account-plugins/qml updated
118. By Alberto Mardegan

Added a hard-coded path for qmlpluginsdir if pkgconfig failed to get it

This way we don't have to build depend on
ubuntu-system-settings-online-accounts, which isn't in main yet.

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Great, looks good now.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mardy/account-plugins/qml updated
119. By Alberto Mardegan

Force installation of QML plugins if specified at configuration time

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Makefile.am'
--- Makefile.am 2013-06-05 19:23:21 +0000
+++ Makefile.am 2013-06-12 05:52:26 +0000
@@ -49,6 +49,10 @@
49 src/generic-oauth.vala49 src/generic-oauth.vala
50endif # ENABLE_LIBACCOUNT_PLUGIN50endif # ENABLE_LIBACCOUNT_PLUGIN
5151
52if ENABLE_QML_PLUGINS
53SUBDIRS += qml
54endif # ENABLE_QML_PLUGINS
55
52# Extract transatable strings from .provider files56# Extract transatable strings from .provider files
53%.provider: %.provider.in $(INTLTOOL_MERGE)57%.provider: %.provider.in $(INTLTOOL_MERGE)
54 $(AM_V_at)$(MKDIR_P) $(builddir)/data/providers58 $(AM_V_at)$(MKDIR_P) $(builddir)/data/providers
5559
=== modified file 'configure.ac'
--- configure.ac 2013-06-04 14:04:14 +0000
+++ configure.ac 2013-06-12 05:52:26 +0000
@@ -26,6 +26,10 @@
2626
27PKG_PROG_PKG_CONFIG([0.24])27PKG_PROG_PKG_CONFIG([0.24])
2828
29AS_IF([test "x$prefix" = "xNONE"],
30 [real_prefix=$ac_default_prefix],
31 [real_prefix=$prefix])
32
29# Binary account plugins.33# Binary account plugins.
30AC_ARG_ENABLE([libaccount-plugin],34AC_ARG_ENABLE([libaccount-plugin],
31 [AS_HELP_STRING([--disable-libaccount-plugin],35 [AS_HELP_STRING([--disable-libaccount-plugin],
@@ -48,13 +52,34 @@
48PKG_CHECK_EXISTS([libaccounts-glib])52PKG_CHECK_EXISTS([libaccounts-glib])
4953
50AC_SUBST([plugindir],54AC_SUBST([plugindir],
51 [`$PKG_CONFIG --variable provider_plugindir account-plugin`])55 [`$PKG_CONFIG --variable provider_plugindir --define-variable=prefix=$real_prefix account-plugin`])
5256
57# QML account plugins.
58AC_ARG_ENABLE([qml-plugins],
59 [AS_HELP_STRING([--disable-qml-plugins],
60 [build without support for QML plugins for Ubuntu Touch])])
61
62AS_IF([test "x$enable_qml_plugins" != "xno"],
63 [have_uoa_plugin=yes])
64
65AM_CONDITIONAL([ENABLE_QML_PLUGINS],
66 [test "x$have_uoa_plugin" = "xyes"])
67
68# QML plugins installation path
69AC_SUBST([qmlpluginsdir],
70 [`$PKG_CONFIG --variable plugin_qml_dir --define-variable=prefix=$real_prefix OnlineAccountsPlugin`])
71AC_MSG_CHECKING(for qmlplugins directory)
72if test "x$qmlpluginsdir" = "x" ; then
73 # fallback if the previous failed
74 qmlpluginsdir="$real_prefix/share/accounts/qml-plugins"
75fi
76
77# libaccounts providers and service files
53AC_SUBST([providersdir],78AC_SUBST([providersdir],
54 [`$PKG_CONFIG --variable providerfilesdir libaccounts-glib`])79 [`$PKG_CONFIG --variable providerfilesdir --define-variable=prefix=$real_prefix libaccounts-glib`])
5580
56AC_SUBST([servicesdir],81AC_SUBST([servicesdir],
57 [`$PKG_CONFIG --variable servicefilesdir libaccounts-glib`])82 [`$PKG_CONFIG --variable servicefilesdir --define-variable=prefix=$real_prefix libaccounts-glib`])
5883
59AC_ARG_ENABLE([TESTS],84AC_ARG_ENABLE([TESTS],
60 [AS_HELP_STRING([--disable-tests], [Disable tests])])85 [AS_HELP_STRING([--disable-tests], [Disable tests])])
@@ -222,5 +247,6 @@
222 data/providers/windows-live.provider.in247 data/providers/windows-live.provider.in
223 Makefile248 Makefile
224 po/Makefile.in249 po/Makefile.in
250 qml/Makefile
225])251])
226AC_OUTPUT252AC_OUTPUT
227253
=== modified file 'debian/account-plugin-facebook.install'
--- debian/account-plugin-facebook.install 2013-03-19 14:47:46 +0000
+++ debian/account-plugin-facebook.install 2013-06-12 05:52:26 +0000
@@ -3,3 +3,4 @@
3usr/share/accounts/services/facebook-microblog.service3usr/share/accounts/services/facebook-microblog.service
4usr/share/accounts/services/facebook-im.service4usr/share/accounts/services/facebook-im.service
5usr/share/accounts/providers/facebook.provider5usr/share/accounts/providers/facebook.provider
6usr/share/accounts/qml-plugins/facebook/Main.qml
67
=== modified file 'debian/account-plugin-flickr.install'
--- debian/account-plugin-flickr.install 2013-03-19 14:47:46 +0000
+++ debian/account-plugin-flickr.install 2013-06-12 05:52:26 +0000
@@ -2,3 +2,4 @@
2etc/signon-ui/webkit-options.d/secure.flickr.com.conf2etc/signon-ui/webkit-options.d/secure.flickr.com.conf
3usr/share/accounts/services/flickr-*.service3usr/share/accounts/services/flickr-*.service
4usr/share/accounts/providers/flickr.provider4usr/share/accounts/providers/flickr.provider
5usr/share/accounts/qml-plugins/flickr/Main.qml
56
=== modified file 'debian/account-plugin-google.install'
--- debian/account-plugin-google.install 2013-04-30 21:30:01 +0000
+++ debian/account-plugin-google.install 2013-06-12 05:52:26 +0000
@@ -3,3 +3,4 @@
3usr/share/accounts/services/google-im.service3usr/share/accounts/services/google-im.service
4usr/share/accounts/services/picasa.service4usr/share/accounts/services/picasa.service
5usr/share/accounts/providers/google.provider5usr/share/accounts/providers/google.provider
6usr/share/accounts/qml-plugins/google/Main.qml
67
=== modified file 'debian/account-plugin-twitter.install'
--- debian/account-plugin-twitter.install 2013-03-19 14:47:46 +0000
+++ debian/account-plugin-twitter.install 2013-06-12 05:52:26 +0000
@@ -1,3 +1,4 @@
1etc/signon-ui/webkit-options.d/api.twitter.com.conf1etc/signon-ui/webkit-options.d/api.twitter.com.conf
2usr/share/accounts/services/twitter-microblog.service2usr/share/accounts/services/twitter-microblog.service
3usr/share/accounts/providers/twitter.provider3usr/share/accounts/providers/twitter.provider
4usr/share/accounts/qml-plugins/twitter/Main.qml
45
=== modified file 'debian/control'
--- debian/control 2013-06-08 04:01:08 +0000
+++ debian/control 2013-06-12 05:52:26 +0000
@@ -45,9 +45,7 @@
45Package: account-plugin-google45Package: account-plugin-google
46Architecture: all46Architecture: all
47Depends: ${shlibs:Depends}, ${misc:Depends},47Depends: ${shlibs:Depends}, ${misc:Depends},
48 libaccount-plugin-google,48 libaccount-plugin-google | ubuntu-system-settings-online-accounts,
49 signon-keyring-extension,
50 signon-plugin-oauth2,
51 unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1),49 unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1),
52Description: GNOME Control Center account plugin for single signon50Description: GNOME Control Center account plugin for single signon
53 GNOME Control Center account plugins for single signon51 GNOME Control Center account plugins for single signon
@@ -55,7 +53,7 @@
55Package: account-plugin-facebook53Package: account-plugin-facebook
56Architecture: all54Architecture: all
57Depends: ${misc:Depends},55Depends: ${misc:Depends},
58 libaccount-plugin-generic-oauth,56 libaccount-plugin-generic-oauth | ubuntu-system-settings-online-accounts,
59 unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1),57 unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1),
60Description: GNOME Control Center account plugin for single signon - facebook58Description: GNOME Control Center account plugin for single signon - facebook
61 GNOME Control Center account plugins for single signon59 GNOME Control Center account plugins for single signon
@@ -63,7 +61,7 @@
63Package: account-plugin-twitter61Package: account-plugin-twitter
64Architecture: all62Architecture: all
65Depends: ${misc:Depends},63Depends: ${misc:Depends},
66 libaccount-plugin-generic-oauth,64 libaccount-plugin-generic-oauth | ubuntu-system-settings-online-accounts,
67 unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1),65 unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1),
68Description: GNOME Control Center account plugin for single signon - twitter66Description: GNOME Control Center account plugin for single signon - twitter
69 GNOME Control Center account plugins for single signon67 GNOME Control Center account plugins for single signon
@@ -71,7 +69,7 @@
71Package: account-plugin-flickr69Package: account-plugin-flickr
72Architecture: all70Architecture: all
73Depends: ${misc:Depends},71Depends: ${misc:Depends},
74 libaccount-plugin-generic-oauth,72 libaccount-plugin-generic-oauth | ubuntu-system-settings-online-accounts,
75 unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1),73 unity-asset-pool (>> 0.8.24daily12.12.05-0ubuntu1),
76Description: GNOME Control Center account plugin for single signon - flickr74Description: GNOME Control Center account plugin for single signon - flickr
77 GNOME Control Center account plugins for single signon75 GNOME Control Center account plugins for single signon
7876
=== modified file 'debian/rules'
--- debian/rules 2013-04-11 17:34:17 +0000
+++ debian/rules 2013-06-12 05:52:26 +0000
@@ -8,7 +8,8 @@
8 NOCONFIGURE=1 dh_autoreconf ./autogen.sh8 NOCONFIGURE=1 dh_autoreconf ./autogen.sh
99
10override_dh_auto_configure:10override_dh_auto_configure:
11 dh_auto_configure -- --with-twitter-consumer-key="NGOB5S7sICsj6epjh0PhAw" \11 dh_auto_configure -- --enable-qml-plugins \
12 --with-twitter-consumer-key="NGOB5S7sICsj6epjh0PhAw" \
12 --with-twitter-consumer-secret="rbUEJCBEokMnGZd8bubd0QL2cSmoCjJeyiSJpnx3OM0" \13 --with-twitter-consumer-secret="rbUEJCBEokMnGZd8bubd0QL2cSmoCjJeyiSJpnx3OM0" \
13 --with-windows-live-client-id="00000000400D5635" \14 --with-windows-live-client-id="00000000400D5635" \
14 --with-foursquare-client-id="1I2UNJXPHNDZT3OPZOOA5LCPIUEUJFMKRXSF42UFCN1KXKTK" \15 --with-foursquare-client-id="1I2UNJXPHNDZT3OPZOOA5LCPIUEUJFMKRXSF42UFCN1KXKTK" \
1516
=== added directory 'qml'
=== added file 'qml/Makefile.am'
--- qml/Makefile.am 1970-01-01 00:00:00 +0000
+++ qml/Makefile.am 2013-06-12 05:52:26 +0000
@@ -0,0 +1,5 @@
1nobase_dist_qmlplugins_DATA = \
2 facebook/Main.qml \
3 flickr/Main.qml \
4 google/Main.qml \
5 twitter/Main.qml
06
=== added directory 'qml/facebook'
=== added file 'qml/facebook/Main.qml'
--- qml/facebook/Main.qml 1970-01-01 00:00:00 +0000
+++ qml/facebook/Main.qml 2013-06-12 05:52:26 +0000
@@ -0,0 +1,33 @@
1import Ubuntu.OnlineAccounts.Plugin 1.0
2
3OAuthMain {
4 creationComponent: OAuth {
5 function completeCreation(reply) {
6 console.log("Access token: " + reply.AccessToken)
7 var http = new XMLHttpRequest()
8 var url = "https://graph.facebook.com/me?access_token=" + reply.AccessToken;
9 http.open("GET", url, true);
10 http.onreadystatechange = function() {
11 if (http.readyState === 4){
12 if (http.status == 200) {
13 console.log("ok")
14 console.log("response text: " + http.responseText)
15 var response = JSON.parse(http.responseText)
16 account.updateDisplayName(response.username)
17 globalAccountService.updateSettings({
18 'id': response.id
19 })
20 account.synced.connect(finished)
21 account.sync()
22
23 } else {
24 console.log("error: " + http.status)
25 cancel()
26 }
27 }
28 };
29
30 http.send(null);
31 }
32 }
33}
034
=== added directory 'qml/flickr'
=== added file 'qml/flickr/Main.qml'
--- qml/flickr/Main.qml 1970-01-01 00:00:00 +0000
+++ qml/flickr/Main.qml 2013-06-12 05:52:26 +0000
@@ -0,0 +1,9 @@
1import Ubuntu.OnlineAccounts.Plugin 1.0
2
3OAuthMain {
4 creationComponent: OAuth {
5 function getUserName(reply) {
6 return reply.username
7 }
8 }
9}
010
=== added directory 'qml/google'
=== added file 'qml/google/Main.qml'
--- qml/google/Main.qml 1970-01-01 00:00:00 +0000
+++ qml/google/Main.qml 2013-06-12 05:52:26 +0000
@@ -0,0 +1,31 @@
1import Ubuntu.OnlineAccounts.Plugin 1.0
2
3OAuthMain {
4 creationComponent: OAuth {
5 function completeCreation(reply) {
6 console.log("Access token: " + reply.AccessToken)
7 var http = new XMLHttpRequest()
8 var url = "https://www.googleapis.com/oauth2/v3/userinfo";
9 http.open("POST", url, true);
10 http.setRequestHeader("Authorization", "Bearer " + reply.AccessToken)
11 http.onreadystatechange = function() {
12 if (http.readyState === 4){
13 if (http.status == 200) {
14 console.log("ok")
15 console.log("response text: " + http.responseText)
16 var response = JSON.parse(http.responseText)
17 account.updateDisplayName(response.email)
18 account.synced.connect(finished)
19 account.sync()
20
21 } else {
22 console.log("error: " + http.status)
23 cancel()
24 }
25 }
26 };
27
28 http.send(null);
29 }
30 }
31}
032
=== added directory 'qml/twitter'
=== added file 'qml/twitter/Main.qml'
--- qml/twitter/Main.qml 1970-01-01 00:00:00 +0000
+++ qml/twitter/Main.qml 2013-06-12 05:52:26 +0000
@@ -0,0 +1,3 @@
1import Ubuntu.OnlineAccounts.Plugin 1.0
2
3OAuthMain {}

Subscribers

People subscribed via source and target branches