second merge of the 2.2 branch (RL)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2000-08-08 06:11:51 +00:00
parent 8fb3bfe20f
commit 3ca6a5f046
138 changed files with 4941 additions and 2278 deletions

View File

@@ -567,7 +567,8 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, id );
event.SetEventObject( menu );
event.SetInt(id );
if (item->IsCheckable())
event.SetInt( item->IsChecked() );
#if wxUSE_MENU_CALLBACK
if (menu->GetCallback())
@@ -948,8 +949,9 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem)
// due to an apparent bug in GTK+, we have to use a static buffer here -
// otherwise GTK+ 1.2.2 manages to override the memory we pass to it
// somehow! (VZ)
static char s_accel[32]; // must be big enough for <control><alt><shift>F12
strncpy(s_accel, GetHotKey(*mitem).mb_str(), WXSIZEOF(s_accel));
static char s_accel[50]; // must be big enougg
wxString tmp( GetHotKey(*mitem) );
strncpy(s_accel, tmp.mb_str(), WXSIZEOF(s_accel));
entry.accelerator = s_accel;
#else // !wxUSE_ACCEL
entry.accelerator = (char*) NULL;
@@ -1090,6 +1092,20 @@ static wxString GetHotKey( const wxMenuItem& item )
case WXK_F12:
hotkey << wxT('F') << code - WXK_F1 + 1;
break;
// GTK seems to use XStringToKeySym here
case WXK_NUMPAD_INSERT:
hotkey << wxT("KP_Insert" );
break;
case WXK_NUMPAD_DELETE:
hotkey << wxT("KP_Delete" );
break;
case WXK_INSERT:
hotkey << wxT("Insert" );
break;
case WXK_DELETE:
hotkey << wxT("Delete" );
break;
// if there are any other keys wxGetAccelFromString() may return,
// we should process them here