Hello,
How to add the "View | Leaks and Traces" as button at the toolbar? I want to add it on the right to "Desktops" button, but that isn't showed by filtering 'leak' at the "Toolbar Configuration" window.
Thank you!

Mailing lists / lazarus / 2016-09
5 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hello,
How to add the "View | Leaks and Traces" as button at the toolbar? I want to add it on the right to "Desktops" button, but that isn't showed by filtering 'leak' at the "Toolbar Configuration" window.
Thank you!
Hi silvioprog,
Open unit $(LazarusDir)/components/leakview/heaptrcview.pas . Replace Register procedure with:
procedure Register;
var
IDEShortCutX: TIDEShortCut;
IDECommandCategory: TIDECommandCategory;
IDECommand: TIDECommand;
IDEButtonCommand: TIDEButtonCommand;
begin
RegisterIDEMenuCommand(itmViewMainWindows, 'mnuLeakView', rsLeakView,
nil, @IDEMenuClicked);
IDEShortCutX := IDEShortCut(VK_UNKNOWN, [], VK_UNKNOWN, []);
IDECommandCategory :=
IDECommandList.FindCategoryByName(CommandCategoryViewName);
if IDECommandCategory nil then
begin
IDECommand := RegisterIDECommand(IDECommandCategory, rsLeakView,
rsLeakView, IDEShortCutX, nil, @IDEMenuClicked);
if IDECommand nil then
IDEButtonCommand := RegisterIDEButtonCommand(IDECommand);
end;
end;Alternatively you can apply the attached patch.
regards,
Balázs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160902/57901c6c/attachment.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: heaptrcview.patch
Type: application/octet-stream
Size: 1275 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160902/57901c6c/attachment.obj>
[...]
PERFECT! :-)
Patch applied properly and now the feature works fine as showed in attached picture.
Did you send it to the Lazarus bugtracker? If you prefer I can do it referencing this topic there.
Thank you!
>Patch applied properly and now the feature works fine as showed in attached
picture.
I'm glad it's working!
>Did you send it to the Lazarus bugtracker? If you prefer I can do it
referencing this topic there.
Feel free to create a bug report with the attached patch. Thank you!
Issued as #30562 <http://bugs.freepascal.org/view.php?id=30562> .
Thanks again! :-)