Recent

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

Gerold_R

  • New Member
  • *
  • Posts: 12
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: 1232
    • 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.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

howardpc

  • Hero Member
  • *****
  • Posts: 4144
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: 4459
  • 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 64-bit.

Gerold_R

  • New Member
  • *
  • Posts: 12
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: 292
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: 4459
  • 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 64-bit.

FTurtle

  • Sr. Member
  • ****
  • Posts: 292

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • 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 64-bit.

Gerold_R

  • New Member
  • *
  • Posts: 12
Re: How to add the TODO list to the editor toolbar
« Reply #9 on: March 15, 2021, 07:54:04 am »
Hi

I updated from 2.0.10 to 2.0.12 and I tought I can now add a toolbutton command for ToDo list.

Here it looks like this is possible now:
https://bugs.freepascal.org/view.php?id=37976

Did I make a mistake during the update? I let the Lazarus installer uninstall the old version before installing 2.0.12

Thanks for an answer
Gerold

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: How to add the TODO list to the editor toolbar
« Reply #10 on: March 15, 2021, 08:28:50 am »
Did I make a mistake during the update?
No, the change was not merged to 2.0.12. The major release 2.2 is delayed and 2.0.12 was thrown in as an afterthought.
Please use Lazarus trunk. You will be positively surprised. It is a lot ahead of 2.0.x.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Gerold_R

  • New Member
  • *
  • Posts: 12
Re: How to add the TODO list to the editor toolbar
« Reply #11 on: March 15, 2021, 09:42:54 am »
OK. Thanks for your answer.
Have a nice day.
Gerold

 

TinyPortal © 2005-2018