diff options
author | Stuart Connolly <stuart02@gmail.com> | 2013-11-30 21:27:36 +0000 |
---|---|---|
committer | Stuart Connolly <stuart02@gmail.com> | 2013-11-30 21:27:36 +0000 |
commit | 0a336a7123f411d5ffc68019bf8b5c3a360551b9 (patch) | |
tree | 2d0096e15ebac531b9271fe2a473da0acc7276a5 | |
parent | 1413739842750c89d7a29a1f04ef587d73dd2edb (diff) | |
download | sequelpro-0a336a7123f411d5ffc68019bf8b5c3a360551b9.tar.gz sequelpro-0a336a7123f411d5ffc68019bf8b5c3a360551b9.tar.bz2 sequelpro-0a336a7123f411d5ffc68019bf8b5c3a360551b9.zip |
Remove use of deprecated methods.
-rw-r--r-- | Source/SPConnectionController.m | 12 | ||||
-rw-r--r-- | Source/SPContentFilterManager.m | 2 | ||||
-rw-r--r-- | Source/SPEditorPreferencePane.m | 2 | ||||
-rw-r--r-- | Source/SPQueryFavoriteManager.m | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index db6851d9..be00e5b7 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -1054,7 +1054,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, */ - (void)chooseKeyLocationSheetDidEnd:(NSOpenPanel *)openPanel returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { - NSString *abbreviatedFileName = [[openPanel filename] stringByAbbreviatingWithTildeInPath]; + NSString *abbreviatedFileName = [[[openPanel URL] path] stringByAbbreviatingWithTildeInPath]; // SSH key file selection if (contextInfo == sshSSHKeyButton) { @@ -1104,24 +1104,24 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, */ - (void)importExportFavoritesSheetDidEnd:(NSOpenPanel *)panel returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo - { +{ if (returnCode == NSOKButton) { if (contextInfo == SPExportFavorites) { SPFavoritesExporter *exporter = [[[SPFavoritesExporter alloc] init] autorelease]; [exporter setDelegate:(NSObject<SPFavoritesExportProtocol> *)self]; - [exporter writeFavorites:[self selectedFavoriteNodes] toFile:[panel filename]]; + [exporter writeFavorites:[self selectedFavoriteNodes] toFile:[[panel URL] path]]; } else if (contextInfo == SPImportFavorites) { SPFavoritesImporter *importer = [[SPFavoritesImporter alloc] init]; [importer setDelegate:(NSObject<SPFavoritesImportProtocol> *)self]; - [importer importFavoritesFromFileAtPath:[panel filename]]; - } + [importer importFavoritesFromFileAtPath:[[panel URL] path]]; } - } + } +} #endif diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m index 019e0b6b..515dead0 100644 --- a/Source/SPContentFilterManager.m +++ b/Source/SPContentFilterManager.m @@ -836,7 +836,7 @@ #ifndef SP_CODA if (returnCode == NSOKButton) { - NSString *filename = [[panel filenames] objectAtIndex:0]; + NSString *filename = [[[panel URLs] objectAtIndex:0] path]; NSError *readError = nil; NSString *convError = nil; NSPropertyListFormat format; diff --git a/Source/SPEditorPreferencePane.m b/Source/SPEditorPreferencePane.m index 027b5f8c..792376ff 100644 --- a/Source/SPEditorPreferencePane.m +++ b/Source/SPEditorPreferencePane.m @@ -538,7 +538,7 @@ static NSString *SPCustomColorSchemeNameLC = @"user-defined"; } else if ([contextInfo isEqualToString:SPImportColorScheme]) { if (returnCode == NSOKButton) { - if ([self _loadColorSchemeFromFile:[[panel filenames] objectAtIndex:0]]) { + if ([self _loadColorSchemeFromFile:[[[panel URLs] objectAtIndex:0] path] ]) { [prefs setObject:SPCustomColorSchemeName forKey:SPCustomQueryEditorThemeName]; [self updateDisplayColorThemeName]; } diff --git a/Source/SPQueryFavoriteManager.m b/Source/SPQueryFavoriteManager.m index 17d2a452..32563964 100644 --- a/Source/SPQueryFavoriteManager.m +++ b/Source/SPQueryFavoriteManager.m @@ -817,7 +817,7 @@ if (returnCode == NSOKButton) { - NSString *filename = [[panel filenames] objectAtIndex:0]; + NSString *filename = [[[panel URLs] objectAtIndex:0] path]; NSError *readError = nil; NSString *convError = nil; NSPropertyListFormat format; |