mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 19:39:17 +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;
|
Classes, SysUtils, LazIDEIntf, Laz2_XMLCfg, LazFileUtils;
|
||||||
|
|
||||||
const
|
const
|
||||||
Version = 1;
|
OpkVersion = 1;
|
||||||
|
|
||||||
type
|
type
|
||||||
{ TOptions }
|
{ TOptions }
|
||||||
@ -46,6 +46,7 @@ type
|
|||||||
private
|
private
|
||||||
FProxySettings: TProxySettings;
|
FProxySettings: TProxySettings;
|
||||||
FXML: TXMLConfig;
|
FXML: TXMLConfig;
|
||||||
|
FVersion: Integer;
|
||||||
FRemoteRepository: String;
|
FRemoteRepository: String;
|
||||||
FForceDownloadAndExtract: Boolean;
|
FForceDownloadAndExtract: Boolean;
|
||||||
FDeleteZipAfterInstall: Boolean;
|
FDeleteZipAfterInstall: Boolean;
|
||||||
@ -113,7 +114,11 @@ end;
|
|||||||
|
|
||||||
procedure TOptions.Load;
|
procedure TOptions.Load;
|
||||||
begin
|
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);
|
FForceDownloadAndExtract := FXML.GetValue('General/ForceDownloadAndExtract/Value', True);
|
||||||
FDeleteZipAfterInstall := FXML.GetValue('General/DeleteZipAfterInstall/Value', True);
|
FDeleteZipAfterInstall := FXML.GetValue('General/DeleteZipAfterInstall/Value', True);
|
||||||
FLastDownloadDir := FXML.GetValue('General/LastDownloadDir/Value', '');
|
FLastDownloadDir := FXML.GetValue('General/LastDownloadDir/Value', '');
|
||||||
@ -133,7 +138,7 @@ end;
|
|||||||
|
|
||||||
procedure TOptions.Save;
|
procedure TOptions.Save;
|
||||||
begin
|
begin
|
||||||
FXML.SetDeleteValue('Version/Value', Version, 0);
|
FXML.SetDeleteValue('Version/Value', OpkVersion, 0);
|
||||||
FXML.SetDeleteValue('General/RemoteRepository/Value', FRemoteRepository, '');
|
FXML.SetDeleteValue('General/RemoteRepository/Value', FRemoteRepository, '');
|
||||||
FXML.SetDeleteValue('General/ForceDownloadAndExtract/Value', FForceDownloadAndExtract, True);
|
FXML.SetDeleteValue('General/ForceDownloadAndExtract/Value', FForceDownloadAndExtract, True);
|
||||||
FXML.SetDeleteValue('General/DeleteZipAfterInstall/Value', FDeleteZipAfterInstall, True);
|
FXML.SetDeleteValue('General/DeleteZipAfterInstall/Value', FDeleteZipAfterInstall, True);
|
||||||
|
@ -47,7 +47,7 @@ object OptionsFrm: TOptionsFrm
|
|||||||
Left = 8
|
Left = 8
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 100
|
Width = 162
|
||||||
Caption = 'Restore defaults'
|
Caption = 'Restore defaults'
|
||||||
OnClick = bRestoreClick
|
OnClick = bRestoreClick
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
Loading…
Reference in New Issue
Block a user