mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-22 10:55:19 -04:00
[loc] fix alert hook handling when switching language
* Because the localized title/button text lookup was only executed once on startup, it wouldn't apply to the new language on relaunch. Fix that.
This commit is contained in:
parent
7e21f8a60c
commit
924c6b1a79
4 changed files with 14 additions and 10 deletions
10
src/stdlg.c
10
src/stdlg.c
|
@ -1977,14 +1977,11 @@ static void CALLBACK AlertPromptHook(HWINEVENTHOOK hWinEventHook, DWORD Event, H
|
|||
}
|
||||
}
|
||||
|
||||
BOOL SetAlertPromptHook(void)
|
||||
void SetAlertPromptMessages(void)
|
||||
{
|
||||
HMODULE mui_lib;
|
||||
char mui_path[MAX_PATH];
|
||||
|
||||
if (ap_weh != NULL)
|
||||
return TRUE; // No need to set again if active
|
||||
|
||||
// Fetch the localized strings in the relevant MUI
|
||||
static_sprintf(mui_path, "%s\\%s\\shell32.dll.mui", system_dir, GetCurrentMUI());
|
||||
mui_lib = LoadLibraryU(mui_path);
|
||||
|
@ -2013,7 +2010,12 @@ BOOL SetAlertPromptHook(void)
|
|||
FreeLibrary(mui_lib);
|
||||
}
|
||||
static_strcpy(title_str[2], lmprintf(MSG_149));
|
||||
}
|
||||
|
||||
BOOL SetAlertPromptHook(void)
|
||||
{
|
||||
if (ap_weh != NULL)
|
||||
return TRUE; // No need to set again if active
|
||||
ap_weh = SetWinEventHook(EVENT_SYSTEM_FOREGROUND, EVENT_SYSTEM_FOREGROUND, NULL,
|
||||
AlertPromptHook, 0, 0, WINEVENT_OUTOFCONTEXT | WINEVENT_SKIPOWNPROCESS);
|
||||
return (ap_weh != NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue