[syslinux] submenus and menu title

Ady ady-sf at hotmail.com
Sun Sep 16 06:12:08 PDT 2012


Date sent:      	Sun, 16 Sep 2012 07:21:49 -0400
From:           	Gene Cumm <gene.cumm at gmail.com>
To:             	For discussion of Syslinux and tftp-hpa 
<syslinux at zytor.com>
Subject:        	Re: [syslinux] submenus and menu title
Send reply to:  	For discussion of Syslinux and tftp-hpa 
<syslinux at zytor.com>
	<mailto:syslinux-request at zytor.com?subject=unsubscribe>
	<mailto:syslinux-request at zytor.com?subject=subscribe>

> > Here is a cfg file using the "1.A._" fallback rule (case#2):
> >  UI menu.c32
> >  MENU TITLE My Parent Title
> >
> >  # case2
> >  MENU BEGIN case2tag
> >  MENU LABEL Mlabel2
> >
> >  LABEL hello2
> >  COM32 hello.c32
> >
> >  MENU END
> >
> > When the MENU LABEL directive (in the example, "MENU LABEL Mlabel2")
> > is used, the menu entry displayed in the parent menu would be such
> > MENU LABEL (in the example, "Mlabel2").
> 
> I see this.  This is a documentation bug that should state that the
> "MENU LABEL" is allowed under a "MENU BEGIN" directive.  I would have
> interpreted this as against syntax
> 

Well, I think that any directive using a TAGNAME is treated as 
equivalent as a LABEL. If this statement is adequate, then maybe this 
also should be documented.

The point is that you won't find ANY case at all (in version 4.05, at 
least) where the parent menu title is inherited. Instead, the 
fallback rules I wrote before (for the menu entry in the parent menu, 
and for the menu title in the submenu) are effectively followed. As I 
mentioned before, popular live CDs already take advantage of such 
undocumented behaviors.

> >
> > The example I just wrote in this same email, "case#2", is such an
> > example, where the sub- menu title being displayed is in fact the
> > MENU LABEL of the submenu ("Mlabel2" in the example), since the sub-
> > MENU TITLE directive is not explicitly used in the submenu.
> >  Moreover, this fallback rule is already being used by popular live
> > CDs, but the behavior is not documented.
> 
> I also see this.  This would be a code bug that "MENU LABEL" is (but
> should not be) overriding "MENU TITLE" for the submenu's title.
> 

Since it is not documented, originally (before posting about this the 
first time) it took me some time to understand why I was not 
receiving the desired results in my tests. I think it isn't really a 
coding bug, but a lack of documentation. I mean, my guess is that the 
behavior was intentionally introduced, but not documented.

To be clear, case#2 shows one example (the other one being case#6 of 
my table) of "MENU LABEL" being used as menu title in the submenu, 
overriding the INHERITANCE of the parent menu title. I point out the 
inheritance, because if MENU TITLE is used inside the submenu (ie. 
after "menu begin"), then _that_ statement is used as submenu title 
(FWIW, cases #1, #3, #5 and #7 of the table). In such case, _that_ 
MENU TITLE directive is not overridden.

Conversely, if MENU LABEL is not present (after "menu begin") and 
MENU TITLE is used (after "menu begin"), then that sub- MENU TITLE is 
displayed as menu entry in the parent menu, in addition to being 
displayed as submenu title (FWIW, cases #3 and #7 of the table).


> There are valid points to enabling the inheritance as you point out.
> There are valid points to maintaining the lack of inheritance as I'm
> trying to point out.
> 

I am not suggesting to change ALL the current fallback rules. So the 
current "pros" are maintained. By correctly implementing the fallback 
rules I am suggesting, the current behavior of existing popular live 
CDs would be maintained too.

> >  My suggestion only replaces a "blank" subtitle with the inherited
> > menu title (or, with the submenu tagname, for the second alternative
> > suggestion, if you'd rather use that one). So, regarding the end user
> > not knowing which submenu he is seeing on the screen, it is the same
> > potential "confusion". He now ( v.4.05 ) sees no subtitle at all (in
> > my case#4 and case#8 of my table), against using at least the parent
> > menu title as subtitle too.
> 
> But this untitled submenu would encourage you to explicitly place one
> there to help your end users.
> 

I don't think so. The 2 cases that would suffer a change are the ones 
where MENU LABEL (after "menu begin") is not used, MENU TITLE (after 
"menu begin") is not used, and the TAGNAME may or may not be used. So 
we are already talking about "lazy" cfg files. I am certainly seeing 
potential cases where the suggested additional fallback rules would 
be useful.

> > My suggestion would be the only case where the parent menu title is
> > indeed inherited, while maintaining ALL the rest fallback rules with
> > higher priority as they are now. Currently, it is never inherited, in
> > no case.
> 
> -- 
> -Gene

Indeed there is a general need for more documentation about submenus, 
but I'd 
also like to see the suggestions we are discussing actually 
implemented. If 
there is a need to concisely summarize them here, I'll gladly do it.

TIA,
Ady.



More information about the Syslinux mailing list