Support Ayatana AppIndicator for TrayIcon
Original Reporter info from Mantis: dbannon @davidbannon
-
Reporter name: David
Original Reporter info from Mantis: dbannon @davidbannon
- Reporter name: David
Description:
A patch is provided to allow Debian Bullseye Gnome users display the TrayIcon.
On Gnome Desktop, the end user needs to install libappindicator3-1 and gnome-shell-extension-appindicator to be able to display the Tray Icon.
Debian is about to release Bullseye but have recently removed libappindicator3-1 from their repository, declaring libayatana-appindicator3-1 its replacement. However, while the new library behaves the same, it has a different name. That means that our TrayIcon will not be able to find it. So, Gnome users will not be able to use the Lazarus TrayIcon.
The many Debian derivative distributions will have the same problem, except, perhaps Ubuntu.
The patch cause the UnityWSCtrls unit to try to load the Ayatana library if (and only if) it fails to load the Unity / Canonical libappindicator. And, as before, if the traditional System Tray is available, that will be used as first choice.
The choice to use an AppIndicator has also been updated, instead of having a list of bad desktops, we now call some X methods, more reliable and lower maintenance.
And to support more than one AppIndicator, the env var driven debugging has been tweaked.
Steps to reproduce:
Run any Lazarus application using TrayIcon on Debian Bullseye Gnome. As in all cases involving Gnome, the plugin gnome-shell-extension-appindicator must be installed (and desktop restarted) and then enabled. On Bullseye Gnome, the icon does not show.
This patch is not needed for other desktops such as Mate, xfce, plasma etc desktops but has been tested and found to do no harm.
At present, the other major distributions do not seem to have moved to Ayatana but given libappindicator's links to Ubuntu, its seems likely that it may become more widespread.
Additional information:
Has been tested on the following platforms -
U16.04 Mate (T),
U20.04 Gnome (L), Mate (L)
Debian Buster Gnome (A), Plasma (T)
MXLinux193 XFCe (T) , Plasma (T)
key : (T) - Traditional SysTray, (A) Ayanata and AppIndicator Plugin, (U) Unity or Canonical Libappindicator3 and AppIndicator Plugin
I will submit a similar patch for GTK3 is this one is used. Qt5 seems to be a problem ....
Mantis conversion info:
- Mantis ID: 38909
- OS: Debian
- OS Build: Bullseye
- Platform: x86, x86_64
- Version: 2.1 (SVN)
- Fixed in revision: r65119 (#876714be), r65122 (#406875b4), r65214 (#229352c4)
- Monitored by: » @salvadorbs (Salvadorbs), » AntonK (Anton Kavalenka), » @davidbannon (David)