Skip to content
Snippets Groups Projects
Verified Commit 8f032517 authored by André's avatar André
Browse files

fix: Flatpak: Fix display of tray icon using libappindicator

Appindicator cannot access custom icons in flatpak. That's why the status is limited to
* online state (gajim icon) and
* new message state

Fixes: #10869
parent 08a2139f
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,8 @@ finish-args:
- --talk-name=org.kde.kwalletd5
# Notifications
- --talk-name=org.freedesktop.Notifications
# tray/status icon
- --talk-name=org.kde.StatusNotifierWatcher
# GnuPG
- --filesystem=~/.gnupg
# camera access
......
......@@ -19,6 +19,8 @@ finish-args:
- --talk-name=org.kde.kwalletd5
# Notifications
- --talk-name=org.freedesktop.Notifications
# tray/status icon
- --talk-name=org.kde.StatusNotifierWatcher
# GnuPG
- --filesystem=~/.gnupg
# camera access
......
......@@ -298,7 +298,7 @@ def __init__(self) -> None:
self._status_icon = appindicator.Indicator.new(
'Gajim',
'dcraven-online',
'org.gajim.Gajim',
appindicator.IndicatorCategory.COMMUNICATIONS)
self._status_icon.set_icon_theme_path(str(configpaths.get('ICONS')))
self._status_icon.set_status(appindicator.IndicatorStatus.ACTIVE)
......@@ -320,6 +320,9 @@ def update_state(self, init: bool = False) -> None:
self._status_icon.set_icon_full(icon_name, _('Pending Event'))
return
if app.is_flatpak():
return
show = get_global_show()
icon_name = get_icon_name(show)
self._status_icon.set_icon_full(icon_name, show)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment