diff options
Diffstat (limited to 'deluge/ui/gtk3/preferences.py')
-rw-r--r-- | deluge/ui/gtk3/preferences.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/deluge/ui/gtk3/preferences.py b/deluge/ui/gtk3/preferences.py index a008a95..3463b70 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: @@ -295,7 +299,7 @@ class Preferences(component.Component): 'Bandwidth'""" self.window_open = True if page is not None: - for (index, string, __) in self.liststore: + for index, string, __ in self.liststore: if page == string: self.treeview.get_selection().select_path(index) break |