mirror of https://gitlab.com/basile.b/dexed.git
added docking options persistence
This commit is contained in:
parent
9866d5fd49
commit
e592b047e0
|
@ -580,6 +580,14 @@ begin
|
||||||
finally
|
finally
|
||||||
xcfg.Free;
|
xcfg.Free;
|
||||||
end;
|
end;
|
||||||
|
//
|
||||||
|
xcfg := TXMLConfigStorage.Create(getDocPath + 'dockingopts.xml',false);
|
||||||
|
try
|
||||||
|
DockMaster.SaveSettingsToConfig(xcfg);
|
||||||
|
xcfg.WriteToDisk;
|
||||||
|
finally
|
||||||
|
xcfg.Free;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.LoadDocking;
|
procedure TCEMainForm.LoadDocking;
|
||||||
|
@ -587,8 +595,8 @@ var
|
||||||
xcfg: TXMLConfigStorage;
|
xcfg: TXMLConfigStorage;
|
||||||
str: TMemoryStream;
|
str: TMemoryStream;
|
||||||
begin
|
begin
|
||||||
if not fileExists(getDocPath + 'docking.xml') then
|
if fileExists(getDocPath + 'docking.xml') then
|
||||||
exit;
|
begin
|
||||||
xcfg := TXMLConfigStorage.Create(getDocPath + 'docking.xml', true);
|
xcfg := TXMLConfigStorage.Create(getDocPath + 'docking.xml', true);
|
||||||
try
|
try
|
||||||
try
|
try
|
||||||
|
@ -606,6 +614,27 @@ begin
|
||||||
finally
|
finally
|
||||||
xcfg.Free;
|
xcfg.Free;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
if fileExists(getDocPath + 'dockingopts.xml') then
|
||||||
|
begin
|
||||||
|
xcfg := TXMLConfigStorage.Create(getDocPath + 'dockingopts.xml', true);
|
||||||
|
try
|
||||||
|
try
|
||||||
|
DockMaster.LoadSettingsFromConfig(xcfg);
|
||||||
|
except
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
str := TMemoryStream.Create;
|
||||||
|
try
|
||||||
|
xcfg.SaveToStream(str);
|
||||||
|
str.saveToFile(getDocPath + 'dockingopts.bak')
|
||||||
|
finally
|
||||||
|
str.Free;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
xcfg.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.KillPlugs;
|
procedure TCEMainForm.KillPlugs;
|
||||||
|
@ -1525,8 +1554,6 @@ begin
|
||||||
win.Show;
|
win.Show;
|
||||||
win.BringToFront;
|
win.BringToFront;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
{$REGION project ---------------------------------------------------------------}
|
{$REGION project ---------------------------------------------------------------}
|
||||||
|
|
Loading…
Reference in New Issue