mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 22:19:18 +02:00
Merged revision(s) 51693 #82df661d71, 51699 #0776ea2c13, 51894 #86b0d4f7ed from trunk:
ide: register debugmanager commands for toolbars ........ ide: fix smart hint window not receiving mouse messages. Issue #29726 ........ IDE, packager: added dots for 'Find in files' menu item, bug #29800 ........ git-svn-id: branches/fixes_1_6@51987 -
This commit is contained in:
parent
3c9b469a86
commit
1a91236f23
@ -47,7 +47,7 @@ uses
|
|||||||
CodeCache, CodeToolManager, PascalParserTool, CodeTree,
|
CodeCache, CodeToolManager, PascalParserTool, CodeTree,
|
||||||
// IDEIntf
|
// IDEIntf
|
||||||
IDEWindowIntf, SrcEditorIntf, MenuIntf, IDECommands, LazIDEIntf, ProjectIntf,
|
IDEWindowIntf, SrcEditorIntf, MenuIntf, IDECommands, LazIDEIntf, ProjectIntf,
|
||||||
CompOptsIntf, IDEDialogs,
|
CompOptsIntf, IDEDialogs, ToolBarIntf,
|
||||||
// IDE
|
// IDE
|
||||||
CompilerOptions, EnvironmentOpts,
|
CompilerOptions, EnvironmentOpts,
|
||||||
SourceEditor, ProjectDefs, Project, IDEProcs, InputHistory, Debugger,
|
SourceEditor, ProjectDefs, Project, IDEProcs, InputHistory, Debugger,
|
||||||
@ -1807,9 +1807,20 @@ end;
|
|||||||
|
|
||||||
procedure TDebugManager.SetupMainBarShortCuts;
|
procedure TDebugManager.SetupMainBarShortCuts;
|
||||||
|
|
||||||
function GetCommand(ACommand: word): TIDECommand;
|
function GetCmdAndBtn(ACommand: word; out ToolButton: TIDEButtonCommand): TIDECommand;
|
||||||
begin
|
begin
|
||||||
Result:=IDECommandList.FindIDECommand(ACommand);
|
Result:=IDECommandList.FindIDECommand(ACommand);
|
||||||
|
if Result<>nil then
|
||||||
|
ToolButton := RegisterIDEButtonCommand(Result)
|
||||||
|
else
|
||||||
|
ToolButton := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetCommand(ACommand: word): TIDECommand;
|
||||||
|
var
|
||||||
|
ToolButton: TIDEButtonCommand;
|
||||||
|
begin
|
||||||
|
Result:=GetCmdAndBtn(ACommand, ToolButton);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -1839,9 +1850,20 @@ end;
|
|||||||
|
|
||||||
procedure TDebugManager.SetupSourceMenuShortCuts;
|
procedure TDebugManager.SetupSourceMenuShortCuts;
|
||||||
|
|
||||||
function GetCommand(ACommand: word): TIDECommand;
|
function GetCmdAndBtn(ACommand: word; out ToolButton: TIDEButtonCommand): TIDECommand;
|
||||||
begin
|
begin
|
||||||
Result:=IDECommandList.FindIDECommand(ACommand);
|
Result:=IDECommandList.FindIDECommand(ACommand);
|
||||||
|
if Result<>nil then
|
||||||
|
ToolButton := RegisterIDEButtonCommand(Result)
|
||||||
|
else
|
||||||
|
ToolButton := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetCommand(ACommand: word): TIDECommand;
|
||||||
|
var
|
||||||
|
ToolButton: TIDEButtonCommand;
|
||||||
|
begin
|
||||||
|
Result:=GetCmdAndBtn(ACommand, ToolButton);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -240,7 +240,7 @@ type
|
|||||||
FLineInfoNotification: TIDELineInfoNotification;
|
FLineInfoNotification: TIDELineInfoNotification;
|
||||||
FInEditorChangedUpdating: Boolean;
|
FInEditorChangedUpdating: Boolean;
|
||||||
|
|
||||||
FOnEditorChange: TNotifyEvent;
|
FOnEditorChange: TStatusChangeEvent;
|
||||||
FVisible: Boolean;
|
FVisible: Boolean;
|
||||||
FOnMouseMove: TMouseMoveEvent;
|
FOnMouseMove: TMouseMoveEvent;
|
||||||
FOnMouseDown: TMouseEvent;
|
FOnMouseDown: TMouseEvent;
|
||||||
@ -512,8 +512,8 @@ type
|
|||||||
property ExecutionLine: integer read GetExecutionLine write SetExecutionLine;
|
property ExecutionLine: integer read GetExecutionLine write SetExecutionLine;
|
||||||
property HasExecutionMarks: Boolean read GetHasExecutionMarks;
|
property HasExecutionMarks: Boolean read GetHasExecutionMarks;
|
||||||
property InsertMode: Boolean read GetInsertmode;
|
property InsertMode: Boolean read GetInsertmode;
|
||||||
property OnEditorChange: TNotifyEvent read FOnEditorChange
|
property OnEditorChange: TStatusChangeEvent read FOnEditorChange
|
||||||
write FOnEditorChange;
|
write FOnEditorChange;
|
||||||
property OnMouseMove: TMouseMoveEvent read FOnMouseMove write FOnMouseMove;
|
property OnMouseMove: TMouseMoveEvent read FOnMouseMove write FOnMouseMove;
|
||||||
property OnMouseDown: TMouseEvent read FOnMouseDown write FOnMouseDown;
|
property OnMouseDown: TMouseEvent read FOnMouseDown write FOnMouseDown;
|
||||||
property OnMouseWheel: TMouseWheelEvent read FOnMouseWheel write FOnMouseWheel;
|
property OnMouseWheel: TMouseWheelEvent read FOnMouseWheel write FOnMouseWheel;
|
||||||
@ -703,7 +703,7 @@ type
|
|||||||
ATabCaption: String = ''): TSourceEditor;
|
ATabCaption: String = ''): TSourceEditor;
|
||||||
procedure AcceptEditor(AnEditor: TSourceEditor; SendEvent: Boolean = False);
|
procedure AcceptEditor(AnEditor: TSourceEditor; SendEvent: Boolean = False);
|
||||||
procedure ReleaseEditor(AnEditor: TSourceEditor; SendEvent: Boolean = False);
|
procedure ReleaseEditor(AnEditor: TSourceEditor; SendEvent: Boolean = False);
|
||||||
procedure EditorChanged(Sender: TObject);
|
procedure EditorChanged(Sender: TObject; Changes: TSynStatusChanges);
|
||||||
procedure DoClose(var CloseAction: TCloseAction); override;
|
procedure DoClose(var CloseAction: TCloseAction); override;
|
||||||
procedure DoShow; override;
|
procedure DoShow; override;
|
||||||
procedure DoHide; override;
|
procedure DoHide; override;
|
||||||
@ -1542,7 +1542,7 @@ begin
|
|||||||
(AParent, 'Find previous word occurrence', srkmecFindPrevWordOccurrence,
|
(AParent, 'Find previous word occurrence', srkmecFindPrevWordOccurrence,
|
||||||
nil, @ExecuteIdeMenuClick, nil, 'menu_search_find_previous');
|
nil, @ExecuteIdeMenuClick, nil, 'menu_search_find_previous');
|
||||||
SrcEditMenuFindInFiles := RegisterIDEMenuCommand
|
SrcEditMenuFindInFiles := RegisterIDEMenuCommand
|
||||||
(AParent, 'Find in files', srkmecFindInFiles, nil,
|
(AParent, 'Find in files', srkmecFindInFiles + ' ...', nil,
|
||||||
@ExecuteIdeMenuClick, nil, 'menu_search_files');
|
@ExecuteIdeMenuClick, nil, 'menu_search_files');
|
||||||
SrcEditMenuFindIdentifierReferences := RegisterIDEMenuCommand
|
SrcEditMenuFindIdentifierReferences := RegisterIDEMenuCommand
|
||||||
(AParent, 'FindIdentifierReferences',lisMenuFindIdentifierRefs, nil,
|
(AParent, 'FindIdentifierReferences',lisMenuFindIdentifierRefs, nil,
|
||||||
@ -4054,7 +4054,7 @@ procedure TSourceEditor.EditorStatusChanged(Sender: TObject;
|
|||||||
Changes: TSynStatusChanges);
|
Changes: TSynStatusChanges);
|
||||||
Begin
|
Begin
|
||||||
If Assigned(OnEditorChange) then
|
If Assigned(OnEditorChange) then
|
||||||
OnEditorChange(Sender);
|
OnEditorChange(Sender, Changes);
|
||||||
UpdatePageName;
|
UpdatePageName;
|
||||||
if Changes * [scCaretX, scCaretY, scSelection] <> [] then
|
if Changes * [scCaretX, scCaretY, scSelection] <> [] then
|
||||||
IDECommandList.PostponeUpdateEvents;
|
IDECommandList.PostponeUpdateEvents;
|
||||||
@ -7066,14 +7066,16 @@ end;
|
|||||||
|
|
||||||
Called whenever an editor status changes. Sender is normally a TSynEdit.
|
Called whenever an editor status changes. Sender is normally a TSynEdit.
|
||||||
-------------------------------------------------------------------------------}
|
-------------------------------------------------------------------------------}
|
||||||
procedure TSourceNotebook.EditorChanged(Sender: TObject);
|
procedure TSourceNotebook.EditorChanged(Sender: TObject;
|
||||||
|
Changes: TSynStatusChanges);
|
||||||
var SenderDeleted: boolean;
|
var SenderDeleted: boolean;
|
||||||
Begin
|
Begin
|
||||||
SenderDeleted:=(Sender as TControl).Parent=nil;
|
SenderDeleted:=(Sender as TControl).Parent=nil;
|
||||||
if SenderDeleted then exit;
|
if SenderDeleted then exit;
|
||||||
UpdateStatusBar;
|
UpdateStatusBar;
|
||||||
if Assigned(Manager) then begin
|
if Assigned(Manager) then begin
|
||||||
Manager.FHints.HideIfVisible;
|
if not(Changes=[scFocus]) then // has to be here because of issue #29726
|
||||||
|
Manager.FHints.HideIfVisible;
|
||||||
Manager.DoEditorStatusChanged(FindSourceEditorWithEditorComponent(TSynEdit(Sender)));
|
Manager.DoEditorStatusChanged(FindSourceEditorWithEditorComponent(TSynEdit(Sender)));
|
||||||
end;
|
end;
|
||||||
End;
|
End;
|
||||||
|
@ -594,7 +594,7 @@ begin
|
|||||||
// register the section for operations on all files
|
// register the section for operations on all files
|
||||||
PkgEditMenuSectionFiles:=RegisterIDEMenuSection(PackageEditorMenuRoot,'Files');
|
PkgEditMenuSectionFiles:=RegisterIDEMenuSection(PackageEditorMenuRoot,'Files');
|
||||||
AParent:=PkgEditMenuSectionFiles;
|
AParent:=PkgEditMenuSectionFiles;
|
||||||
PkgEditMenuFindInFiles:=RegisterIDEMenuCommand(AParent,'Find in files',srkmecFindInFiles);
|
PkgEditMenuFindInFiles:=RegisterIDEMenuCommand(AParent,'Find in files',srkmecFindInFiles + ' ...');
|
||||||
PkgEditMenuSortFiles:=RegisterIDEMenuCommand(AParent,'Sort Files Permanently',lisPESortFiles);
|
PkgEditMenuSortFiles:=RegisterIDEMenuCommand(AParent,'Sort Files Permanently',lisPESortFiles);
|
||||||
PkgEditMenuFixFilesCase:=RegisterIDEMenuCommand(AParent,'Fix Files Case',lisPEFixFilesCase);
|
PkgEditMenuFixFilesCase:=RegisterIDEMenuCommand(AParent,'Fix Files Case',lisPEFixFilesCase);
|
||||||
PkgEditMenuShowMissingFiles:=RegisterIDEMenuCommand(AParent, 'Show Missing Files', lisPEShowMissingFiles);
|
PkgEditMenuShowMissingFiles:=RegisterIDEMenuCommand(AParent, 'Show Missing Files', lisPEShowMissingFiles);
|
||||||
|
Loading…
Reference in New Issue
Block a user