diff options
author | JRG 2 <jrg2@ubuntu.(none)> | 2013-12-14 19:01:23 (GMT) |
---|---|---|
committer | JRG 2 <jrg2@ubuntu.(none)> | 2013-12-14 19:01:23 (GMT) |
commit | 0a4029f4ccbabc11c21601f2293abbf129c6eaa3 (patch) | |
tree | 72fe2453ff75701c16c98dc838cd749d150c8c60 | |
parent | 33573db18b7ced67555baf2468a599eaa46abf4c (diff) |
Modify activity.pynotify_new_message
-rw-r--r-- | activity.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activity.py b/activity.py index d67bfe4..18d9faa 100644 --- a/activity.py +++ b/activity.py @@ -220,6 +220,10 @@ class Chat(activity.Activity): nick = '???' logger.debug('Received message from %s: %s', nick, text) self.chatbox.add_text(buddy, text) + vscroll = self.chatbox.get_vadjustment() + if vscroll.get_property("value") != vscroll.get_property("upper"): + self._alert(_("New message"), _("New message from %s" % nick)) + def _alert(self, title, text=None): alert = NotifyAlert(timeout=5) |