adium 5503:6ce9b9ca54fe: Fix the image copying to not repeatedly...

commits at adium.im commits at adium.im
Wed May 15 16:14:23 UTC 2013


details:	http://hg.adium.im/adium/rev/6ce9b9ca54fe
revision:	5503:6ce9b9ca54fe
branch:		adium-1.6
author:		Frank Dowsett <wixardy at adium.im>
date:		Wed May 15 12:14:06 2013 -0400

Fix the image copying to not repeatedly darken the emoticon menu for each new tab.

diffs (28 lines):

diff -r e59656c07a3d -r 6ce9b9ca54fe Frameworks/Adium Framework/Source/AIMessageEntryTextView.m
--- a/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m	Mon May 13 13:02:33 2013 -0400
+++ b/Frameworks/Adium Framework/Source/AIMessageEntryTextView.m	Wed May 15 12:14:06 2013 -0400
@@ -1794,16 +1794,19 @@
 		[emoticonsMenuButton setAction:@selector(popUpEmoticonsMenu)];
 		[[emoticonsMenuButton cell] setImageScaling:NSImageScaleNone];
 
-		[emoticonsMenuButton setImage:[emoticonsMenuIcon copy]];
+		[emoticonsMenuButton setImage:emoticonsMenuIcon];
+		
+		NSImage *alternateMenuIcon = [emoticonsMenuIcon copy];
 		
 		// Adjust image for On/Alternate state
-		[emoticonsMenuIcon lockFocus];		
-		[emoticonsMenuIcon drawAtPoint:NSZeroPoint fromRect:NSZeroRect operation:NSCompositePlusDarker fraction:0.5f];
-		[emoticonsMenuIcon unlockFocus];
+		[alternateMenuIcon lockFocus];
+		[alternateMenuIcon drawAtPoint:NSZeroPoint fromRect:NSZeroRect operation:NSCompositePlusDarker fraction:0.5f];
+		[alternateMenuIcon unlockFocus];
 		
-		[emoticonsMenuButton setAlternateImage:emoticonsMenuIcon];
+		[emoticonsMenuButton setAlternateImage:alternateMenuIcon];
 		
 		[emoticonsMenuIcon release];
+		[alternateMenuIcon release];
 
 		// Register for notifications
 		[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(positionIndicators:)




More information about the commits mailing list