[haiku-commits] Re: haiku: hrev50508 - src/apps/deskbar

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 22 Aug 2016 20:04:29 -0400

This and the previous commit are only partially correct; you should be
getting the coallator using
BLocale::Default()->GetCollator(&collator).

On Mon, Aug 22, 2016 at 7:54 PM,  <jscipione@xxxxxxxxx> wrote:

hrev50508 adds 1 changeset to branch 'master'
old head: bd6dcb363fc870e5d539308d55cc1b5f2d777d29
new head: dd6fccb0629852693b4bbb03037431a63470d0f1
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=dd6fccb06298+%5Ebd6dcb363fc8

----------------------------------------------------------------------------

dd6fccb06298: Deskbar: Add new apps using locale collator

  ... sorry I overlooked this case in my last commit. Need to add apps using
  the locale collator Compare() method instead of strcasecmp() as well.

  Fixes #7712 better.

                                     [ John Scipione <jscipione@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev50508
Commit:      dd6fccb0629852693b4bbb03037431a63470d0f1
URL:         http://cgit.haiku-os.org/haiku/commit/?id=dd6fccb06298
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Mon Aug 22 23:52:25 2016 UTC

Ticket:      https://dev.haiku-os.org/ticket/7712

----------------------------------------------------------------------------

1 file changed, 2 insertions(+), 1 deletion(-)
src/apps/deskbar/ExpandoMenuBar.cpp | 3 ++-

----------------------------------------------------------------------------

diff --git a/src/apps/deskbar/ExpandoMenuBar.cpp 
b/src/apps/deskbar/ExpandoMenuBar.cpp
index 3e03deb..66df4e6 100644
--- a/src/apps/deskbar/ExpandoMenuBar.cpp
+++ b/src/apps/deskbar/ExpandoMenuBar.cpp
@@ -647,7 +647,8 @@ TExpandoMenuBar::AddTeam(BList* team, BBitmap* icon, 
char* name,
                int32 itemCount = CountItems();
                while (i < itemCount) {
                        teamItem = dynamic_cast<TTeamMenuItem*>(ItemAt(i));
-                       if (teamItem != NULL && strcasecmp(teamItem->Label(), 
name) > 0) {
+                       if (teamItem != NULL && 
gCollator.Compare(teamItem->Label(), name)
+                                       > 0) {
                                AddItem(item, i);
                                break;
                        }



Other related posts: