Keyboard shortcuts for user defined tools is a must working on different compilers like AVR GCC for using the programs on microcontrollers etc.
After building the code it have to be transfered to the controller. For this step you have to start an additional program like AVR Dude. Working only with menus sucks.
...Regretfully, I feel my contribution would likely be ignored or dismissed (and my time wasted). This is unfortunate and makes me doubtful even using CodeBlocks as my IDE is a good idea, a project so unwelcoming to new blood and fresh insight cannot progress well - despite it's potential. Codeblocks has a user base that consists entirely of developers - it should be capitalising on that fact!
Jamie
I certainly did not intend to discourage anyone from contributing to the project.That's good to hear, although it has not been my experience so far and reading posts elsewhere in the forum I am not alone. Note, I am talking about this forum as a whole, as previously noted. Therefore, as I do have other things I need to get on with, I hope the time I've taken to write up the following has not been wasted. :)
Seeking out these bugs and new ideas are most welcome.
When the Tools menu is modified in the background, it is always rebuilt without its shortcuts. KeyBinder will slowly record this fact.This is a separate and less annoying issue to the one I first posted about as it can at least be worked around. There are two solutions to it though: detect the 'Configure Tools' dialog and perform a restore of the items that still match (I notice keybinder already detects new windows so it shouldn't be hard), this would be a bit of a hack though. The preferred solution is codeblocks should only need to delete/insert/modify items as needed and can check if a shortcut is assigned beforehand and restore it (eg. if a caption is being changed). This is certainly the case on windows anyway - there is no need to rebuild from scratch each time. I'd look into creating a patch to do this if I had any faith it would be accepted and my effort wouldn't be wasted.
...It's clear I should not continue to waste my efforts on a project that does not want to progress.
Jamie
Yes, you're most welcome to go waste your time somewhere else.Can't say that surprises me - it's the very attitude I've described! :)
Index: trunk/src/sdk/toolsmanager.cpp
===================================================================
--- trunk/src/sdk/toolsmanager.cpp (revision 3738)
+++ trunk/src/sdk/toolsmanager.cpp (working copy)
@@ -328,10 +328,16 @@
{
tool->SetMenuId(wxNewId());
}
- m_ItemsManager.Add(menu, tool->GetMenuId(), tool->GetName(), tool->GetName());
- Connect(tool->GetMenuId(), -1, wxEVT_COMMAND_MENU_SELECTED,
- (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction)
- &ToolsManager::OnToolClick);
+
+ if (tool->GetName() == wxT("-"))
+ m_ItemsManager.Add(menu, wxID_SEPARATOR, _T(""), _T(""));
+ else
+ {
+ m_ItemsManager.Add(menu, tool->GetMenuId(), tool->GetName(), tool->GetName());
+ Connect(tool->GetMenuId(), -1, wxEVT_COMMAND_MENU_SELECTED,
+ (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction)
+ &ToolsManager::OnToolClick);
+ }
}
if (m_Tools.GetCount() > 0)
KeyBinder will soon be able to maintain shortcuts on the Tools menu.
I see you finally implemented the change I suggested above. :shock: :roll:
One last thing before I pack up my toys and play elsewhere..
Good thinking Ceniza, I wonder if that works with normal win32 menus or if it's just a wx thing..
Removing the save within cbKeyBinder::OnRelease makes for a tools menu that is fully saved and restored - every time.
Well, I'd have made the changes earlier, but I couldn't see what you were talking about because your big head was in the way. :roll:Oh dear.... I don't think it's my ego that's getting in the way of progress....
Welcome back.Thank you for your warm welcome. :) ...but I never left. While your attitude did convince me to stop trying to contribute to this project and go back to VS (at least until this project matures - along with it's developers), it doesn't mean cb isn't of any use to me on my usb key. ;)
It is a wx thing. It parses the menu text for a tab. If the text after the tab can be interpreted as a key combination, it sets the accelerator property for the platform.I thought it might be as I'd kick myself if accelerators had been that easy in win32 all this time! Thanks for explaining how it works, I don't know how language resources are handled in cb (seem to be hardcoded) but this might have been a better approach for customising all the menu shortcuts.