From 84f111d965995339734b788278d13b13ccf09d32 Mon Sep 17 00:00:00 2001 From: Sam Parkinson Date: Sun, 06 Apr 2014 21:22:16 +0000 Subject: Show a notification when chat is in the background and gets a message --- (limited to 'activity.py') 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) -- cgit v0.9.1