]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
1.0.84 release v1.0.84
authorlongpanda <admin@ventoy.net>
Sun, 4 Dec 2022 07:33:16 +0000 (15:33 +0800)
committerlongpanda <admin@ventoy.net>
Sun, 4 Dec 2022 07:33:16 +0000 (15:33 +0800)
.github/ISSUE_TEMPLATE/issue_template.yml
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c
INSTALL/grub/grub.cfg

index dd1b14d22d4d5031b45a649af3ead3138b79f70b..acdc706762c739de6c4c7746dd90a5dc2843e9a2 100644 (file)
@@ -21,7 +21,7 @@ body:
     attributes:
       label: Ventoy Version
       description: What version of ventoy are you running?
     attributes:
       label: Ventoy Version
       description: What version of ventoy are you running?
-      placeholder: 1.0.83
+      placeholder: 1.0.84
     validations:
       required: true
   - type: dropdown
     validations:
       required: true
   - type: dropdown
index 4fbfe7f7ab3c3f1061b00c97e7543dc6d10045fa..eab86b1aa13344754f8957d465da57700e7a0081 100644 (file)
@@ -6177,12 +6177,21 @@ static grub_err_t ventoy_cmd_fs_ignore_case(grub_extcmd_context_t ctxt, int argc
     return 0;
 }
 
     return 0;
 }
 
+static grub_err_t ventoy_cmd_init_menu_lang(grub_extcmd_context_t ctxt, int argc, char **args)
+{
+    (void)ctxt;
+    (void)argc;
+
+    ventoy_plugin_load_menu_lang(1, args[0]);
+    VENTOY_CMD_RETURN(0);
+}
+
 static grub_err_t ventoy_cmd_load_menu_lang(grub_extcmd_context_t ctxt, int argc, char **args)
 {
     (void)ctxt;
     (void)argc;
 
 static grub_err_t ventoy_cmd_load_menu_lang(grub_extcmd_context_t ctxt, int argc, char **args)
 {
     (void)ctxt;
     (void)argc;
 
-    ventoy_plugin_load_menu_lang(args[0]);
+    ventoy_plugin_load_menu_lang(0, args[0]);
     VENTOY_CMD_RETURN(0);
 }
 
     VENTOY_CMD_RETURN(0);
 }
 
@@ -6399,6 +6408,7 @@ static cmd_para ventoy_cmds[] =
     { "vt_limine_menu", ventoy_cmd_linux_limine_menu, 0, NULL, "", "", NULL },
     { "vt_secondary_recover_mode", ventoy_cmd_secondary_recover_mode, 0, NULL, "", "", NULL },
     { "vt_load_menu_lang", ventoy_cmd_load_menu_lang, 0, NULL, "", "", NULL },
     { "vt_limine_menu", ventoy_cmd_linux_limine_menu, 0, NULL, "", "", NULL },
     { "vt_secondary_recover_mode", ventoy_cmd_secondary_recover_mode, 0, NULL, "", "", NULL },
     { "vt_load_menu_lang", ventoy_cmd_load_menu_lang, 0, NULL, "", "", NULL },
+    { "vt_init_menu_lang", ventoy_cmd_init_menu_lang, 0, NULL, "", "", NULL },
     { "vt_cur_menu_lang", ventoy_cmd_cur_menu_lang, 0, NULL, "", "", NULL },
 };
 
     { "vt_cur_menu_lang", ventoy_cmd_cur_menu_lang, 0, NULL, "", "", NULL },
 };
 
index 810a2302bdb21a3958da3362bc01808ca4f027e5..ba1dcf22bac77152f5d7b633ddbde4da916c2237 100644 (file)
@@ -1261,7 +1261,7 @@ grub_err_t ventoy_cmd_browser_disk(grub_extcmd_context_t ctxt, int argc, char **
 int ventoy_get_fs_type(const char *fs);
 int ventoy_img_name_valid(const char *filename, grub_size_t namelen);
 void * ventoy_alloc_chain(grub_size_t size);
 int ventoy_get_fs_type(const char *fs);
 int ventoy_img_name_valid(const char *filename, grub_size_t namelen);
 void * ventoy_alloc_chain(grub_size_t size);
-int ventoy_plugin_load_menu_lang(const char *lang);
+int ventoy_plugin_load_menu_lang(int init, const char *lang);
 const char *ventoy_get_vmenu_title(const char *vMenu);
 grub_err_t ventoy_cmd_cur_menu_lang(grub_extcmd_context_t ctxt, int argc, char **args);
 extern int ventoy_menu_push_key(int code);
 const char *ventoy_get_vmenu_title(const char *vMenu);
 grub_err_t ventoy_cmd_cur_menu_lang(grub_extcmd_context_t ctxt, int argc, char **args);
 extern int ventoy_menu_push_key(int code);
index 3c2ae77ee4c5cd4104ee30dc8b54c801e34b364a..91d331efd76e8bbbf036a9e9e99a4018416b6d56 100644 (file)
@@ -3474,7 +3474,7 @@ const char *ventoy_get_vmenu_title(const char *vMenu)
     return vtoy_json_get_string_ex(g_menu_lang_json->pstChild, vMenu);
 }
 
     return vtoy_json_get_string_ex(g_menu_lang_json->pstChild, vMenu);
 }
 
-int ventoy_plugin_load_menu_lang(const char *lang)
+int ventoy_plugin_load_menu_lang(int init, const char *lang)
 {
     int ret = 1;
     grub_file_t file = NULL;
 {
     int ret = 1;
     grub_file_t file = NULL;
@@ -3528,9 +3528,12 @@ int ventoy_plugin_load_menu_lang(const char *lang)
         grub_snprintf(g_ventoy_hotkey_tip, sizeof(g_ventoy_hotkey_tip), "%s", ventoy_get_vmenu_title("VTMENU_STR_HOTKEY_LIST"));
     }
 
         grub_snprintf(g_ventoy_hotkey_tip, sizeof(g_ventoy_hotkey_tip), "%s", ventoy_get_vmenu_title("VTMENU_STR_HOTKEY_LIST"));
     }
 
-    ventoy_menu_push_key(GRUB_TERM_ESC);
-    ventoy_menu_push_key(GRUB_TERM_ESC);
-    g_ventoy_menu_refresh = 1;
+    if (init == 0)
+    {
+        ventoy_menu_push_key(GRUB_TERM_ESC);
+        ventoy_menu_push_key(GRUB_TERM_ESC);
+        g_ventoy_menu_refresh = 1;        
+    }
     ret = 0;
 
 end:
     ret = 0;
 
 end:
index 71750eef5537dfcd584691cf8b6386acaa3fb24c..4e980a6da8a8330366dc3ca5534e78890806d3a3 100644 (file)
@@ -2354,7 +2354,7 @@ function img_unsupport_menuentry {
 #############################################################
 #############################################################
 
 #############################################################
 #############################################################
 
-set VENTOY_VERSION="1.0.83"
+set VENTOY_VERSION="1.0.84"
 
 #ACPI not compatible with Window7/8, so disable by default
 set VTOY_PARAM_NO_ACPI=1
 
 #ACPI not compatible with Window7/8, so disable by default
 set VTOY_PARAM_NO_ACPI=1
@@ -2457,9 +2457,9 @@ else
 fi
 
 if [ -n "$VTOY_MENU_LANGUAGE" ]; then
 fi
 
 if [ -n "$VTOY_MENU_LANGUAGE" ]; then
-    vt_load_menu_lang "$VTOY_MENU_LANGUAGE"
+    vt_init_menu_lang "$VTOY_MENU_LANGUAGE"
 else
 else
-    vt_load_menu_lang en_US
+    vt_init_menu_lang en_US
 fi
 
 if [ -n "$VTOY_MENU_TIMEOUT" ]; then
 fi
 
 if [ -n "$VTOY_MENU_TIMEOUT" ]; then