From: Leonid Konontsov <me@nokono.ru> This commit makes RestartDialogEx function load restart prompt string only if lpwstrReason is null. --- dlls/shell32/dialogs.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/dialogs.c b/dlls/shell32/dialogs.c index 665c7093953..9d90ca2adda 100644 --- a/dlls/shell32/dialogs.c +++ b/dlls/shell32/dialogs.c @@ -506,10 +506,19 @@ static BOOL ConfirmDialog(HWND hWndOwner, UINT PromptId, UINT TitleId) int WINAPI RestartDialogEx(HWND hWndOwner, LPCWSTR lpwstrReason, DWORD uFlags, DWORD uReason) { + WCHAR Prompt[256]; + WCHAR Title[256]; TRACE("(%p)\n", hWndOwner); - /* FIXME: use lpwstrReason */ - if (ConfirmDialog(hWndOwner, IDS_RESTART_PROMPT, IDS_RESTART_TITLE)) + LoadStringW(shell32_hInstance, IDS_RESTART_TITLE, Title, ARRAY_SIZE(Title)); + + if (!lpwstrReason) + { + LoadStringW(shell32_hInstance, IDS_RESTART_PROMPT, Prompt, ARRAY_SIZE(Prompt)); + lpwstrReason = Prompt; + } + + if (MessageBoxW(hWndOwner, lpwstrReason, Title, MB_YESNO|MB_ICONQUESTION) == IDYES) { HANDLE hToken; TOKEN_PRIVILEGES npr; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10098