Changeset 3729

Show
Ignore:
Timestamp:
09/14/07 00:51:11 (1 year ago)
Author:
timothy
Message:

Remove the NSNotificationQueue category since it isn't used.

Files:

Legend:

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

    r3109 r3729  
    77- (void) postNotificationOnMainThreadWithName:(NSString *) name object:(id) object userInfo:(NSDictionary *) userInfo waitUntilDone:(BOOL) wait; 
    88@end 
    9  
    10 @interface NSNotificationQueue (NSNotificationQueueAdditions) 
    11 - (void) enqueueNotificationOnMainThread:(NSNotification *) notification postingStyle:(NSPostingStyle) postingStyle; 
    12 - (void) enqueueNotificationOnMainThread:(NSNotification *) notification postingStyle:(NSPostingStyle) postingStyle coalesceMask:(unsigned) coalesceMask forModes:(NSArray *) modes; 
    13 @end 
  • trunk/Additions/NSNotificationAdditions.m

    r3533 r3729  
    4848} 
    4949@end 
    50  
    51 @implementation NSNotificationQueue (NSNotificationQueueAdditions) 
    52 - (void) enqueueNotificationOnMainThread:(NSNotification *) notification postingStyle:(NSPostingStyle) postingStyle { 
    53         if( pthread_main_np() ) return [self enqueueNotification:notification postingStyle:postingStyle coalesceMask:( NSNotificationCoalescingOnName | NSNotificationCoalescingOnSender ) forModes:nil]; 
    54         [self enqueueNotificationOnMainThread:notification postingStyle:postingStyle coalesceMask:( NSNotificationCoalescingOnName | NSNotificationCoalescingOnSender ) forModes:nil]; 
    55 } 
    56  
    57 - (void) enqueueNotificationOnMainThread:(NSNotification *) notification postingStyle:(NSPostingStyle) postingStyle coalesceMask:(unsigned) coalesceMask forModes:(NSArray *) modes { 
    58         if( pthread_main_np() ) return [self enqueueNotification:notification postingStyle:postingStyle coalesceMask:coalesceMask forModes:modes]; 
    59  
    60         NSMutableDictionary *info = [[NSMutableDictionary allocWithZone:nil] initWithCapacity:4]; 
    61         if( notification ) [info setObject:notification forKey:@"notification"]; 
    62         [info setObject:[NSNumber numberWithUnsignedInt:postingStyle] forKey:@"postingStyle"]; 
    63         [info setObject:[NSNumber numberWithUnsignedInt:coalesceMask] forKey:@"coalesceMask"]; 
    64         if( modes ) [info setObject:modes forKey:@"modes"]; 
    65  
    66         [[self class] performSelectorOnMainThread:@selector( _enqueueNotification: ) withObject:info waitUntilDone:NO]; 
    67 } 
    68  
    69 + (void) _enqueueNotification:(NSDictionary *) info { 
    70         NSNotification *notification = [info objectForKey:@"notification"]; 
    71         NSPostingStyle postingStyle = [[info objectForKey:@"postingStyle"] unsignedIntValue]; 
    72         unsigned coalesceMask = [[info objectForKey:@"coalesceMask"] unsignedIntValue]; 
    73         NSArray *modes = [info objectForKey:@"modes"]; 
    74  
    75         [[self defaultQueue] enqueueNotification:notification postingStyle:postingStyle coalesceMask:coalesceMask forModes:modes]; 
    76  
    77         [info release]; 
    78 } 
    79 @end