aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2011-03-08 09:09:02 +0000
committerBibiko <bibiko@eva.mpg.de>2011-03-08 09:09:02 +0000
commit72dac790e199a8c1f5043261bb60c7340c9b96ff (patch)
tree97a7cb104848a130a0bfa053ecfe7b26522336bf
parent2a9b0987450a7dd60e824a9067c8aa8fd3d1ee5c (diff)
downloadsequelpro-72dac790e199a8c1f5043261bb60c7340c9b96ff.tar.gz
sequelpro-72dac790e199a8c1f5043261bb60c7340c9b96ff.tar.bz2
sequelpro-72dac790e199a8c1f5043261bb60c7340c9b96ff.zip
• fixed compiler warnings and avoid using [NSRURL pathComponents] since it's 10.6 method (but it worked?)
-rw-r--r--Source/SPAppController.m14
1 files 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];