Revert "FIX: SevenZip - password dialog priority"

This reverts commit 0aef56bc46.
This commit is contained in:
Alexander Koblov 2024-07-29 22:07:32 +03:00
commit fcbdf75482
2 changed files with 6 additions and 23 deletions

View file

@ -3,7 +3,7 @@
-------------------------------------------------------------------------
SevenZip archiver plugin, dialogs unit
Copyright (C) 2014-2024 Alexander Koblov (alexx2000@mail.ru)
Copyright (C) 2014-2017 Alexander Koblov (alexx2000@mail.ru)
Based on 7-Zip 15.06 (http://7-zip.org)
7-Zip Copyright (C) 1999-2015 Igor Pavlov
@ -733,30 +733,13 @@ begin
Result:= 0;
end;
function FindWindow(ProcessId: DWORD; szWndClassName: PWideChar): HWND;
var
hWindow: HWND;
dwProcess: DWORD;
begin
hWindow:= FindWindowExW(0, 0, szWndClassName, nil);
while (hWindow <> 0) do
begin
GetWindowThreadProcessId(hWindow, @dwProcess);
if (dwProcess = ProcessId) then Exit(hWindow);
hWindow:= FindWindowExW(0, hWindow, szWndClassName, nil);
end;
Result:= 0;
end;
function ShowPasswordQuery(var Encrypt: Boolean; var Password: WideString): Boolean;
var
Parent: HWND;
PasswordData: TPasswordData;
begin
PasswordData.Password:= Password;
PasswordData.EncryptHeader:= Encrypt;
Parent:= FindWindow(GetProcessID, 'TTOTAL_CMD');
Result:= (DialogBoxParam(hInstance, 'DIALOG_PWD', Parent, @PasswordDialog, LPARAM(@PasswordData)) = IDOK);
Result:= (DialogBoxParam(hInstance, 'DIALOG_PWD', 0, @PasswordDialog, LPARAM(@PasswordData)) = IDOK);
if Result then
begin
Password:= PasswordData.Password;

View file

@ -20,11 +20,11 @@
</i18n>
<VersionInfo>
<UseVersionInfo Value="True"/>
<MajorVersionNr Value="23"/>
<MinorVersionNr Value="8"/>
<RevisionNr Value="14"/>
<MajorVersionNr Value="24"/>
<MinorVersionNr Value="7"/>
<RevisionNr Value="29"/>
<CharSet Value="04B0"/>
<StringTable FileDescription="SevenZip archiver plugin" InternalName="SevenZip" LegalCopyright="Copyright (C) 2014-2023 Alexander Koblov"/>
<StringTable FileDescription="SevenZip archiver plugin" InternalName="SevenZip" LegalCopyright="Copyright (C) 2014-2024 Alexander Koblov"/>
</VersionInfo>
<BuildModes Count="2">
<Item1 Name="Release" Default="True"/>