Deskbar: Compare signature case-insensitive
This commit is contained in:
@@ -992,7 +992,7 @@ TBarView::AppCanHandleTypes(const char* signature)
|
|||||||
|| !fCachedTypesList || fCachedTypesList->CountItems() == 0)
|
|| !fCachedTypesList || fCachedTypesList->CountItems() == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (strcmp(signature, kTrackerSignature) == 0) {
|
if (strcasecmp(signature, kTrackerSignature) == 0) {
|
||||||
// tracker should support all types
|
// tracker should support all types
|
||||||
// and should pass them on to the appropriate application
|
// and should pass them on to the appropriate application
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -586,17 +586,17 @@ TExpandoMenuBar::AddTeam(BList* team, BBitmap* icon, char* name,
|
|||||||
TTeamMenuItem* item = new TTeamMenuItem(team, icon, name, signature,
|
TTeamMenuItem* item = new TTeamMenuItem(team, icon, name, signature,
|
||||||
itemWidth, itemHeight, fDrawLabel, fVertical);
|
itemWidth, itemHeight, fDrawLabel, fVertical);
|
||||||
|
|
||||||
if (settings->trackerAlwaysFirst && !strcmp(signature, kTrackerSignature))
|
if (settings->trackerAlwaysFirst
|
||||||
|
&& strcasecmp(signature, kTrackerSignature) == 0) {
|
||||||
AddItem(item, 0);
|
AddItem(item, 0);
|
||||||
else if (settings->sortRunningApps) {
|
} else if (settings->sortRunningApps) {
|
||||||
TTeamMenuItem* teamItem
|
TTeamMenuItem* teamItem = dynamic_cast<TTeamMenuItem*>(ItemAt(0));
|
||||||
= dynamic_cast<TTeamMenuItem*>(ItemAt(0));
|
|
||||||
int32 firstApp = 0;
|
int32 firstApp = 0;
|
||||||
|
|
||||||
// if Tracker should always be the first item, we need to skip it
|
// if Tracker should always be the first item, we need to skip it
|
||||||
// when sorting in the current item
|
// when sorting in the current item
|
||||||
if (settings->trackerAlwaysFirst && teamItem != NULL
|
if (settings->trackerAlwaysFirst && teamItem != NULL
|
||||||
&& !strcmp(teamItem->Signature(), kTrackerSignature)) {
|
&& !strcasecmp(teamItem->Signature(), kTrackerSignature)) {
|
||||||
firstApp++;
|
firstApp++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user