diff options
author | Sam Parkinson <sam.parkinson3@gmail.com> | 2014-04-06 21:22:16 (GMT) |
---|---|---|
committer | Sam Parkinson <sam.parkinson3@gmail.com> | 2014-04-06 21:22:16 (GMT) |
commit | 84f111d965995339734b788278d13b13ccf09d32 (patch) | |
tree | b3017605a1d7cf8c1c2d2aef4759f3c4f1e8d37a /activity.py | |
parent | 84ce65821cc76e37bc7592353b5a073e492d8da7 (diff) |
Show a notification when chat is in the background and gets a messagenotifications
Diffstat (limited to 'activity.py')
-rw-r--r-- | activity.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activity.py b/activity.py index d746d35..897652c 100644 --- a/activity.py +++ b/activity.py @@ -221,6 +221,8 @@ class Chat(activity.Activity): nick = '???' logger.debug('Received message from %s: %s', nick, text) self.chatbox.add_text(buddy, text) + if not self.has_focus: + self.notify_user(_("Message from %s") % buddy, text) def _alert(self, title, text=None): alert = NotifyAlert(timeout=5) |