adium 3903:e26f2434926d: Remove unnecessary stuff from AIContact...

commits at adium.im commits at adium.im
Thu May 19 22:23:45 UTC 2011


details:	http://hg.adium.im/adium/rev/e26f2434926d
revision:	3903:e26f2434926d
branch:		(none)
author:		Adrian Godoroja <robotive at me.com>
date:		Fri May 20 01:21:20 2011 +0300

Remove unnecessary stuff from AIContactListUserPictureMenuController.
Minor event handling related additions to AIImageCollectionView.

diffs (104 lines):

diff -r f2a7f3e68380 -r e26f2434926d Frameworks/AIUtilities Framework/Source/AIImageCollectionView.m
--- a/Frameworks/AIUtilities Framework/Source/AIImageCollectionView.m	Thu May 19 02:17:03 2011 +0200
+++ b/Frameworks/AIUtilities Framework/Source/AIImageCollectionView.m	Fri May 20 01:21:20 2011 +0300
@@ -306,12 +306,16 @@
 {
 	// Highlight item
 	[self highlightItemAtIndex:[self indexAtPoint:[self convertPoint:[anEvent locationInWindow] fromView:nil]]];
+	
+	[super mouseMoved:anEvent];
 }
 
 - (void)mouseExited:(NSEvent *)anEvent
 {
 	// Reset highlight
 	[self resetHighlight];
+	
+	[super mouseExited:anEvent];
 }
 
 - (void)scrollWheel:(NSEvent *)anEvent
diff -r f2a7f3e68380 -r e26f2434926d Source/AIContactListUserPictureMenuController.m
--- a/Source/AIContactListUserPictureMenuController.m	Thu May 19 02:17:03 2011 +0200
+++ b/Source/AIContactListUserPictureMenuController.m	Fri May 20 01:21:20 2011 +0300
@@ -43,9 +43,6 @@
 - (void)choosePicture:(id)sender;
 - (void)clearRecentPictures:(id)sender;
 
-// Notifications
-- (void)parentWindowWillClose:(NSNotification *)aNotification;
-
 @end
 
 
@@ -106,11 +103,6 @@
 		}
 		
 		[self setImages:pictures];
-		
-		[[NSNotificationCenter defaultCenter] addObserver:self
-												 selector:@selector(parentWindowWillClose:)
-													 name:NSWindowWillCloseNotification
-												   object:[picker window]];
 
 		[menu popUpMenuPositioningItem:[menu itemAtIndex:0] atLocation:NSMakePoint(2.0f, -4.0f) inView:imagePicker];
 	}
@@ -162,8 +154,7 @@
     return [array autorelease];
 }
 
-#pragma mark -
-#pragma mark NSMenu delegate
+#pragma mark - NSMenu delegate
 
 - (void)menuNeedsUpdate:(NSMenu *)aMenu
 {
@@ -247,13 +238,7 @@
 	[menuItem release];
 }
 
-- (void)menuDidClose:(NSMenu *)aMenu
-{
-	[[NSNotificationCenter defaultCenter] removeObserver:self];
-}
-
-#pragma mark -
-#pragma mark AIImageCollectionView delegate
+#pragma mark - AIImageCollectionView delegate
 
 - (BOOL)imageCollectionView:(AIImageCollectionView *)collectionView shouldHighlightItemAtIndex:(NSUInteger)anIndex
 {	
@@ -291,8 +276,7 @@
 	[menu cancelTracking];
 }
 
-#pragma mark -
-#pragma mark Menu Actions
+#pragma mark - Menu Actions
 
 - (void)selectedAccount:(id)sender
 {
@@ -314,23 +298,4 @@
 	[[IKPictureTakerRecentPictureRepository recentRepository] clearRecents:YES];
 }
 
-#pragma mark -
-#pragma mark Parent Window Notifications
-
-- (void)windowDidResignMain:(NSNotification *)aNotification
-{
-	[menu cancelTracking];
-}
-
-- (void)windowDidResignKey:(NSNotification *)aNotification
-{
-	[menu cancelTracking];		
-}
-
-- (void)parentWindowWillClose:(NSNotification *)aNotification
-{
-	//Close menu, when our parent window closes
-	[menu cancelTracking];
-}
-
 @end




More information about the commits mailing list