Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Butter-Swimming Butterfly on February 09, 2019, 02:07:28 am

Title: Key binding for 'Select target...' dialog is eventually overwritten
Post by: Butter-Swimming Butterfly on February 09, 2019, 02:07:28 am
Any key-binding to the 'Select target...' dialog automatically clears while (and periodically after) Code::Blocks initiates.

This issue prevents me from adopting the key-command layout I want:
F1 => Select target...
F2 => Build
F3 => Build and Run
CTRL-F3 => Run (without building)
Can this key-binding issue be fixed in the next Code::Blocks release?


Edit: Wrong forum section. I think I was supposed to post this on the 'General' board.
Title: Re: Key binding for 'Select target...' dialog is eventually overwritten
Post by: BlueHazzard on February 09, 2019, 11:21:00 am
Are other settings also cleared, or only the key bindings?
What operating system, what codeblocks version?
Is only the select target binding affected, or other bindings also?
Title: Re: Key binding for 'Select target...' dialog is eventually overwritten
Post by: Pecan on February 09, 2019, 11:47:29 pm
Currently you cannot bind a permanent key to the Select target menu item because its sub menus disappear when CB is closed and it has no sub menus to bind to when CB is opened.

That menu item is actually just a place holder for a list dialog. I doubt that wxWidgets will ever have the ability to accept a key binding to such a transient object.

Title: Re: Key binding for 'Select target...' dialog is eventually overwritten
Post by: BlueHazzard on February 10, 2019, 02:36:52 pm
Does he want to open the target dialog, or does he want to select a speciffic target?
Maybe this can be solved with some scripting. Does the key binder plugin supports only calling a script?
Title: Re: Key binding for 'Select target...' dialog is eventually overwritten
Post by: Pecan on February 11, 2019, 07:10:04 am
Does he want to open the target dialog, or does he want to select a speciffic target?
Maybe this can be solved with some scripting. Does the key binder plugin supports only calling a script?

Keybinder uses no scripts.
Keybinder has no scripting support.
Title: Re: Key binding for 'Select target...' dialog is eventually overwritten
Post by: Butter-Swimming Butterfly on February 13, 2019, 09:23:00 am
Currently you cannot bind a permanent key to the Select target menu item because its sub menus disappear when CB is closed and it has no sub menus to bind to when CB is opened.

That menu item is actually just a place holder for a list dialog. I doubt that wxWidgets will ever have the ability to accept a key binding to such a transient object.

I know (Menu bar -> Build -> Select target) descends into a sub-menu that partially changes to correspond with the active project's contained targets. By 'that' menu item, are you referring to the one I want to bind with? (Menu bar -> Build -> Select target -> Select target...)? I don't know anything about wxWidgets, but I'm guessing it doesn't allow altering menu contents without creating/destroying the entire menu at once. I don't understand otherwise.
Title: Re: Key binding for 'Select target...' dialog is eventually overwritten
Post by: oBFusCATed on February 13, 2019, 09:44:58 am
It should be possible to be fixed. I'll have to experiment a bit. Ping me in a week if you don't hear anything from me.
Title: Re: Key binding for 'Select target...' dialog is eventually overwritten
Post by: Butter-Swimming Butterfly on February 20, 2019, 08:35:42 am
Alright. Does the problem still appear to be fixable?
Title: Re: Key binding for 'Select target...' dialog is eventually overwritten
Post by: oBFusCATed on February 21, 2019, 07:49:44 pm
Yes, I have a fix, but I've not committed it yet, because I want to test it a bit more.
Title: Re: Key binding for 'Select target...' dialog is eventually overwritten
Post by: oBFusCATed on March 02, 2019, 07:13:34 pm
Fix in trunk...
Title: Re: Key binding for 'Select target...' dialog is eventually overwritten
Post by: Butter-Swimming Butterfly on March 19, 2019, 12:03:17 am
It works! Thank you! :D