1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-06 13:54:12 +01:00

- Fixed WMArray.

- Changed WMList to use WMArray instead of WMBag
- Fixed compilation problems in WPrefs.app
This commit is contained in:
dan
2000-09-23 03:49:58 +00:00
parent 18b7dcc2b0
commit 41ff127444
8 changed files with 399 additions and 387 deletions

View File

@@ -100,18 +100,18 @@ static int
closestListItem(WMList *list, char *text, Bool exact)
{
WMListItem *item;
WMBag *items = WMGetListItems(list);
WMBagIterator i;
int len = strlen(text);
WMArray *items = WMGetListItems(list);
int i, len = strlen(text);
if (len==0)
return -1;
WM_ITERATE_BAG(items, item, i) {
for(i=0; i<WMGetArrayItemCount(items); i++) {
item = WMGetFromArray(items, i);
if (strlen(item->text) >= len &&
((exact && strcmp(item->text, text)==0) ||
(!exact && strncmp(item->text, text, len)==0))) {
return WMBagIndexForIterator(items, i);
return i;
}
}