From 544853c7056afbfba9d38e83345f589836696bd9 Mon Sep 17 00:00:00 2001 From: Edward Sheldrake Date: Fri, 30 Sep 2011 13:12:58 +0200 Subject: [PATCH] fix xdg-menu to handle -caption in desktop files (#678827) --- xdg-menu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xdg-menu b/xdg-menu index f551adb..72d5ad8 100644 --- a/xdg-menu +++ b/xdg-menu @@ -31,7 +31,8 @@ def walk_menu(entry): elif entry.get_type() == gmenu.TYPE_ENTRY and not entry.is_excluded: print ' ' % \ 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)