mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 16:20:35 +02:00
components: anchordocking: save options to file after changing them through tools->options dialog
git-svn-id: trunk@41957 -
This commit is contained in:
parent
1d1e59dd74
commit
4d0d273045
@ -74,8 +74,8 @@ type
|
|||||||
procedure IncreaseChangeStamp; inline;
|
procedure IncreaseChangeStamp; inline;
|
||||||
property ChangeStamp: int64 read FChangeStamp;
|
property ChangeStamp: int64 read FChangeStamp;
|
||||||
property Modified: boolean read GetModified write SetModified;
|
property Modified: boolean read GetModified write SetModified;
|
||||||
procedure LoadOptions;
|
procedure LoadSettings;
|
||||||
procedure SaveOptions;
|
procedure SaveSettings;
|
||||||
// layouts
|
// layouts
|
||||||
function GetUserLayoutFilename(Full: boolean): string;
|
function GetUserLayoutFilename(Full: boolean): string;
|
||||||
procedure LoadDefaultLayout;
|
procedure LoadDefaultLayout;
|
||||||
@ -154,7 +154,7 @@ begin
|
|||||||
// add options frame
|
// add options frame
|
||||||
AnchorDockOptionsID:=RegisterIDEOptionsEditor(GroupEnvironment,TAnchorDockIDEFrame,
|
AnchorDockOptionsID:=RegisterIDEOptionsEditor(GroupEnvironment,TAnchorDockIDEFrame,
|
||||||
AnchorDockOptionsID)^.Index;
|
AnchorDockOptionsID)^.Index;
|
||||||
IDEAnchorDockMaster.LoadOptions;
|
IDEAnchorDockMaster.LoadSettings;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TIDEAnchorDockMaster }
|
{ TIDEAnchorDockMaster }
|
||||||
@ -561,7 +561,7 @@ begin
|
|||||||
LUIncreaseChangeStamp64(FChangeStamp);
|
LUIncreaseChangeStamp64(FChangeStamp);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEAnchorDockMaster.LoadOptions;
|
procedure TIDEAnchorDockMaster.LoadSettings;
|
||||||
var
|
var
|
||||||
Config: TConfigStorage;
|
Config: TConfigStorage;
|
||||||
begin
|
begin
|
||||||
@ -574,12 +574,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
DebugLn(['TIDEAnchorDockMaster.LoadOptions failed: ',E.Message]);
|
DebugLn(['TIDEAnchorDockMaster.LoadSettings failed: ',E.Message]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIDEAnchorDockMaster.SaveOptions;
|
procedure TIDEAnchorDockMaster.SaveSettings;
|
||||||
var
|
var
|
||||||
Config: TConfigStorage;
|
Config: TConfigStorage;
|
||||||
begin
|
begin
|
||||||
@ -587,12 +587,13 @@ begin
|
|||||||
Config:=GetIDEConfigStorage(DefaultConfigFileName,false);
|
Config:=GetIDEConfigStorage(DefaultConfigFileName,false);
|
||||||
try
|
try
|
||||||
DockMaster.SaveSettingsToConfig(Config);
|
DockMaster.SaveSettingsToConfig(Config);
|
||||||
|
Config.WriteToDisk;
|
||||||
finally
|
finally
|
||||||
Config.Free;
|
Config.Free;
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
on E: Exception do begin
|
on E: Exception do begin
|
||||||
DebugLn(['TIDEAnchorDockMaster.SaveOptions failed: ',E.Message]);
|
DebugLn(['TIDEAnchorDockMaster.SaveSettings failed: ',E.Message]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -656,7 +657,7 @@ begin
|
|||||||
then begin
|
then begin
|
||||||
DockMaster.LoadSettings(FSettings);
|
DockMaster.LoadSettings(FSettings);
|
||||||
IDEAnchorDockMaster.SaveUserLayout;
|
IDEAnchorDockMaster.SaveUserLayout;
|
||||||
IDEAnchorDockMaster.SaveOptions;
|
IDEAnchorDockMaster.SaveSettings;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user