Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G gajim-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 50
    • Issues 50
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gajim
  • gajim-plugins
  • Issues
  • #548

Closed
Open
Created Mar 04, 2021 by Arno Onken@asnelt

[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

  1. Start Gajim with appindicator_integration plugin active.
  2. Receive a message while Gajim is in the background.
  3. 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.

Assignee
Assign to
Time tracking