Changeset 3089

Show
Ignore:
Timestamp:
12/26/05 23:33:32 (3 years ago)
Author:
timothy
Message:

Skip some calls Cocoa will just do for us.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Additions/NSNotificationAdditions.m

    r3088 r3089  
    1414 
    1515- (void) postNotificationOnMainThreadWithName:(NSString *) name object:(id) object { 
    16         if( pthread_main_np() ) return [self postNotificationName:name object:object]; 
     16        if( pthread_main_np() ) return [self postNotificationName:name object:object userInfo:nil]; 
    1717        [self postNotificationOnMainThreadWithName:name object:object userInfo:nil waitUntilDone:NO]; 
    1818} 
     
    4646@implementation NSNotificationQueue (NSNotificationQueueAdditions) 
    4747- (void) enqueueNotificationOnMainThread:(NSNotification *) notification postingStyle:(NSPostingStyle) postingStyle { 
    48         if( pthread_main_np() ) return [self enqueueNotification:notification postingStyle:postingStyle]; 
     48        if( pthread_main_np() ) return [self enqueueNotification:notification postingStyle:postingStyle coalesceMask:( NSNotificationCoalescingOnName | NSNotificationCoalescingOnSender ) forModes:nil]; 
    4949        [self enqueueNotificationOnMainThread:notification postingStyle:postingStyle coalesceMask:( NSNotificationCoalescingOnName | NSNotificationCoalescingOnSender ) forModes:nil]; 
    5050}