adium-1.4 2664:bc1492a4a7c7: Dont ask for confirmation or try to...
commits at adium.im
commits at adium.im
Wed Oct 28 08:00:13 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/bc1492a4a7c7
revision: 2664:bc1492a4a7c7
author: William Bowling <will at wbowling.info>
date: Wed Oct 28 18:27:54 2009 +1100
Dont ask for confirmation or try to delete 0 selected logs
diffs (28 lines):
diff -r c0312fd455c7 -r bc1492a4a7c7 Source/AILogViewerWindowController.m
--- a/Source/AILogViewerWindowController.m Tue Oct 27 23:48:47 2009 -0700
+++ b/Source/AILogViewerWindowController.m Wed Oct 28 18:27:54 2009 +1100
@@ -1818,8 +1818,13 @@
NSArray *selectedLogs = [tableView_results selectedItemsFromArray:currentSearchResults];
[resultsLock unlock];
- NSAlert *alert = [self alertForDeletionOfLogCount:[selectedLogs count]];
- [alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(deleteLogsAlertDidEnd:returnCode:contextInfo:) contextInfo:[selectedLogs retain]];
+ if ([selectedLogs count] > 0) {
+ NSAlert *alert = [self alertForDeletionOfLogCount:[selectedLogs count]];
+ [alert beginSheetModalForWindow:[self window]
+ modalDelegate:self
+ didEndSelector:@selector(deleteLogsAlertDidEnd:returnCode:contextInfo:)
+ contextInfo:[selectedLogs retain]];
+ }
}
- (void)tableViewColumnDidResize:(NSNotification *)aNotification
@@ -2565,7 +2570,7 @@
modalDelegate:self
didEndSelector:@selector(deleteLogsAlertDidEnd:returnCode:contextInfo:)
contextInfo:[selectedLogs retain]];
- } else {
+ } else if ([selectedLogs count] == 1) {
[self deleteLogsAlertDidEnd:nil
returnCode:NSAlertFirstButtonReturn
contextInfo:[selectedLogs retain]];
More information about the commits
mailing list