]> granicus.if.org Git - transmission/commitdiff
remove the cap on the number of messages in the message log - my tests had no problem...
authorMitchell Livingston <livings124@transmissionbt.com>
Sun, 22 Nov 2009 03:56:04 +0000 (03:56 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Sun, 22 Nov 2009 03:56:04 +0000 (03:56 +0000)
macosx/MessageWindowController.m

index 2e8819d999131397aedbc1515d9f533b72dd16cf..0f8063876efcdd198820423125db6b479bbb3019 100644 (file)
@@ -32,7 +32,6 @@
 #define LEVEL_DEBUG 2
 
 #define UPDATE_SECONDS  0.6
-#define MAX_MESSAGES    8000
 
 @interface MessageWindowController (Private)
 
     
     tr_freeMessageList(messages);
     
-    NSUInteger total = [fMessages count];
-    if (total > MAX_MESSAGES)
-    {
-        //remove the oldest - move oldest to end for (assumedly) most efficient removal
-        NSSortDescriptor * descriptor = [[[NSSortDescriptor alloc] initWithKey: @"Index" ascending: NO] autorelease];
-        [fMessages sortUsingDescriptors: [NSArray arrayWithObject: descriptor]];
-        
-        [fMessages removeObjectsAtIndexes: [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(MAX_MESSAGES, total-MAX_MESSAGES)]];
-        
-        [fMessageTable noteHeightOfRowsWithIndexesChanged: [NSIndexSet indexSetWithIndexesInRange: NSMakeRange(0, MAX_MESSAGES)]];
-        total = MAX_MESSAGES;
-    }
-    
     [fMessages sortUsingDescriptors: [fMessageTable sortDescriptors]];
     
     [fMessageTable reloadData];
     if (shouldScroll)
-        [fMessageTable scrollRowToVisible: total-1];
+        [fMessageTable scrollRowToVisible: [fMessages count]-1];
 }
 
 - (NSInteger) numberOfRowsInTableView: (NSTableView *) tableView