Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: chameleon on February 20, 2007, 02:24:32 pm

Title: Control-W bug
Post by: chameleon on February 20, 2007, 02:24:32 pm
I redefine an action for Control-W : Debug->Debugging Windows->Watches.

In menus, looks like redefination is done (Control-W applies to "Watches" and nothing applies to "Close File")

But when I press Control-W, makes current file to close.

Maybe a forgotten (hard) key definition?

Windows, almost last build.

PS: I renege my promise not to post another post ;-)
Title: Re: Control-W bug
Post by: Pecan on February 22, 2007, 03:17:53 pm
Yes, Ctrl-W is hard coded in main.cpp as "Close Window" and cannot be over-ridden by a plugin.


Code
 // Accelerator table
 wxAcceleratorEntry entries[7];

 entries[0].Set(wxACCEL_CTRL | wxACCEL_SHIFT, (int) 'W', idFileCloseAll);
 entries[1].Set(wxACCEL_CTRL | wxACCEL_SHIFT, WXK_F4, idFileCloseAll);
 entries[2].Set(wxACCEL_CTRL, (int) 'W', idFileClose);
 entries[3].Set(wxACCEL_CTRL, WXK_F4, idFileClose);
 entries[4].Set(wxACCEL_CTRL, WXK_F6, idFileNext);
 entries[5].Set(wxACCEL_CTRL | wxACCEL_SHIFT, WXK_F6, idFilePrev);
 entries[6].Set(wxACCEL_SHIFT, WXK_TAB, idShiftTab);
 m_pAccel = new wxAcceleratorTable(7, entries);

 this->SetAcceleratorTable(*m_pAccel);
Title: Re: Control-W bug
Post by: Pecan on February 24, 2007, 12:42:12 am
Fixed SVN 3639