adium-1.4 3556:64e7045b71bf: Fix compilation on 10.5

commits at adium.im commits at adium.im
Mon Jun 27 00:18:24 UTC 2011


details:	http://hg.adium.im/adium-1.4/rev/64e7045b71bf
revision:	3556:64e7045b71bf
branch:		(none)
author:		Evan Schoenberg
date:		Sun Jun 26 19:18:19 2011 -0500

Fix compilation on 10.5

diffs (25 lines):

diff -r 89e0195da5b0 -r 64e7045b71bf Plugins/Purple Service/AIFacebookXMPPOAuthWebViewWindowController.m
--- a/Plugins/Purple Service/AIFacebookXMPPOAuthWebViewWindowController.m	Sun Jun 26 14:22:43 2011 -0500
+++ b/Plugins/Purple Service/AIFacebookXMPPOAuthWebViewWindowController.m	Sun Jun 26 19:18:19 2011 -0500
@@ -105,10 +105,17 @@
 			DOMDocument *domDoc = [frame DOMDocument];
             
             if (self.isMigrating) {
-                NSString *text = domDoc.body.innerHTML;
-                text = [text stringByReplacingOccurrencesOfString:@"Log in to use your Facebook account"
-                                                       withString:@"The new version of Adium has a much more reliable Facebook Chat service. Log in to use your Facebook account"];
-                domDoc.body.innerHTML = text;
+				
+				/* 10.5.x doesn't get this nicety, I don't believe; compilation errors on domDoc.body, at least */
+				if ([domDoc respondsToSelector:@selector(body)]) {
+					DOMHTMLElement *body = [domDoc body];
+					if ([body respondsToSelector:@selector(innerHTML)]) {
+						NSString *text = [body innerHTML];
+						text = [text stringByReplacingOccurrencesOfString:@"Log in to use your Facebook account"
+															   withString:@"The new version of Adium has a much more reliable Facebook Chat service. Log in to use your Facebook account"];
+						[body setInnerHTML:text];
+					}
+				}
             }
 
             




More information about the commits mailing list