adium 4633:1734068b1ce6: Blacklist the Skype plugin in 1.5, as i...

commits at adium.im commits at adium.im
Wed Feb 1 11:41:49 UTC 2012


details:	http://hg.adium.im/adium/rev/1734068b1ce6
revision:	4633:1734068b1ce6
branch:		(none)
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Wed Feb 01 12:41:03 2012 +0100

Blacklist the Skype plugin in 1.5, as it's known to be broken.

I know this introduces new strings that probably will not be translated in time, but too many people have it installed and don't know they need to update it.

diffs (59 lines):

diff -r e5bc62906ccf -r 1734068b1ce6 Frameworks/Adium Framework/Source/AICorePluginLoader.m
--- a/Frameworks/Adium Framework/Source/AICorePluginLoader.m	Tue Jan 31 16:38:56 2012 +0200
+++ b/Frameworks/Adium Framework/Source/AICorePluginLoader.m	Wed Feb 01 12:41:03 2012 +0100
@@ -48,6 +48,7 @@
 + (BOOL)confirmPluginAtPath:(NSString *)pluginPath;
 + (BOOL)confirmPluginArchitectureAtPath:(NSString *)pluginPath;
 + (BOOL)confirmMinimumVersionMetForPluginAtPath:(NSString *)pluginPath;
++ (BOOL)pluginIsBlacklisted:(NSBundle *)plugin;
 + (void)disablePlugin:(NSString *)pluginPath;
 + (BOOL)allDependenciesMetForPluginAtPath:(NSString *)pluginPath;
 @end
@@ -134,6 +135,17 @@
 	[super dealloc];
 }
 
++ (BOOL)pluginIsBlacklisted:(NSBundle *)plugin
+{
+	// Only one right now: the Skype plugin that works with 1.4 crashes #15590.
+	if ([[plugin bundleIdentifier] isEqualToString:@"org.bigbrownchunx.skypeplugin"] &&
+		[[[plugin infoDictionary] objectForKey:@"CFBundleVersion"] isEqualToString:@"1.0"]) {
+		return YES;
+	}
+	
+	return NO;
+}
+
 /*!
  * @brief Load plugins from the specified path
  *
@@ -158,7 +170,6 @@
 		return;
 	}
 	
-	
 	//Confirm the presence of external plugins with the user
 	if (confirmLoading && 
 		(![self confirmMinimumVersionMetForPluginAtPath:pluginPath] ||
@@ -179,6 +190,21 @@
 	@try
 	{
 		if ((pluginBundle = [NSBundle bundleWithPath:pluginPath])) {
+			
+			if ([self pluginIsBlacklisted:pluginBundle]) {
+				NSRunInformationalAlertPanel([NSString stringWithFormat:
+											  AILocalizedString(@"Plugin %@ Will be Disabled", "%@ will be the name of a plugin. This is the title of the dialogue shown when an plugin is blacklisted."),
+											  [[pluginPath lastPathComponent] stringByDeletingPathExtension]],
+											 [NSString stringWithFormat:
+											  AILocalizedString(@"This plugin is known to be incompatible with Adium %@.", "%@ will be a version number of Adium"),
+											  [NSApp applicationVersion]],
+											 AILocalizedString(@"Disable", nil),
+											 nil,
+											 nil);
+				[self disablePlugin:pluginPath];
+				return;
+			}
+			
 			Class principalClass = [pluginBundle principalClass];
 			if (principalClass) {
 				plugin = [[principalClass alloc] init];




More information about the commits mailing list