예제 #1
0
static int
compare_typed_list_items(const BListItem* _a, const BListItem* _b)
{
	// TODO: sort them using collators.
	LanguageListItem* a = (LanguageListItem*)_a;
	LanguageListItem* b = (LanguageListItem*)_b;
	return strcasecmp(a->Text(), b->Text());
}
예제 #2
0
static int
compare_typed_list_items(const BListItem* _a, const BListItem* _b)
{
	static BCollator collator;

	LanguageListItem* a = (LanguageListItem*)_a;
	LanguageListItem* b = (LanguageListItem*)_b;

	return collator.Compare(a->Text(), b->Text());
}
LanguageListItem::LanguageListItem(const LanguageListItem& other)
	:
	BStringItem(other.Text()),
	fID(other.fID),
	fCode(other.fCode)
{
}