Recent

Author Topic: How to add the TODO list to the editor toolbar  (Read 541 times)

Gerold_R

  • New member
  • *
  • Posts: 7
How to add the TODO list to the editor toolbar
« on: October 23, 2020, 08:14:45 am »
Hello

I am still configuring Lazarus and I would like to have the button to show the TODO list in the editor toolbar. It's possible to add a lot of functions but I dont see how to add the TODO list. Any idea? I am used to it, cause in D7 I had the same using GExperts.
Thanks


jwdietrich

  • Hero Member
  • *****
  • Posts: 1154
    • formatio reticularis
Re: How to add the TODO list to the editor toolbar
« Reply #1 on: October 23, 2020, 08:58:40 am »
It should be available via the "View" menu, see attachment
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.10 | FPC 3.2.0 | PPC, Intel, ARM | macOS, Windows, Linux

howardpc

  • Hero Member
  • *****
  • Posts: 3585
Re: How to add the TODO list to the editor toolbar
« Reply #2 on: October 23, 2020, 09:34:45 am »
Check that you have the appropriate package installed in the IDE, and install it if not.

This package is not installed by default in recent Lazarus versions.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3887
  • I like bugs.
Re: How to add the TODO list to the editor toolbar
« Reply #3 on: October 23, 2020, 10:16:14 am »
The question was about editor toolbar. Apparently ToDo list cannot be added there.
You can however set a shortcut key for it. This may be a bug (or feature) in Lazarus IDE code. I guess it should allow adding a registered menu command to a toolbar.
It could be fixed also in the ToDo package by registering an IDE command.
If somebody wants to fix it, please do. Patches are welcome.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux.

Gerold_R

  • New member
  • *
  • Posts: 7
Re: How to add the TODO list to the editor toolbar
« Reply #4 on: October 23, 2020, 10:24:32 am »
Check that you have the appropriate package installed in the IDE, and install it if not.

The package is installed.Version 1.0.2

But I can not add the button for this function (and it seems the only one) to the editor toolbar or IDE coolbar. Probably a bug.


FTurtle

  • Sr. Member
  • ****
  • Posts: 280
Re: How to add the TODO list to the editor toolbar
« Reply #5 on: October 23, 2020, 03:00:03 pm »
If somebody wants to fix it, please do. Patches are welcome.

I will try implement it.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3887
  • I like bugs.
Re: How to add the TODO list to the editor toolbar
« Reply #6 on: October 23, 2020, 05:30:13 pm »
Thanks FTurtle in advance.
FYI everybody:
I also started to wonder why ToDo list is not available for ToolBars. It would be a nice addition in editor toolbar especially.
I studied the code.
Actually the ToDo menu items are registered the same way as other View menu items.
I don't see any reason why it doesn't appear in the command list.
ToDoDlg.Register calls RegisterIDEMenuCommand(), the same that other commands are registered with.
I tried some tweaks. No difference.
I wrote about it in Lazarus developer list but no answer so far. Maybe nobody knows.
« Last Edit: October 23, 2020, 08:13:53 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux.

FTurtle

  • Sr. Member
  • ****
  • Posts: 280

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3887
  • I like bugs.
Re: How to add the TODO list to the editor toolbar
« Reply #8 on: October 24, 2020, 01:37:01 pm »
https://bugs.freepascal.org/view.php?id=37976
Thanks.
Ok, the RegisterIDEButtonCommand is done also for other IDE's menu commands but in a sneaky way. I did not find it right away.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux.

 

TinyPortal © 2005-2018