[syslinux] submenus and menu title
Matt Fleming
matt at console-pimps.org
Mon Nov 12 07:06:03 PST 2012
On Thu, 2012-10-25 at 11:09 +0100, Matt Fleming wrote:
> On Mon, 2012-09-17 at 05:29 -0400, Gene Cumm wrote:
> > 2) code bug per doc/menu.txt: "Submenus inherit the properties of
> > their parent menus" however submenus do not inherit the title at this
> > time.
>
> I'll take a look at implementing this for the case where the submenu
> doesn't specify MENU TITLE, MENU LABEL or a tag name, since that's the
> least intrusive change discussed in this thread and it blatantly doesn't
> work at the moment.
FYI this is queued up for Syslinux-5.00-pre10.
---
>From 70ceb446ce5d5d0c94e84169e3fbd684ca7f331c Mon Sep 17 00:00:00 2001
From: Matt Fleming <matt.fleming at intel.com>
Date: Thu, 25 Oct 2012 11:35:14 +0100
Subject: [PATCH] menu: Inherit parent menu title
The documentation for the menu system clearly states that all
properties of the parent are inherited in the submenu. Unfortunately
there's a bug that means this isn't true for the parent's menu title,
so fix that.
Signed-off-by: Matt Fleming <matt.fleming at intel.com>
---
com32/menu/readconfig.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c
index cffe8e3..3690e48 100644
--- a/com32/menu/readconfig.c
+++ b/com32/menu/readconfig.c
@@ -189,6 +189,9 @@ static struct menu *new_menu(struct menu *parent,
m->menu_master_passwd = refstr_get(parent->menu_master_passwd);
m->menu_background = refstr_get(parent->menu_background);
+ refstr_put(m->title);
+ m->title = refstr_get(parent->title);
+
m->color_table = copy_color_table(parent->color_table);
for (i = 0; i < 12; i++) {
--
1.7.11.7
--
Matt Fleming, Intel Open Source Technology Center
More information about the Syslinux
mailing list