diff options
author | Unit 193 <unit193@unit193.net> | 2021-11-23 23:07:29 -0500 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2021-11-24 19:49:49 +0000 |
commit | 9194092d7bf42ca8960fe73ac2ab3fed3b0823bd (patch) | |
tree | a03ad0c0b19e177dac7c9227cfa927b5d263256d | |
parent | 5f6f65a06500e12f378e7918289e1d82954c1bd6 (diff) | |
download | deluge-9194092d7bf42ca8960fe73ac2ab3fed3b0823bd.tar.gz deluge-9194092d7bf42ca8960fe73ac2ab3fed3b0823bd.tar.bz2 deluge-9194092d7bf42ca8960fe73ac2ab3fed3b0823bd.zip |
[GTKUI] Support using the Ayatana fork of indicators.
As this fork is maintained in Debian, and as of Impish/21.10 is the supported
variant in Ubuntu as well.
Closes: deluge-torrent/deluge#317
-rw-r--r-- | deluge/ui/gtk3/systemtray.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/deluge/ui/gtk3/systemtray.py b/deluge/ui/gtk3/systemtray.py index f851f3275..a2435223b 100644 --- a/deluge/ui/gtk3/systemtray.py +++ b/deluge/ui/gtk3/systemtray.py @@ -30,8 +30,12 @@ from .common import build_menu_radio_list, get_logo from .dialogs import OtherDialog try: - require_version('AppIndicator3', '0.1') - from gi.repository import AppIndicator3 + try: + require_version('AyatanaAppIndicator3', '0.1') + from gi.repository import AyatanaAppIndicator3 as AppIndicator3 + except (ValueError, ImportError): + require_version('AppIndicator3', '0.1') + from gi.repository import AppIndicator3 except (ValueError, ImportError): AppIndicator3 = None |