# HG changeset patch # User Goffi # Date 1468768362 -7200 # Node ID 8a749ec21c50d7d26919f1766dc7a4c47b6b5ee1 # Parent 19b9d3f8a6c7682137c0b78876e9bd7a207e39cd primitivus: fixed notifications counter for simple messages in MUC rooms diff -r 19b9d3f8a6c7 -r 8a749ec21c50 frontends/src/primitivus/chat.py --- a/frontends/src/primitivus/chat.py Sun Jul 17 16:47:33 2016 +0200 +++ b/frontends/src/primitivus/chat.py Sun Jul 17 17:12:42 2016 +0200 @@ -450,6 +450,9 @@ entity=from_jid, )) self.host.notify(C.NOTIFY_MESSAGE, from_jid, msg, widget=self, profile=self.profile) + else: + self.host.notify(C.NOTIFY_MESSAGE, self.target, widget=self, profile=self.profile) + def addUser(self, nick): occupant = super(Chat, self).addUser(nick) diff -r 19b9d3f8a6c7 -r 8a749ec21c50 frontends/src/primitivus/primitivus --- a/frontends/src/primitivus/primitivus Sun Jul 17 16:47:33 2016 +0200 +++ b/frontends/src/primitivus/primitivus Sun Jul 17 17:12:42 2016 +0200 @@ -606,7 +606,8 @@ # we ignore notification if the widget is selected but we can # still do a desktop notification is the X window has not the focus super(PrimitivusApp, self).notify(type_, entity, message, subject, callback, cb_args, widget, profile) - if not self.x_notify.hasFocus(): + # we don't want notifications without message on desktop + if message is not None and not self.x_notify.hasFocus(): if message is None: message = _("{app}: a new event has just happened{entity}").format( app=C.APP_NAME,