[syslinux] submenus and menu title
Ady
ady-sf at hotmail.com
Sun Sep 16 10:28:58 PDT 2012
Date sent: Sun, 16 Sep 2012 09:40:06 -0700
From: "H. Peter Anvin" <hpa at zytor.com>
To: For discussion of Syslinux and tftp-hpa
<syslinux at zytor.com>
Subject: Re: [syslinux] submenus and menu title
> On 09/14/2012 05:32 PM, Gene Cumm wrote:
> >>
> >> The addition of these two statements (assuming this was the
> >> implementation intention) would correct the documentation bug.
> >
> > HPA, is this documentation alteration the proper intention OR should
> > the menu system be corrected, including a change such that the
> > tagname, if set, is always shown in the parent and probably an
> > additional directive 'MENU INHERITTITLE' to state that the tagname
> > should be shown on the parent and the title of the child should be the
> > same as the parent. OR should the tagname not affect the child's
> > title?
> >
>
> My general philosophy on these kinds of things:
>
> It is a bad thing to change established behavior (since it might break
> people's existing configurations.) However, if the current behavior is
> useless to people AND the corrected behavior would be useful to people,
> then it is worth fixing.
>
> I'm not sure this applies here, though, what do you guys think?
>
> Sorry for late replies. I have been psychotically busy.
>
> -hpa
>
> --
1._ Menu entry in parent menu.
This characteristic already has an adequate behavior, but it is not
adequately documented.
For the purpose of documentation, here are the fallback rules.
1.1._ If MENU LABEL is explicitly used for the submenu entry, then
display that as menu entry in the parent menu. Only if it is not
explicitly used, then;
1.1.1._ If a MENU TITLE is explicitly used in the submenu, then
display that as menu entry in the parent menu. Only if it is not
explicitly used (and the previous conditions are also not met), then;
1.1.1.1._ If a TAGNAME is explicitly used for the submenu, then
display that as menu entry in the parent menu. Only if it is not
explicitly used (and the previous conditions are also not met), then;
1.1.1.1.1._ If none of the above conditions are met, then the menu
entry in the parent menu is blank, and only the ">" symbol is seen,
indicating a submenu entry.
2._ Menu title in the submenu (submenu title).
This characteristic should be improved, and it also needs adequate
documentation.
The suggested behavior is:
2.1._ If MENU TITLE is explicitly used inside the submenu, then
display that as submenu title. Only if it is not explicitly used,
then;
2.1.1._ If MENU LABEL is explicitly used for the submenu entry, then
display that as submenu title. Only if it is not explicitly used (and
the previous conditions are also not met), then;
2.1.1.1._ If a TAGNAME is explicitly used for the submenu, then
display that as submenu title. Only if it is not explicitly used (and
the previous conditions are also not met), then;
2.1.1.1.1._ If, in the parent menu, MENU TITLE is explicitly used,
then display that as submenu title. Only if it is not explicitly used
(and the previous conditions are also not met), then;
2.1.1.1.1.1._ If none of the above conditions are met, then the menu
title in the submenu (submenu title) is blank.
Note that "2.1" and "2.1.1" are already being used in version 4.05,
but are not documented.
The additional suggested fallback rules only improve 2 cases, in
which previously the submenu title would be blank. THIS MEANS THAT
PRACTICAL EXISTING CONFIGURATION FILES MAINTAIN THE CURRENT BEHAVIOR
EVEN AFTER THE IMPLEMENTATION OF THE ADDITIONAL SUGGESTED CONDITIONS.
The following is an example configuration file, presenting 8 relevant
different cases.
*** CFG FILE STARTS HERE ***
UI menu.c32
MENU TITLE Parent title
# case_1
MENU BEGIN tag_1
MENU LABEL mlabel_1
MENU TITLE title_1
LABEL hello_1
COM32 hello.c32
MENU END
# case_2
MENU BEGIN tag_2
MENU LABEL mlabel_2
LABEL hello_2
COM32 hello.c32
MENU END
# case_3
MENU BEGIN tag_3
MENU TITLE title_3
LABEL hello_3
COM32 hello.c32
MENU END
# case_4
MENU BEGIN tag_4
LABEL hello_4
COM32 hello.c32
MENU END
# case_5
MENU BEGIN
MENU LABEL mlabel_5
MENU TITLE title_5
LABEL hello_5
COM32 hello.c32
MENU END
# case_6
MENU BEGIN
MENU LABEL mlabel_6
LABEL hello_6
COM32 hello.c32
MENU END
# case_7
MENU BEGIN
MENU TITLE title_7
LABEL hello_7
COM32 hello.c32
MENU END
# case_8
MENU BEGIN
LABEL hello_8
COM32 hello.c32
MENU END
*** CFG FILE ENDS HERE ***
This time I am attaching (instead of linking to) a new summarizing
table, which also corresponds to the 8 cases shown above.
TIA,
Ady.
-------------- next part --------------
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.
---- File information -----------
File: submenu_title2.png
Date: 16 Sep 2012, 18:49
Size: 42689 bytes.
Type: JPEG-image
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submenu_title2.png
Type: image/jpeg
Size: 42689 bytes
Desc: not available
URL: <http://www.zytor.com/pipermail/syslinux/attachments/20120916/137f7d32/attachment.jpe>
More information about the Syslinux
mailing list