Earlier (issue #39671) I tried to change the logic for this exact same LazarusDirectory but it caused a regression.
You told me you had fixed it. And from memory, it needed to be fixed. But you did not tell me you reverted that fix. Thanks very much.
background : Initially, direct access to LazarusDirectory was not available, Getmen eventually either found a way or made a way but by that stage, my code was in the review pipeline.
https://forum.lazarus.freepascal.org/index.php/topic,57680.msg434967.html#msg434967
Clearly I should have gone back to it but I was traveling then and time was a rare commodity. But with a fix applied to the LazarusDirectory name issue, it was not critical.
My "fix" was based on poor knowledge of the code. After reverting it I planned to study the issue more but I had many other activities during the past year and this one got postponed.
Now it is fixed.
No worries mate, or how they say in Australia?
I started to wonder when was function GetParsedLazarusDirectory added to the interface. Why didn't we find it earlier? I did :
$ git blame components/buildintf/ideoptionsintf.pas
This is a portion of its output :
151f452c847 components/ideintf/ideoptionsintf.pas (ondrej 2015-11-27 05:35:22 +0000 135) procedure RemoveFromRecentPackageFiles(const AFilename: string); virtual; abstract;
151f452c847 components/ideintf/ideoptionsintf.pas (ondrej 2015-11-27 05:35:22 +0000 136)
68276150e12 components/ideintf/ideoptionsintf.pas (joost 2019-01-01 16:49:20 +0000 137) function GetParsedCompilerFilename: string; virtual; abstract;
9d1b8c9d875 components/ideintf/ideoptionsintf.pas (joost 2019-04-12 21:08:55 +0000 138) function GetParsedFppkgConfig: string; virtual; abstract;
6f9144a5841 components/buildintf/ideoptionsintf.pas (balazs 2022-02-23 08:04:33 +0200 139) function GetParsedLazarusDirectory: string; virtual; abstract;
fba579ac625 components/ideintf/ideoptionsintf.pas (mattias 2018-09-22 12:03:45 +0000 140)
151f452c847 components/ideintf/ideoptionsintf.pas (ondrej 2015-11-27 05:35:22 +0000 141) procedure AddHandlerAddToRecentOpenFiles(Handler: TOnAddToRecent; const AsFirst: boolean = true); // AsFirst means: first to call
151f452c847 components/ideintf/ideoptionsintf.pas (ondrej 2015-11-27 05:35:22 +0000 142) procedure RemoveHandlerAddToRecentOpenFiles(Handler: TOnAddToRecent);
It was added by
balazs in February this year. Kudos to him. [I got confused by names and had an inaccurate comment here for a while]
BTW, the "
git blame" command is super. The whole file was moved from ideintf to buildintf (removing LCL dependency) and Git is able to track it without being told about the move. It calculates a "similarity index" and understands that identical or near identical files are moved or copied.
Also the merge conflict algorithms in Git are very good. The more demanding task you have, the better it works.
Well, in my case I am not using trunk for day to day work anymore because of this https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39540
Yes, it must be fixed properly. Now it does not crash any more but the popup opens in a wrong place.
The problem only shows up if you are using the default location for PCP. Most trunk users have it as a second install and its config is redirected. Certainly in my case.
PCP is "Primary Config Path". The bug happened also when using --pcp= parameter.
I think I know why others didn't notice it! The few people who are testing the Examples window in Lazarus "main" have their sources in a directory right under their home directory, like "
~/lazarus_git". LazarusDirectory is stored as a path relative to PCP which by default is "
~/.lazarus". By accident it went right.
My sources are in "
~/SW/lazarus" and things went haywire. How does it work on Windows? I have no idea.
The global options GUI needs a hint of how LazarusDirectory is stored. I will add it ... [Edit] Done in 2f13102566
About the filter :
It is OK if TextHint is not shown when the filter has focus. It is widgetset specific behavior. TextHint is shown when focus is elsewhere. It is logical and users learn it in few seconds. Please don't waste your time tweaking LCL's behavior. If LCL widgetset code has a bug, it should be fixed there.
I added a comment in issue
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40034You still haven't commented on using the
TListViewFilterEdit control.