mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Saving configuration in Zip plugin
This commit is contained in:
parent
32529ce0a6
commit
83b43ca3eb
2 changed files with 16 additions and 4 deletions
|
|
@ -33,6 +33,8 @@ uses
|
|||
SysUtils, DialogAPI;
|
||||
|
||||
procedure CreateZipConfDlg;
|
||||
procedure LoadConfig;
|
||||
procedure SaveConfig;
|
||||
|
||||
implementation
|
||||
|
||||
|
|
@ -89,6 +91,7 @@ begin
|
|||
3:
|
||||
gDeflationOption:= doSuperFast;
|
||||
end; // case
|
||||
SaveConfig;
|
||||
SendDlgMsg(pDlg, DlgItemName, DM_CLOSE, 0, 0);
|
||||
end
|
||||
else if DlgItemName = 'btnCancel' then
|
||||
|
|
@ -108,5 +111,17 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure LoadConfig;
|
||||
begin
|
||||
gCompressionMethodToUse:= TAbZipSupportedMethod(gIni.ReadInteger('Configuration', 'CompressionMethodToUse', 2));
|
||||
gDeflationOption:= TAbZipDeflationOption(gIni.ReadInteger('Configuration', 'DeflationOption', 0));
|
||||
end;
|
||||
|
||||
procedure SaveConfig;
|
||||
begin
|
||||
gIni.WriteInteger('Configuration', 'CompressionMethodToUse', Integer(gCompressionMethodToUse));
|
||||
gIni.WriteInteger('Configuration', 'DeflationOption', Integer(gDeflationOption));
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
|||
|
|
@ -327,8 +327,7 @@ begin
|
|||
gSetDlgProcInfo:= SetDlgProcInfo;
|
||||
// load configuration from ini file
|
||||
gIni:= TIniFile.Create(gSetDlgProcInfo.PluginConfDir + 'zip.ini');
|
||||
gCompressionMethodToUse:= TAbZipSupportedMethod(gIni.ReadInteger('Configuration', 'CompressionMethodToUse', 0));
|
||||
gDeflationOption:= TAbZipDeflationOption(gIni.ReadInteger('Configuration', 'DeflationOption', 0));
|
||||
LoadConfig;
|
||||
end;
|
||||
|
||||
|
||||
|
|
@ -357,7 +356,5 @@ begin
|
|||
end;
|
||||
|
||||
finalization
|
||||
gIni.WriteInteger('Configuration', 'CompressionMethodToUse', Integer(gCompressionMethodToUse));
|
||||
gIni.WriteInteger('Configuration', 'DeflationOption', Integer(gDeflationOption));
|
||||
gIni.Free;
|
||||
end.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue