use correct signature for callback
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -195,11 +195,10 @@ static void tree_entry_destroy_cb(wxTreeEntry* entry,
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
static gint gtk_listbox_sort_callback(GtkTreeModel * WXUNUSED(model),
|
static int
|
||||||
GtkTreeIter *a,
|
sort_callback(GtkTreeModel*, GtkTreeIter* a, GtkTreeIter* b, void* data)
|
||||||
GtkTreeIter *b,
|
|
||||||
wxListBox *listbox)
|
|
||||||
{
|
{
|
||||||
|
wxListBox* listbox = static_cast<wxListBox*>(data);
|
||||||
wxTreeEntry* entry1 = GetEntry(listbox->m_liststore, a, listbox);
|
wxTreeEntry* entry1 = GetEntry(listbox->m_liststore, a, listbox);
|
||||||
wxCHECK_MSG(entry1, 0, wxT("Could not get first entry"));
|
wxCHECK_MSG(entry1, 0, wxT("Could not get first entry"));
|
||||||
|
|
||||||
@@ -218,12 +217,10 @@ static gint gtk_listbox_sort_callback(GtkTreeModel * WXUNUSED(model),
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
static gboolean gtk_listbox_searchequal_callback(GtkTreeModel * WXUNUSED(model),
|
static gboolean
|
||||||
gint WXUNUSED(column),
|
search_callback(GtkTreeModel*, int, const char* key, GtkTreeIter* iter, void* data)
|
||||||
const gchar* key,
|
|
||||||
GtkTreeIter* iter,
|
|
||||||
wxListBox* listbox)
|
|
||||||
{
|
{
|
||||||
|
wxListBox* listbox = static_cast<wxListBox*>(data);
|
||||||
wxTreeEntry* entry = GetEntry(listbox->m_liststore, iter, listbox);
|
wxTreeEntry* entry = GetEntry(listbox->m_liststore, iter, listbox);
|
||||||
wxCHECK_MSG(entry, true, "could not get entry");
|
wxCHECK_MSG(entry, true, "could not get entry");
|
||||||
|
|
||||||
@@ -327,10 +324,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
|||||||
// NB: If this is enabled a doubleclick event (activate) gets sent
|
// NB: If this is enabled a doubleclick event (activate) gets sent
|
||||||
// on a successful search
|
// on a successful search
|
||||||
gtk_tree_view_set_search_column(m_treeview, WXLISTBOX_DATACOLUMN);
|
gtk_tree_view_set_search_column(m_treeview, WXLISTBOX_DATACOLUMN);
|
||||||
gtk_tree_view_set_search_equal_func(m_treeview,
|
gtk_tree_view_set_search_equal_func(m_treeview, search_callback, this, NULL);
|
||||||
(GtkTreeViewSearchEqualFunc) gtk_listbox_searchequal_callback,
|
|
||||||
this,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
gtk_tree_view_set_enable_search(m_treeview, FALSE);
|
gtk_tree_view_set_enable_search(m_treeview, FALSE);
|
||||||
|
|
||||||
@@ -365,7 +359,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
|
|||||||
// Set the sort callback
|
// Set the sort callback
|
||||||
gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(m_liststore),
|
gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(m_liststore),
|
||||||
WXLISTBOX_DATACOLUMN,
|
WXLISTBOX_DATACOLUMN,
|
||||||
(GtkTreeIterCompareFunc) gtk_listbox_sort_callback,
|
sort_callback,
|
||||||
this, //userdata
|
this, //userdata
|
||||||
NULL //"destroy notifier"
|
NULL //"destroy notifier"
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user