diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2023-04-23 17:55:43 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2023-04-23 18:15:52 +0100 |
commit | dbedf7f639931afb635c68ac42194b1816155b54 (patch) | |
tree | 6eb551b8484c6c3d8bb9d4d57d77c0315ea0f505 | |
parent | 81116a63ca247cd67e3612a54079f7d914f4d29e (diff) | |
download | deluge-dbedf7f639931afb635c68ac42194b1816155b54.tar.gz deluge-dbedf7f639931afb635c68ac42194b1816155b54.tar.bz2 deluge-dbedf7f639931afb635c68ac42194b1816155b54.zip |
[GTK3] Fix missing AppIndicator option in Preferences
Issue with legacy tray icon being used despite AyatanaAppIndicator3
installed. The problem is due to option to use AppIndicator not being
shown in Preferences.
Fixes: https://dev.deluge-torrent.org/ticket/3598
-rw-r--r-- | deluge/ui/gtk3/preferences.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/deluge/ui/gtk3/preferences.py b/deluge/ui/gtk3/preferences.py index 301d8753f..3463b70c0 100644 --- a/deluge/ui/gtk3/preferences.py +++ b/deluge/ui/gtk3/preferences.py @@ -30,8 +30,12 @@ from .dialogs import AccountDialog, ErrorDialog, InformationDialog, YesNoDialog from .path_chooser import PathChooser try: - require_version('AppIndicator3', '0.1') - from gi.repository import AppIndicator3 # noqa: F401 + try: + require_version('AyatanaAppIndicator3', '0.1') + from gi.repository import AyatanaAppIndicator3 # noqa: F401 + except (ValueError, ImportError): + require_version('AppIndicator3', '0.1') + from gi.repository import AppIndicator3 # noqa: F401 except (ImportError, ValueError): appindicator = False else: |