From: Robert Roebling Date: Tue, 24 Aug 2010 17:06:15 +0000 (+0000) Subject: Make sorting of wxListBox, wxChoice and wxComboBox identical to the MSW sorting X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/625ed743015f2da84db47a6851e6011bd08f4bd2?ds=inline 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 --- diff --git a/include/wx/gtk/private/string.h b/include/wx/gtk/private/string.h index 9721015bf2..c9662bcebd 100644 --- a/include/wx/gtk/private/string.h +++ b/include/wx/gtk/private/string.h @@ -80,7 +80,7 @@ public: wxSharedPtr ptr = *iter; gchar *key = ptr->m_key; - if (strcmp(key,new_key) > 0) + if (strcmp(key,new_key) >= 0) { m_list.insert( iter, new_ptr ); return index; diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 0a266f5376..1bad9b14d7 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -280,7 +280,7 @@ static gint gtk_listbox_sort_callback(GtkTreeModel * WXUNUSED(model), //We compare collate keys here instead of calling g_utf8_collate //as it is rather slow (and even the docs reccommend this) 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 (entry2);