зеркало из https://github.com/mozilla/pjs.git
Bug 317439, make "del" key remove items from the download window in additon to "backspace". Patch by Chris Lawson <bugzilla@chrislawson.net>. Camino-only-npotdb. r=kreeger sr=smfr
This commit is contained in:
Родитель
6b779006b8
Коммит
834727fb57
|
@ -398,23 +398,13 @@ static id gSharedProgressController = nil;
|
|||
}
|
||||
break;
|
||||
|
||||
case NSDeleteFunctionKey:
|
||||
case NSDeleteCharacter:
|
||||
{ // delete key - remove all selected items unless an active one is selected
|
||||
NSArray* selected = [self selectedProgressViewControllers];
|
||||
BOOL activeFound = NO;
|
||||
for (unsigned i = 0; i < [selected count]; i++)
|
||||
{
|
||||
if ([[selected objectAtIndex:i] isActive])
|
||||
{
|
||||
activeFound = YES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (activeFound)
|
||||
NSBeep();
|
||||
else
|
||||
{ // delete or fwd-delete key - remove all selected items unless an active one is selected
|
||||
if ([self shouldAllowRemoveAction])
|
||||
[self remove:self];
|
||||
else
|
||||
NSBeep();
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче