mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 18:16:02 +02:00
ide: editor general mist: don't rely on captions since they can change after language switch (issue #0015559)
git-svn-id: trunk@23597 -
This commit is contained in:
parent
3f076b14b9
commit
265891c7da
@ -3,7 +3,6 @@ inherited EditorGeneralMiscOptionsFrame: TEditorGeneralMiscOptionsFrame
|
|||||||
Width = 459
|
Width = 459
|
||||||
ClientHeight = 186
|
ClientHeight = 186
|
||||||
ClientWidth = 459
|
ClientWidth = 459
|
||||||
TabOrder = 0
|
|
||||||
Visible = False
|
Visible = False
|
||||||
DesignLeft = 138
|
DesignLeft = 138
|
||||||
DesignTop = 138
|
DesignTop = 138
|
||||||
@ -13,9 +12,9 @@ inherited EditorGeneralMiscOptionsFrame: TEditorGeneralMiscOptionsFrame
|
|||||||
AnchorSideTop.Control = EditorTrimSpaceTypeCheckBox
|
AnchorSideTop.Control = EditorTrimSpaceTypeCheckBox
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 156
|
Left = 156
|
||||||
Height = 16
|
Height = 14
|
||||||
Top = 160
|
Top = 161
|
||||||
Width = 142
|
Width = 127
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
Caption = 'EditorTrimSpaceTypeLabel'
|
Caption = 'EditorTrimSpaceTypeLabel'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -45,7 +44,6 @@ inherited EditorGeneralMiscOptionsFrame: TEditorGeneralMiscOptionsFrame
|
|||||||
ChildSizing.ControlsPerLine = 1
|
ChildSizing.ControlsPerLine = 1
|
||||||
ColumnLayout = clVerticalThenHorizontal
|
ColumnLayout = clVerticalThenHorizontal
|
||||||
Columns = 2
|
Columns = 2
|
||||||
Ctl3D = False
|
|
||||||
OnItemClick = EditorOptionsGroupBoxItemClick
|
OnItemClick = EditorOptionsGroupBoxItemClick
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
@ -57,11 +55,8 @@ inherited EditorGeneralMiscOptionsFrame: TEditorGeneralMiscOptionsFrame
|
|||||||
Height = 21
|
Height = 21
|
||||||
Top = 158
|
Top = 158
|
||||||
Width = 150
|
Width = 150
|
||||||
AutoComplete = False
|
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Ctl3D = False
|
|
||||||
ItemHeight = 13
|
ItemHeight = 13
|
||||||
ItemWidth = 0
|
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
|
@ -90,13 +90,13 @@ begin
|
|||||||
begin
|
begin
|
||||||
with EditorOptionsGroupBox do
|
with EditorOptionsGroupBox do
|
||||||
begin
|
begin
|
||||||
Checked[Items.IndexOf(lisShowSpecialCharacters)] := eoShowSpecialChars in SynEditOptions;
|
Checked[0] := eoShowSpecialChars in SynEditOptions;
|
||||||
Checked[Items.IndexOf(dlgTrimTrailingSpaces)] := eoTrimTrailingSpaces in SynEditOptions;
|
Checked[1] := eoTrimTrailingSpaces in SynEditOptions;
|
||||||
Checked[Items.IndexOf(dlgCloseButtonsNotebook)] := ShowTabCloseButtons;
|
Checked[2] := ShowTabCloseButtons;
|
||||||
//Checked[Items.IndexOf(dlgShowGutterHints)] := ShowGutterHints;
|
//Checked[Items.IndexOf(dlgShowGutterHints)] := ShowGutterHints;
|
||||||
Checked[Items.IndexOf(dlgFindTextatCursor)] := FindTextAtCursor;
|
Checked[3] := FindTextAtCursor;
|
||||||
Checked[Items.IndexOf(dlgCopyWordAtCursorOnCopyNone)] := CopyWordAtCursorOnCopyNone;
|
Checked[4] := CopyWordAtCursorOnCopyNone;
|
||||||
Checked[Items.IndexOf(dlgCopyPasteKeepFolds)] := eoFoldedCopyPaste in SynEditOptions2;
|
Checked[5] := eoFoldedCopyPaste in SynEditOptions2;
|
||||||
end;
|
end;
|
||||||
EditorTrimSpaceTypeCheckBox.ItemIndex := ord(TrimSpaceType);
|
EditorTrimSpaceTypeCheckBox.ItemIndex := ord(TrimSpaceType);
|
||||||
end;
|
end;
|
||||||
@ -112,30 +112,20 @@ procedure TEditorGeneralMiscOptionsFrame.WriteSettings(AOptions: TAbstractIDEOpt
|
|||||||
TEditorOptions(AOptions).SynEditOptions := TEditorOptions(AOptions).SynEditOptions - [AnOption];
|
TEditorOptions(AOptions).SynEditOptions := TEditorOptions(AOptions).SynEditOptions - [AnOption];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure UpdateOption(const CheckBoxName: String; AnOption: TSynEditorOption);
|
|
||||||
var
|
|
||||||
i: integer;
|
|
||||||
begin
|
|
||||||
i := EditorOptionsGroupBox.Items.IndexOf(CheckBoxName);
|
|
||||||
UpdateOptionFromBool(EditorOptionsGroupBox.Checked[i], AnOption);
|
|
||||||
end;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
with AOptions as TEditorOptions do
|
with AOptions as TEditorOptions do
|
||||||
begin
|
begin
|
||||||
UpdateOption(lisShowSpecialCharacters, eoShowSpecialChars);
|
UpdateOptionFromBool(EditorOptionsGroupBox.Checked[0], eoShowSpecialChars);
|
||||||
UpdateOption(dlgTrimTrailingSpaces, eoTrimTrailingSpaces);
|
UpdateOptionFromBool(EditorOptionsGroupBox.Checked[1], eoTrimTrailingSpaces);
|
||||||
ShowTabCloseButtons := CheckGroupItemChecked(EditorOptionsGroupBox, dlgCloseButtonsNotebook);
|
ShowTabCloseButtons := EditorOptionsGroupBox.Checked[2];
|
||||||
CopyWordAtCursorOnCopyNone := CheckGroupItemChecked(EditorOptionsGroupBox, dlgCopyWordAtCursorOnCopyNone);
|
|
||||||
//ShowGutterHints := CheckGroupItemChecked(EditorOptionsGroupBox, dlgShowGutterHints);
|
//ShowGutterHints := CheckGroupItemChecked(EditorOptionsGroupBox, dlgShowGutterHints);
|
||||||
FindTextAtCursor := CheckGroupItemChecked(EditorOptionsGroupBox, dlgFindTextatCursor);
|
FindTextAtCursor := EditorOptionsGroupBox.Checked[3];
|
||||||
TrimSpaceType := TSynEditStringTrimmingType(EditorTrimSpaceTypeCheckBox.ItemIndex);
|
CopyWordAtCursorOnCopyNone := EditorOptionsGroupBox.Checked[4];
|
||||||
if EditorOptionsGroupBox.Checked[EditorOptionsGroupBox.Items.IndexOf
|
if EditorOptionsGroupBox.Checked[5] then
|
||||||
(dlgCopyPasteKeepFolds)]
|
|
||||||
then
|
|
||||||
SynEditOptions2 := SynEditOptions2 + [eoFoldedCopyPaste]
|
SynEditOptions2 := SynEditOptions2 + [eoFoldedCopyPaste]
|
||||||
else
|
else
|
||||||
SynEditOptions2 := SynEditOptions2 - [eoFoldedCopyPaste];
|
SynEditOptions2 := SynEditOptions2 - [eoFoldedCopyPaste];
|
||||||
|
TrimSpaceType := TSynEditStringTrimmingType(EditorTrimSpaceTypeCheckBox.ItemIndex);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user