User forums > Using Code::Blocks

[Feature Request] keyboard shortcuts for user defined tools

<< < (3/4) > >>

Pecan:

--- Quote from: jamieo on March 24, 2007, 10:29:47 pm ---...It's clear I should not continue to waste my efforts on a project that does not want to progress.

Jamie

--- End quote ---

Yes, you're most welcome to go waste your time somewhere else.

jamieo:

--- Quote from: Pecan on March 24, 2007, 10:35:43 pm ---Yes, you're most welcome to go waste your time somewhere else.
--- End quote ---
Can't say that surprises me - it's the very attitude I've described!  :)

One last thing before I pack up my toys and play elsewhere..  here's a patch that allows you to have separators in the tools menu to help organise things a bit.  It's only a simple little thing a few lines long but I was surprised not to have this functionality so here it is.  I know it has nothing to do with keybinder but the OP might benefit from it if nothing else.  I'm not going to waste any more effort trying to submit it but anybody else is welcome to do so.

There are other patches I've been working on (as well as some I've submitted for 'ThreadSearch' to dje, a developer who does welcome feedback) but they're not quite finished and it's become clear that spending more time trying to make an ide work than actually using it is counter productive!


--- Code: ---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)

--- End code ---

Ceniza:
There's actually a way to add a shortcut to the Tools, but it's tricky.

When adding or editing a tool, at the end of the "Name" of the tool add a "tab" and the key accelerator. To add the "tab", open a text editor, press tab, select it, copy it and paste it.



That should work with the help plugin too :D

Pecan:
With the new fixes from this "week of fixes" (2007/03/31), KeyBinder will soon be able to maintain shortcuts on the Tools menu.

@Ceniza, very clever. Wish I'd thought of that. :)

jamieo:

--- Quote from: Pecan on March 31, 2007, 02:11:14 pm ---KeyBinder will soon be able to maintain shortcuts on the Tools menu.

--- End quote ---

I see you finally implemented the change I suggested above. :shock: :roll:

I can confirm with the latest nightly that KeyBinder does already maintain shortcuts on the Tools menu.

Good thinking Ceniza, I wonder if that works with normal win32 menus or if it's just a wx thing..

Jamie

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version