mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 18:53:28 +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
|
||||
ClientHeight = 186
|
||||
ClientWidth = 459
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
DesignLeft = 138
|
||||
DesignTop = 138
|
||||
@ -13,9 +12,9 @@ inherited EditorGeneralMiscOptionsFrame: TEditorGeneralMiscOptionsFrame
|
||||
AnchorSideTop.Control = EditorTrimSpaceTypeCheckBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 156
|
||||
Height = 16
|
||||
Top = 160
|
||||
Width = 142
|
||||
Height = 14
|
||||
Top = 161
|
||||
Width = 127
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'EditorTrimSpaceTypeLabel'
|
||||
ParentColor = False
|
||||
@ -45,7 +44,6 @@ inherited EditorGeneralMiscOptionsFrame: TEditorGeneralMiscOptionsFrame
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ColumnLayout = clVerticalThenHorizontal
|
||||
Columns = 2
|
||||
Ctl3D = False
|
||||
OnItemClick = EditorOptionsGroupBoxItemClick
|
||||
TabOrder = 0
|
||||
end
|
||||
@ -57,11 +55,8 @@ inherited EditorGeneralMiscOptionsFrame: TEditorGeneralMiscOptionsFrame
|
||||
Height = 21
|
||||
Top = 158
|
||||
Width = 150
|
||||
AutoComplete = False
|
||||
BorderSpacing.Top = 6
|
||||
Ctl3D = False
|
||||
ItemHeight = 13
|
||||
ItemWidth = 0
|
||||
Style = csDropDownList
|
||||
TabOrder = 1
|
||||
end
|
||||
|
@ -90,15 +90,15 @@ begin
|
||||
begin
|
||||
with EditorOptionsGroupBox do
|
||||
begin
|
||||
Checked[Items.IndexOf(lisShowSpecialCharacters)] := eoShowSpecialChars in SynEditOptions;
|
||||
Checked[Items.IndexOf(dlgTrimTrailingSpaces)] := eoTrimTrailingSpaces in SynEditOptions;
|
||||
Checked[Items.IndexOf(dlgCloseButtonsNotebook)] := ShowTabCloseButtons;
|
||||
Checked[0] := eoShowSpecialChars in SynEditOptions;
|
||||
Checked[1] := eoTrimTrailingSpaces in SynEditOptions;
|
||||
Checked[2] := ShowTabCloseButtons;
|
||||
//Checked[Items.IndexOf(dlgShowGutterHints)] := ShowGutterHints;
|
||||
Checked[Items.IndexOf(dlgFindTextatCursor)] := FindTextAtCursor;
|
||||
Checked[Items.IndexOf(dlgCopyWordAtCursorOnCopyNone)] := CopyWordAtCursorOnCopyNone;
|
||||
Checked[Items.IndexOf(dlgCopyPasteKeepFolds)] := eoFoldedCopyPaste in SynEditOptions2;
|
||||
Checked[3] := FindTextAtCursor;
|
||||
Checked[4] := CopyWordAtCursorOnCopyNone;
|
||||
Checked[5] := eoFoldedCopyPaste in SynEditOptions2;
|
||||
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];
|
||||
end;
|
||||
|
||||
procedure UpdateOption(const CheckBoxName: String; AnOption: TSynEditorOption);
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
i := EditorOptionsGroupBox.Items.IndexOf(CheckBoxName);
|
||||
UpdateOptionFromBool(EditorOptionsGroupBox.Checked[i], AnOption);
|
||||
end;
|
||||
|
||||
begin
|
||||
with AOptions as TEditorOptions do
|
||||
begin
|
||||
UpdateOption(lisShowSpecialCharacters, eoShowSpecialChars);
|
||||
UpdateOption(dlgTrimTrailingSpaces, eoTrimTrailingSpaces);
|
||||
ShowTabCloseButtons := CheckGroupItemChecked(EditorOptionsGroupBox, dlgCloseButtonsNotebook);
|
||||
CopyWordAtCursorOnCopyNone := CheckGroupItemChecked(EditorOptionsGroupBox, dlgCopyWordAtCursorOnCopyNone);
|
||||
UpdateOptionFromBool(EditorOptionsGroupBox.Checked[0], eoShowSpecialChars);
|
||||
UpdateOptionFromBool(EditorOptionsGroupBox.Checked[1], eoTrimTrailingSpaces);
|
||||
ShowTabCloseButtons := EditorOptionsGroupBox.Checked[2];
|
||||
//ShowGutterHints := CheckGroupItemChecked(EditorOptionsGroupBox, dlgShowGutterHints);
|
||||
FindTextAtCursor := CheckGroupItemChecked(EditorOptionsGroupBox, dlgFindTextatCursor);
|
||||
TrimSpaceType := TSynEditStringTrimmingType(EditorTrimSpaceTypeCheckBox.ItemIndex);
|
||||
if EditorOptionsGroupBox.Checked[EditorOptionsGroupBox.Items.IndexOf
|
||||
(dlgCopyPasteKeepFolds)]
|
||||
then
|
||||
FindTextAtCursor := EditorOptionsGroupBox.Checked[3];
|
||||
CopyWordAtCursorOnCopyNone := EditorOptionsGroupBox.Checked[4];
|
||||
if EditorOptionsGroupBox.Checked[5] then
|
||||
SynEditOptions2 := SynEditOptions2 + [eoFoldedCopyPaste]
|
||||
else
|
||||
SynEditOptions2 := SynEditOptions2 - [eoFoldedCopyPaste];
|
||||
TrimSpaceType := TSynEditStringTrimmingType(EditorTrimSpaceTypeCheckBox.ItemIndex);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user