mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 23:38:02 +02:00
IDE: partially revert r50517 #d696ee5a59
git-svn-id: trunk@50520 -
This commit is contained in:
parent
2a47550bba
commit
19206bce93
@ -148,12 +148,6 @@ type
|
||||
procedure RemoveHandlerAddToRecentProjectFiles(Handler: TOnAddToRecent);
|
||||
procedure AddHandlerAddToRecentPackageFiles(Handler: TOnAddToRecent; const AsFirst: boolean = true); // AsFirst means: first to call
|
||||
procedure RemoveHandlerAddToRecentPackageFiles(Handler: TOnAddToRecent);
|
||||
protected
|
||||
function GetUseDoubleClickToCloseTabs: Boolean; virtual; abstract;
|
||||
public
|
||||
// read-only access to options needed by external packages.
|
||||
// feel free to extend when needed
|
||||
property UseDoubleClickToCloseTabs: Boolean read GetUseDoubleClickToCloseTabs;
|
||||
end;
|
||||
|
||||
TIDEEditorOptions = class(TAbstractIDEEnvironmentOptions)
|
||||
|
@ -393,9 +393,6 @@ type
|
||||
FShowButtonGlyphs: TApplicationShowGlyphs;
|
||||
FShowMenuGlyphs: TApplicationShowGlyphs;
|
||||
|
||||
// global tabs
|
||||
FUseDoubleClickToCloseTabs: boolean;
|
||||
|
||||
// auto save
|
||||
FAutoSaveEditorFiles: boolean;
|
||||
FAutoSaveProject: boolean;
|
||||
@ -575,8 +572,6 @@ type
|
||||
procedure InitXMLCfg(CleanConfig: boolean);
|
||||
procedure FileUpdated;
|
||||
procedure SetTestBuildDirectory(const AValue: string);
|
||||
protected
|
||||
function GetUseDoubleClickToCloseTabs: Boolean; override;
|
||||
public
|
||||
class function GetGroupCaption:string; override;
|
||||
class function GetInstance: TAbstractIDEOptions; override;
|
||||
@ -817,10 +812,6 @@ type
|
||||
property MsgColors[u: TMessageLineUrgency]: TColor read GetMsgColors write SetMsgColors;
|
||||
property MsgViewShowFPCMsgLinesCompiled: Boolean read FMsgViewShowFPCMsgLinesCompiled write FMsgViewShowFPCMsgLinesCompiled;
|
||||
|
||||
//global tab handling
|
||||
property UseDoubleClickToCloseTabs: Boolean
|
||||
read FUseDoubleClickToCloseTabs write FUseDoubleClickToCloseTabs;
|
||||
|
||||
// glyphs
|
||||
property ShowButtonGlyphs: TApplicationShowGlyphs read FShowButtonGlyphs write FShowButtonGlyphs;
|
||||
property ShowMenuGlyphs: TApplicationShowGlyphs read FShowMenuGlyphs write FShowMenuGlyphs;
|
||||
@ -1336,9 +1327,6 @@ begin
|
||||
FMsgViewFilters:=TLMsgViewFilters.Create(nil);
|
||||
FMsgViewShowFPCMsgLinesCompiled:=false;
|
||||
|
||||
// global tabs
|
||||
FUseDoubleClickToCloseTabs := False;
|
||||
|
||||
// glyphs
|
||||
FShowButtonGlyphs := sbgSystem;
|
||||
FShowMenuGlyphs := sbgSystem;
|
||||
@ -1757,9 +1745,6 @@ begin
|
||||
MsgViewFilters.LoadFromXMLConfig(FXMLCfg,'MsgView/Filters/');
|
||||
FMsgViewShowFPCMsgLinesCompiled:=FXMLCfg.GetValue(Path+'MsgView/FPCMsg/ShowLinesCompiled',false);
|
||||
|
||||
// global tabs
|
||||
FUseDoubleClickToCloseTabs:=FXMLCfg.GetValue(Path+'UseDoubleClickToCloseTabs/Value',false);
|
||||
|
||||
// glyphs
|
||||
FShowButtonGlyphs := TApplicationShowGlyphs(FXMLCfg.GetValue(Path+'ShowButtonGlyphs/Value',
|
||||
Ord(sbgSystem)));
|
||||
@ -2095,9 +2080,6 @@ begin
|
||||
MsgViewFilters.SaveToXMLConfig(FXMLCfg,'MsgView/Filters/');
|
||||
FXMLCfg.SetDeleteValue(Path+'MsgView/FPCMsg/ShowLinesCompiled',FMsgViewShowFPCMsgLinesCompiled,false);
|
||||
|
||||
// global tabs
|
||||
FXMLCfg.SetDeleteValue(Path+'UseDoubleClickToCloseTabs/Value',FUseDoubleClickToCloseTabs,false);
|
||||
|
||||
// glyphs
|
||||
FXMLCfg.SetDeleteValue(Path+'ShowButtonGlyphs/Value',Ord(FShowButtonGlyphs), Ord(sbgSystem));
|
||||
FXMLCfg.SetDeleteValue(Path+'ShowMenuGlyphs/Value',Ord(FShowMenuGlyphs), Ord(sbgSystem));
|
||||
@ -2770,11 +2752,6 @@ begin
|
||||
Result:=FParseValues[eopTestBuildDirectory].UnparsedValue;
|
||||
end;
|
||||
|
||||
function TEnvironmentOptions.GetUseDoubleClickToCloseTabs: Boolean;
|
||||
begin
|
||||
Result := FUseDoubleClickToCloseTabs;
|
||||
end;
|
||||
|
||||
procedure TEnvironmentOptions.SetDebuggerEventLogColors(AIndex: TDBGEventType; const AValue: TDebuggerEventLogColor);
|
||||
begin
|
||||
FDebuggerEventLogColors[AIndex] := AValue;
|
||||
|
@ -15,7 +15,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 327
|
||||
Top = 308
|
||||
Width = 150
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
@ -30,7 +30,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 185
|
||||
Top = 166
|
||||
Width = 57
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'lblButtons'
|
||||
@ -44,7 +44,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 207
|
||||
Top = 188
|
||||
Width = 50
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'lblMenus'
|
||||
@ -58,13 +58,13 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 245
|
||||
Top = 226
|
||||
Width = 241
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'CheckDiskChangesWithLoadingCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 7
|
||||
TabOrder = 6
|
||||
end
|
||||
object ShowHintsForComponentPaletteCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
@ -72,11 +72,11 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 140
|
||||
Top = 121
|
||||
Width = 246
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'ShowHintsForComponentPaletteCheckBox'
|
||||
TabOrder = 4
|
||||
TabOrder = 3
|
||||
end
|
||||
object ShowHintsForMainSpeedButtonsCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
@ -84,11 +84,11 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 121
|
||||
Top = 102
|
||||
Width = 246
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'ShowHintsForMainSpeedButtonsCheckBox'
|
||||
TabOrder = 3
|
||||
TabOrder = 2
|
||||
end
|
||||
object LanguageComboBox: TComboBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
@ -118,7 +118,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 348
|
||||
Top = 329
|
||||
Width = 584
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
@ -130,7 +130,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
'300'
|
||||
'120'
|
||||
)
|
||||
TabOrder = 11
|
||||
TabOrder = 10
|
||||
Visible = False
|
||||
end
|
||||
object AutoSaveProjectCheckBox: TCheckBox
|
||||
@ -139,14 +139,14 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 302
|
||||
Top = 283
|
||||
Width = 159
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'AutoSaveProjectCheckBox'
|
||||
Enabled = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 10
|
||||
TabOrder = 9
|
||||
Visible = False
|
||||
end
|
||||
object AutoSaveEditorFilesCheckBox: TCheckBox
|
||||
@ -155,14 +155,14 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 283
|
||||
Top = 264
|
||||
Width = 176
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'AutoSaveEditorFilesCheckBox'
|
||||
Enabled = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 9
|
||||
TabOrder = 8
|
||||
Visible = False
|
||||
end
|
||||
object ImportDesktopButton: TButton
|
||||
@ -173,7 +173,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 299
|
||||
Height = 25
|
||||
Top = 395
|
||||
Top = 376
|
||||
Width = 291
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
@ -183,7 +183,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
OnClick = ImportDesktopButtonClick
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 13
|
||||
TabOrder = 12
|
||||
end
|
||||
object ExportDesktopButton: TButton
|
||||
AnchorSideLeft.Control = Owner
|
||||
@ -192,7 +192,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideRight.Control = lblCenter
|
||||
Left = 6
|
||||
Height = 25
|
||||
Top = 395
|
||||
Top = 376
|
||||
Width = 287
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
@ -203,7 +203,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
OnClick = ExportDesktopButtonClick
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 12
|
||||
TabOrder = 11
|
||||
end
|
||||
object PanelGlyphsButtonsOptions: TPanel
|
||||
AnchorSideLeft.Control = lblButtons
|
||||
@ -214,7 +214,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 69
|
||||
Height = 19
|
||||
Top = 183
|
||||
Top = 164
|
||||
Width = 521
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
@ -226,7 +226,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
ChildSizing.ControlsPerLine = 3
|
||||
ClientHeight = 19
|
||||
ClientWidth = 521
|
||||
TabOrder = 5
|
||||
TabOrder = 4
|
||||
object rbBtnGlyphShowSystem: TRadioButton
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
@ -264,7 +264,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 69
|
||||
Height = 19
|
||||
Top = 205
|
||||
Top = 186
|
||||
Width = 521
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
@ -275,7 +275,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
ChildSizing.ControlsPerLine = 3
|
||||
ClientHeight = 19
|
||||
ClientWidth = 521
|
||||
TabOrder = 6
|
||||
TabOrder = 5
|
||||
object rbMenuGlyphShowSystem: TRadioButton
|
||||
AnchorSideRight.Control = PanelGlyphsMenusOptions
|
||||
AnchorSideRight.Side = asrBottom
|
||||
@ -313,7 +313,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 296
|
||||
Height = 5
|
||||
Top = 392
|
||||
Top = 373
|
||||
Width = 5
|
||||
AutoSize = False
|
||||
ParentColor = False
|
||||
@ -324,13 +324,13 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 264
|
||||
Top = 245
|
||||
Width = 190
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'AskSavingOnlySessionCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 8
|
||||
TabOrder = 7
|
||||
end
|
||||
object PreferDoubleClickCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
@ -363,7 +363,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 230
|
||||
Top = 211
|
||||
Width = 597
|
||||
Caption = 'Check and Auto Save Files'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -377,7 +377,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 377
|
||||
Top = 358
|
||||
Width = 597
|
||||
Caption = 'Import / Export'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -391,7 +391,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 165
|
||||
Top = 146
|
||||
Width = 597
|
||||
Caption = 'Show Glyphs for'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -401,11 +401,11 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
ParentFont = False
|
||||
end
|
||||
object lblHints: TDividerBevel
|
||||
AnchorSideTop.Control = PreferDoubleClickCloseTabCheckBox
|
||||
AnchorSideTop.Control = PreferDoubleClickCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 106
|
||||
Top = 87
|
||||
Width = 597
|
||||
Caption = 'Hints'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -428,18 +428,4 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object PreferDoubleClickCloseTabCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = PreferDoubleClickCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 81
|
||||
Width = 216
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'PreferDoubleClickCloseTabCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
||||
|
@ -54,7 +54,6 @@ type
|
||||
ImportDesktopButton: TButton;
|
||||
PanelGlyphsButtonsOptions: TPanel;
|
||||
PanelGlyphsMenusOptions: TPanel;
|
||||
PreferDoubleClickCloseTabCheckBox: TCheckBox;
|
||||
rbMenuGlyphShowAlways: TRadioButton;
|
||||
rbMenuGlyphShowNever: TRadioButton;
|
||||
rbMenuGlyphShowSystem: TRadioButton;
|
||||
@ -118,8 +117,6 @@ begin
|
||||
lblMouseAction.Caption := dlgMouseAction;
|
||||
PreferDoubleClickCheckBox.Caption := dlgPreferDoubleClickOverSingleClick;
|
||||
PreferDoubleClickCheckBox.Hint := dlgCurrentlyRespectedByMessagesWindow;
|
||||
PreferDoubleClickCloseTabCheckBox.Caption := dlgPreferDoubleClickOverMiddleClickToClose;
|
||||
PreferDoubleClickCloseTabCheckBox.Hint := dlgCurrentlyRespectedByNotebookWindow;
|
||||
|
||||
// hints
|
||||
lblHints.Caption := dlgDesktopHints;
|
||||
@ -166,7 +163,6 @@ begin
|
||||
|
||||
// mouse action
|
||||
PreferDoubleClickCheckBox.Checked := MsgViewDblClickJumps;
|
||||
PreferDoubleClickCloseTabCheckBox.Checked := UseDoubleClickToCloseTabs;
|
||||
|
||||
// hints
|
||||
ShowHintsForMainSpeedButtonsCheckBox.Checked:=ShowHintsForMainSpeedButtons;
|
||||
@ -204,7 +200,6 @@ begin
|
||||
|
||||
// mouse action
|
||||
MsgViewDblClickJumps := PreferDoubleClickCheckBox.Checked;
|
||||
UseDoubleClickToCloseTabs := PreferDoubleClickCloseTabCheckBox.Checked;
|
||||
|
||||
// hints
|
||||
ShowHintsForMainSpeedButtons:=ShowHintsForMainSpeedButtonsCheckBox.Checked;
|
||||
|
@ -1279,9 +1279,6 @@ resourcestring
|
||||
dlgPreferDoubleClickOverSingleClick = 'Prefer double-click over single-click';
|
||||
dlgCurrentlyRespectedByMessagesWindow = 'Currently respected by messages window, '
|
||||
+'jump history and search results.';
|
||||
dlgPreferDoubleClickOverMiddleClickToClose = 'Prefer double-click over middle-click when closing tabs';
|
||||
dlgCurrentlyRespectedByNotebookWindow = 'Currently respected by source notebook '
|
||||
+'and search results.';
|
||||
lisExportEnvironmentOptions = 'Export environment options';
|
||||
lisImportEnvironmentOptions = 'Import environment options';
|
||||
|
||||
|
@ -261,7 +261,6 @@ var
|
||||
begin
|
||||
FMaxItems:=50000;
|
||||
ResultsNoteBook.Options:= ResultsNoteBook.Options+[nboShowCloseButtons];
|
||||
ResultsNoteBook.ControlStyle:=ResultsNoteBook.ControlStyle+[csDoubleClicks];
|
||||
ResultsNoteBook.Update;
|
||||
|
||||
Name:=NonModalIDEWindowNames[nmiwSearchResultsViewName];
|
||||
@ -369,9 +368,8 @@ procedure TSearchResultsView.ResultsNoteBookMouseDown(Sender: TObject; Button: T
|
||||
var
|
||||
TabIndex: LongInt;
|
||||
begin
|
||||
if (not EnvironmentOptions.UseDoubleClickToCloseTabs and (Button = mbMiddle))
|
||||
or ( EnvironmentOptions.UseDoubleClickToCloseTabs and (Button = mbLeft) and (ssDouble in Shift))
|
||||
then begin
|
||||
if (Button = mbMiddle) then
|
||||
begin
|
||||
TabIndex := ResultsNoteBook.TabIndexAtClientPos(Point(X,Y));
|
||||
if TabIndex >= 0 then
|
||||
ResultsNoteBookClosetabclicked(ResultsNoteBook.Page[TabIndex]);
|
||||
|
@ -6312,7 +6312,6 @@ Begin
|
||||
ShowTabs := True;
|
||||
if ShowTabs then
|
||||
TabPosition := EditorOpts.TabPosition;
|
||||
ControlStyle := ControlStyle + [csDoubleClicks];
|
||||
OnChange := @NotebookPageChanged;
|
||||
OnCloseTabClicked := @CloseTabClicked;
|
||||
OnMouseDown:=@NotebookMouseDown;
|
||||
@ -8358,9 +8357,8 @@ procedure TSourceNotebook.NotebookMouseDown(Sender: TObject; Button: TMouseButto
|
||||
var
|
||||
TabIndex: Integer;
|
||||
begin
|
||||
if (not EnvironmentOptions.UseDoubleClickToCloseTabs and (Button = mbMiddle))
|
||||
or ( EnvironmentOptions.UseDoubleClickToCloseTabs and (Button = mbLeft) and (ssDouble in Shift))
|
||||
then begin
|
||||
if (Button = mbMiddle) then
|
||||
begin
|
||||
TabIndex:=FNotebook.TabIndexAtClientPos(Point(X,Y));
|
||||
if TabIndex>=0 then
|
||||
CloseClicked(NoteBookPage[TabIndex],
|
||||
|
Loading…
Reference in New Issue
Block a user