adium 3578:e0e26b920fc4: Don't display this relatively nonsensic...

commits at adium.im commits at adium.im
Tue Nov 30 21:06:28 UTC 2010


details:	http://hg.adium.im/adium/rev/e0e26b920fc4
revision:	3578:e0e26b920fc4
author:		Evan Schoenberg
date:		Wed Nov 24 15:31:02 2010 -0500

Don't display this relatively nonsensical error alert. I've seen and had reports of this happening during application termination. Just return nil.
(transplanted from 5ff785a3e1daa8171c1f988fc3119d41c2681501)
Subject: adium 3579:b00b8bac3f80: When checking to see if the HTML includes an RTL div, do a case-insensitive search. This check had been broken by changes in AIHTMLDecoder; it's significantly less fragile if case insensitive. Fixes #10403 I believe, though I have not tested it.

details:	http://hg.adium.im/adium/rev/b00b8bac3f80
revision:	3579:b00b8bac3f80
author:		Evan Schoenberg
date:		Tue Nov 30 14:53:31 2010 -0600

When checking to see if the HTML includes an RTL div, do a case-insensitive search. This check had been broken by changes in AIHTMLDecoder; it's significantly less fragile if case insensitive. Fixes #10403 I believe, though I have not tested it.
(transplanted from dd1d939811c78acbf52ed4b833de146ef6085998)

diffs (33 lines):

diff -r 48c5b6b69d35 -r b00b8bac3f80 Plugins/WebKit Message View/AIWebkitMessageViewStyle.m
--- a/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m	Sun Nov 28 09:22:54 2010 +0100
+++ b/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m	Tue Nov 30 14:53:31 2010 -0600
@@ -810,8 +810,10 @@
 				  withString:[NSColor representedColorForObject:contentSource.UID withValidColors:self.validSenderColors]];
 	
 	//HAX. The odd conditional here detects the rtl html that our html parser spits out.
+	BOOL isRTL = ([inString rangeOfString:@"<div dir=\"rtl\">"
+								  options:(NSCaseInsensitiveSearch | NSLiteralSearch)].location != NSNotFound);
 	[inString replaceKeyword:@"%messageDirection%"
-				  withString:(([inString rangeOfString:@"<DIV dir=\"rtl\">"].location != NSNotFound) ? @"rtl" : @"ltr")];
+				  withString:(isRTL ? @"rtl" : @"ltr")];
 	
 	//Replaces %time{x}% with a timestamp formatted like x (using NSDateFormatter)
 	do{
diff -r 48c5b6b69d35 -r b00b8bac3f80 Source/AIInterfaceController.m
--- a/Source/AIInterfaceController.m	Sun Nov 28 09:22:54 2010 +0100
+++ b/Source/AIInterfaceController.m	Tue Nov 30 14:53:31 2010 -0600
@@ -1306,12 +1306,8 @@
 	//trap prevents us from crashing if they happen to disable all the available message view plugins.
 	//PUT THAT PLUGIN BACK IT WAS IMPORTANT!
 	if ([messageViewArray count] == 0) {
-		NSRunCriticalAlertPanel(@"No Message View Plugin Installed",
-								@"Adium cannot find its message view plugin. Please re-install.  If you've manually disabled Adium's message view plugin, please re-enable it.",
-								@"Quit",
-								nil,
-								nil);
-		[NSApp terminate:nil];
+		AILogWithSignature(@"WARNING: Called for %@ without a mesage display controller.", inChat);
+		return nil;
 	}
 	
 	return [[messageViewArray objectAtIndex:0] messageDisplayControllerForChat:inChat];




More information about the commits mailing list