Changeset 602 for trunk/Cocoa/Pester/Source/NJRQTMediaPopUpButton.m
- Timestamp:
- 12/21/09 22:12:37 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source/NJRQTMediaPopUpButton.m
r600 r602 433 433 { 434 434 BDAlias *alias = [sender representedObject]; 435 int i ndex = [self indexOfItem: sender], otherIndex = [self indexOfItem: otherItem];435 int itemIndex = [self indexOfItem: sender], otherIndex = [self indexOfItem: otherItem]; 436 436 [self _setAlias: alias]; 437 437 if (![self _validateWithPreview: YES]) { 438 438 [[self menu] removeItem: sender]; 439 } else if (i ndex > otherIndex + 1) { // move "other" item to top of list440 int recentIndex = [recentMediaAliasData count] - i ndex + otherIndex;441 NSMenuItem *item = [[self itemAtIndex: i ndex] retain];439 } else if (itemIndex > otherIndex + 1) { // move "other" item to top of list 440 int recentIndex = [recentMediaAliasData count] - itemIndex + otherIndex; 441 NSMenuItem *item = [[self itemAtIndex: itemIndex] retain]; 442 442 NSData *data = [[recentMediaAliasData objectAtIndex: recentIndex] retain]; 443 443 // [self _validateRecentMedia]; 444 [self removeItemAtIndex: i ndex];444 [self removeItemAtIndex: itemIndex]; 445 445 [[self menu] insertItem: item atIndex: otherIndex + 1]; 446 446 [self selectItem: item];
Note:
See TracChangeset
for help on using the changeset viewer.