adium 4593:7e15eea3d5e1: Refactored AITemporaryIRCAccountWindowC...

commits at adium.im commits at adium.im
Sun Jan 29 15:04:59 UTC 2012


details:	http://hg.adium.im/adium/rev/7e15eea3d5e1
revision:	4593:7e15eea3d5e1
branch:		(none)
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Sun Jan 29 16:04:43 2012 +0100

Refactored AITemporaryIRCAccountWindowController to be acceptable to the static analyzer.

diffs (46 lines):

diff -r 7a4864a334d0 -r 7e15eea3d5e1 Source/AITemporaryIRCAccountWindowController.h
--- a/Source/AITemporaryIRCAccountWindowController.h	Sun Jan 29 15:59:53 2012 +0100
+++ b/Source/AITemporaryIRCAccountWindowController.h	Sun Jan 29 16:04:43 2012 +0100
@@ -44,7 +44,7 @@
 }
 
 - (id)initWithChannel:(NSString *)newChannel server:(NSString *)newServer port:(NSInteger)newPort andPassword:(NSString *)newPassword;
-
+- (void)show __attribute__((ns_consumes_self));
 - (IBAction)okay:(id)sender;
 - (IBAction)displayAdvanced:(id)sender;
 
diff -r 7a4864a334d0 -r 7e15eea3d5e1 Source/AITemporaryIRCAccountWindowController.m
--- a/Source/AITemporaryIRCAccountWindowController.m	Sun Jan 29 15:59:53 2012 +0100
+++ b/Source/AITemporaryIRCAccountWindowController.m	Sun Jan 29 16:04:43 2012 +0100
@@ -42,12 +42,15 @@
 		server = [newServer retain];
 		port = (newPort == -1 ? 6667 : newPort);
 		password = [newPassword retain];
-		
-		[[self window] makeKeyAndOrderFront:nil];
 	}
 	return self;
 }
 
+- (void)show
+{
+	[[self window] makeKeyAndOrderFront:nil];
+}
+
 - (void)dealloc
 {
 	[channel release];
diff -r 7a4864a334d0 -r 7e15eea3d5e1 Source/AIURLHandlerPlugin.m
--- a/Source/AIURLHandlerPlugin.m	Sun Jan 29 15:59:53 2012 +0100
+++ b/Source/AIURLHandlerPlugin.m	Sun Jan 29 16:04:43 2012 +0100
@@ -527,7 +527,8 @@
 	}
 	
 	if (!ircAccount) {
-		[[AITemporaryIRCAccountWindowController alloc] initWithChannel:name server:server port:port andPassword:password];
+		AITemporaryIRCAccountWindowController *temporaryIRCAccountWindowController = [[AITemporaryIRCAccountWindowController alloc] initWithChannel:name server:server port:port andPassword:password];
+		[temporaryIRCAccountWindowController show];
 	} else if (name) {
 		[adium.chatController chatWithName:name
 		 identifier:nil




More information about the commits mailing list