mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-09 20:26:33 +02:00
IDE: OI desktop options: fix paths, add ShowComponentTree
git-svn-id: trunk@58121 -
This commit is contained in:
parent
10445683a7
commit
06dc766bc5
@ -330,6 +330,7 @@ type
|
|||||||
private
|
private
|
||||||
FComponentTreeHeight: integer;
|
FComponentTreeHeight: integer;
|
||||||
FInfoBoxHeight: integer;
|
FInfoBoxHeight: integer;
|
||||||
|
FShowComponentTree: Boolean;
|
||||||
FShowInfoBox: boolean;
|
FShowInfoBox: boolean;
|
||||||
FSplitterX: array[TObjectInspectorPage] of Integer;
|
FSplitterX: array[TObjectInspectorPage] of Integer;
|
||||||
|
|
||||||
@ -346,6 +347,7 @@ type
|
|||||||
procedure Load(XMLConfig: TXMLConfig; Path: String);
|
procedure Load(XMLConfig: TXMLConfig; Path: String);
|
||||||
procedure Save(XMLConfig: TXMLConfig; Path: String);
|
procedure Save(XMLConfig: TXMLConfig; Path: String);
|
||||||
|
|
||||||
|
property ShowComponentTree: Boolean read FShowComponentTree write FShowComponentTree;
|
||||||
property ComponentTreeHeight: integer read FComponentTreeHeight write FComponentTreeHeight;
|
property ComponentTreeHeight: integer read FComponentTreeHeight write FComponentTreeHeight;
|
||||||
property SplitterX[const APage: TObjectInspectorPage]: Integer read GetSplitterX write SetSplitterX;
|
property SplitterX[const APage: TObjectInspectorPage]: Integer read GetSplitterX write SetSplitterX;
|
||||||
property ShowInfoBox: boolean read FShowInfoBox write FShowInfoBox;
|
property ShowInfoBox: boolean read FShowInfoBox write FShowInfoBox;
|
||||||
@ -1102,6 +1104,7 @@ begin
|
|||||||
DDest.SplitterX[I] := SplitterX[I];
|
DDest.SplitterX[I] := SplitterX[I];
|
||||||
DDest.ShowInfoBox := ShowInfoBox;
|
DDest.ShowInfoBox := ShowInfoBox;
|
||||||
DDest.ComponentTreeHeight := ComponentTreeHeight;
|
DDest.ComponentTreeHeight := ComponentTreeHeight;
|
||||||
|
DDest.ShowComponentTree := ShowComponentTree;
|
||||||
DDest.InfoBoxHeight := InfoBoxHeight;
|
DDest.InfoBoxHeight := InfoBoxHeight;
|
||||||
end else
|
end else
|
||||||
inherited AssignTo(Dest);
|
inherited AssignTo(Dest);
|
||||||
@ -1125,6 +1128,7 @@ begin
|
|||||||
|
|
||||||
ShowInfoBox := o.ShowInfoBox;
|
ShowInfoBox := o.ShowInfoBox;
|
||||||
ComponentTreeHeight := o.ComponentTreeHeight;
|
ComponentTreeHeight := o.ComponentTreeHeight;
|
||||||
|
ShowComponentTree := o.ShowComponentTree;
|
||||||
InfoBoxHeight := o.InfoBoxHeight;
|
InfoBoxHeight := o.InfoBoxHeight;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1132,24 +1136,26 @@ procedure TDesktopOIOptions.Load(XMLConfig: TXMLConfig; Path: String);
|
|||||||
var
|
var
|
||||||
I: TObjectInspectorPage;
|
I: TObjectInspectorPage;
|
||||||
begin
|
begin
|
||||||
Path := Path + 'ObjectInspector';
|
Path := Path + 'ObjectInspectorOptions/';
|
||||||
for I in TObjectInspectorPage do
|
for I in TObjectInspectorPage do
|
||||||
FSplitterX[I] := XMLConfig.GetValue(Path+'SplitterX/'+DefaultOIPageNames[I]+'/Value',-1);
|
FSplitterX[I] := XMLConfig.GetValue(Path+'SplitterX/'+DefaultOIPageNames[I]+'/Value',-1);
|
||||||
ShowInfoBox := XMLConfig.GetValue(Path+'ShowInfoBox/Value',True);
|
ShowComponentTree := XMLConfig.GetValue(Path+'ComponentTree/Show/Value',True);
|
||||||
ComponentTreeHeight := XMLConfig.GetValue(Path+'ComponentTreeHeight/Value',-1);
|
ComponentTreeHeight := XMLConfig.GetValue(Path+'ComponentTree/Height/Value',-1);
|
||||||
InfoBoxHeight := XMLConfig.GetValue(Path+'InfoBoxHeight/Value',-1);
|
ShowInfoBox := XMLConfig.GetValue(Path+'InfoBox/Show/Value',True);
|
||||||
|
InfoBoxHeight := XMLConfig.GetValue(Path+'InfoBox/Height/Value',-1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDesktopOIOptions.Save(XMLConfig: TXMLConfig; Path: String);
|
procedure TDesktopOIOptions.Save(XMLConfig: TXMLConfig; Path: String);
|
||||||
var
|
var
|
||||||
I: TObjectInspectorPage;
|
I: TObjectInspectorPage;
|
||||||
begin
|
begin
|
||||||
Path := Path + 'ObjectInspector';
|
Path := Path + 'ObjectInspectorOptions/';
|
||||||
for I in TObjectInspectorPage do
|
for I in TObjectInspectorPage do
|
||||||
XMLConfig.SetDeleteValue(Path+'SplitterX/'+DefaultOIPageNames[I]+'/Value',FSplitterX[I],-1);
|
XMLConfig.SetDeleteValue(Path+'SplitterX/'+DefaultOIPageNames[I]+'/Value',FSplitterX[I],-1);
|
||||||
XMLConfig.SetDeleteValue(Path+'ShowInfoBox/Value',ShowInfoBox,True);
|
XMLConfig.SetDeleteValue(Path+'ComponentTree/Show/Value',ShowComponentTree,True);
|
||||||
XMLConfig.SetDeleteValue(Path+'ComponentTreeHeight/Value',ComponentTreeHeight,-1);
|
XMLConfig.SetDeleteValue(Path+'ComponentTree/Height/Value',ComponentTreeHeight,-1);
|
||||||
XMLConfig.SetDeleteValue(Path+'InfoBoxHeight/Value',InfoBoxHeight,-1);
|
XMLConfig.SetDeleteValue(Path+'InfoBox/Show/Value',ShowInfoBox,True);
|
||||||
|
XMLConfig.SetDeleteValue(Path+'InfoBox/Height/Value',InfoBoxHeight,-1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDesktopOIOptions.SetSplitterX(const APage: TObjectInspectorPage;
|
procedure TDesktopOIOptions.SetSplitterX(const APage: TObjectInspectorPage;
|
||||||
@ -1170,6 +1176,7 @@ begin
|
|||||||
o.GridSplitterX[I] := Max(10, FSplitterX[I]);
|
o.GridSplitterX[I] := Max(10, FSplitterX[I]);
|
||||||
|
|
||||||
o.ShowInfoBox := ShowInfoBox;
|
o.ShowInfoBox := ShowInfoBox;
|
||||||
|
o.ShowComponentTree := ShowComponentTree;
|
||||||
if ComponentTreeHeight>=0 then
|
if ComponentTreeHeight>=0 then
|
||||||
o.ComponentTreeHeight := Max(10, ComponentTreeHeight);
|
o.ComponentTreeHeight := Max(10, ComponentTreeHeight);
|
||||||
if InfoBoxHeight>=0 then
|
if InfoBoxHeight>=0 then
|
||||||
@ -1478,8 +1485,8 @@ begin
|
|||||||
FIDETitleIncludesBuildMode:=FXMLCfg.GetValue(Path+'IDETitleIncludesBuildMode/Value',false);
|
FIDETitleIncludesBuildMode:=FXMLCfg.GetValue(Path+'IDETitleIncludesBuildMode/Value',false);
|
||||||
FIDEProjectDirectoryInIdeTitle:=FXMLCfg.GetValue(Path+'IDEProjectDirectoryInIdeTitle/Value',false);
|
FIDEProjectDirectoryInIdeTitle:=FXMLCfg.GetValue(Path+'IDEProjectDirectoryInIdeTitle/Value',false);
|
||||||
// CompletionWindow
|
// CompletionWindow
|
||||||
FCompletionWindowWidth:=FXMLCfg.GetValue(Path+'CompletionWindowWidth/Value', FCompletionWindowWidth);
|
FCompletionWindowWidth:=FXMLCfg.GetValue(Path+'CompletionWindowOptions/Width/Value', FCompletionWindowWidth);
|
||||||
FCompletionWindowHeight:=FXMLCfg.GetValue(Path+'CompletionWindowHeight/Value', 6);
|
FCompletionWindowHeight:=FXMLCfg.GetValue(Path+'CompletionWindowOptions/Height/Value', 6);
|
||||||
|
|
||||||
if not FXMLCfg.HasPath(Path+'IDECoolBarOptions/', True) then
|
if not FXMLCfg.HasPath(Path+'IDECoolBarOptions/', True) then
|
||||||
Path := ''; // Toolbars and palette were at the top level in XML.
|
Path := ''; // Toolbars and palette were at the top level in XML.
|
||||||
@ -1540,8 +1547,8 @@ begin
|
|||||||
FXMLCfg.SetDeleteValue(Path+'IDETitleIncludesBuildMode/Value',FIDETitleIncludesBuildMode,false);
|
FXMLCfg.SetDeleteValue(Path+'IDETitleIncludesBuildMode/Value',FIDETitleIncludesBuildMode,false);
|
||||||
FXMLCfg.SetDeleteValue(Path+'IDEProjectDirectoryInIdeTitle/Value',FIDEProjectDirectoryInIdeTitle,false);
|
FXMLCfg.SetDeleteValue(Path+'IDEProjectDirectoryInIdeTitle/Value',FIDEProjectDirectoryInIdeTitle,false);
|
||||||
// CompletionWindow
|
// CompletionWindow
|
||||||
FXMLCfg.SetValue(Path+'CompletionWindowWidth/Value',FCompletionWindowWidth);
|
FXMLCfg.SetValue(Path+'CompletionWindowOptions/Width/Value',FCompletionWindowWidth);
|
||||||
FXMLCfg.SetDeleteValue(Path+'CompletionWindowHeight/Value',FCompletionWindowHeight, 6);
|
FXMLCfg.SetDeleteValue(Path+'CompletionWindowOptions/Height/Value',FCompletionWindowHeight, 6);
|
||||||
// IDE Coolbar
|
// IDE Coolbar
|
||||||
FIDECoolBarOptions.Save(FXMLCfg, Path);
|
FIDECoolBarOptions.Save(FXMLCfg, Path);
|
||||||
// Editor Toolbar
|
// Editor Toolbar
|
||||||
|
Loading…
Reference in New Issue
Block a user