Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-09

How do I add the "View | Leaks and Traces" as button at the toolbar?

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Balázs Székely

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>

Reply by email

silvioprog
to Balázs Székely
Balázs Székely wrote 5 lines
Hi silvioprog, Open unit $(LazarusDir)/components/leakview/heaptrcview.pas . Replace Register procedure with:

[...]

Show quoted text 5 lines
Alternatively you can apply the attached patch. regards, Balázs

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!

Silvio Clécio -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160904/a9d0f07d/attachment.html>

Reply by email

GetMem1
to silvioprog
>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!

Reply by email

silvioprog
to GetMem1
GetMem1 wrote 8 lines
>>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! :-)

Silvio Clécio -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160905/a2f1ef6e/attachment.html>

Reply by email