[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
This commit is contained in:
Calum Lind 2023-04-23 17:55:43 +01:00
parent 81116a63ca
commit dbedf7f639
No known key found for this signature in database
GPG Key ID: 90597A687B836BA3
1 changed files with 6 additions and 2 deletions

View File

@ -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: