Commits

Anonymous committed bcc2489

Don't need the * on an id. Also remove the unneeded import of defines

  • Participants
  • Parent commits 1ceef23
  • Branches default

Comments (0)

Files changed (2)

File BeepController.m

 @implementation BeepController
 
 - (id) init {
-	if ( self = [super init] ) {
-		_notifications = [[NSMutableArray alloc] init];
-	}
-	return self;
+    if ( self = [super init] ) {
+        _notifications = [[NSMutableArray alloc] init];
+    }
+    return self;
 }
 
 - (void) dealloc {
-	[_notifications release];
-	_notifications = nil;
+    [_notifications release];
+    _notifications = nil;
 }
 
 #pragma mark -
 
 - (IBAction)showAddSheet:(id)sender { 
-	[NSApp beginSheet:_newNotificationPanel 
-	   modalForWindow:_beepWindow 
-		modalDelegate:nil 
-	   didEndSelector:nil 
-		  contextInfo:nil];
-	
-	[NSApp runModalForWindow:_newNotificationPanel];
-	[NSApp endSheet:_newNotificationPanel];
-	[_newNotificationPanel orderOut:self];
+    [NSApp beginSheet:_newNotificationPanel 
+       modalForWindow:_beepWindow 
+        modalDelegate:nil 
+       didEndSelector:nil 
+          contextInfo:nil];
+    
+    [NSApp runModalForWindow:_newNotificationPanel];
+    [NSApp endSheet:_newNotificationPanel];
+    [_newNotificationPanel orderOut:self];
 }
 
 - (IBAction)addNotification:(id)sender {
 }
 
 - (IBAction)registerBeep:(id)sender {
-	if ( [_registered state] == NSOnState ) {
-		NSLog( @"Button on" );
-		NSMutableArray *defNotesArray = [NSMutableArray array];
-		NSMutableArray *allNotesArray = [NSMutableArray array];
-		NSEnumerator *defNotes = [_notifications objectEnumerator];
-		id def;
-		int k = 0;
-		
-		while ( def = [defNotes nextObject] ) {
-			if ( [(NSDictionary *)def objectForKey:GROWL_NOTIFICATION_DEFAULT] ) {
-				[defNotesArray addObject:[def objectForKey:GROWL_NOTIFICATION_TITLE]];
-			}
-		}
-		
-		for ( k=0; k < [_notifications count]; k++ ) {
-			[allNotesArray addObject:[[_notifications objectAtIndex:k] objectForKey:GROWL_NOTIFICATION_TITLE]];
-		}
-		
-		NSDictionary *regDict = [[NSDictionary alloc] initWithObjectsAndKeys:   @"Beep", GROWL_APP_NAME, 
-																				allNotesArray, GROWL_NOTIFICATIONS_ALL, 
-																				defNotesArray, GROWL_NOTIFICATIONS_DEFAULT,
-																				nil];
-		
-		[[NSDistributedNotificationCenter defaultCenter] postNotificationName:GROWL_APP_REGISTRATION 
-																	   object:nil 
-																	 userInfo:regDict];
-	} else {
-		NSLog( @"Button off" );	
-	}
+    if ( [_registered state] == NSOnState ) {
+        NSLog( @"Button on" );
+        NSMutableArray *defNotesArray = [NSMutableArray array];
+        NSMutableArray *allNotesArray = [NSMutableArray array];
+        NSEnumerator *defNotes = [_notifications objectEnumerator];
+        id def;
+        int k = 0;
+        
+        while ( def = [defNotes nextObject] ) {
+            if ( [(NSDictionary *)def objectForKey:GROWL_NOTIFICATION_DEFAULT] ) {
+                [defNotesArray addObject:[def objectForKey:GROWL_NOTIFICATION_TITLE]];
+            }
+        }
+        
+        for ( k=0; k < [_notifications count]; k++ ) {
+            [allNotesArray addObject:[[_notifications objectAtIndex:k] objectForKey:GROWL_NOTIFICATION_TITLE]];
+        }
+        
+        NSDictionary *regDict = [[NSDictionary alloc] initWithObjectsAndKeys:   @"Beep", GROWL_APP_NAME, 
+            allNotesArray, GROWL_NOTIFICATIONS_ALL, 
+            defNotesArray, GROWL_NOTIFICATIONS_DEFAULT,
+            nil];
+        
+        [[NSDistributedNotificationCenter defaultCenter] postNotificationName:GROWL_APP_REGISTRATION 
+                                                                       object:nil 
+                                                                     userInfo:regDict];
+    } else {
+        NSLog( @"Button off" );	
+    }
 }
 
 - (IBAction)sendNotification:(id)sender {
 }
 
 - (IBAction) endPanel:(id)sender {
-	[NSApp stopModal];
+    [NSApp stopModal];
 }
 
 #pragma mark Table Data Source
 
 - (int)numberOfRowsInTableView:(NSTableView *)aTableView {
-	return [_notifications count];
+    return [_notifications count];
 }
 
 - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex {
-	return [[_notifications objectAtIndex:rowIndex] objectForKey:GROWL_NOTIFICATION_TITLE];
+    return [[_notifications objectAtIndex:rowIndex] objectForKey:GROWL_NOTIFICATION_TITLE];
 }
 
 #pragma mark Table Delegate Methods
 
 - (BOOL)tableView:(NSTableView *)tableView shouldEditTableColumn:(NSTableColumn *)tableColumn row:(int)row {
-	return NO;
+    return NO;
 }
 
 @end

File GrowlController.h

 //
 
 #import <Foundation/Foundation.h>
-#import "GrowlDefines.h" //this should not be needed
+
+@protocol GrowlDisplayPlugin;
 
 @interface GrowlController : NSObject {
 	NSMutableDictionary			*_tickets;				//Application tickets
-	id <GrowlDisplayPlugin>		*_displayController;
+	id <GrowlDisplayPlugin>		_displayController;
 }
 
 - (void) dispatchNotification:(NSNotification *) note;