adium/adium

Merge adium-1.5.3 into default.

2012-07-25, Thijs Alkemade
95e6b347f547
Merge adium-1.5.3 into default.
--- a/ChangeLogs/Changes.txt Tue Jul 24 21:38:06 2012 +0200
+++ b/ChangeLogs/Changes.txt Wed Jul 25 01:48:15 2012 +0200
@@ -1,5 +1,11 @@
Adium Version History
-----------------------
+Version 1.5.3 (XX/XX/XXXX)
+ * Icons set for group chat bookmarks will now show up on the tab bar in the chat window. (Andreas Marienborg) (#14484)
+ * Fixed another problem with the transcript viewer causing search to fail when closing and reopening the window. (#13586)
+ * Fixed an issue that caused logging in to Facebook to fail when login approvals are enabled. (#15705)
+ * Fixed a problem with iTunes 10.6.3 on Mac OS X 10.6.8 causing the chat window's toolbar to break. (#16046)
+
Version 1.5.2 (7/21/2012)
* Fixed an issue where the log indexer would never finish.
* Fixed a number of crashes that could occur after closing the Transcript Viewer. (#15984, #15823)
--- a/Copyright.txt Tue Jul 24 21:38:06 2012 +0200
+++ b/Copyright.txt Wed Jul 25 01:48:15 2012 +0200
@@ -73,6 +73,7 @@
Daniel Ljungborg
Casey Lutz
Jeff Mahoney
+Andreas Marienborg
Sam McCandlish
Pietro Modi
Nicola Del Monaco
--- a/Frameworks/Adium Framework/Source/AIChat.m Tue Jul 24 21:38:06 2012 +0200
+++ b/Frameworks/Adium Framework/Source/AIChat.m Wed Jul 25 01:48:15 2012 +0200
@@ -127,9 +127,15 @@
//Big image
- (NSImage *)chatImage
{
- AIListContact *listObject = self.listObject;
+ AIListContact *listObject = nil;
NSImage *image = nil;
+ if (self.isGroupChat) {
+ listObject = (AIListContact *)[adium.contactController existingBookmarkForChat:self];
+ } else {
+ listObject = self.listObject;
+ }
+
if (listObject) {
image = listObject.parentContact.userIcon;
if (!image) image = [AIServiceIcons serviceIconForObject:listObject type:AIServiceIconLarge direction:AIIconNormal];
@@ -143,9 +149,15 @@
//lil image
- (NSImage *)chatMenuImage
{
- AIListObject *listObject = self.listObject;
+ AIListObject *listObject = nil;
NSImage *chatMenuImage = nil;
+ if (self.isGroupChat) {
+ listObject = (AIListContact *)[adium.contactController existingBookmarkForChat:self];
+ } else {
+ listObject = self.listObject;
+ }
+
if (listObject) {
chatMenuImage = [AIUserIcons menuUserIconForObject:listObject];
} else {
--- a/Plugins/Purple Service/AIFacebookXMPPOAuthWebViewWindowController.h Tue Jul 24 21:38:06 2012 +0200
+++ b/Plugins/Purple Service/AIFacebookXMPPOAuthWebViewWindowController.h Wed Jul 25 01:48:15 2012 +0200
@@ -14,7 +14,7 @@
@interface AIFacebookXMPPOAuthWebViewWindowController : AIWindowController {
IBOutlet WebView *webView;
IBOutlet NSProgressIndicator *spinner;
- NSMutableSet *cookies;
+ NSMutableDictionary *cookies;
AIFacebookXMPPAccount *account;
@@ -28,7 +28,7 @@
@property (nonatomic, retain) IBOutlet WebView *webView;
@property (nonatomic, retain) IBOutlet NSProgressIndicator *spinner;
-@property (nonatomic, retain) NSMutableSet *cookies;
+@property (nonatomic, retain) NSMutableDictionary *cookies;
@property (nonatomic, retain) AIFacebookXMPPAccount *account;
@property (nonatomic, retain) NSString *autoFillUsername;
--- a/Plugins/Purple Service/AIFacebookXMPPOAuthWebViewWindowController.m Tue Jul 24 21:38:06 2012 +0200
+++ b/Plugins/Purple Service/AIFacebookXMPPOAuthWebViewWindowController.m Wed Jul 25 01:48:15 2012 +0200
@@ -28,7 +28,7 @@
- (id)init
{
if ((self = [super initWithWindowNibName:@"AIFacebookXMPPOauthWebViewWindow"])) {
- self.cookies = [[[NSMutableSet alloc] init] autorelease];
+ self.cookies = [[[NSMutableDictionary alloc] init] autorelease];
}
return self;
}
@@ -163,7 +163,10 @@
- (void)addCookiesFromResponse:(NSHTTPURLResponse *)response
{
NSArray *newCookies = [NSHTTPCookie cookiesWithResponseHeaderFields:[response allHeaderFields] forURL:[response URL]];
- [cookies addObjectsFromArray:newCookies];
+
+ for (NSHTTPCookie *newCookie in newCookies) {
+ [cookies setObject:newCookie forKey:newCookie.name];
+ }
}
- (void)addCookiesToRequest:(NSMutableURLRequest *)request
@@ -173,7 +176,7 @@
NSMutableArray *sentCookies = [NSMutableArray array];
// same origin: domain, port, path.
- for (NSHTTPCookie *cookie in cookies) {
+ for (NSHTTPCookie *cookie in cookies.allValues) {
if ([[cookie expiresDate] timeIntervalSinceNow] < 0) {
//NSLog(@"****** expired: %@", cookie);
continue;
--- a/Plugins/Send Message Contact Alert/ESSendMessageContactAlertPlugin.m Tue Jul 24 21:38:06 2012 +0200
+++ b/Plugins/Send Message Contact Alert/ESSendMessageContactAlertPlugin.m Wed Jul 25 01:48:15 2012 +0200
@@ -128,6 +128,12 @@
UID:contact.UID];
}
+ /* I'm also not sure how this can occur. Apparently the contact corresponding to the destUniqueID was a
+ * meta-contact, and it had no subcontacts on account.service. Probably a broken (empty?) meta-contact
+ * or an inconsistent offline message. (#15787)
+ */
+ if (!contact) return FALSE;
+
//If the desired account is not available for sending, ask Adium for the best available account
if (![account availableForSendingContentType:CONTENT_MESSAGE_TYPE
toContact:contact]) {
--- a/Source/AILoggerPlugin.m Tue Jul 24 21:38:06 2012 +0200
+++ b/Source/AILoggerPlugin.m Wed Jul 25 01:48:15 2012 +0200
@@ -401,7 +401,6 @@
if(reindex)
[bself _resetLogIndex];
- [bself logContentIndex];
if (!userTriggeredReindex) {
if (reindex)
[bself _dirtyAllLogs];
@@ -1693,8 +1692,8 @@
if (bself->logIndex) {
[bself _flushIndex:bself->logIndex];
if (bself.canCloseIndex) {
+ AILogWithSignature(@"**** %@ Releasing its index %p (%d)", bself, bself->logIndex, CFGetRetainCount(bself->logIndex));
SKIndexClose(bself->logIndex);
- AILogWithSignature(@"**** %@ Released its index %p", bself, bself->logIndex);
bself->logIndex = nil;
}
}
--- a/Source/ESUserIconHandlingPlugin.m Tue Jul 24 21:38:06 2012 +0200
+++ b/Source/ESUserIconHandlingPlugin.m Wed Jul 25 01:48:15 2012 +0200
@@ -282,7 +282,13 @@
AIListContact *listContact;
NSImage *image;
- if ((listContact = chat.listObject.parentContact) && !chat.isGroupChat) {
+ if (chat.isGroupChat) {
+ listContact = (AIListContact *)[adium.contactController existingBookmarkForChat:chat];
+ } else {
+ listContact = chat.listObject.parentContact;
+ }
+
+ if (listContact) {
image = [listContact userIcon];
//Use the serviceIcon if no image can be found
--- a/Source/ESiTunesPlugin.m Tue Jul 24 21:38:06 2012 +0200
+++ b/Source/ESiTunesPlugin.m Wed Jul 25 01:48:15 2012 +0200
@@ -558,7 +558,14 @@
MVMenuButton *button = [[MVMenuButton alloc] initWithFrame:NSMakeRect(0,0,32,32)];
//configure the popup button and its menu
- [button setImage:[[NSWorkspace sharedWorkspace] iconForFile:iTunesPath]];
+
+ /* XXX Remove after 10.6: Apparently with iTunes 10.6.3 on Mac OS X 10.6.8, the NSIconRefImageRep
+ * that is returned by -iconfForFile: for iTunes fails to encode itself for NSCopying. Make a copy
+ * here via -TIFFRepresentation to avoid this bug.
+ * rdar://11930126 http://trac.adium.im/ticket/16046
+ */
+ NSData *imageData = [[[NSWorkspace sharedWorkspace] iconForFile:iTunesPath] TIFFRepresentation];
+ [button setImage:[[[NSImage alloc] initWithData:imageData] autorelease]];
[self createiTunesToolbarItemMenuItems:menu];
NSToolbarItem * iTunesItem = [AIToolbarUtilities toolbarItemWithIdentifier:KEY_TRIGGERS_TOOLBAR