[syslinux] SYSLINUX 2.09-pre5 - Menu Depth "Feature"

Geoffrey Huntley geoff at cam1.com.au
Tue Feb 3 18:04:11 PST 2004


I rotated my code around as to define all 'third level' menus first,
followed by 'second level' and then 'first level' (main menu).

And now it works, so I guess that's what was happening.

-----Original Message-----
From: syslinux-bounces at zytor.com [mailto:syslinux-bounces at zytor.com] On
Behalf Of Murali Krishnan Ganapathy
Sent: Wednesday, February 04, 2004 2:58 AM
To: Geoffrey Huntley
Cc: syslinux at zytor.com
Subject: Re: [syslinux] SYSLINUX 2.09-pre5 - Menu Depth "Feature"

>If you have two submenus nested within each other and then call a third
>menu

>it will bring up the second menu instead of the third.
>
>  MAIN = add_menu(" Main Menu ");
>  add_item("Begin Menu Depth Test","Only Allows Depth Of
>Two",OPT_SUBMENU,NULL,ONE);
>  add_item("Exit to prompt", "Exit the menu system", OPT_EXITMENU, "exit",
>0);
>  
>
At this point ONE probably evaluates to 0. So you may pointing at a 
arbitrary submenu (depending on what value ONE has). Best way is to 
either define the menu's is reverse topological order, i.e. declare the 
menu's which does not have any submenu's first... and work your way up 
the (menu dependency tree). That way, you would already have declared 
the TWO menu before the MAIN menu. This will ensure that TWO gets a 
correct value. Otherwise, you can always hard code a number instead of 
the symbolic ONE, i.e. replace ONE with 1/2 or whatever. The advantage 
of the first is that you can never define recursice menu's.

- Murali

>  ONE = add_menu(" LEVEL 1 ");
>  add_item("GOTO LEVEL 2","Go one level up",OPT_SUBMENU,NULL,TWO);
>  add_item("Exit to prompt", "Exit the menu system", OPT_EXITMENU, "exit",
>0);
>
>  TWO = add_menu(" LEVEL 2 ");
>  add_item("GOTO LEVEL 3","Go one level up",OPT_SUBMENU,NULL,TWO);
>  add_item("Exit to prompt", "Exit the menu system", OPT_EXITMENU, "exit",
>0);
>  [snip]
>
>End result of selecting goto LEVEL 2 is that it brings up a new submenu
>containing LEVEL 1 instead of LEVEL2.
>
> 
>  
>
>>I have just released SYSLINUX 2.09-pre4 with a few changes:
>>
>>a) SYSLINUX should now correctly handle mode changes from within a 
>>COMBOOT program.
>>
>>b) Tweaks to the menu system to avoid the "grey text on black" problem.
>>
>>c) A new color scheme for the menu system (Murali, check it out and see 
>>if you think it works for you.)
>>
>>ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/Testing/
>>
>>Please test it out, everyone...
>>
>>	-hpa
>>    
>>
>
>
>_______________________________________________
>SYSLINUX mailing list
>Submissions to SYSLINUX at zytor.com
>Unsubscribe or set options at:
>http://www.zytor.com/mailman/listinfo/syslinux
>Please do not send private replies to mailing list traffic.
>
>
>  
>

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX at zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.




More information about the Syslinux mailing list