fix xdg-menu to handle -caption in desktop files (#678827)

epel9
Edward Sheldrake 14 years ago committed by Miroslav Lichvar
parent b14300bcbf
commit 544853c705

@ -31,7 +31,8 @@ def walk_menu(entry):
elif entry.get_type() == gmenu.TYPE_ENTRY and not entry.is_excluded:
print ' <item label="%s">' % \
escape(entry.get_name().replace('"', ''))
command = re.sub(' [^ ]*%[fFuUdDnNickvm]', '', entry.get_exec())
command = re.sub(' -caption "%c"| -caption %c', ' -caption "%s"' % entry.get_name(), entry.get_exec())
command = re.sub(' [^ ]*%[fFuUdDnNickvm]', '', command)
if entry.launch_in_terminal:
command = 'xterm -title "%s" -e %s' % \
(entry.get_name(), command)

Loading…
Cancel
Save