Tdesktop: Use AppIndicator if DBus interface is available

Created on 26 Sep 2017  路  4Comments  路  Source: telegramdesktop/tdesktop

You're checking for Unity and XFCE here: https://github.com/telegramdesktop/tdesktop/blob/c1aa1c5a0f26b29fce1307ba455f9887e7c1c1ec/Telegram/SourceFiles/platform/linux/linux_desktop_environment.cpp#L123

The future proof variant would be to add a check if the com.canonical.dbusmenu or org.kde.StatusNotifierWatcher DBus interface is owned. This will be needed in the upcoming Ubuntu 17.10 since they are switching from Unity to GNOME while still supporting AppIndicators via an extension.

Most helpful comment

What you are suggesting is always using AppIndicators (PreferAppIndicatorTrayIcon) even while system supports more powerful SNI (provided via QtTrayIcon). KDE users will suffer from this switch. This DE supports a complete SNI implementation which is much powerful comparing to AppIndicators.

SNI supports pixbufs (allows to pass images directly via DBus), tooltip icons and left-click actions. The first thing is not so critical, Telegram uses a workaround for icons: it saves all icons to separate folder and then passes their name via DBus. But left click and toolips can't be restored. This is what KDE users will lose.

So that's definitely not a good idea. For me adding a one more check IsGnome seems more accurate.

All 4 comments

@jhasse Looking forward to an PR.

I've created #3928 :)

What you are suggesting is always using AppIndicators (PreferAppIndicatorTrayIcon) even while system supports more powerful SNI (provided via QtTrayIcon). KDE users will suffer from this switch. This DE supports a complete SNI implementation which is much powerful comparing to AppIndicators.

SNI supports pixbufs (allows to pass images directly via DBus), tooltip icons and left-click actions. The first thing is not so critical, Telegram uses a workaround for icons: it saves all icons to separate folder and then passes their name via DBus. But left click and toolips can't be restored. This is what KDE users will lose.

So that's definitely not a good idea. For me adding a one more check IsGnome seems more accurate.

Good point. I've created a new PR which does as you suggested and checks IsGnome: #3930

Was this page helpful?
0 / 5 - 0 ratings