mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-12 01:14:56 +00:00
Prefer AppIndicator if DBus interface is available
Starting with Ubuntu 17.10 the interface will be provided by an extension (shipped by default): https://github.com/ubuntu/gnome-shell-extension-appindicator Legacy tray icons have been completely removed in GNOME 3.26. By checking the interface, this will allow users of other distributions with GNOME to also use Telegram's indicator with the extension. Signed-off-by: Jan Niklas Hasse <jhasse@bixense.com> (github: jhasse)
This commit is contained in:
parent
11a46a1072
commit
e42cc02d0e
@ -20,6 +20,8 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
*/
|
||||
#include "platform/linux/linux_desktop_environment.h"
|
||||
|
||||
#include <QDBusInterface>
|
||||
|
||||
namespace Platform {
|
||||
namespace DesktopEnvironment {
|
||||
namespace {
|
||||
@ -120,7 +122,8 @@ bool TryQtTrayIcon() {
|
||||
}
|
||||
|
||||
bool PreferAppIndicatorTrayIcon() {
|
||||
return IsXFCE() || IsUnity();
|
||||
return IsXFCE() || IsUnity() ||
|
||||
(IsGnome() && QDBusInterface("org.kde.StatusNotifierWatcher", "/").isValid());
|
||||
}
|
||||
|
||||
bool TryUnityCounter() {
|
||||
|
@ -196,6 +196,7 @@
|
||||
'<(qt_loc)/include',
|
||||
'<(qt_loc)/include/QtCore',
|
||||
'<(qt_loc)/include/QtGui',
|
||||
'<(qt_loc)/include/QtDBus',
|
||||
'<(qt_loc)/include/QtCore/<(qt_version)',
|
||||
'<(qt_loc)/include/QtGui/<(qt_version)',
|
||||
'<(qt_loc)/include/QtCore/<(qt_version)/QtCore',
|
||||
|
Loading…
Reference in New Issue
Block a user