fixed small typos
This commit is contained in:
parent
b6c94f23de
commit
e211ed0c54
3 changed files with 13 additions and 13 deletions
|
@ -17,7 +17,7 @@ class Tentia:
|
||||||
self.mentions = Windows.Timeline(self, "mentions", "Mentions")
|
self.mentions = Windows.Timeline(self, "mentions", "Mentions")
|
||||||
|
|
||||||
if self.controller.stringForKey("user_access_token") != "":
|
if self.controller.stringForKey("user_access_token") != "":
|
||||||
self.logged_in_successfully(True)
|
self.authentification_succeded()
|
||||||
|
|
||||||
self.app.exec_()
|
self.app.exec_()
|
||||||
|
|
||||||
|
@ -40,15 +40,6 @@ class Tentia:
|
||||||
self.timeline.show()
|
self.timeline.show()
|
||||||
self.mentions.show()
|
self.mentions.show()
|
||||||
|
|
||||||
def logged_in_successfully(self, success):
|
|
||||||
self.preferences.active(False)
|
|
||||||
if success:
|
|
||||||
self.preferences.hide()
|
|
||||||
self.timeline = Windows.Timeline(self)
|
|
||||||
self.timeline.show()
|
|
||||||
else:
|
|
||||||
print "not logged in"
|
|
||||||
|
|
||||||
|
|
||||||
class Controller(QtCore.QObject):
|
class Controller(QtCore.QObject):
|
||||||
|
|
||||||
|
@ -109,6 +100,9 @@ class Console(QtCore.QObject):
|
||||||
def notice(self, string):
|
def notice(self, string):
|
||||||
print "<js NOTICE>: " + string
|
print "<js NOTICE>: " + string
|
||||||
|
|
||||||
|
@QtCore.pyqtSlot(str)
|
||||||
|
def debug(self, string):
|
||||||
|
print "<js DEBUG>: " + string
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -138,5 +138,4 @@ class Oauth:
|
||||||
|
|
||||||
def tentia_callback(self, url):
|
def tentia_callback(self, url):
|
||||||
script = "tentia_instance.requestAccessToken('" + url.toString() + "');"
|
script = "tentia_instance.requestAccessToken('" + url.toString() + "');"
|
||||||
print script
|
|
||||||
self.core.page().mainFrame().evaluateJavaScript(script)
|
self.core.page().mainFrame().evaluateJavaScript(script)
|
||||||
|
|
|
@ -83,6 +83,13 @@ var console = {
|
||||||
} else {
|
} else {
|
||||||
__console.notice(s);
|
__console.notice(s);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
debug: function(s) {
|
||||||
|
if (OS_TYPE == "mac") {
|
||||||
|
alert("DEBUG: " + s);
|
||||||
|
} else {
|
||||||
|
__console.debug(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -99,14 +106,14 @@ function debug(string) {
|
||||||
string = JSON.stringify(string);
|
string = JSON.stringify(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
alert("DEBUG: " + string);
|
console.debug(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
function go() { // wait untill everything is loaded
|
function go() { // wait untill everything is loaded
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
|
||||||
if (typeof HostAppGo != typeof __not_defined__) {
|
if (typeof HostAppGo != typeof __not_defined__) {
|
||||||
|
|
||||||
HostAppGo();
|
HostAppGo();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Reference in a new issue