first pass of wxUniv merge - nothing works, most parts don't even compile

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-06-26 20:59:19 +00:00
parent aeb313f31c
commit 1e6feb95a7
409 changed files with 42065 additions and 6675 deletions

View File

@@ -578,12 +578,14 @@ void wxMenuBar::SetLabelTop( size_t pos, const wxString& label )
static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
{
if (g_isIdle) wxapp_install_idle_handler();
if (g_isIdle)
wxapp_install_idle_handler();
int id = menu->FindMenuIdByMenuItem(widget);
/* should find it for normal (not popup) menu */
wxASSERT( (id != -1) || (menu->GetInvokingWindow() != NULL) );
wxASSERT_MSG( (id != -1) || (menu->GetInvokingWindow() != NULL),
_T("menu item not found in gtk_menu_clicked_callback") );
if (!menu->IsEnabled(id))
return;
@@ -607,25 +609,7 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
}
}
wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, id );
event.SetEventObject( menu );
if (item->IsCheckable())
event.SetInt( item->IsChecked() );
#if wxUSE_MENU_CALLBACK
if (menu->GetCallback())
{
(void) (*(menu->GetCallback())) (*menu, event);
return;
}
#endif // wxUSE_MENU_CALLBACK
if (menu->GetEventHandler()->ProcessEvent(event))
return;
wxWindow *win = menu->GetInvokingWindow();
if (win)
win->GetEventHandler()->ProcessEvent( event );
menu->SendEvent(item->GetId(), item->IsCheckable() ? item->IsChecked() : -1);
}
//-----------------------------------------------------------------------------