X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0d5f4ba3b0a2192ecc0ba6d313c1e87ace5c5ad3..8ca1a013e4e699724040ff1f514dab3b4a11d3c9:/src/gtk/listbox.cpp?ds=sidebyside diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index fdc21f53e6..15c70a351d 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -32,7 +32,6 @@ #include "wx/tooltip.h" #endif -#include #include #include @@ -68,8 +67,6 @@ gtk_listbox_row_activated_callback(GtkTreeView *treeview, GtkTreeViewColumn *col, wxListBox *listbox) { - if (g_isIdle) wxapp_install_idle_handler(); - if (g_blockEventsOnDrag) return; if (g_blockEventsOnScroll) return; @@ -111,34 +108,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" //----------------------------------------------------------------------------- @@ -334,7 +303,6 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, long style, const wxValidator& validator, const wxString &name ) { - m_needParent = true; m_blockEvent = false; if (!PreCreation( parent, pos, size ) || @@ -456,11 +424,6 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, g_signal_connect_after(m_treeview, "row-activated", 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 ); PostCreation(size); @@ -923,10 +886,10 @@ int wxListBox::DoListHitTest(const wxPoint& point) const // ---------------------------------------------------------------------------- #if wxUSE_TOOLTIPS -void wxListBox::ApplyToolTip( GtkTooltips *tips, const wxChar *tip ) +void wxListBox::ApplyToolTip( GtkTooltips *tips, const gchar *tip ) { // RN: Is this needed anymore? - gtk_tooltips_set_tip( tips, GTK_WIDGET( m_treeview ), wxGTK_CONV(tip), (gchar*) NULL ); + gtk_tooltips_set_tip( tips, GTK_WIDGET( m_treeview ), tip, (gchar*) NULL ); } #endif // wxUSE_TOOLTIPS