Browse Source

Refactor to use the MenuEntry class better

A more sane way to use the MenuEntry class
pull/5/head
George Vlahavas 9 years ago
parent
commit
1399f0b6d7
  1. 8
      src/xdgmenumaker

8
src/xdgmenumaker

@ -274,7 +274,7 @@ def get_entry_info(desktopfile):
if desktop in notshowin:
show = False
if show:
return [category, name, icon, command, path]
return MenuEntry(category, name, icon, command, path)
else:
return None
@ -317,9 +317,9 @@ def menu():
applist = []
for desktopfile in desktopfilelist():
try:
e = get_entry_info(desktopfile)
if e is not None:
applist.append(MenuEntry(e[0], e[1], e[2], e[3], e[4]))
entry = get_entry_info(desktopfile)
if entry is not None:
applist.append(entry)
except exc.ParsingError:
pass

Loading…
Cancel
Save