From 72dac790e199a8c1f5043261bb60c7340c9b96ff Mon Sep 17 00:00:00 2001 From: Bibiko Date: Tue, 8 Mar 2011 09:09:02 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20compiler=20warnings=20and=20avoid?= =?UTF-8?q?=20using=20[NSRURL=20pathComponents]=20since=20it's=2010.6=20me?= =?UTF-8?q?thod=20(but=20it=20worked=3F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPAppController.m | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 767f0c91..30429d79 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -653,12 +653,14 @@ YY_BUFFER_STATE yy_scan_string (const char *); NSString *command = [url host]; NSString *passedProcessID = [url user]; NSArray *parameter; - NSArray *pathComponents = [url pathComponents]; - if([pathComponents count] > 1) - parameter = [pathComponents subarrayWithRange:NSMakeRange(1,[[url pathComponents] count]-1)]; + NSArray *pathComponents = [[url absoluteString] pathComponents]; + + if([pathComponents count] > 2) + parameter = [pathComponents subarrayWithRange:NSMakeRange(2, [pathComponents count]-2)]; else parameter = [NSArray array]; + NSFileManager *fm = [NSFileManager defaultManager]; // Handle commands which don't need a connection window @@ -1984,7 +1986,7 @@ YY_BUFFER_STATE yy_scan_string (const char *); idx = [SPChooseMenuItemDialog withItems:assignedKeyEquivalents atPosition:[NSEvent mouseLocation]]; if(idx > -1) { - NSArray *eq = [assignedKeyEquivalents objectAtIndex:idx]; + NSDictionary *eq = [assignedKeyEquivalents objectAtIndex:idx]; if(eq && [eq count]) { NSMenuItem *aMenuItem = [[[NSMenuItem alloc] init] autorelease]; [aMenuItem setTag:0]; @@ -2003,7 +2005,7 @@ YY_BUFFER_STATE yy_scan_string (const char *); idx = [SPChooseMenuItemDialog withItems:assignedKeyEquivalents atPosition:[NSEvent mouseLocation]]; if(idx > -1) { - NSArray *eq = [assignedKeyEquivalents objectAtIndex:idx]; + NSDictionary *eq = [assignedKeyEquivalents objectAtIndex:idx]; if(eq && [eq count]) { NSMenuItem *aMenuItem = [[[NSMenuItem alloc] init] autorelease]; [aMenuItem setTag:0]; @@ -2022,7 +2024,7 @@ YY_BUFFER_STATE yy_scan_string (const char *); idx = [SPChooseMenuItemDialog withItems:assignedKeyEquivalents atPosition:[NSEvent mouseLocation]]; if(idx > -1) { - NSArray *eq = [assignedKeyEquivalents objectAtIndex:idx]; + NSDictionary *eq = [assignedKeyEquivalents objectAtIndex:idx]; if(eq && [eq count]) { NSMenuItem *aMenuItem = [[[NSMenuItem alloc] init] autorelease]; [aMenuItem setTag:0]; -- cgit v1.2.3