removed the code to manually send wxNavigationEvents, it's not needed any more

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-04-12 15:00:56 +00:00
parent 0d5f4ba3b0
commit a2e4a628ee

View File

@ -111,34 +111,6 @@ gtk_listbox_row_activated_callback(GtkTreeView *treeview,
} }
} }
//-----------------------------------------------------------------------------
// "key_press_event"
//-----------------------------------------------------------------------------
extern "C" {
static gint
gtk_listbox_key_press_callback( GtkWidget *widget,
GdkEventKey *gdk_event,
wxListBox *listbox )
{
if (g_blockEventsOnDrag) return FALSE;
if ((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab))
{
wxNavigationKeyEvent new_event;
/* GDK reports GDK_ISO_Left_Tab for SHIFT-TAB */
new_event.SetDirection( (gdk_event->keyval == GDK_Tab) );
/* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
new_event.SetWindowChange( (gdk_event->state & GDK_CONTROL_MASK) );
new_event.SetCurrentFocus( listbox );
if (listbox->GetEventHandler()->ProcessEvent( new_event ))
return TRUE;
}
return FALSE;
}
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// "changed" // "changed"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -456,11 +428,6 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
g_signal_connect_after(m_treeview, "row-activated", g_signal_connect_after(m_treeview, "row-activated",
G_CALLBACK(gtk_listbox_row_activated_callback), this); G_CALLBACK(gtk_listbox_row_activated_callback), this);
// for panel navigation
g_signal_connect (m_treeview, "key_press_event",
G_CALLBACK (gtk_listbox_key_press_callback),
this);
m_parent->DoAddChild( this ); m_parent->DoAddChild( this );
PostCreation(size); PostCreation(size);