fossfreedom / alternative-toolbar

Modern, minimal and music-focused interface for Rhythmbox
GNU General Public License v3.0
156 stars 20 forks source link

Modern mode expects XDG_CURRENT_DESKTOP #102

Closed jurassicplayer closed 7 years ago

jurassicplayer commented 7 years ago

Currently when toggling on Modern mode, os.environ is used like a dictionary and breaks with a KeyError when XDG_CURRENT_DESKTOP isn't set. os.environ has a get() method that can be used and also return a default string if nothing is found so Modern mode doesn't break when XDG_CURRENT_DESKTOP is missing/unset.

The current implementation (alttoolbar_type.py | line 1547): os.environ["XDG_CURRENT_DESKTOP"].find("GNOME") == -1

Suggested change: os.environ.get("XDG_CURRENT_DESKTOP","DESKTOP_NOT_SET").find("GNOME") == -1

It didn't seem like something important enough for a pull request, but it did break usability enough that I couldn't go back to the plugins settings to disable Modern mode when it happened.

fossfreedom commented 7 years ago

ta- thanks for the info.