From 834727fb57844cf08384fad3c0c8357f88318d32 Mon Sep 17 00:00:00 2001 From: "mark%moxienet.com" Date: Thu, 1 Dec 2005 16:58:28 +0000 Subject: [PATCH] Bug 317439, make "del" key remove items from the download window in additon to "backspace". Patch by Chris Lawson . Camino-only-npotdb. r=kreeger sr=smfr --- camino/src/download/ProgressDlgController.mm | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/camino/src/download/ProgressDlgController.mm b/camino/src/download/ProgressDlgController.mm index 93d541b7bd7..595731df88e 100644 --- a/camino/src/download/ProgressDlgController.mm +++ b/camino/src/download/ProgressDlgController.mm @@ -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;