]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/listbox.cpp
corrected off by 1 error in cMB2WC() call (thanks valgrind)
[wxWidgets.git] / src / gtk / listbox.cpp
index fdc21f53e6910ff35e17b2349068d1bd03eddd8c..15c70a351daed662f35462f938e65ed91867f166 100644 (file)
@@ -32,7 +32,6 @@
     #include "wx/tooltip.h"
 #endif
 
-#include <gdk/gdk.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
@@ -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