Browse Source

Merge pull request #19 from bgstack15/onlyshowin

handle OnlyShowIn and NotShowIn better
pull/22/head 1.6
George Vlahavas 4 years ago
committed by GitHub
parent
commit
2552e06343
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/xdgmenumaker

8
src/xdgmenumaker

@ -400,11 +400,11 @@ def get_entry_info(desktopfile, ico_paths=True):
hidden = de.getHidden()
nodisplay = de.getNoDisplay()
# none of the freedesktop registered environments are supported by
# OnlyShowIn anyway:
# OnlyShowIn but it might be worth using some extra logic here.
# http://standards.freedesktop.org/menu-spec/latest/apb.html
# So if OnlyShowIn is set, it certainly isn't for any of the WMs
# xdgmenumaker supports.
if (onlyshowin != []) or (desktop in notshowin) or hidden or nodisplay:
if (onlyshowin != [] and not (desktop.lower() in (name.lower() for name in onlyshowin))) \
or (desktop.lower() in (name.lower for name in notshowin)) \
or hidden or nodisplay:
return None
name = de.getName().encode('utf-8')

Loading…
Cancel
Save