From a19aeafc4a1204482f399344836f069a6bc965b7 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 17 Apr 2014 06:22:14 +0000 Subject: [PATCH] use a prefix match for interactive search having to type in the whole string to get a match is worthless git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/listbox.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index edacaa6463..9db502ae2e 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -225,11 +225,11 @@ static gboolean gtk_listbox_searchequal_callback(GtkTreeModel * WXUNUSED(model), wxListBox* listbox) { wxTreeEntry* entry = GetEntry(listbox->m_liststore, iter, listbox); - wxCHECK_MSG(entry, 0, wxT("Could not get entry")); + wxCHECK_MSG(entry, true, "could not get entry"); - wxGtkString keycollatekey(g_utf8_collate_key(key, -1)); + wxGtkString keyc(g_utf8_collate_key(key, -1)); - return strcmp(keycollatekey, wx_tree_entry_get_collate_key(entry)) != 0; + return strncmp(keyc, wx_tree_entry_get_collate_key(entry), strlen(keyc)); } }