diff --git a/.gitignore b/.gitignore index 6c97669..6b81198 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ dsa_priv.pem Mac/.DS_Store build .DS_Store +*~ diff --git a/Linux/Tentia.py b/Linux/Tentia.py index 9bd9d51..62ffac4 100755 --- a/Linux/Tentia.py +++ b/Linux/Tentia.py @@ -14,7 +14,7 @@ class Tentia: self.preferences = Windows.Preferences(self) self.preferences.show() - self.oauth_implementation = Windows.Oauth(self) + self.oauth_implementation = Windows.Oauth(self) if self.controller.stringForKey("user_access_token") != "": self.authentification_succeded() @@ -111,8 +111,14 @@ class Controller(QtCore.QObject): self.app.mentions.evaluateJavaScript("tentia_instance.unread_mentions = 0;") @QtCore.pyqtSlot(str, str, str, str) - def notificateUserAboutMention(self, text, name, post_id, entity): - print "notificateUserAboutMention is not implemented yet" + def notificateUserAboutMentionFromNameWithPostIdAndEntity(self, text, name, post_id, entity): + try: + subprocess.check_output(['kdialog', '--passivepopup', name + ' mentioned you: ' + text]) + except OSError: + try: + subprocess.check_output(['notify-send', '-i', 'dialog-information', name + 'mentioned you on Tent', text]) + except OSError: + pass @QtCore.pyqtSlot(str) def openNewMessageWidow(self, string): diff --git a/WebKit/scripts/helper/HostApp.js b/WebKit/scripts/helper/HostApp.js index 29358cf..8d6ff45 100644 --- a/WebKit/scripts/helper/HostApp.js +++ b/WebKit/scripts/helper/HostApp.js @@ -107,7 +107,9 @@ define(function() { HostApp.notificateUserAboutMention = function(text, name, post_id, entity) { if (OS_TYPE == "mac") { controller.notificateUserAboutMention_fromName_withPostId_andEntity_(text, name, post_id, entity); - } + } else { + controller.notificateUserAboutMentionFromNameWithPostIdAndEntity(text, name, post_id, entity); + } } HostApp.alertTitleWithMessage = function(title, message) {