function init() {
if(Utils.isAuthorized()) {
//title = "Hi, "+Utils.name();
- //login();
+ login();
} else {
pageStack.initialPage = "LoginPage.qml";
hide();
}
function login() {
- /*var secrets = {
- token: Utils.token(),
- secret: Utils.tokenSecret(),
- consumer_key : Utils.customerKey(),
- consumer_secret: Utils.customerSecret()
- };
- U1.getRootNode(secrets,root);
- */
pageStack.currentPage.init();
}
}
function onErr(status) {
- hide()
if(status==401) {
+ hide()
tip.show(qsTr("Ubuntu One authorization has failed. Try once again or check login settings."));
} else if(status==0) {
- tip.show(qsTr("Unable to connect. Check internet connection."));
+ hide()
+ tip.show(qsTr("Unable to connect. Check internet connection and restart application."));
} else {
+ hide()
tip.show(qsTr("Unknown error: ")+status);
}
}
source: "images/ubi100.png"
width: 104; height: 70
anchors.horizontalCenter: parent.horizontalCenter
- //y: (box.height-height)/3
}
Text {
id: loading
- //anchors.top: pic.bottom
- //anchors.margins: Const.TEXT_MARGIN
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 25
color: "white"
}
BusyIndicator {
- //anchors.top: loading.bottom
- //anchors.margins: 2*Const.TEXT_MARGIN
+ id: busy
anchors.horizontalCenter: parent.horizontalCenter
running: true
}
}
+ Button {
+ id: close
+ iconSource: "images/close.png"
+ anchors { right: parent.right; top: parent.top; margins: Const.DEFAULT_MARGIN }
+ onButtonClicked: Qt.quit()
+ }
+
Text {
anchors.bottom: ver.top
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 20
color: "white"
- text: "v0.9.3-1 © 2012 Michal Kosciesza"
+ text: "v0.9.4-1 © 2012 Michal Kosciesza"
}
Text {