1 import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
4 import "UIConstants.js" as Const
13 U1.getToken(user.text,pass.text,root)
16 function onResp(secrets,account) {
18 Utils.setCustomerKey(secrets.consumer_key);
19 Utils.setCustomerSecret(secrets.consumer_secret);
20 Utils.setToken(secrets.token);
21 Utils.setTokenSecret(secrets.secret);
22 Utils.setName(account.username);
24 tip.show(qsTr("Logged in!"));
25 pageStack.initialPage = "StartPage.qml";
28 function onErr(status) {
30 //console.log("onErr");
32 tip.show(qsTr("Authorization failed!"));
33 } else if(status==0) {
34 tip.show(qsTr("Unable to connect!"));
36 tip.show(qsTr("Error: ")+status);
43 contentHeight: content.height+Const.SYSTEM_BAR_HEIGHT+Const.TEXT_MARGIN
44 y: Const.SYSTEM_BAR_HEIGHT+2*Const.TEXT_MARGIN
48 spacing: Const.DEFAULT_MARGIN
54 text: qsTr("Ubuntu One sign in:")
61 placeholderText: qsTr("User ID")
68 placeholderText: qsTr("Password")
69 echoMode: TextInput.Password
76 onButtonClicked: root.getToken()