Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18972 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-09-28 15:59:04 +00:00
parent 8cebe02569
commit 979fca9d83

View File

@ -543,25 +543,21 @@ OpenWithPoseView::CanHandleDragSelection(const Model *, const BMessage *, bool)
static void
AddSupportingAppForTypeToQuery(SearchForSignatureEntryList *queryIterator,
const char *signature)
const char *type)
{
// get supporting apps for type
BMimeType mime(signature);
BMimeType mime(type);
if (!mime.IsInstalled())
return;
BMessage message;
mime.GetSupportingApps(&message);
for (int32 index =0; ; index++) {
const char *signature;
int32 length;
// push each of the supporting apps signature uniquely
if (message.FindData("applications", 'CSTR', index, (const void **)&signature,
&length) != B_OK)
break;
// push each of the supporting apps signature uniquely
const char *signature;
for (int32 index = 0; message.FindString("applications", index,
&signature) == B_OK; index++) {
queryIterator->PushUniqueSignature(signature);
}
}
@ -1196,7 +1192,7 @@ SearchForSignatureEntryList::PushUniqueSignature(const char *str)
// do a unique add
if (fSignatures.EachElement(FindOne, (void *)str))
return;
fSignatures.AddItem(new BString(str));
}
@ -1222,12 +1218,12 @@ SearchForSignatureEntryList::GetNextDirents(struct dirent *buffer,
return fIteratorList->GetNextDirents(buffer, length, count);
}
struct AddOneTermParams {
BString *result;
bool first;
};
static const BString *
AddOnePredicateTerm(const BString *item, void *castToParams)
{