--- a/Frameworks/AIUtilities Framework/Source/AIColorAdditions.m Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/AIUtilities Framework/Source/AIColorAdditions.m Fri May 03 00:06:06 2013 +0200
@@ -163,6 +163,7 @@
[NSColor colorWithHTMLString:@"#00f"], @"blue",
[NSColor colorWithHTMLString:@"#008080"], @"teal",
[NSColor colorWithHTMLString:@"#0ff"], @"aqua",
+ [NSColor colorWithHTMLString:@"#4b0082"], @"indigo", NSArray *paths = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:defaultRGBTxtLocation1 error:NULL];
for (NSString *middlePath in paths) {
@@ -527,7 +528,9 @@
NSDictionary *colorValues = [self colorNamesDictionary];
colorValue = [colorValues objectForKey:str];
if (!colorValue) colorValue = [colorValues objectForKey:[str lowercaseString]];
NSLog(@"+[NSColor(AIColorAdditions) colorWithHTMLString:] called with unrecognised color name (str is %@); returning %@", str, defaultColor);
--- a/Frameworks/AIUtilities Framework/Source/AIImageViewWithImagePicker.m Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/AIUtilities Framework/Source/AIImageViewWithImagePicker.m Fri May 03 00:06:06 2013 +0200
@@ -254,7 +254,7 @@
//Draw our original image as 50% transparent
- [[self image] dissolveToPoint:NSZeroPoint fraction:0.5f];
+ [[self image] drawAtPoint:NSZeroPoint fromRect:NSMakeRect(0, 0, self.image.size.width, self.image.size.height) operation:NSCompositeCopy fraction:0.5f]; //We want the image to resize
--- a/Frameworks/Adium Framework/Source/AIAbstractListController.m Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIAbstractListController.m Fri May 03 00:06:06 2013 +0200
@@ -28,6 +28,7 @@
#import <Adium/AIListObject.h>
#import <Adium/AIListContact.h>
#import <Adium/AIListGroup.h>
+#import <Adium/AIGroupChat.h> #import <Adium/AIMetaContact.h>
#import <Adium/AIListOutlineView.h>
#import <Adium/AIMenuControllerProtocol.h>
@@ -590,11 +591,20 @@
id<AIContainingObject> listObject = (id<AIContainingObject>)(item.listObject);
proxyListObject = [AIProxyListObject proxyListObjectForListObject:[listObject visibleObjectAtIndex:idx]
inListObject:listObject];
- proxyListObject = [AIProxyListObject proxyListObjectForListObject:[contactList visibleObjectAtIndex:idx]
- inListObject:contactList];
+ if ([contactList isKindOfClass:[AIGroupChat class]]) { + NSString *nick = [(AIGroupChat *)contactList visibleObjectAtIndex:idx]; + AIListObject *listObject = [(AIGroupChat *)contactList contactForNick:nick]; + proxyListObject = [AIProxyListObject proxyListObjectForListObject:listObject + inListObject:contactList + proxyListObject = [AIProxyListObject proxyListObjectForListObject:[contactList visibleObjectAtIndex:idx] + inListObject:contactList]; proxyListObject = [AIProxyListObject proxyListObjectForListObject:contactList
--- a/Frameworks/Adium Framework/Source/AIChat.m Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIChat.m Fri May 03 00:06:06 2013 +0200
@@ -606,6 +606,7 @@
AIContentMessage *messageContent;
messageContent = [AIContentMessage messageInChat:self
destination:self.listObject
message:attributedMessage
--- a/Frameworks/Adium Framework/Source/AIContentMessage.h Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIContentMessage.h Fri May 03 00:06:06 2013 +0200
@@ -45,7 +45,15 @@
- message:(NSAttributedString *)inMessage
+ message:(NSAttributedString *)inMessage + autoreply:(BOOL)inAutoReply; ++ (id)messageInChat:(AIChat *)inChat + withSource:(id)inSource + sourceNick:(NSString *)inSourceNick + message:(NSAttributedString *)inMessage autoreply:(BOOL)inAutoreply;
/*! @brief Create an AIContentMessage.
@@ -56,6 +64,7 @@
- (id)initWithChat:(AIChat *)inChat
+ sourceNick:(NSString *)inSourceNick message:(NSAttributedString *)inMessage
--- a/Frameworks/Adium Framework/Source/AIContentMessage.m Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIContentMessage.m Fri May 03 00:06:06 2013 +0200
@@ -21,7 +21,6 @@
@implementation AIContentMessage
-//Create a content message
+ (id)messageInChat:(AIChat *)inChat
@@ -30,11 +29,30 @@
autoreply:(BOOL)inAutoReply
return [[self alloc] initWithChat:inChat
- autoreply:inAutoReply];
+ autoreply:inAutoReply]; +//Create a content message ++ (id)messageInChat:(AIChat *)inChat + withSource:(id)inSource + sourceNick:(NSString *)inSourceNick + message:(NSAttributedString *)inMessage + autoreply:(BOOL)inAutoReply + return [[self alloc] initWithChat:inChat + sourceNick:inSourceNick + autoreply:inAutoReply]; @@ -46,12 +64,13 @@
- (id)initWithChat:(AIChat *)inChat
+ sourceNick:(NSString *)inSourceNick message:(NSAttributedString *)inMessage
autoreply:(BOOL)inAutoReply
- if ((self = [super initWithChat:inChat source:inSource destination:inDest date:inDate message:inMessage])) {
+ if ((self = [super initWithChat:inChat source:inSource sourceNick:inSourceNick destination:inDest date:inDate message:inMessage])) { isAutoreply = inAutoReply;
encodedMessageAccountData = nil;
@@ -66,7 +85,7 @@
[classes addObject:@"message"];
if(isAutoreply) [classes addObject:@"autoreply"];
if(self.chat.isGroupChat) {
- AIGroupChatFlags flags = [(AIGroupChat *)self.chat flagsForContact:(AIListContact *)self.source];
+ AIGroupChatFlags flags = [(AIGroupChat *)self.chat flagsForNick:self.sourceNick]; if (flags & AIGroupChatOp)
[classes addObject:@"op"];
if (flags & AIGroupChatHalfOp)
@@ -83,7 +102,7 @@
if (!self.chat.isGroupChat) return @"";
- AIGroupChatFlags flags = [(AIGroupChat *)self.chat flagsForContact:(AIListContact *)self.source];
+ AIGroupChatFlags flags = [(AIGroupChat *)self.chat flagsForNick:self.sourceNick]; if ((flags & AIGroupChatFounder) == AIGroupChatFounder) {
--- a/Frameworks/Adium Framework/Source/AIContentObject.h Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIContentObject.h Fri May 03 00:06:06 2013 +0200
@@ -38,6 +38,7 @@
AIListObject *destination;
NSAttributedString *message;
@@ -86,6 +87,13 @@
message:(NSAttributedString *)inMessage;
+- (id)initWithChat:(AIChat *)inChat + source:(AIListObject *)inSource + sourceNick:(NSString *)inSourceNick + destination:(AIListObject *)inDest + message:(NSAttributedString *)inMessage; /*! @brief The type of content.
* @par There is at least one type defined for every concrete subclass of \c AIContentObject.
@@ -254,4 +262,6 @@
@property (nonatomic) BOOL postProcessContent;
+@property (nonatomic, retain) NSString *sourceNick; --- a/Frameworks/Adium Framework/Source/AIContentObject.m Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIContentObject.m Fri May 03 00:06:06 2013 +0200
@@ -22,7 +22,7 @@
@implementation AIContentObject
@synthesize source, destination, date, isOutgoing = outgoing, chat, message, userInfo;
-@synthesize filterContent, trackContent, displayContent, displayContentImmediately, sendContent, postProcessContent;
+@synthesize filterContent, trackContent, displayContent, displayContentImmediately, sendContent, postProcessContent, sourceNick; - (id)initWithChat:(AIChat *)inChat
source:(AIListObject *)inSource
@@ -31,12 +31,23 @@
return [self initWithChat:inChat source:inSource destination:inDest date:inDate message:nil];
- (id)initWithChat:(AIChat *)inChat
source:(AIListObject *)inSource
destination:(AIListObject *)inDest
message:(NSAttributedString *)inMessage
+ return [self initWithChat:inChat source:inSource sourceNick:nil destination:inDest date:inDate message:inMessage]; +- (id)initWithChat:(AIChat *)inChat + source:(AIListObject *)inSource + sourceNick:(NSString *)inSourceNick + destination:(AIListObject *)inDest + message:(NSAttributedString *)inMessage if ((self = [super init]))
@@ -49,6 +60,7 @@
//Store source, dest, chat, ...
+ sourceNick = inSourceNick; date = (inDate ? inDate : [NSDate date]);
--- a/Frameworks/Adium Framework/Source/AIContentTopic.h Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIContentTopic.h Fri May 03 00:06:06 2013 +0200
@@ -27,8 +27,9 @@
+ (id)topicInChat:(AIChat *)inChat
+ sourceNick:(NSString *)inSourceNick
message:(NSAttributedString *)inMessage;
@property (nonatomic) BOOL actuallyBlank;
--- a/Frameworks/Adium Framework/Source/AIContentTopic.m Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIContentTopic.m Fri May 03 00:06:06 2013 +0200
@@ -20,12 +20,14 @@
@implementation AIContentTopic
+ (id)topicInChat:(AIChat *)inChat
+ sourceNick:(NSString *)inSourceNick message:(NSAttributedString *)inMessage
return [super messageInChat:inChat
+ sourceNick:inSourceNick --- a/Frameworks/Adium Framework/Source/AIGroupChat.h Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIGroupChat.h Fri May 03 00:06:06 2013 +0200
@@ -18,10 +18,11 @@
@interface AIGroupChat : AIChat <AIContainingObject> {
- NSMutableDictionary *participatingContactsFlags;
- NSMutableDictionary *participatingContactsAliases;
- NSMutableArray *participatingContacts;
+ NSMutableDictionary *participatingNicksFlags; + NSMutableDictionary *participatingNicksContacts; + NSMutableArray *participatingNicks; @@ -33,26 +34,29 @@
@property (readonly, nonatomic) BOOL supportsTopic;
-- (void)updateTopic:(NSString *)inTopic withSource:(AIListContact *)contact;
+- (void)updateTopic:(NSString *)inTopic withSource:(NSString *)contact; - (void)setTopic:(NSString *)inTopic;
@property (readwrite, copy, nonatomic) NSDate *lastMessageDate;
// Group chat participants.
-- (NSString *)displayNameForContact:(AIListObject *)contact;
-- (AIGroupChatFlags)flagsForContact:(AIListObject *)contact;
-- (NSString *)aliasForContact:(AIListObject *)contact;
-- (void)setFlags:(AIGroupChatFlags)flags forContact:(AIListObject *)contact;
-- (void)setAlias:(NSString *)alias forContact:(AIListObject *)contact;
-- (void)removeSavedValuesForContactUID:(NSString *)contactUID;
+- (AIListContact *)contactForNick:(NSString *)nick; +- (AIGroupChatFlags)flagsForNick:(NSString *)nick; +- (void)setFlags:(AIGroupChatFlags)flags forNick:(NSString *)nick; +- (void)setContact:(AIListContact *)contact forNick:(NSString *)nick; +- (void)changeNick:(NSString *)from to:(NSString *)to; +- (void)removeSavedValuesForNick:(NSString *)nick; +- (NSArray *)nicksForContact:(AIListObject *)contact; -- (void)addParticipatingListObject:(AIListContact *)inObject notify:(BOOL)notify;
-- (void)addParticipatingListObjects:(NSArray *)inObjects notify:(BOOL)notify;
+- (void)addParticipatingNick:(NSString *)inObject notify:(BOOL)notify; +- (void)addParticipatingNicks:(NSArray *)inObjects notify:(BOOL)notify; - (void)removeAllParticipatingContactsSilently;
-- (void)removeObject:(AIListObject *)inObject;
+- (void)removeObject:(NSString *)inObject; - (BOOL)inviteListContact:(AIListContact *)inObject withMessage:(NSString *)inviteMessage;
- (void)resortParticipants;
+- (NSString *)visibleObjectAtIndex:(NSUInteger)idx; --- a/Frameworks/Adium Framework/Source/AIGroupChat.m Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIGroupChat.m Fri May 03 00:06:06 2013 +0200
@@ -31,7 +31,6 @@
@interface AIGroupChat ()
- (void)contentObjectAdded:(NSNotification *)notification;
-- (AIListContact *)visibleObjectAtIndex:(NSUInteger)idx;
@@ -46,9 +45,9 @@
if ((self = [super initForAccount:inAccount])) {
- participatingContacts = [[NSMutableArray alloc] init];
- participatingContactsFlags = [[NSMutableDictionary alloc] init];
- participatingContactsAliases = [[NSMutableDictionary alloc] init];
+ participatingNicks = [[NSMutableArray alloc] init]; + participatingNicksFlags = [[NSMutableDictionary alloc] init]; + participatingNicksContacts = [[NSMutableDictionary alloc] init]; [[NSNotificationCenter defaultCenter] addObserver:self
@@ -117,20 +116,6 @@
[super object:inObject didChangeValueForProperty:key notify:notify];
- * @brief The alias for a given contact
-- (NSString *)aliasForContact:(AIListObject *)contact
- NSString *alias = [participatingContactsAliases objectForKey:contact.UID];
- alias = [self.account fallbackAliasForContact:(AIListContact *)contact inChat:self];
AIGroupChatFlags highestFlag(AIGroupChatFlags flags)
if ((flags & AIGroupChatFounder) == AIGroupChatFounder)
@@ -194,15 +179,18 @@
* @brief Update the topic.
-- (void)updateTopic:(NSString *)inTopic withSource:(AIListContact *)contact
+- (void)updateTopic:(NSString *)inTopic withSource:(NSString *)nick + AIListContact *contact = [self contactForNick:nick]; [self setValue:inTopic forProperty:KEY_TOPIC notify:NotifyNow];
- [self setValue:contact forProperty:KEY_TOPIC_SETTER notify:NotifyNow];
+ [self setValue:nick forProperty:KEY_TOPIC_SETTER notify:NotifyNow]; // Apply the new topic to the message view
AIContentTopic *contentTopic = [AIContentTopic topicInChat:self
message:[NSAttributedString stringWithString:[self valueForProperty:KEY_TOPIC] ?: @""]];
@@ -250,15 +238,15 @@
- (void)resortParticipants
- [participatingContacts sortUsingComparator:^(id objectA, id objectB){
- AIGroupChatFlags flagA = highestFlag([self flagsForContact:objectA]), flagB = highestFlag([self flagsForContact:objectB]);
+ [participatingNicks sortUsingComparator:^(id objectA, id objectB){ + AIGroupChatFlags flagA = highestFlag([self flagsForNick:objectA]), flagB = highestFlag([self flagsForNick:objectB]); return (NSComparisonResult)NSOrderedAscending;
} else if (flagA < flagB) {
return (NSComparisonResult)NSOrderedDescending;
- return [[self displayNameForContact:objectA] localizedCaseInsensitiveCompare:[self displayNameForContact:objectB]];
+ return [objectA localizedCaseInsensitiveCompare:objectB]; @@ -266,46 +254,42 @@
//Participating ListObjects --------------------------------------------------------------------------------------------
#pragma mark Participating ListObjects
- * @brief The display name for the contact in this chat.
- * @param contact The AIListObject whose display name should be created
- * If the user has an alias set, the alias is used, otherwise the display name.
- * @returns Display name
-- (NSString *)displayNameForContact:(AIListObject *)contact
+- (AIListObject *)contactForNick:(NSString *)nick + return [participatingNicksContacts objectForKey:nick]; +- (AIGroupChatFlags)flagsForNick:(NSString *)nick - return [self aliasForContact:contact] ?: contact.displayName;
+ return [[participatingNicksFlags objectForKey:nick] intValue]; +- (void)setFlags:(AIGroupChatFlags)flags forNick:(NSString *)nick + [participatingNicksFlags setObject:@(flags)
- * @brief The flags for a given contact.
-- (AIGroupChatFlags)flagsForContact:(AIListObject *)contact
+- (void)setContact:(AIListContact *)contact forNick:(NSString *)nick - return [(NSNumber *)[participatingContactsFlags objectForKey:contact.UID] intValue];
+ NSParameterAssert(contact != nil); + [participatingNicksContacts setObject:contact
- * @brief Set the flags for a contact
- * Note that this doesn't set the bitwise or; this directly sets the value passed.
-- (void)setFlags:(AIGroupChatFlags)flags forContact:(AIListObject *)contact
+- (void)changeNick:(NSString *)from to:(NSString *)to - [participatingContactsFlags setObject:[NSNumber numberWithInteger:flags]
- * @brief Set the alias for a contact.
-- (void)setAlias:(NSString *)alias forContact:(AIListObject *)contact
- [participatingContactsAliases setObject:alias
+ [participatingNicks removeObject:from]; + [participatingNicks addObject:to]; + NSNumber *flags = [participatingNicksFlags objectForKey:from]; + [participatingNicksFlags removeObjectForKey:from]; + if (flags) [participatingNicksFlags setObject:flags forKey:to]; + AIListObject *contact = [participatingNicksContacts objectForKey:from]; + [participatingNicksContacts removeObjectForKey:from]; + if (contact) [participatingNicksContacts setObject:contact forKey:to]; @@ -314,35 +298,41 @@
* Removes any values which are dependent upon the contact, such as
-- (void)removeSavedValuesForContactUID:(NSString *)contactUID
+- (void)removeSavedValuesForNick:(NSString *)nick - [participatingContactsFlags removeObjectForKey:contactUID];
- [participatingContactsAliases removeObjectForKey:contactUID];
-- (void)addParticipatingListObject:(AIListContact *)inObject notify:(BOOL)notify
- [self addParticipatingListObjects:[NSArray arrayWithObject:inObject] notify:notify];
+ [participatingNicksFlags removeObjectForKey:nick]; + [participatingNicksContacts removeObjectForKey:nick]; -- (void)addParticipatingListObjects:(NSArray *)inObjects notify:(BOOL)notify
+- (NSArray *)nicksForContact:(AIListObject *)contact - NSMutableArray *contacts = [inObjects mutableCopy];
- for (AIListObject *obj in inObjects) {
- if ([self containsObject:obj] || ![self canContainObject:obj])
- [contacts removeObject:obj];
+ NSMutableArray *nicks = [NSMutableArray array]; + for (NSString *nick in participatingNicks) { + if ([[participatingNicksContacts objectForKey:nick] isEqual:contact]) { + [nicks addObject:nick]; - [participatingContacts addObjectsFromArray:contacts];
- [adium.chatController chat:self addedListContacts:contacts notify:notify];
+- (void)addParticipatingNick:(NSString *)inObject notify:(BOOL)notify + [self addParticipatingNicks:[NSArray arrayWithObject:inObject] notify:notify]; -- (BOOL)addObject:(AIListObject *)inObject
+- (void)addParticipatingNicks:(NSArray *)inObjects notify:(BOOL)notify - NSParameterAssert([inObject isKindOfClass:[AIListContact class]]);
+ [participatingNicks addObjectsFromArray:inObjects]; + [adium.chatController chat:self addedListContacts:inObjects notify:notify]; +- (BOOL)addObject:(NSString *)inObject + NSParameterAssert([inObject isKindOfClass:[NSString class]]); - [self addParticipatingListObject:(AIListContact *)inObject notify:YES];
+ [self addParticipatingNick:inObject notify:YES]; @@ -352,84 +342,97 @@
return ([self.account inviteContact:inContact toChat:self withMessage:inviteMessage]);
-#pragma mark AIContainingObject protocol
+- (NSArray *)containedObjects + return [participatingNicksContacts allValues]; - (NSArray *)visibleContainedObjects
return self.containedObjects;
-- (NSArray *)containedObjects
- return participatingContacts;
- (NSUInteger)countOfContainedObjects
- return [participatingContacts count];
+ return [participatingNicks count]; - (BOOL)containsObject:(AIListObject *)inObject
- return [participatingContacts containsObjectIdenticalTo:inObject];
+ return [[participatingNicksContacts allValues] containsObjectIdenticalTo:inObject]; -- (AIListContact *)visibleObjectAtIndex:(NSUInteger)idx
+- (NSString *)visibleObjectAtIndex:(NSUInteger)idx - return [participatingContacts objectAtIndex:idx];
+ return [participatingNicks objectAtIndex:idx]; - (NSUInteger)visibleIndexOfObject:(AIListObject *)obj
if(![[AIContactHidingController sharedController] visibilityOfListObject:obj inContainer:self])
- return [participatingContacts indexOfObject:obj];
+ for (NSString *nick in participatingNicks) { + if ([[participatingNicksContacts objectForKey:nick] isEqual:obj]) { + return [participatingNicks indexOfObject:nick]; - (NSArray *)uniqueContainedObjects
- return self.containedObjects;
+ NSMutableArray *contacts = [NSMutableArray array]; + for (AIListContact *contact in [participatingNicksContacts allValues]) { + if (![contacts containsObject:contacts]) { + [contacts addObject:contact]; -- (void)removeObject:(AIListObject *)inObject
+- (void)removeObject:(NSString *)inObject - if ([self containsObject:inObject]) {
- AIListContact *contact = (AIListContact *)inObject; //if we contain it, it has to be an AIListContact
- [participatingContacts removeObject:inObject];
+ AIListContact *contact = [participatingNicksContacts valueForKey:inObject]; + [participatingNicks removeObject:inObject]; + [self removeSavedValuesForNick:inObject]; + [adium.chatController chat:self removedListContact:contact]; + if (contact.isStranger && + ![adium.chatController allGroupChatsContainingContact:contact.parentContact].count && + ![adium.chatController existingChatWithContact:contact.parentContact]) { - [self removeSavedValuesForContactUID:inObject.UID];
- [adium.chatController chat:self removedListContact:contact];
- if (contact.isStranger &&
- ![adium.chatController allGroupChatsContainingContact:contact.parentContact].count &&
- ![adium.chatController existingChatWithContact:contact.parentContact]) {
- [[AIContactObserverManager sharedManager] delayListObjectNotifications];
- [adium.contactController accountDidStopTrackingContact:contact];
- [[AIContactObserverManager sharedManager] endListObjectNotificationsDelaysImmediately];
+ [[AIContactObserverManager sharedManager] delayListObjectNotifications]; + [adium.contactController accountDidStopTrackingContact:contact]; + [[AIContactObserverManager sharedManager] endListObjectNotificationsDelaysImmediately]; -- (void)removeObjectAfterAccountStopsTracking:(AIListObject *)object
+- (void)removeObjectAfterAccountStopsTracking:(NSString *)object - [self removeObject:object]; //does nothing if we've already removed it
+ [self removeObject:object]; - (void)removeAllParticipatingContactsSilently
/* Note that allGroupChatsContainingContact won't count this chat if it's already marked as not open */
- for (AIListContact *listContact in self) {
+ for (AIListContact *listContact in [participatingNicksContacts allValues]) { if (listContact.isStranger &&
![adium.chatController existingChatWithContact:listContact.parentContact] &&
([adium.chatController allGroupChatsContainingContact:listContact.parentContact].count == 0)) {
[adium.contactController accountDidStopTrackingContact:listContact];
- [participatingContacts removeAllObjects];
- [participatingContactsFlags removeAllObjects];
- [participatingContactsAliases removeAllObjects];
+ [participatingNicks removeAllObjects]; + [participatingNicksFlags removeAllObjects]; + [participatingNicksContacts removeAllObjects]; [[NSNotificationCenter defaultCenter] postNotificationName:Chat_ParticipatingListObjectsChanged
@@ -448,7 +451,7 @@
- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(__unsafe_unretained id [])stackbuf count:(NSUInteger)len
- return [participatingContacts countByEnumeratingWithState:state objects:stackbuf count:len];
+ return [participatingNicks countByEnumeratingWithState:state objects:stackbuf count:len]; - (BOOL) canContainObject:(id)obj
--- a/Frameworks/Adium Framework/Source/AIListContactGroupChatCell.m Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIListContactGroupChatCell.m Fri May 03 00:06:06 2013 +0200
@@ -25,11 +25,10 @@
- (NSString *)labelString
- AIListObject *listObject = [proxyObject listObject];
- if (chat && [chat displayNameForContact:listObject]) {
- label = [chat displayNameForContact:listObject];
+ if (proxyObject.nick) { + label = proxyObject.nick; label = [super labelString];
@@ -39,23 +38,21 @@
- AIListObject *listObject = [proxyObject listObject];
- return [[AIGroupChatStatusIcons sharedIcons] imageForFlag:[chat flagsForContact:listObject]];
+ return [[AIGroupChatStatusIcons sharedIcons] imageForFlag:[chat flagsForNick:proxyObject.nick]]; - (NSImage *)serviceImage
// We can't use [listObject statusIcon] because it will show unknown for strangers.
- AIListObject *listObject = [proxyObject listObject];
- return [AIStatusIcons statusIconForListObject:listObject
+ AIListContact *listObject = [chat contactForNick:proxyObject.nick]; + return [AIStatusIcons statusIconForListObject:(AIListObject *)listObject direction:AIIconFlipped];
- AIListObject *listObject = [proxyObject listObject];
- return [[AIGroupChatStatusIcons sharedIcons] colorForFlag:[chat flagsForContact:listObject]];
+ return [[AIGroupChatStatusIcons sharedIcons] colorForFlag:[chat flagsForNick:proxyObject.nick]]; - (float)imageOpacityForDrawing
--- a/Frameworks/Adium Framework/Source/AIProxyListObject.h Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIProxyListObject.h Fri May 03 00:06:06 2013 +0200
@@ -25,6 +25,7 @@
NSAttributedString *cachedDisplayName;
NSDictionary *cachedLabelAttributes;
NSSize cachedDisplayNameSize;
@property (nonatomic, copy) NSDictionary *cachedLabelAttributes;
@property (nonatomic, strong) NSString *cachedDisplayNameString;
@@ -32,6 +33,7 @@
@property (nonatomic) NSSize cachedDisplayNameSize;
@property (nonatomic, strong) NSString *key;
+@property (nonatomic, strong) NSString *nick; @property (nonatomic, weak) AIListObject *listObject;
@property (nonatomic, weak) ESObjectWithProperties <AIContainingObject> * containingObject;
@@ -42,6 +44,10 @@
+ (AIProxyListObject *)existingProxyListObjectForListObject:(ESObjectWithProperties *)inListObject
inListObject:(ESObjectWithProperties <AIContainingObject>*)inContainingObject;
++ (AIProxyListObject *)proxyListObjectForListObject:(AIListObject *)inListObject + inListObject:(ESObjectWithProperties <AIContainingObject>*)inContainingObject + withNick:(NSString *)inNick; * @brief Called when an AIListObject is done with an AIProxyListObject to remove it from the global dictionary
--- a/Frameworks/Adium Framework/Source/AIProxyListObject.m Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/AIProxyListObject.m Fri May 03 00:06:06 2013 +0200
@@ -25,7 +25,7 @@
@implementation AIProxyListObject
@synthesize key, cachedDisplayName, cachedDisplayNameString, cachedLabelAttributes, cachedDisplayNameSize;
-@synthesize listObject, containingObject;
+@synthesize listObject, containingObject, nick; static inline NSMutableDictionary *_getProxyDict() {
@@ -52,10 +52,21 @@
+ (AIProxyListObject *)proxyListObjectForListObject:(AIListObject *)inListObject
inListObject:(ESObjectWithProperties <AIContainingObject>*)inContainingObject
+ return [self proxyListObjectForListObject:inListObject inListObject:inContainingObject withNick:nil]; ++ (AIProxyListObject *)proxyListObjectForListObject:(AIListObject *)inListObject + inListObject:(ESObjectWithProperties <AIContainingObject>*)inContainingObject + withNick:(NSString *)inNick AIProxyListObject *proxy;
NSString *key = (inContainingObject ?
[NSString stringWithFormat:@"%@-%@", inListObject.internalObjectID, inContainingObject.internalObjectID] :
inListObject.internalObjectID);
+ key = [key stringByAppendingFormat:@"-%@", inNick]; proxy = [proxyDict objectForKey:key];
@@ -73,6 +84,7 @@
proxy.listObject = inListObject;
proxy.containingObject = inContainingObject;
[inListObject noteProxyObject:proxy];
[proxyDict setObject:proxy
--- a/Frameworks/Adium Framework/Source/ESFileTransfer.m Fri Apr 26 18:36:46 2013 +0200
+++ b/Frameworks/Adium Framework/Source/ESFileTransfer.m Fri May 03 00:06:06 2013 +0200
@@ -70,6 +70,7 @@
if ((self = [super initWithChat:aChat
message:[[NSAttributedString alloc] initWithString:@""]