diff options
Diffstat (limited to 'Source/SPAppController.m')
-rw-r--r-- | Source/SPAppController.m | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 7a3ec334..45deeff9 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -43,6 +43,7 @@ - (id)init { if ((self = [super init])) { + _sessionURL = nil; [NSApp setDelegate:self]; } @@ -295,6 +296,9 @@ [[self frontDocument] initWithConnectionFile:filename]; } + else if([[[filename pathExtension] lowercaseString] isEqualToString:@"spfs"]) { + + } else { NSLog(@"Only files with the extensions ‘spf’ or ‘sql’ are allowed."); } @@ -435,6 +439,23 @@ return nil; } +/** + * Retrieve the session URL. Return nil if no session is opened + */ +- (NSURL *)sessionURL +{ + return _sessionURL; +} + +/** + * Set the global session URL used for Save (As) Session. + */ +- (void)setSessionURL:(NSString *)urlString +{ + if(_sessionURL) [_sessionURL release], _sessionURL = nil; + _sessionURL = [[NSURL fileURLWithPath:urlString] retain]; +} + #pragma mark - #pragma mark Services menu methods @@ -768,7 +789,7 @@ { [prefsController release], prefsController = nil; [aboutController release], aboutController = nil; - + if(_sessionURL) [_sessionURL release], _sessionURL = nil; [super dealloc]; } |