diff --git a/Linux/Tentia.py b/Linux/Tentia.py index 32e90e1..d9cd5a9 100755 --- a/Linux/Tentia.py +++ b/Linux/Tentia.py @@ -17,7 +17,7 @@ class Tentia: self.mentions = Windows.Timeline(self, "mentions", "Mentions") if self.controller.stringForKey("user_access_token") != "": - self.logged_in_successfully(True) + self.authentification_succeded() self.app.exec_() @@ -40,15 +40,6 @@ class Tentia: self.timeline.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): @@ -109,6 +100,9 @@ class Console(QtCore.QObject): def notice(self, string): print ": " + string + @QtCore.pyqtSlot(str) + def debug(self, string): + print ": " + string if __name__ == "__main__": diff --git a/Linux/Windows.py b/Linux/Windows.py index 03de3a1..5aa134e 100644 --- a/Linux/Windows.py +++ b/Linux/Windows.py @@ -138,5 +138,4 @@ class Oauth: def tentia_callback(self, url): script = "tentia_instance.requestAccessToken('" + url.toString() + "');" - print script self.core.page().mainFrame().evaluateJavaScript(script) diff --git a/WebKit/scripts/main.js b/WebKit/scripts/main.js index d74ab60..acdb259 100644 --- a/WebKit/scripts/main.js +++ b/WebKit/scripts/main.js @@ -83,6 +83,13 @@ var console = { } else { __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); } - alert("DEBUG: " + string); + console.debug(string); } function go() { // wait untill everything is loaded setTimeout(function() { if (typeof HostAppGo != typeof __not_defined__) { - + HostAppGo(); } else {