hotkey optimization

h is equal to Ctrl+h
m is equal to Ctrl+m
pull/1174/head
longpanda 3 years ago
parent d151e74336
commit 154bbc6e5f

@ -94,7 +94,7 @@ hash_file (grub_file_t file, const gcry_md_spec_t *hash, void *result)
{ {
total += r; total += r;
div = grub_divmod64(total * 100, (grub_uint64_t)file->size, &ro); div = grub_divmod64(total * 100, (grub_uint64_t)file->size, &ro);
grub_printf("\rCalculating %d%% ", (int)div); grub_printf("\rCalculating %s %d%% ", hash->name, (int)div);
grub_refresh(); grub_refresh();
} }
} }
@ -105,7 +105,7 @@ hash_file (grub_file_t file, const gcry_md_spec_t *hash, void *result)
grub_free (context); grub_free (context);
if (progress) if (progress)
{ {
grub_printf("\rCalculating 100%% \n\r\n"); grub_printf("\rCalculating %s 100%% \n\r\n", hash->name);
grub_refresh(); grub_refresh();
} }
return GRUB_ERR_NONE; return GRUB_ERR_NONE;

@ -913,6 +913,7 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
goto refresh; goto refresh;
case (GRUB_TERM_CTRL | 'h'): case (GRUB_TERM_CTRL | 'h'):
case 'h':
{ {
cmdstr = grub_env_get("VTOY_HELP_CMD"); cmdstr = grub_env_get("VTOY_HELP_CMD");
if (cmdstr) if (cmdstr)
@ -926,6 +927,7 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
break; break;
} }
case (GRUB_TERM_CTRL | 'm'): case (GRUB_TERM_CTRL | 'm'):
case 'm':
{ {
if (g_ventoy_cur_img_path) if (g_ventoy_cur_img_path)
{ {

Loading…
Cancel
Save