Recent

Author Topic: Bug/Fix ToDo List ...  (Read 4793 times)

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Bug/Fix ToDo List ...
« on: March 12, 2015, 01:16:16 pm »
As a happy Lazarus user, I’ve never really used the “ToDo List” (under the “View” menu), until recently (see Wiki Page).

The way it works is pretty simple and very helpful. Simply add code like this to your source code:

Code: [Select]
{TODO : Still need to do this}and it will appear in the ToDo List, with the ability to click that line and right away jump to the comment in the code. Awesome! … well mostly …


Under MacOS X, the ToDo List initially appears to remain blank …
After playing around with it for a while (first assuming that I did something wrong), I have found that initially:
- the headers are not visible,
- the columns are ridiculous wide.
Searching for the headers is quite a pain, rendering this great function almost useless.

As you can see in the screenshots, the horizontal scrollbar slider is very small, which (in this case) gives you a pretty good indication how wide the grid is. The headers/columns one would like to see are somewhere in between the beginning and the end, and slow scrolling is needed to find them.
Next one needs to grab the side of the left header to try to slide it to the left, to only see it disappear – it instantly jumped to the beginning but that cannot be seen until you endlessly scroll back to the beginning.

The initial view and the view after countless minutes of scrolling back and forth to find the headers/content.

Since we all should try to help where we can, I took the effort to dig into the IDE code and found a fix …


This concerns the file: /Developer/lazarus/components/todolist/lib/i386-darwin/carbon/todolist.lfm


For every column I have set AutoSize to False (Auto = FALSE), which solves the issue.
This concerns the lines 31, 40, 45, 50, 55 and 60.
I’ve attached the modified file as well.

I’m running Lazarus 1.2.6, FPC 2.6.4 on MacOS X Yosemite (10.10.2).


Hope this is helpful to any one … and if this could be submitted to Lazarus, then that would be great, unless this is not the right solution.
I unfortunately have no idea how to do that.

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Bug/Fix ToDo List ...
« Reply #1 on: March 12, 2015, 05:14:18 pm »
You might want to try: Source - Insert ToDo. On Windows its shortcut is Shift+Ctrl+T. I don't know about OSX.

I noticed that Done column has a width of 639, and Description column has a width of 700 while the form is only 643 pixels wide!

And in code, also:
Code: [Select]
unit TodoList;
...
procedure TIDETodoWindow.FormCreate(Sender: TObject);
begin
...
  with lvTodo do
  begin
..
    Column[1].Width   := 700;

Column[1] is the description column.

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Bug/Fix ToDo List ...
« Reply #2 on: March 13, 2015, 10:19:22 am »
When I tried "Source" - "Insert ToDo", the grid remains unusable. :-(


I haven't tried to fix it in the code yet, since setting the column Autsize = False fixed it all.


Also note that when trying this under Windows (XP) or Linux (Xubuntu 32bit), this issue did not occur.


Another observation ...
Strangely enough the following did NOT work under Linux, but do work under Windows and MacOS X:


Code: [Select]
//TODO: Test
{ TODO : Test2 }


(the first one entered manually, the second one with "Insert ToDo")

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Bug/Fix ToDo List ...
« Reply #3 on: April 15, 2015, 08:57:18 pm »
I've reported this as a bug...

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4468
  • I like bugs.
Re: Bug/Fix ToDo List ...
« Reply #4 on: April 15, 2015, 10:17:15 pm »
I've reported this as a bug...

Is this right? This is the bug report you referred :
  http://bugs.freepascal.org/view.php?id=19789
It was fixed almost 4 years ago.

If you want to open new reports, please always use a recent version, now it means either Lazarus trunk or RC3.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Bug/Fix ToDo List ...
« Reply #5 on: April 16, 2015, 09:46:40 am »
My bad ... I posted the wrong link ... sorry.
The correct link: http://bugs.freepascal.org/view.php?id=27866


Thanks for catching that!

 

TinyPortal © 2005-2018