Make sorting of wxListBox, wxChoice and wxComboBox identical to the MSW sorting

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2010-08-24 17:06:15 +00:00
parent 16e4586527
commit 625ed74301
2 changed files with 2 additions and 2 deletions

View File

@@ -80,7 +80,7 @@ public:
wxSharedPtr<wxGtkCollatableString> ptr = *iter; wxSharedPtr<wxGtkCollatableString> ptr = *iter;
gchar *key = ptr->m_key; gchar *key = ptr->m_key;
if (strcmp(key,new_key) > 0) if (strcmp(key,new_key) >= 0)
{ {
m_list.insert( iter, new_ptr ); m_list.insert( iter, new_ptr );
return index; return index;

View File

@@ -280,7 +280,7 @@ static gint gtk_listbox_sort_callback(GtkTreeModel * WXUNUSED(model),
//We compare collate keys here instead of calling g_utf8_collate //We compare collate keys here instead of calling g_utf8_collate
//as it is rather slow (and even the docs reccommend this) //as it is rather slow (and even the docs reccommend this)
int ret = strcmp(gtk_tree_entry_get_collate_key(entry), int ret = strcmp(gtk_tree_entry_get_collate_key(entry),
gtk_tree_entry_get_collate_key(entry2)); gtk_tree_entry_get_collate_key(entry2)) >= 0;
g_object_unref (entry); g_object_unref (entry);
g_object_unref (entry2); g_object_unref (entry2);