[appindicator_integration] New message icon not shown
Versions
- OS: GNU/Linux Debian Sid
- Gajim version: 1.3.0
- Plugin version: 1.3.3
- GTK version: 3.24.24
- Glib version: 2.66.2
- PyGObject version: 3.38.0
- Python-nbxmpp version: 2.0.2
- Sway version: 1.5.1
- Waybar version: 0.9.5
Steps to reproduce the problem
- Start Gajim with appindicator_integration plugin active.
- Receive a message while Gajim is in the background.
- Read the message.
Expected behavior
When the message is received, the tray icon should change from "online" to "new-message" and back to "online" once the message is read.
Actual behavior
The icon remains at "online" without changing.
The self.indicator.set_status(appindicator.IndicatorStatus.ATTENTION)
seems to not trigger an icon change.
Solution
In plugin.py
, changing
self.indicator.set_status(appindicator.IndicatorStatus.ATTENTION)
to
self.indicator.set_status(appindicator.IndicatorStatus.ATTENTION)
self.indicator.set_icon_full('mail-unread', 'New Message')
and adding
if self.connected == 1:
self.indicator.set_icon_full(self.online_icon, _('Online'))
else:
self.indicator.set_icon_full(self.offline_icon, _('Offline'))
to the end of the file fixes the problem for me. These should be harmless changes making the plugin more robust.