mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 18:09:23 +02:00
OPK: Use the new Version to read RemoteRepository also from old configuration.
git-svn-id: trunk@53455 -
This commit is contained in:
parent
45004c171a
commit
ee23326382
@ -30,7 +30,7 @@ uses
|
||||
Classes, SysUtils, LazIDEIntf, Laz2_XMLCfg, LazFileUtils;
|
||||
|
||||
const
|
||||
Version = 1;
|
||||
OpkVersion = 1;
|
||||
|
||||
type
|
||||
{ TOptions }
|
||||
@ -46,6 +46,7 @@ type
|
||||
private
|
||||
FProxySettings: TProxySettings;
|
||||
FXML: TXMLConfig;
|
||||
FVersion: Integer;
|
||||
FRemoteRepository: String;
|
||||
FForceDownloadAndExtract: Boolean;
|
||||
FDeleteZipAfterInstall: Boolean;
|
||||
@ -113,7 +114,11 @@ end;
|
||||
|
||||
procedure TOptions.Load;
|
||||
begin
|
||||
FRemoteRepository := FXML.GetValue('General/RemoteRepository/Value', '');
|
||||
FVersion := FXML.GetValue('Version/Value', 0);
|
||||
if FVersion = 0 then
|
||||
FRemoteRepository := FXML.GetValue('RemoteRepository/Value', '')
|
||||
else
|
||||
FRemoteRepository := FXML.GetValue('General/RemoteRepository/Value', '');
|
||||
FForceDownloadAndExtract := FXML.GetValue('General/ForceDownloadAndExtract/Value', True);
|
||||
FDeleteZipAfterInstall := FXML.GetValue('General/DeleteZipAfterInstall/Value', True);
|
||||
FLastDownloadDir := FXML.GetValue('General/LastDownloadDir/Value', '');
|
||||
@ -133,7 +138,7 @@ end;
|
||||
|
||||
procedure TOptions.Save;
|
||||
begin
|
||||
FXML.SetDeleteValue('Version/Value', Version, 0);
|
||||
FXML.SetDeleteValue('Version/Value', OpkVersion, 0);
|
||||
FXML.SetDeleteValue('General/RemoteRepository/Value', FRemoteRepository, '');
|
||||
FXML.SetDeleteValue('General/ForceDownloadAndExtract/Value', FForceDownloadAndExtract, True);
|
||||
FXML.SetDeleteValue('General/DeleteZipAfterInstall/Value', FDeleteZipAfterInstall, True);
|
||||
|
@ -47,7 +47,7 @@ object OptionsFrm: TOptionsFrm
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 8
|
||||
Width = 100
|
||||
Width = 162
|
||||
Caption = 'Restore defaults'
|
||||
OnClick = bRestoreClick
|
||||
TabOrder = 2
|
||||
|
Loading…
Reference in New Issue
Block a user