mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-04-19 18:27:28 -04:00
priority key>parent in menu class plugin
This commit is contained in:
parent
ac3ab97686
commit
a8edb99d28
@ -2488,16 +2488,25 @@ const char * ventoy_plugin_get_menu_class(int type, const char *name, const char
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node->parent)
|
if (node->parent == 0)
|
||||||
{
|
{
|
||||||
if ((node->patlen < pathlen) && ventoy_plugin_is_parent(node->pattern, node->patlen, path))
|
if ((node->patlen < namelen) && grub_strstr(name, node->pattern))
|
||||||
{
|
{
|
||||||
return node->class;
|
return node->class;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
|
||||||
|
for (node = g_menu_class_head; node; node = node->next)
|
||||||
{
|
{
|
||||||
if ((node->patlen < namelen) && grub_strstr(name, node->pattern))
|
if (node->type != type)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node->parent)
|
||||||
|
{
|
||||||
|
if ((node->patlen < pathlen) && ventoy_plugin_is_parent(node->pattern, node->patlen, path))
|
||||||
{
|
{
|
||||||
return node->class;
|
return node->class;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user