mirror of https://github.com/ventoy/Ventoy.git
Show the directory path in the return menu for TreeView mode and Browser mode.
This commit is contained in:
parent
5553dd4fc4
commit
620229508b
|
@ -520,13 +520,13 @@ grub_err_t ventoy_cmd_browser_dir(grub_extcmd_context_t ctxt, int argc, char **a
|
|||
|
||||
if (g_tree_view_menu_style == 0)
|
||||
{
|
||||
browser_ssprintf(&mbuf, "menuentry \"%-10s [../]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo 'return ...' \n}\n", "<--");
|
||||
browser_ssprintf(&mbuf, "menuentry \"%-10s [(%s)%s/..]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo 'return ...' \n}\n", "<--", args[0], g_menu_path_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
browser_ssprintf(&mbuf, "menuentry \"[../]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo 'return ...' \n}\n");
|
||||
browser_ssprintf(&mbuf, "menuentry \"[(%s)%s/..]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo 'return ...' \n}\n", args[0], g_menu_path_buf);
|
||||
}
|
||||
|
||||
for (i = 1; i >= 0; i--)
|
||||
|
|
|
@ -2295,8 +2295,8 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
|
|||
{
|
||||
vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos,
|
||||
"menuentry \"[Return to ListView]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo '%s ...' \n"
|
||||
"}\n", "return");
|
||||
" echo 'return ...' \n"
|
||||
"}\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2350,16 +2350,16 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
|
|||
if (g_tree_view_menu_style == 0)
|
||||
{
|
||||
vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos,
|
||||
"menuentry \"%-10s [../]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
"menuentry \"%-10s [%s/..]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo 'return ...' \n"
|
||||
"}\n", "<--");
|
||||
"}\n", "<--", node->dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos,
|
||||
"menuentry \"[../]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo '%s ...' \n"
|
||||
"}\n", "return");
|
||||
"menuentry \"[%s/..]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo 'return ...' \n"
|
||||
"}\n", node->dir);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2397,7 +2397,7 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
|
|||
|
||||
if (node != &g_img_iterator_head)
|
||||
{
|
||||
vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, "%s", "}\n");
|
||||
vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, "}\n");
|
||||
}
|
||||
|
||||
node->done = 1;
|
||||
|
|
|
@ -313,8 +313,8 @@ extern int g_ventoy_debug;
|
|||
void ventoy_debug(const char *fmt, ...);
|
||||
#define debug(fmt, args...) if (g_ventoy_debug) ventoy_debug("[VTOY]: "fmt, ##args)
|
||||
|
||||
#define vtoy_ssprintf(buf, pos, fmt, ...) \
|
||||
pos += grub_snprintf(buf + pos, VTOY_MAX_SCRIPT_BUF - pos, fmt, __VA_ARGS__)
|
||||
#define vtoy_ssprintf(buf, pos, fmt, args...) \
|
||||
pos += grub_snprintf(buf + pos, VTOY_MAX_SCRIPT_BUF - pos, fmt, ##args)
|
||||
|
||||
#define browser_ssprintf(mbuf, fmt, args...) \
|
||||
(mbuf)->pos += grub_snprintf((mbuf)->buf + (mbuf)->pos, (mbuf)->max - (mbuf)->pos, fmt, ##args)
|
||||
|
|
|
@ -9,7 +9,7 @@ mkdir -p $VT_DIR/GRUB2/PXE
|
|||
|
||||
make install
|
||||
|
||||
PATH=$PATH:$VT_DIR/GRUB2/INSTALL/bin/:$VT_DIR/GRUB2/INSTALL/sbin/
|
||||
PATH=$VT_DIR/GRUB2/INSTALL/bin/:$VT_DIR/GRUB2/INSTALL/sbin/:$PATH
|
||||
|
||||
net_modules_legacy="net tftp http"
|
||||
all_modules_legacy="file setkey date drivemap blocklist regexp newc vga_text ntldr search at_keyboard usb_keyboard gcry_md5 hashsum gzio xzio lzopio lspci pci ext2 xfs ventoy chain read halt iso9660 linux16 test true sleep reboot echo videotest videoinfo videotest_checksum video_colors video_cirrus video_bochs vga vbe video_fb font video gettext extcmd terminal linux minicmd help configfile tr trig boot biosdisk disk ls tar squash4 password_pbkdf2 all_video png jpeg part_gpt part_msdos fat exfat ntfs loopback gzio normal udf gfxmenu gfxterm gfxterm_background gfxterm_menu smbios"
|
||||
|
|
Loading…
Reference in New Issue