adium 3448:7c95d29f3552: Narrow the scope of this change to redu...

commits at adium.im commits at adium.im
Sat Oct 30 09:35:51 UTC 2010


details:	http://hg.adium.im/adium/rev/7c95d29f3552
revision:	3448:7c95d29f3552
author:		Evan Schoenberg
date:		Sat Oct 30 04:34:46 2010 -0500

Narrow the scope of this change to reduce possible bugs; only set the delegate if it's a contact menu and it's to laod lazily
(transplanted from 08c3c8460e3c4e994605746779c7679a9b31b330)

diffs (29 lines):

diff -r 9d074a461a19 -r 7c95d29f3552 Frameworks/Adium Framework/Source/AIAbstractListObjectMenu.m
--- a/Frameworks/Adium Framework/Source/AIAbstractListObjectMenu.m	Sat Oct 30 04:13:17 2010 -0500
+++ b/Frameworks/Adium Framework/Source/AIAbstractListObjectMenu.m	Sat Oct 30 04:34:46 2010 -0500
@@ -71,7 +71,6 @@
 {
 	if(!menu) {
 		menu = [[NSMenu allocWithZone:[NSMenu zone]] init];
-		[menu setDelegate:self];
 
 		[menu setMenuChangedMessagesEnabled:NO];
 		for (NSMenuItem *menuItem in self.menuItems)
diff -r 9d074a461a19 -r 7c95d29f3552 Frameworks/Adium Framework/Source/AIContactMenu.m
--- a/Frameworks/Adium Framework/Source/AIContactMenu.m	Sat Oct 30 04:13:17 2010 -0500
+++ b/Frameworks/Adium Framework/Source/AIContactMenu.m	Sat Oct 30 04:34:46 2010 -0500
@@ -144,6 +144,14 @@
 	return delegate;
 }
 
+- (NSMenu *)menu
+{
+	NSMenu *theMenu = [super menu];
+	if (populateMenuLazily)
+		[theMenu setDelegate:self];
+	return theMenu;
+}
+
 /*!
  * @brief Inform our delegate when the menu is rebuilt
  */




More information about the commits mailing list