adium 2087:91f62fffba29: Propertyize, and tighten up delegate ty...

commits at adium.im commits at adium.im
Tue May 5 07:28:50 UTC 2009


details:	http://hg.adium.im/adium/rev/91f62fffba29
revision:	2087:91f62fffba29
author:		David Smith <catfish.man at gmail.com>
date:		Tue May 05 00:28:17 2009 -0700

Propertyize, and tighten up delegate typechecking a little
Subject: adium 2088:e55580d85f00: Automated merge with ssh://hg@hg.adiumx.com/adium

details:	http://hg.adium.im/adium/rev/e55580d85f00
revision:	2088:e55580d85f00
author:		David Smith <catfish.man at gmail.com>
date:		Tue May 05 00:28:37 2009 -0700

Automated merge with ssh://hg@hg.adiumx.com/adium

diffstat:

 Plugins/Bonjour/libezv/Classes/AWEzvContact.h           |   5 +++--
 Plugins/Bonjour/libezv/Classes/AWEzvContact.m           |   1 -
 Plugins/Bonjour/libezv/Private Classes/AWEzvXMLStream.h |   9 ++++-----
 Plugins/Bonjour/libezv/Private Classes/AWEzvXMLStream.m |  15 ++++-----------
 Plugins/Purple Service/CBPurpleAccount.m                |   7 +++++--
 5 files changed, 16 insertions(+), 21 deletions(-)

diffs (127 lines):

diff -r 1093e7d0ae59 -r e55580d85f00 Plugins/Bonjour/libezv/Classes/AWEzvContact.h
--- a/Plugins/Bonjour/libezv/Classes/AWEzvContact.h	Mon May 04 16:04:38 2009 -0700
+++ b/Plugins/Bonjour/libezv/Classes/AWEzvContact.h	Tue May 05 00:28:37 2009 -0700
@@ -31,10 +31,11 @@
  */
 
 #import "AWEzvDefines.h"
+#import "AWEzvXMLStream.h"
 
 @class AWEzvXMLStream, AWEzvRendezvousData, AWEzvContactManager, NSImage, ServiceController, EKEzvOutgoingFileTransfer;
 
- at interface AWEzvContact : NSObject {
+ at interface AWEzvContact : NSObject <AWEzvXMLStreamProtocol> {
 	NSString *name;
 	NSString *uniqueID;
 	NSData *contactImageData;
@@ -51,7 +52,7 @@
 	ServiceController *addressServiceController;
 }
 
- at property (readwrite, retain, nonatomic) NSString *uniqueID;
+ at property (readwrite, copy, nonatomic) NSString *uniqueID;
 @property (readwrite, retain, nonatomic) NSData *contactImageData;
 @property (readwrite, retain, nonatomic) NSString *imageHash;
 @property (readonly, nonatomic) AWEzvStatus status;
diff -r 1093e7d0ae59 -r e55580d85f00 Plugins/Bonjour/libezv/Classes/AWEzvContact.m
--- a/Plugins/Bonjour/libezv/Classes/AWEzvContact.m	Mon May 04 16:04:38 2009 -0700
+++ b/Plugins/Bonjour/libezv/Classes/AWEzvContact.m	Tue May 05 00:28:37 2009 -0700
@@ -34,7 +34,6 @@
 #import "AWEzvContact.h"
 #import "AWEzvContactPrivate.h"
 #import "AWEzvXMLNode.h"
-#import "AWEzvXMLStream.h"
 #import "AWEzvRendezvousData.h"
 #import "AWEzvContactManager.h"
 #import "AWEzvContactManagerRendezvous.h"
diff -r 1093e7d0ae59 -r e55580d85f00 Plugins/Bonjour/libezv/Private Classes/AWEzvXMLStream.h
--- a/Plugins/Bonjour/libezv/Private Classes/AWEzvXMLStream.h	Mon May 04 16:04:38 2009 -0700
+++ b/Plugins/Bonjour/libezv/Private Classes/AWEzvXMLStream.h	Tue May 05 00:28:37 2009 -0700
@@ -45,13 +45,12 @@
 }
 
 - (id) initWithFileHandle:(NSFileHandle *)connection initiator:(int)initiator;
-- (NSFileHandle *)fileHandle;
+ at property (readonly, nonatomic) NSFileHandle *fileHandle;
 - (void) readAndParse;
 - (void) sendData:(NSData *)data;
 - (void) sendString:(NSString *)string;
 - (void) endConnection;
-- (void) setDelegate:(id)delegate;
-- (id) delegate;
+ at property (assign, readwrite, nonatomic) id<AWEzvXMLStreamProtocol> delegate;
 
 /* Private methods: used by private implementation, do NOT use these methods */
 - (void) xmlStartElement:(const XML_Char *)name attributes:(const XML_Char **)attributes;
@@ -66,6 +65,6 @@
 @protocol AWEzvXMLStreamProtocol
 - (void) XMLConnectionClosed;
 - (void) XMLReceived:(AWEzvXMLNode *)root;
-- (NSString *) uniqueID;
-- (AWEzvContactManager *) manager;
+ at property (readonly, copy, nonatomic) NSString *uniqueID;
+ at property (readonly, retain, nonatomic) AWEzvContactManager *manager;
 @end
diff -r 1093e7d0ae59 -r e55580d85f00 Plugins/Bonjour/libezv/Private Classes/AWEzvXMLStream.m
--- a/Plugins/Bonjour/libezv/Private Classes/AWEzvXMLStream.m	Mon May 04 16:04:38 2009 -0700
+++ b/Plugins/Bonjour/libezv/Private Classes/AWEzvXMLStream.m	Tue May 05 00:28:37 2009 -0700
@@ -59,7 +59,7 @@
 
 - (id) initWithFileHandle:(NSFileHandle *)myConnection initiator:(int)myInitiator 
 {
-    if ((self = [super init])) {
+	if ((self = [super init])) {
 		connection = [myConnection retain];
 		delegate = nil;
 		nodeStack = [[AWEzvStack alloc] init];
@@ -67,7 +67,7 @@
 		negotiated = 0;
 	}	
     
-    return self;
+	return self;
 }
 
 - (void)dealloc
@@ -83,9 +83,7 @@
 	[super dealloc];
 }
 
-- (NSFileHandle *)fileHandle {
-    return connection;
-}
+ at synthesize fileHandle = connection;
 
 - (void) readAndParse {
     [[NSNotificationCenter defaultCenter] addObserver:self
@@ -154,12 +152,7 @@
     [[aNotification object] readInBackgroundAndNotify];
 }
 
-- (void) setDelegate:(id)myDelegate {
-    delegate = myDelegate;
-}
-- (id) delegate {
-    return delegate;
-}
+ at synthesize delegate;
 
 - (void) xmlStartElement:(const XML_Char *)name attributes:(const XML_Char **)attributes {
     AWEzvXMLNode    *node;
diff -r 1093e7d0ae59 -r e55580d85f00 Plugins/Purple Service/CBPurpleAccount.m
--- a/Plugins/Purple Service/CBPurpleAccount.m	Mon May 04 16:04:38 2009 -0700
+++ b/Plugins/Purple Service/CBPurpleAccount.m	Tue May 05 00:28:37 2009 -0700
@@ -907,8 +907,11 @@
 {
 	[purpleAdapter closeChat:chat];
 	
-	//Be sure any remaining typing flag is cleared as the chat closes
-	[self setTypingFlagOfChat:chat to:nil];
+	if (!chat.isGroupChat) {
+		//Be sure any remaining typing flag is cleared as the chat closes
+		[self setTypingFlagOfChat:chat to:nil];
+	}
+	
 	AILog(@"purple closeChat:%@",chat.uniqueChatID);
 	
     return YES;




More information about the commits mailing list