Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Krice on February 09, 2025, 12:25:05 pm

Title: Open files list single click
Post by: Krice on February 09, 2025, 12:25:05 pm
I think open files list would work better if it had single click select to choose the source file rather than double click. It's driving me crazy to have to double click to view the file, I guess mainly because how it's implemented in Visual Studio (the right way). I tried to search if anyone had mentioned this, but no one, really? Also, Visual Studio doesn't even show tabs for files, because if you have them in the list it's not needed, because you can just select the file from the list. I'm using 20.03.
Title: Re: Open files list single click
Post by: Grit Clef on February 09, 2025, 01:32:46 pm
It is this code in src/plugins/openfileslist/openfileslistplugin.cpp which handles that event:
Code
EVT_TREE_ITEM_ACTIVATED(idOpenFilesTree, OpenFilesListPlugin::OnTreeItemActivated)
But there's no such event that will be triggered when the item is single-clicked in wxTreeEvent.
Probably this thread (https://forums.wxwidgets.org/viewtopic.php?t=39267).
Title: Re: Open files list single click
Post by: Krice on February 10, 2025, 12:40:49 pm
So it's possible or not? Is wxWidgets blocking this too, like it always does?
Title: Re: Open files list single click
Post by: Grit Clef on February 10, 2025, 12:49:46 pm
Maybe possible; that depends on whether the devs will accept adding some extra code in the source.
Title: Re: Open files list single click
Post by: Krice on February 20, 2025, 12:03:10 pm
Source code for open files list is short, but when I was reading it I was surprised that it has almost no comments explaining what the code does. Bad developers! Trying to understand wxWidgets antics is annoying, it's just so wacky style of programming.
Title: Re: Open files list single click
Post by: Krice on February 28, 2025, 05:19:15 pm
QtCreator has also one click open files list. It seems to be the standard. But other than that QtCreator, at least the open source version, is not that great. It really made me think about how lucky we are to have Code::Blocks which I think is the only (useful) open source IDE. Most so called IDEs are more like text editors, like QtCreator.
Title: Re: Open files list single click
Post by: christo on February 28, 2025, 07:00:47 pm
I've a patch which works based on https://forums.wxwidgets.org/viewtopic.php?t=43852

https://github.com/josephch/codeblocks/commit/9344b8b216ad593a1b0117211c946b2a8af04f1c

It works. It is really easier to navigate with single click.