Ticket #3598: 1.patch

File 1.patch, 673 bytes (added by Pacho Ramos, 2 years ago)

ayatana-detection.patch

  • (a) a/deluge/ui/gtk3/preferences.py~ vs. (b) b/deluge/ui/gtk3/preferences.py

    a b  
    3030from .path_chooser import PathChooser
    3131
    3232try:
    33     require_version('AppIndicator3', '0.1')
    34     from gi.repository import AppIndicator3  # noqa: F401
     33    try:
     34        require_version('AyatanaAppIndicator3', '0.1')
     35        from gi.repository import AyatanaAppIndicator3 as AppIndicator3
     36    except (ValueError, ImportError):
     37        require_version('AppIndicator3', '0.1')
     38        from gi.repository import AppIndicator3  # noqa: F401
    3539except (ImportError, ValueError):
    3640    appindicator = False
    3741else: