Browse Source

Don't forget to escape the ampersands. Also, change ../ to

a more direct method of retrieving the desktop-directories relevant
to the source file when run in a portable manner. ../ is dependent
on the current working directory.
pull/5/head
ShadowKyogre 9 years ago
parent
commit
f54bb5e8bf
  1. 8
      src/xdgmenumaker

8
src/xdgmenumaker

@ -26,7 +26,7 @@ pekwmdynamic = False
# for them, where they should be if this was installed properly
prefix = 'not_set'
if prefix == 'not_set':
desktop_dir = '../desktop-directories/'
desktop_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'desktop-directories/')
else:
desktop_dir = prefix + '/share/desktop-directories/'
@ -619,7 +619,7 @@ def compizboxmenu():
else:
print(spacing + '<menu name="' + category + '">')
for app in menu_category.applist:
name = app.name
name = app.name.replace('&', '&amp;')
icon = app.icon
command = app.command
path = app.path
@ -629,11 +629,11 @@ def compizboxmenu():
print(('{}<item type="launcher"><name>{}</name>'
'<icon>{}</icon>'
'<command>{}</command></item>').format(spacing,
name, icon, command))
name, icon, command.replace('&', '&amp;')))
else:
print(('{}<item type="launcher"><name>{}</name>'
'<command>{}</command></item>').format(spacing,
name, command))
name, command.replace('&', '&amp;')))
print(spacing + '</menu>')
if submenu:
print('</menu>')

Loading…
Cancel
Save