Merge pull request #769 from brot/fix-ubuntu-unity-check

Fix gpodder.ui.unity check for newer Ubuntu versions
This commit is contained in:
Eric Le Lay 2020-03-29 13:03:36 +02:00 committed by GitHub
commit c4e6e6f8e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -112,8 +112,10 @@ def main():
gpodder.ui.gtk = True
gpodder.ui.python3 = True
gpodder.ui.unity = (os.environ.get('DESKTOP_SESSION', 'unknown').lower() in
('ubuntu', 'ubuntu-2d'))
desktop_session = os.environ.get('DESKTOP_SESSION', 'unknown').lower()
xdg_current_desktop = os.environ.get('XDG_CURRENT_DESKTOP', 'unknown').lower()
gpodder.ui.unity = (desktop_session in ('ubuntu', 'ubuntu-2d')
and xdg_current_desktop == 'unity')
from gpodder import log
log.setup(options.verbose)