rpms/openbox/devel openbox.spec,1.36,1.37 xdg-menu,1.2,1.3

Miroslav Lichvar (mlichvar) fedora-extras-commits at redhat.com
Fri Aug 1 12:01:54 UTC 2008


Author: mlichvar

Update of /cvs/pkgs/rpms/openbox/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10494

Modified Files:
	openbox.spec xdg-menu 
Log Message:
- Remove field codes from commands in xdg-menu (#452403)
- Add support for launching applications in xterm to xdg-menu



Index: openbox.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openbox/devel/openbox.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- openbox.spec	10 Jun 2008 17:32:18 -0000	1.36
+++ openbox.spec	1 Aug 2008 12:01:24 -0000	1.37
@@ -1,6 +1,6 @@
 Name:		openbox
 Version:	3.4.7.2
-Release:	3%{?dist}
+Release:	4%{?dist}
 Summary:	A highly configurable and standards-compliant X11 window manager
 
 Group:		User Interface/Desktops
@@ -134,6 +134,10 @@
 
 
 %changelog
+* Fri Aug 01 2008 Miroslav Lichvar <mlichvar at redhat.com> - 3.4.7.2-4
+- Remove field codes from commands in xdg-menu (#452403)
+- Add support for launching applications in xterm to xdg-menu
+
 * Tue Jun 10 2008 Miroslav Lichvar <mlichvar at redhat.com> - 3.4.7.2-3
 - Clean up properties after gdm in session scripts (#444135)
 - Add license to xdg-menu script


Index: xdg-menu
===================================================================
RCS file: /cvs/pkgs/rpms/openbox/devel/xdg-menu,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xdg-menu	10 Jun 2008 17:32:18 -0000	1.2
+++ xdg-menu	1 Aug 2008 12:01:24 -0000	1.3
@@ -19,7 +19,7 @@
 #            Miroslav Lichvar <mlichvar at redhat.com>
 
 
-import gmenu, sys
+import gmenu, re, sys
 from xml.sax.saxutils import escape
 
 def walk_menu(entry):
@@ -29,10 +29,14 @@
 		map(walk_menu, entry.get_contents())
 		print '</menu>'
 	elif entry.get_type() == gmenu.TYPE_ENTRY and not entry.is_excluded:
-		print """
-	<item label="%s">
-		<action name="Execute"><command>%s</command></action>
-	</item>	""" % (escape(entry.get_name()), escape(entry.get_exec()))
+		print '	<item label="%s">' % escape(entry.get_name())
+		command = re.sub(' [^ ]*%[fFuUdDnNickvm]', '', entry.get_exec())
+		if entry.launch_in_terminal:
+			command = 'xterm -title "%s" -e %s' % \
+				(entry.get_name(), command)
+		print '		<action name="Execute">' + \
+			'<command>%s</command></action>' % escape(command)
+		print '	</item>'
 
 if len(sys.argv) > 1:
 	menu = sys.argv[1] + '.menu'




More information about the fedora-extras-commits mailing list