Le vendredi 02 juillet 2010 à 19:48 +0200, Bill Allombert a écrit :

> This is a bug in openbox menu-methods: it seems openbox needs the id field
> to be unique, but the menu include two sections named 'Monitoring' and
> the menu-method create the same id for both, hence the confusion.
> 
> Please find a patch that change the id to be $section. This needs a small
> change to /etc/xdg/openbox/menu.xml as well.
> 
> Thanks for reporting this issue.
> 
> Cheers,


I modified files : /etc/menu-method/openbox and /etc/xdg/openbox/menu.xml

I attached the diff and new files

I am not on that it is the good solution, but it corrects the bug.


cordially,


--- menu.xml	2009-08-09 18:25:45.000000000 +0200
+++ menu-new.xml	2010-07-03 16:32:20.000000000 +0200
@@ -13,7 +13,7 @@
     <action name="Execute"><execute>x-www-browser</execute></action>
   </item>
   <!-- This requires the presence of the 'menu' package to work -->
-  <menu id="Debian" />
+  <menu id="/Debian" />
   <separator />
   <menu id="client-list-menu" />
   <separator />

Attachment: menu-new.xml
Description: XML document

--- openbox	2010-07-03 16:08:37.000000000 +0200
+++ openbox-new	2010-07-03 16:09:59.000000000 +0200
@@ -10,6 +10,8 @@
 userprefix=".config/openbox/"
 treewalk="(M)"
 
+function id()=$section
+
 function xml_escape($s) = replace(replace(replace(replace(replace($s, \
 				"&",  "&amp;"), \
 				">",  "&gt;"), \
@@ -29,7 +31,7 @@
 	     nstring(level(), "  ") "</item>\n"
 endsupported
 
-startmenu=   nstring(level(), "  ")  "<menu id='" xml_escape(title()) "' label='" xml_escape(title()) "'>\n"
+startmenu=   nstring(level(), "  ")  "<menu id='" xml_escape(id()) "' label='" xml_escape(title()) "'>\n"
 endmenu=     nstring(level(), "  ")  "</menu>\n"
 
 preoutput=   "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!-- Automatically generated file. Do not edit (see /usr/share/doc/menu/html) -->\n\n<openbox_menu xmlns=\"http://openbox.org/\"\n        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        xsi:schemaLocation=\"http://openbox.org/\n                file:///usr/share/openbox/menu.xsd\">\n\n"
#!/usr/bin/install-menu

!include menu.h

compat="menu-1"

outputencoding="UTF-8"
genmenu="debian-menu.xml"
rootprefix="/var/lib/openbox/"
userprefix=".config/openbox/"
treewalk="(M)"

function id()=$section

function xml_escape($s) = replace(replace(replace(replace(replace($s, \
                                "&",  "&amp;"), \
                                ">",  "&gt;"), \
                                "<",  "&lt;"), \
                                "'",  "&apos;"), \
                                "\"", "&quot;")

supported
    x11=     nstring(level(), "  ") "<item label='" xml_escape(title()) "'>\n" \
             nstring(level(), "  ") "  <action name='Execute'><execute>" 
xml_escape($command) "</execute></action>\n" \
             nstring(level(), "  ") "</item>\n"
    text=    nstring(level(), "  ") "<item label='" xml_escape(title()) "'>\n" \
             nstring(level(), "  ") "  <action name='Execute'><execute>" 
xml_escape(term()) "</execute></action>\n" \
             nstring(level(), "  ") "</item>\n"
    wm=      nstring(level(), "  ") "<item label='" xml_escape(title()) "'>\n" \
             nstring(level(), "  ") "  <action name='Restart'><execute>" 
xml_escape($command) "</execute></action>\n" \
             nstring(level(), "  ") "</item>\n"
endsupported

startmenu=   nstring(level(), "  ")  "<menu id='" xml_escape(id()) "' label='" 
xml_escape(title()) "'>\n"
endmenu=     nstring(level(), "  ")  "</menu>\n"

preoutput=   "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!-- Automatically 
generated file. Do not edit (see /usr/share/doc/menu/html) -->\n\n<openbox_menu 
xmlns=\"http://openbox.org/\"\n        
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n        
xsi:schemaLocation=\"http://openbox.org/\n                
file:///usr/share/openbox/menu.xsd\">\n\n"
postoutput=  "\n</openbox_menu>\n"

Reply via email to