Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: earlgrey on September 07, 2014, 06:12:15 pm

Title: OpenFilesList plugin
Post by: earlgrey on September 07, 2014, 06:12:15 pm
Is it possible to implement a "single-click" option in the OpenFilesList plugin : Instead of double-clicking on a file name to display it, I would like this to be possible with a single-click.

Regards -

( It is just a suggestion, not an order , neither a request )
Title: Re: OpenFilesList plugin
Post by: earlgrey on September 09, 2014, 08:54:08 pm
A simple new event handler for tree selection change does it ( I have it working on svn 9857, 5mn coding ! )

openfileslist.cpp :
Code: [Select]
const int idTreeSelCHanged = wxNewId();
EVT_TREE_SEL_CHANGED( idOpenFilesTree, OpenFilesListPlugin::OnTreeSelectionChanged)
OpenFilesListPlugin::OnTreeSelectionChanged(...)
{
   copy & paste of OpenFilesListPlugin::OnTreeItemActivated(..) code
}
openfileslist.h :
Code: [Select]
void OnTreeSelectionChanged(wxTreeEvent &event);

It is really great.

What is missing is an option dialog for openfileslist plugin.
Title: Re: OpenFilesList plugin
Post by: oBFusCATed on September 09, 2014, 09:06:36 pm
Patch?
Title: Re: OpenFilesList plugin
Post by: earlgrey on September 09, 2014, 09:13:34 pm
Tomorrow or thursday on latest svn available, I'm falling asleep now.

Note it changes the behaviour of the plugin, double-click event handler is then unuseful.

Regards -
Title: Re: OpenFilesList plugin
Post by: earlgrey on September 10, 2014, 08:07:37 pm
Done on svn9915

Go to trunk/src/plugins/openfileslist then :

Code: [Select]
$ patch < openfileslistplugin-cpp_svn9915_oflsc.patch
$ patch < openfileslistplugin-h_svn9915_oflsc.patch

Enjoy.
Title: Re: OpenFilesList plugin
Post by: earlgrey on September 14, 2014, 02:08:50 pm
Previous patches produces segfaults, due to a NULL wxTreeItemData in OpenFilesListPlugin::OnTreeSelChanged(wxTreeEvent &event).
Attached new patches for svn9916 that correct this.

Go to trunk/src/plugins/openfileslist then :

Code: [Select]
$ patch < oflp-sc_svn9916_cpp.patch
$ patch < oflp-sc_svn9916_h.patch

Enjoy.
Title: Re: OpenFilesList plugin
Post by: oBFusCATed on May 23, 2016, 05:21:51 pm
Sorry for the late reply.

If you're still interested in this change you should make it configurable.