Attempt to fix #14484: Wrong group chat icon on tabs adium-1.5.3
authorAndreas Marienborg <omega@palle.net>
Sat, 21 Jul 2012 23:29:09 +0700
branchadium-1.5.3
changeset 4898eac298cb768a
parent 4897 5ea3bd51010d
child 4899 9f195727e81d
Attempt to fix #14484: Wrong group chat icon on tabs

The lookup of contact information when getting images was not consistent with
how it was done elsewhere in the same file. Changed it to special case
isGroupChat here as well, and the images showed up.

Fixes #14484, r=xnyhps
Copyright.txt
Frameworks/Adium Framework/Source/AIChat.m
     1.1 --- a/Copyright.txt	Sun Jul 22 13:37:42 2012 +0200
     1.2 +++ b/Copyright.txt	Sat Jul 21 23:29:09 2012 +0700
     1.3 @@ -73,6 +73,7 @@
     1.4  Daniel Ljungborg
     1.5  Casey Lutz
     1.6  Jeff Mahoney
     1.7 +Andreas Marienborg
     1.8  Sam McCandlish
     1.9  Pietro Modi
    1.10  Nicola Del Monaco
     2.1 --- a/Frameworks/Adium Framework/Source/AIChat.m	Sun Jul 22 13:37:42 2012 +0200
     2.2 +++ b/Frameworks/Adium Framework/Source/AIChat.m	Sat Jul 21 23:29:09 2012 +0700
     2.3 @@ -127,9 +127,15 @@
     2.4  //Big image
     2.5  - (NSImage *)chatImage
     2.6  {
     2.7 -	AIListContact 	*listObject = self.listObject;
     2.8 +	AIListContact 	*listObject = nil;
     2.9  	NSImage			*image = nil;
    2.10  
    2.11 +	if (self.isGroupChat) {
    2.12 +		listObject = (AIListContact *)[adium.contactController existingBookmarkForChat:self];
    2.13 +	} else {
    2.14 +		listObject = self.listObject;
    2.15 +	}
    2.16 +
    2.17  	if (listObject) {
    2.18  		image = listObject.parentContact.userIcon;
    2.19  		if (!image) image = [AIServiceIcons serviceIconForObject:listObject type:AIServiceIconLarge direction:AIIconNormal];
    2.20 @@ -143,9 +149,15 @@
    2.21  //lil image
    2.22  - (NSImage *)chatMenuImage
    2.23  {
    2.24 -	AIListObject 	*listObject = self.listObject;
    2.25 +	AIListObject 	*listObject = nil;
    2.26  	NSImage			*chatMenuImage = nil;
    2.27  	
    2.28 +	if (self.isGroupChat) {
    2.29 +		listObject = (AIListContact *)[adium.contactController existingBookmarkForChat:self];
    2.30 +	} else {
    2.31 +		listObject = self.listObject;
    2.32 +	}
    2.33 +
    2.34  	if (listObject) {
    2.35  		chatMenuImage = [AIUserIcons menuUserIconForObject:listObject];
    2.36  	} else {