Fix an uncaught exception in the Default Client advanced preferences from messing up the UI by removing all traces of MSN and Yahoo from the URL handler code. adium-1.5.10.4
authorThijs Alkemade <me@thijsalkema.de>
Sun, 23 Apr 2017 20:53:22 +0200
branchadium-1.5.10.4
changeset 5983 a98704da1923
parent 5982 e58f535ef9d2
child 5984 c42b73c02750
Fix an uncaught exception in the Default Client advanced preferences from messing up the UI by removing all traces of MSN and Yahoo from the URL handler code.
Source/AIURLHandlerAdvancedPreferences.m
Source/AIURLHandlerPlugin.m
--- a/Source/AIURLHandlerAdvancedPreferences.m	Mon Apr 17 12:16:26 2017 +0200
+++ b/Source/AIURLHandlerAdvancedPreferences.m	Sun Apr 23 20:53:22 2017 +0200
@@ -191,7 +191,7 @@
 	if (!image) {
 		AIService *service = [adium.accountController firstServiceWithServiceID:[plugin serviceIDForScheme:scheme]];
 		image = [AIServiceIcons serviceIconForService:service type:AIServiceIconLarge direction:AIIconNormal];
-		[servicesInformation setObject:image forKey:@"image"];
+		if (image) [servicesInformation setObject:image forKey:@"image"];
 	}
 	
 	return image;	
@@ -205,7 +205,7 @@
 	if (!longServiceName) {
 		AIService *service = [adium.accountController firstServiceWithServiceID:[plugin serviceIDForScheme:scheme]];
 		longServiceName = [service longDescription];
-		[servicesInformation setObject:longServiceName forKey:@"name"];
+		[servicesInformation setObject:(longServiceName ?: @"(unknown)") forKey:@"name"];
 	}
 	
 	return longServiceName;
--- a/Source/AIURLHandlerPlugin.m	Mon Apr 17 12:16:26 2017 +0200
+++ b/Source/AIURLHandlerPlugin.m	Sun Apr 23 20:53:22 2017 +0200
@@ -138,12 +138,9 @@
 	if (!schemeToServiceDict) {
 		schemeToServiceDict = [[NSDictionary alloc] initWithObjectsAndKeys:
 							   @"AIM",     @"aim",
-							   @"Yahoo!",  @"ymsgr",
-							   @"Yahoo!",  @"yahoo",
 							   @"Jabber",  @"xmpp",
 							   @"Jabber",  @"jabber",
 							   @"GTalk",   @"gtalk",
-							   @"MSN",     @"msn",
 							   @"IRC",	   @"irc",
 							   nil];
 	}
@@ -154,7 +151,7 @@
 /*!
  * @brief All of the schemes similar to a given scheme
  *
- * Several services (such as Yahoo and Jabber) have several scheme
+ * Several services (such as Jabber) have several scheme
  * aliases which are possible schemes for them. Instead of having multiple
  * entries each, we simply use a reference one and apply to all aliases.
  *
@@ -163,9 +160,7 @@
  */
 - (NSArray *)allSchemesLikeScheme:(NSString *)scheme
 {
-	if ([scheme isEqualToString:@"ymsgr"]) {
-		return [NSArray arrayWithObjects:@"yahoo", @"ymsgr", nil];
-	} else if ([scheme isEqualToString:@"xmpp"]) {
+	if ([scheme isEqualToString:@"xmpp"]) {
 		return [NSArray arrayWithObjects:@"xmpp", @"jabber", @"gtalk", nil];
 	} else {
 		return [NSArray arrayWithObject:scheme];
@@ -179,7 +174,7 @@
  */
 - (NSArray *)uniqueSchemes
 {
-	return [NSArray arrayWithObjects:@"aim", @"irc", @"xmpp", @"msn", @"msim", @"ymsgr", nil];
+	return [NSArray arrayWithObjects:@"aim", @"irc", @"xmpp", nil];
 }
 
 /*!
@@ -252,7 +247,6 @@
 	static NSDictionary *schemeMappingDict = nil;
 	if (!schemeMappingDict) {
 		schemeMappingDict = [[NSDictionary alloc] initWithObjectsAndKeys:
-							 @"ymsgr", @"yahoo",
 							 @"xmpp", @"jabber",
 							 nil];
 	}
@@ -471,7 +465,6 @@
 			NSString	*name;
 			if (user && [user length]) {
 				//jabber://tekjew@jabber.org
-				//msn://jdoe@hotmail.com
 				name = [NSString stringWithFormat:@"%@@%@",[url user],[url host]];
 			} else {
 				//aim://tekjew