Patch from wildwobby which confirms before removing logs when hitting the delete key. Fixes #13097.
authorZachary West <zacw@adium.im>
Fri Oct 16 11:01:08 2009 -0400 (2009-10-16)
changeset 26173d815231bb66
parent 2616 10ccc3f3e515
child 2618 1b8a3dce56d1
Patch from wildwobby which confirms before removing logs when hitting the delete key. Fixes #13097.
Source/AILogViewerWindowController.m
     1.1 --- a/Source/AILogViewerWindowController.m	Fri Oct 16 10:56:33 2009 -0400
     1.2 +++ b/Source/AILogViewerWindowController.m	Fri Oct 16 11:01:08 2009 -0400
     1.3 @@ -1812,7 +1812,12 @@
     1.4  
     1.5  - (void)tableViewDeleteSelectedRows:(NSTableView *)tableView
     1.6  {
     1.7 -    [self deleteSelection:nil];
     1.8 +	[resultsLock lock];
     1.9 +	NSArray *selectedLogs = [tableView_results selectedItemsFromArray:currentSearchResults];
    1.10 +	[resultsLock unlock];
    1.11 +	
    1.12 +	NSAlert *alert = [self alertForDeletionOfLogCount:[selectedLogs count]];
    1.13 +	[alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(deleteLogsAlertDidEnd:returnCode:contextInfo:) contextInfo:[selectedLogs retain]];
    1.14  }
    1.15  
    1.16  - (void)tableViewColumnDidResize:(NSNotification *)aNotification