X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ab75332894d55b557102c5a287727ca635cb1ff..fb8d7eb7a880f1f2e32d8830f9c5e12b2536e05f:/src/gtk/listbox.cpp diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index b3fcefba41..4f44746313 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -36,7 +36,7 @@ #include "wx/gtk/treeentry_gtk.h" #include -#if GTK_CHECK_VERSION(3,0,0) +#ifdef __WXGTK3__ #include #endif @@ -669,7 +669,7 @@ int wxListBox::FindString( const wxString &item, bool bCase ) const void wxListBox::GTKOnActivated(int item) { - SendEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, item, IsSelected(item)); + SendEvent(wxEVT_LISTBOX_DCLICK, item, IsSelected(item)); } void wxListBox::GTKOnSelectionChanged() @@ -682,7 +682,7 @@ void wxListBox::GTKOnSelectionChanged() { const int item = GetSelection(); if ( DoChangeSingleSelection(item) ) - SendEvent(wxEVT_COMMAND_LISTBOX_SELECTED, item, true); + SendEvent(wxEVT_LISTBOX, item, true); } } @@ -781,7 +781,7 @@ void wxListBox::DoScrollToCell(int n, float alignY, float alignX) wxCHECK_RET( IsValid(n), wxT("invalid index")); //RN: I have no idea why this line is needed... - if (gdk_pointer_is_grabbed () && gtk_widget_has_grab(GTK_WIDGET(m_treeview))) + if (gtk_widget_has_grab(GTK_WIDGET(m_treeview))) return; GtkTreeIter iter; @@ -931,7 +931,7 @@ wxSize wxListBox::DoGetBestSize() const wxVisualAttributes wxListBox::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) { - return GetDefaultAttributesFromGTKWidget(gtk_tree_view_new, true); + return GetDefaultAttributesFromGTKWidget(gtk_tree_view_new(), true); } #endif // wxUSE_LISTBOX