menu: do not require label attribute for highest level menu definition

Allow highest level menu definitions - typically used for root-menu and
client-menu - to be defined like this:

    <openbox_menu>
      <menu id="">
      </menu>
    </openbox>

Previously this required a label attribute (which was not used for
anything and could be an empty string) as show below:

    <openbox_menu>
      <menu id="" label="">
      </menu>
    </openbox>

Closes issue #472
This commit is contained in:
Johan Malm 2022-08-11 18:43:51 +01:00 committed by Johan Malm
parent ac5c9dae00
commit 70421b1207
3 changed files with 39 additions and 5 deletions

View file

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu>
<menu id="client-menu" label="ClientMenu">
<menu id="client-menu">
<item label="Minimize">
<action name="Iconify" />
</item>
@ -31,7 +32,8 @@
<action name="Close" />
</item>
</menu>
<menu id="root-menu" label="">
<menu id="root-menu">
<item label="Web browser">
<action name="Execute"><command>firefox</command></action>
</item>