mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 14:58:13 +02:00
Merge branch 'lazarus-AddOptionToHideProjectInspectorProps'
This commit is contained in:
commit
4f3fe4bcd2
@ -480,6 +480,7 @@ type
|
||||
FHideIDEOnRun: boolean;
|
||||
FAutoAdjustIDEHeight: boolean;
|
||||
FAutoAdjustIDEHeightFullCompPal: boolean;
|
||||
FProjectInspectorShowProps: boolean;
|
||||
// window menu
|
||||
FIDENameForDesignedFormList: boolean;
|
||||
// CompletionWindow
|
||||
@ -535,6 +536,8 @@ type
|
||||
property EditorToolBarOptions: TEditorToolBarOptions read FEditorToolBarOptions;
|
||||
property ComponentPaletteOptions: TCompPaletteOptions read FComponentPaletteOptions;
|
||||
property ObjectInspectorOptions: TDesktopOIOptions read FObjectInspectorOptions;
|
||||
property ProjectInspectorShowProps: boolean read FProjectInspectorShowProps
|
||||
write FProjectInspectorShowProps;
|
||||
end;
|
||||
|
||||
{ TUnsupportedDesktopOpt }
|
||||
@ -2044,6 +2047,8 @@ begin
|
||||
FComponentPaletteOptions:=TCompPaletteOptions.Create;
|
||||
// object inspector
|
||||
FObjectInspectorOptions:=TDesktopOIOptions.Create;
|
||||
// project inspector
|
||||
FProjectInspectorShowProps := true;
|
||||
// Windows layout
|
||||
InitLayoutList;
|
||||
|
||||
@ -2109,6 +2114,8 @@ begin
|
||||
FComponentPaletteOptions.Assign(Source.FComponentPaletteOptions);
|
||||
// object inspector
|
||||
FObjectInspectorOptions.Assign(Source.FObjectInspectorOptions);
|
||||
// project inspector
|
||||
FProjectInspectorShowProps := Source.FProjectInspectorShowProps;
|
||||
|
||||
if IsCompatible and Assigned(FDockedOpt) then
|
||||
FDockedOpt.Assign(Source.FDockedOpt);
|
||||
@ -2135,6 +2142,8 @@ begin
|
||||
// CompletionWindow
|
||||
FCompletionWindowWidth:=FXMLCfg.GetValue(Path+'CompletionWindowOptions/Width/Value', FCompletionWindowWidth);
|
||||
FCompletionWindowHeight:=FXMLCfg.GetValue(Path+'CompletionWindowOptions/Height/Value', 6);
|
||||
// Project Inspector
|
||||
FProjectInspectorShowProps := FXMLCfg.GetValue(Path+'ProjectInspectorShowProps/Value', true);
|
||||
|
||||
if not FXMLCfg.HasPath(Path+'IDECoolBarOptions/', True) then
|
||||
Path := ''; // Toolbars and palette were at the top level in XML.
|
||||
@ -2197,6 +2206,8 @@ begin
|
||||
// CompletionWindow
|
||||
FXMLCfg.SetValue(Path+'CompletionWindowOptions/Width/Value',FCompletionWindowWidth);
|
||||
FXMLCfg.SetDeleteValue(Path+'CompletionWindowOptions/Height/Value',FCompletionWindowHeight, 6);
|
||||
// Project Inspector
|
||||
FXMLCfg.SetDeleteValue(Path+'ProjectInspectorShowProps/Value', FProjectInspectorShowProps, true);
|
||||
// IDE Coolbar
|
||||
FIDECoolBarOptions.Save(FXMLCfg, Path);
|
||||
// Editor Toolbar
|
||||
|
@ -129,4 +129,17 @@ object WindowOptionsFrame: TWindowOptionsFrame
|
||||
ShowHint = True
|
||||
TabOrder = 7
|
||||
end
|
||||
object ProjectInspectorShowPropsCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = AutoAdjustIDEHeightFullCompPalCheckBox
|
||||
AnchorSideTop.Control = AutoAdjustIDEHeightFullCompPalCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 24
|
||||
Top = 211
|
||||
Width = 295
|
||||
Caption = 'ProjectInspectorShowPropsCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 8
|
||||
end
|
||||
end
|
||||
|
@ -40,6 +40,7 @@ type
|
||||
|
||||
TWindowOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
AutoAdjustIDEHeightFullCompPalCheckBox: TCheckBox;
|
||||
ProjectInspectorShowPropsCheckBox: TCheckBox;
|
||||
lblShowingWindows: TDividerBevel;
|
||||
NameForDesignedFormList: TCheckBox;
|
||||
AutoAdjustIDEHeightCheckBox: TCheckBox;
|
||||
@ -89,6 +90,8 @@ begin
|
||||
AutoAdjustIDEHeightFullCompPalCheckBox.Hint:=lisAutoAdjustIDEHeightFullComponentPaletteHint;
|
||||
ProjectDirInIdeTitleCheckBox.Caption:=lisIDETitleShowsProjectDir;
|
||||
ProjectDirInIdeTitleCheckBox.Hint:=lisProjectDirectoryIsShowedInIdeTitleBar;
|
||||
ProjectInspectorShowPropsCheckBox.Caption:=lisProjectInspectorShowProps;
|
||||
ProjectInspectorShowPropsCheckBox.Hint:=lisProjectInspectorShowPropsHint;
|
||||
end;
|
||||
|
||||
procedure TWindowOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
@ -104,6 +107,7 @@ begin
|
||||
AutoAdjustIDEHeightCheckBox.Checked:=AutoAdjustIDEHeight;
|
||||
AutoAdjustIDEHeightFullCompPalCheckBox.Checked:=AutoAdjustIDEHeightFullCompPal;
|
||||
ProjectDirInIdeTitleCheckBox.Checked:=IDEProjectDirectoryInIdeTitle;
|
||||
ProjectInspectorShowPropsCheckBox.Checked:=ProjectInspectorShowProps;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -120,6 +124,7 @@ begin
|
||||
AutoAdjustIDEHeight := AutoAdjustIDEHeightCheckBox.Checked;
|
||||
AutoAdjustIDEHeightFullCompPal := AutoAdjustIDEHeightFullCompPalCheckBox.Checked;
|
||||
IDEProjectDirectoryInIdeTitle:=ProjectDirInIdeTitleCheckBox.Checked;
|
||||
ProjectInspectorShowProps:=ProjectInspectorShowPropsCheckBox.Checked;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -1426,6 +1426,8 @@ resourcestring
|
||||
lisAutoAdjustIDEHeightFullComponentPalette = 'Show complete component palette';
|
||||
lisAutoAdjustIDEHeightFullComponentPaletteHint =
|
||||
'If component palette spans over more lines, show them all and not only one.';
|
||||
lisProjectInspectorShowProps = 'Show properties in Project Inspector';
|
||||
lisProjectInspectorShowPropsHint = 'Properties are in the lower pane';
|
||||
lisWindowMenuWithNameForDesignedForm = 'Window menu shows designed form''s name instead of caption';
|
||||
lisWindowMenuWithNameForDesignedFormHint = 'Useful especially if the caption is left empty.';
|
||||
lisTitleInTaskbarShowsForExampleProject1LpiLazarus = 'Title in taskbar '
|
||||
|
@ -208,6 +208,7 @@ type
|
||||
function CreateToolButton(AName, ACaption, AHint, AImageName: String;
|
||||
AOnClick: TNotifyEvent): TToolButton;
|
||||
function CreateDivider: TToolButton;
|
||||
procedure OptionsChanged(Sender: TObject; {%H-}Restore: boolean);
|
||||
procedure SetDependencyDefaultFilename(AsPreferred: boolean);
|
||||
procedure SetIdleConnected(AValue: boolean);
|
||||
procedure SetLazProject(const AValue: TProject);
|
||||
@ -1297,6 +1298,12 @@ begin
|
||||
Result.Parent := ToolBar;
|
||||
end;
|
||||
|
||||
procedure TProjectInspectorForm.OptionsChanged(Sender: TObject; Restore: boolean);
|
||||
begin
|
||||
PropsGroupBox.Visible := EnvironmentOptions.Desktop.ProjectInspectorShowProps;
|
||||
Splitter1.Visible := PropsGroupBox.Visible;
|
||||
end;
|
||||
|
||||
procedure TProjectInspectorForm.SetupComponents;
|
||||
begin
|
||||
ImageIndexFiles := IDEImages.LoadImage('pkg_files');
|
||||
@ -1341,6 +1348,9 @@ begin
|
||||
FDependenciesNode.ImageIndex:=FPropGui.ImageIndexRequired;
|
||||
FDependenciesNode.SelectedIndex:=FDependenciesNode.ImageIndex;
|
||||
end;
|
||||
|
||||
EnvironmentOptions.AddHandlerAfterWrite(@OptionsChanged);
|
||||
OptionsChanged(Nil, False);
|
||||
end;
|
||||
|
||||
function TProjectInspectorForm.TreeViewGetImageIndex(Str: String; Data: TObject;
|
||||
@ -1704,16 +1714,16 @@ end;
|
||||
procedure TProjectInspectorForm.UpdateProperties(Immediately: boolean);
|
||||
var
|
||||
CurDependency, SingleSelectedDep: TPkgDependency;
|
||||
TVNode, SingleSelectedDirectory: TTreeNode;
|
||||
TVNode, DepHeaderNode, SingleSelectedDirectory: TTreeNode;
|
||||
NodeData: TPENodeData;
|
||||
Item: TObject;
|
||||
i, SelFileCount, SelDepCount, SelUnitCount, SelDirCount: Integer;
|
||||
SingleSelectedRemoved: Boolean;
|
||||
begin
|
||||
if not CanUpdate(pefNeedUpdateProperties,Immediately) then exit;
|
||||
//GuiToFileOptions(False);
|
||||
|
||||
// check selection
|
||||
DepHeaderNode:=nil;
|
||||
SingleSelectedDep:=nil;
|
||||
SingleSelectedDirectory:=nil;
|
||||
SingleSelectedRemoved:=false;
|
||||
@ -1735,11 +1745,11 @@ begin
|
||||
SingleSelectedDep:=CurDependency;
|
||||
SingleSelectedRemoved:=NodeData.Removed;
|
||||
end;
|
||||
end else if IsDirectoryNode(TVNode) or (TVNode=FFilesNode) then begin
|
||||
end else if IsDirectoryNode(TVNode) then begin
|
||||
inc(SelDirCount);
|
||||
SingleSelectedDirectory:=TVNode;
|
||||
end //else if TVNode=FRequiredPackagesNode then
|
||||
// DebugLn('UpdatePEProperties: Required packages selected');
|
||||
end else if TVNode=FDependenciesNode then
|
||||
DepHeaderNode:=TVNode;
|
||||
end;
|
||||
|
||||
if (SelFileCount+SelDepCount+SelDirCount>1) then begin
|
||||
@ -1768,12 +1778,15 @@ begin
|
||||
FPropGui.UpdateApplyDependencyButton;
|
||||
end
|
||||
else if SingleSelectedDirectory<>nil then begin
|
||||
//PropsGroupBox.Enabled:=true;
|
||||
//PropsGroupBox.Caption:=lisPckEditFileProperties;
|
||||
PropsGroupBox.Enabled:=true;
|
||||
PropsGroupBox.Caption:=lisPckEditFileProperties;
|
||||
end
|
||||
else begin
|
||||
PropsGroupBox.Enabled:=false;
|
||||
PropsGroupBox.Caption:=lisPckEditDependencyProperties;
|
||||
if Assigned(DepHeaderNode) then
|
||||
PropsGroupBox.Caption:=lisPckEditDependencyProperties
|
||||
else
|
||||
PropsGroupBox.Caption:=lisPckEditFileProperties;
|
||||
end;
|
||||
finally
|
||||
EnableAlign;
|
||||
|
Loading…
Reference in New Issue
Block a user