mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-08 19:04:07 +01:00
IDE: add option to prefer double-click over middle click when closing tabs.
git-svn-id: trunk@50517 -
This commit is contained in:
parent
d0d57337c3
commit
d696ee5a59
@ -148,6 +148,21 @@ 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)
|
||||
protected
|
||||
function GetTabPosition: TTabPosition; virtual; abstract;
|
||||
public
|
||||
// read-only access to options needed by external packages.
|
||||
// feel free to extend when needed
|
||||
property TabPosition: TTabPosition read GetTabPosition;
|
||||
end;
|
||||
|
||||
TOnLoadIDEOptions = procedure(Sender: TObject; AOptions: TAbstractIDEOptions) of object;
|
||||
@ -267,6 +282,7 @@ function IDEEditorGroups: TIDEOptionsGroupList;
|
||||
|
||||
var
|
||||
IDEEnvironmentOptions: TIDEEnvironmentOptions;
|
||||
IDEEditorOptions: TIDEEditorOptions;
|
||||
|
||||
const
|
||||
// Font style used by filter
|
||||
|
||||
@ -15,7 +15,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, FileUtil, Laz2_XMLCfg, LCLType, Forms, Controls,
|
||||
ComCtrls, Graphics, ProjectIntf, IDECommands;
|
||||
Graphics, ProjectIntf, IDECommands;
|
||||
|
||||
type
|
||||
TSourceMarklingType = (
|
||||
@ -281,7 +281,6 @@ type
|
||||
virtual; abstract;
|
||||
function GetShowTabs: Boolean; virtual; abstract;
|
||||
procedure SetShowTabs(const AShowTabs: Boolean); virtual; abstract;
|
||||
function GetTabPosition: TTabPosition; virtual; abstract;
|
||||
public
|
||||
// List of SourceEditorWindows
|
||||
function SourceWindowWithEditor(const AEditor: TSourceEditorInterface): TSourceEditorWindowInterface;
|
||||
@ -341,7 +340,6 @@ type
|
||||
procedure InvalidateMarklingsOfAllFiles(aProducer: TSourceMarklingProducer); virtual; abstract;
|
||||
procedure InvalidateMarklings(aProducer: TSourceMarklingProducer; aFilename: string); virtual; abstract;
|
||||
property ShowTabs: Boolean read GetShowTabs write SetShowTabs;
|
||||
property TabPosition: TTabPosition read GetTabPosition;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
@ -1294,7 +1294,7 @@ type
|
||||
|
||||
{ TEditorOptions - Editor Options object used to hold the editor options }
|
||||
|
||||
TEditorOptions = class(TAbstractIDEEnvironmentOptions)
|
||||
TEditorOptions = class(TIDEEditorOptions)
|
||||
private
|
||||
FBlockTabIndent: Integer;
|
||||
FCompletionLongLineHintInMSec: Integer;
|
||||
@ -1416,6 +1416,8 @@ type
|
||||
|
||||
FDefaultValues: TEditorOptions;
|
||||
|
||||
protected
|
||||
function GetTabPosition: TTabPosition; override;
|
||||
public
|
||||
class function GetGroupCaption:string; override;
|
||||
class function GetInstance: TAbstractIDEOptions; override;
|
||||
@ -5738,6 +5740,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TEditorOptions.GetTabPosition: TTabPosition;
|
||||
begin
|
||||
Result := fTabPosition;
|
||||
end;
|
||||
|
||||
procedure TEditorOptions.GetSynEditPreviewSettings(APreviewEditor: TObject);
|
||||
// read synedit setings from config file
|
||||
var
|
||||
|
||||
@ -393,6 +393,9 @@ type
|
||||
FShowButtonGlyphs: TApplicationShowGlyphs;
|
||||
FShowMenuGlyphs: TApplicationShowGlyphs;
|
||||
|
||||
// global tabs
|
||||
FUseDoubleClickToCloseTabs: boolean;
|
||||
|
||||
// auto save
|
||||
FAutoSaveEditorFiles: boolean;
|
||||
FAutoSaveProject: boolean;
|
||||
@ -572,6 +575,8 @@ 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;
|
||||
@ -812,6 +817,10 @@ 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;
|
||||
@ -1327,6 +1336,9 @@ begin
|
||||
FMsgViewFilters:=TLMsgViewFilters.Create(nil);
|
||||
FMsgViewShowFPCMsgLinesCompiled:=false;
|
||||
|
||||
// global tabs
|
||||
FUseDoubleClickToCloseTabs := False;
|
||||
|
||||
// glyphs
|
||||
FShowButtonGlyphs := sbgSystem;
|
||||
FShowMenuGlyphs := sbgSystem;
|
||||
@ -1745,6 +1757,9 @@ 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)));
|
||||
@ -2080,6 +2095,9 @@ 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));
|
||||
@ -2752,6 +2770,11 @@ 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;
|
||||
|
||||
@ -14,9 +14,9 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Control = AutoSaveProjectCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 347
|
||||
Width = 164
|
||||
Height = 15
|
||||
Top = 327
|
||||
Width = 150
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'AutoSaveIntervalInSecsLabel'
|
||||
@ -29,9 +29,9 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Control = PanelGlyphsButtonsOptions
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 184
|
||||
Width = 64
|
||||
Height = 15
|
||||
Top = 185
|
||||
Width = 57
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'lblButtons'
|
||||
Font.Style = [fsBold]
|
||||
@ -43,9 +43,9 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Control = PanelGlyphsMenusOptions
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 210
|
||||
Width = 56
|
||||
Height = 15
|
||||
Top = 207
|
||||
Width = 50
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'lblMenus'
|
||||
Font.Style = [fsBold]
|
||||
@ -57,38 +57,38 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Control = lblCheckAndAutoSave
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 253
|
||||
Width = 260
|
||||
Height = 19
|
||||
Top = 245
|
||||
Width = 241
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'CheckDiskChangesWithLoadingCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 0
|
||||
TabOrder = 7
|
||||
end
|
||||
object ShowHintsForComponentPaletteCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = ShowHintsForMainSpeedButtonsCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 133
|
||||
Width = 266
|
||||
Height = 19
|
||||
Top = 140
|
||||
Width = 246
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'ShowHintsForComponentPaletteCheckBox'
|
||||
TabOrder = 1
|
||||
TabOrder = 4
|
||||
end
|
||||
object ShowHintsForMainSpeedButtonsCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = lblHints
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 111
|
||||
Width = 268
|
||||
Height = 19
|
||||
Top = 121
|
||||
Width = 246
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'ShowHintsForMainSpeedButtonsCheckBox'
|
||||
TabOrder = 2
|
||||
TabOrder = 3
|
||||
end
|
||||
object LanguageComboBox: TComboBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
@ -98,17 +98,17 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 20
|
||||
Top = 18
|
||||
Width = 584
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
BorderSpacing.Right = 6
|
||||
ItemHeight = 17
|
||||
ItemHeight = 15
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
Style = csDropDownList
|
||||
TabOrder = 3
|
||||
TabOrder = 0
|
||||
end
|
||||
object AutoSaveIntervalInSecsComboBox: TComboBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
@ -118,19 +118,19 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 370
|
||||
Top = 348
|
||||
Width = 584
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
Enabled = False
|
||||
ItemHeight = 17
|
||||
ItemHeight = 15
|
||||
Items.Strings = (
|
||||
'1200'
|
||||
'600'
|
||||
'300'
|
||||
'120'
|
||||
)
|
||||
TabOrder = 4
|
||||
TabOrder = 11
|
||||
Visible = False
|
||||
end
|
||||
object AutoSaveProjectCheckBox: TCheckBox
|
||||
@ -138,15 +138,15 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Control = AutoSaveEditorFilesCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 319
|
||||
Width = 174
|
||||
Height = 19
|
||||
Top = 302
|
||||
Width = 159
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'AutoSaveProjectCheckBox'
|
||||
Enabled = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 5
|
||||
TabOrder = 10
|
||||
Visible = False
|
||||
end
|
||||
object AutoSaveEditorFilesCheckBox: TCheckBox
|
||||
@ -154,15 +154,15 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Control = AskSavingOnlySessionCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 297
|
||||
Width = 193
|
||||
Height = 19
|
||||
Top = 283
|
||||
Width = 176
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'AutoSaveEditorFilesCheckBox'
|
||||
Enabled = False
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 6
|
||||
TabOrder = 9
|
||||
Visible = False
|
||||
end
|
||||
object ImportDesktopButton: TButton
|
||||
@ -172,8 +172,8 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 299
|
||||
Height = 29
|
||||
Top = 419
|
||||
Height = 25
|
||||
Top = 395
|
||||
Width = 291
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
@ -183,7 +183,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
OnClick = ImportDesktopButtonClick
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 7
|
||||
TabOrder = 13
|
||||
end
|
||||
object ExportDesktopButton: TButton
|
||||
AnchorSideLeft.Control = Owner
|
||||
@ -191,8 +191,8 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = lblCenter
|
||||
Left = 6
|
||||
Height = 29
|
||||
Top = 419
|
||||
Height = 25
|
||||
Top = 395
|
||||
Width = 287
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
@ -203,7 +203,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
OnClick = ExportDesktopButtonClick
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 8
|
||||
TabOrder = 12
|
||||
end
|
||||
object PanelGlyphsButtonsOptions: TPanel
|
||||
AnchorSideLeft.Control = lblButtons
|
||||
@ -212,10 +212,10 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 76
|
||||
Height = 23
|
||||
Top = 181
|
||||
Width = 514
|
||||
Left = 69
|
||||
Height = 19
|
||||
Top = 183
|
||||
Width = 521
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
@ -224,15 +224,15 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
BevelOuter = bvNone
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 3
|
||||
ClientHeight = 23
|
||||
ClientWidth = 514
|
||||
TabOrder = 9
|
||||
ClientHeight = 19
|
||||
ClientWidth = 521
|
||||
TabOrder = 5
|
||||
object rbBtnGlyphShowSystem: TRadioButton
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 23
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 161
|
||||
Width = 147
|
||||
Caption = 'rbBtnGlyphShowSystem'
|
||||
Checked = True
|
||||
TabOrder = 0
|
||||
@ -240,18 +240,18 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
end
|
||||
object rbBtnGlyphShowNever: TRadioButton
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
Left = 161
|
||||
Height = 23
|
||||
Left = 147
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 154
|
||||
Width = 140
|
||||
Caption = 'rbBtnGlyphShowNever'
|
||||
TabOrder = 1
|
||||
end
|
||||
object rbBtnGlyphShowAlways: TRadioButton
|
||||
Left = 315
|
||||
Height = 23
|
||||
Left = 287
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 159
|
||||
Width = 146
|
||||
Caption = 'rbBtnGlyphShowAlways'
|
||||
TabOrder = 2
|
||||
end
|
||||
@ -262,10 +262,10 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 76
|
||||
Height = 23
|
||||
Top = 207
|
||||
Width = 514
|
||||
Left = 69
|
||||
Height = 19
|
||||
Top = 205
|
||||
Width = 521
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 3
|
||||
@ -273,16 +273,16 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
BevelOuter = bvNone
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 3
|
||||
ClientHeight = 23
|
||||
ClientWidth = 514
|
||||
TabOrder = 10
|
||||
ClientHeight = 19
|
||||
ClientWidth = 521
|
||||
TabOrder = 6
|
||||
object rbMenuGlyphShowSystem: TRadioButton
|
||||
AnchorSideRight.Control = PanelGlyphsMenusOptions
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 23
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 174
|
||||
Width = 160
|
||||
Caption = 'rbMenuGlyphShowSystem'
|
||||
Checked = True
|
||||
TabOrder = 0
|
||||
@ -290,18 +290,18 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
end
|
||||
object rbMenuGlyphShowNever: TRadioButton
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
Left = 174
|
||||
Height = 23
|
||||
Left = 160
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 167
|
||||
Width = 153
|
||||
Caption = 'rbMenuGlyphShowNever'
|
||||
TabOrder = 1
|
||||
end
|
||||
object rbMenuGlyphShowAlways: TRadioButton
|
||||
Left = 341
|
||||
Height = 23
|
||||
Left = 313
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 172
|
||||
Width = 159
|
||||
Caption = 'rbMenuGlyphShowAlways'
|
||||
TabOrder = 2
|
||||
end
|
||||
@ -313,7 +313,7 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 296
|
||||
Height = 5
|
||||
Top = 416
|
||||
Top = 392
|
||||
Width = 5
|
||||
AutoSize = False
|
||||
ParentColor = False
|
||||
@ -323,33 +323,33 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Control = CheckDiskChangesWithLoadingCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 275
|
||||
Width = 207
|
||||
Height = 19
|
||||
Top = 264
|
||||
Width = 190
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'AskSavingOnlySessionCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 11
|
||||
TabOrder = 8
|
||||
end
|
||||
object PreferDoubleClickCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = lblMouseAction
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 66
|
||||
Width = 183
|
||||
Height = 19
|
||||
Top = 62
|
||||
Width = 167
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'PreferDoubleClickCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
TabOrder = 12
|
||||
TabOrder = 1
|
||||
end
|
||||
object lblLanguage: TDividerBevel
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 0
|
||||
Height = 17
|
||||
Height = 15
|
||||
Top = 0
|
||||
Width = 590
|
||||
Caption = 'Language'
|
||||
@ -362,8 +362,8 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Control = PanelGlyphsMenusOptions
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 17
|
||||
Top = 236
|
||||
Height = 15
|
||||
Top = 230
|
||||
Width = 597
|
||||
Caption = 'Check and Auto Save Files'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -376,8 +376,8 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Control = AutoSaveIntervalInSecsComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 17
|
||||
Top = 399
|
||||
Height = 15
|
||||
Top = 377
|
||||
Width = 597
|
||||
Caption = 'Import / Export'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -390,8 +390,8 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Control = ShowHintsForComponentPaletteCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 17
|
||||
Top = 161
|
||||
Height = 15
|
||||
Top = 165
|
||||
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 = PreferDoubleClickCheckBox
|
||||
AnchorSideTop.Control = PreferDoubleClickCloseTabCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 17
|
||||
Top = 94
|
||||
Height = 15
|
||||
Top = 106
|
||||
Width = 597
|
||||
Caption = 'Hints'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -418,8 +418,8 @@ object DesktopOptionsFrame: TDesktopOptionsFrame
|
||||
AnchorSideTop.Control = LanguageComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 17
|
||||
Top = 49
|
||||
Height = 15
|
||||
Top = 47
|
||||
Width = 597
|
||||
Caption = 'Mouse Action'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -428,4 +428,18 @@ 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,6 +54,7 @@ type
|
||||
ImportDesktopButton: TButton;
|
||||
PanelGlyphsButtonsOptions: TPanel;
|
||||
PanelGlyphsMenusOptions: TPanel;
|
||||
PreferDoubleClickCloseTabCheckBox: TCheckBox;
|
||||
rbMenuGlyphShowAlways: TRadioButton;
|
||||
rbMenuGlyphShowNever: TRadioButton;
|
||||
rbMenuGlyphShowSystem: TRadioButton;
|
||||
@ -117,6 +118,8 @@ begin
|
||||
lblMouseAction.Caption := dlgMouseAction;
|
||||
PreferDoubleClickCheckBox.Caption := dlgPreferDoubleClickOverSingleClick;
|
||||
PreferDoubleClickCheckBox.Hint := dlgCurrentlyRespectedByMessagesWindow;
|
||||
PreferDoubleClickCloseTabCheckBox.Caption := dlgPreferDoubleClickOverMiddleClickToClose;
|
||||
PreferDoubleClickCloseTabCheckBox.Hint := dlgCurrentlyRespectedByNotebookWindow;
|
||||
|
||||
// hints
|
||||
lblHints.Caption := dlgDesktopHints;
|
||||
@ -163,6 +166,7 @@ begin
|
||||
|
||||
// mouse action
|
||||
PreferDoubleClickCheckBox.Checked := MsgViewDblClickJumps;
|
||||
PreferDoubleClickCloseTabCheckBox.Checked := UseDoubleClickToCloseTabs;
|
||||
|
||||
// hints
|
||||
ShowHintsForMainSpeedButtonsCheckBox.Checked:=ShowHintsForMainSpeedButtons;
|
||||
@ -200,6 +204,7 @@ begin
|
||||
|
||||
// mouse action
|
||||
MsgViewDblClickJumps := PreferDoubleClickCheckBox.Checked;
|
||||
UseDoubleClickToCloseTabs := PreferDoubleClickCloseTabCheckBox.Checked;
|
||||
|
||||
// hints
|
||||
ShowHintsForMainSpeedButtons:=ShowHintsForMainSpeedButtonsCheckBox.Checked;
|
||||
|
||||
@ -1279,6 +1279,9 @@ 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';
|
||||
|
||||
|
||||
@ -1311,6 +1311,7 @@ begin
|
||||
LoadFileDialogFilter;
|
||||
|
||||
EditorOpts := TEditorOptions.Create;
|
||||
IDEEditorOptions := EditorOpts;
|
||||
EditorOpts.OnBeforeRead := @DoEditorOptionsBeforeRead;
|
||||
EditorOpts.OnAfterWrite := @DoEditorOptionsAfterWrite;
|
||||
SetupIDECommands;
|
||||
|
||||
@ -261,6 +261,7 @@ var
|
||||
begin
|
||||
FMaxItems:=50000;
|
||||
ResultsNoteBook.Options:= ResultsNoteBook.Options+[nboShowCloseButtons];
|
||||
ResultsNoteBook.ControlStyle:=ResultsNoteBook.ControlStyle+[csDoubleClicks];
|
||||
ResultsNoteBook.Update;
|
||||
|
||||
Name:=NonModalIDEWindowNames[nmiwSearchResultsViewName];
|
||||
@ -368,7 +369,9 @@ procedure TSearchResultsView.ResultsNoteBookMouseDown(Sender: TObject; Button: T
|
||||
var
|
||||
TabIndex: LongInt;
|
||||
begin
|
||||
if (Button = mbMiddle) then begin
|
||||
if (not EnvironmentOptions.UseDoubleClickToCloseTabs and (Button = mbMiddle))
|
||||
or ( EnvironmentOptions.UseDoubleClickToCloseTabs and (Button = mbLeft) and (ssDouble in Shift))
|
||||
then begin
|
||||
TabIndex := ResultsNoteBook.TabIndexAtClientPos(Point(X,Y));
|
||||
if TabIndex >= 0 then
|
||||
ResultsNoteBookClosetabclicked(ResultsNoteBook.Page[TabIndex]);
|
||||
|
||||
@ -907,7 +907,6 @@ type
|
||||
procedure DoWindowHide(AWindow: TSourceNotebook);
|
||||
function GetShowTabs: Boolean; override;
|
||||
procedure SetShowTabs(const AShowTabs: Boolean); override;
|
||||
function GetTabPosition: TTabPosition; override;
|
||||
public
|
||||
procedure BeginAutoFocusLock;
|
||||
procedure EndAutoFocusLock;
|
||||
@ -6313,6 +6312,7 @@ Begin
|
||||
ShowTabs := True;
|
||||
if ShowTabs then
|
||||
TabPosition := EditorOpts.TabPosition;
|
||||
ControlStyle := ControlStyle + [csDoubleClicks];
|
||||
OnChange := @NotebookPageChanged;
|
||||
OnCloseTabClicked := @CloseTabClicked;
|
||||
OnMouseDown:=@NotebookMouseDown;
|
||||
@ -8358,7 +8358,9 @@ procedure TSourceNotebook.NotebookMouseDown(Sender: TObject; Button: TMouseButto
|
||||
var
|
||||
TabIndex: Integer;
|
||||
begin
|
||||
if (Button = mbMiddle) then begin
|
||||
if (not EnvironmentOptions.UseDoubleClickToCloseTabs and (Button = mbMiddle))
|
||||
or ( EnvironmentOptions.UseDoubleClickToCloseTabs and (Button = mbLeft) and (ssDouble in Shift))
|
||||
then begin
|
||||
TabIndex:=FNotebook.TabIndexAtClientPos(Point(X,Y));
|
||||
if TabIndex>=0 then
|
||||
CloseClicked(NoteBookPage[TabIndex],
|
||||
@ -9067,11 +9069,6 @@ begin
|
||||
Result := TSourceEditorWindowInterface(FSourceWindowList[Index]);
|
||||
end;
|
||||
|
||||
function TSourceEditorManagerBase.GetTabPosition: TTabPosition;
|
||||
begin
|
||||
Result := EditorOpts.TabPosition;
|
||||
end;
|
||||
|
||||
procedure TSourceEditorManagerBase.DoWindowFocused(AWindow: TSourceNotebook);
|
||||
begin
|
||||
FChangeNotifyLists[semWindowFocused].CallNotifyEvents(FActiveWindow);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user