aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-01-23 22:58:29 +0000
committerstuconnolly <stuart02@gmail.com>2012-01-23 22:58:29 +0000
commit92c07b88860b19bd78d2a1bec98e6b17bc458c03 (patch)
tree0bb5c50a949cdb5accbf3258d587b3972366406f /Source
parent532276bfa656b18bb5df76404bca3545334985b7 (diff)
downloadsequelpro-92c07b88860b19bd78d2a1bec98e6b17bc458c03.tar.gz
sequelpro-92c07b88860b19bd78d2a1bec98e6b17bc458c03.tar.bz2
sequelpro-92c07b88860b19bd78d2a1bec98e6b17bc458c03.zip
When exporting a single favorite, make the filename the name of the favorite.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPConnectionController.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index c5119bb7..f0bfecfe 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -885,10 +885,12 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
{
NSSavePanel *savePanel = [NSSavePanel savePanel];
+ NSString *fileName = [[self selectedFavoriteNodes] count] > 1 ? SPExportFavoritesFilename : [[[self selectedFavorite] objectForKey:SPFavoriteNameKey] stringByAppendingPathExtension:@"plist"];
+
[savePanel setAccessoryView:exportPanelAccessoryView];
[savePanel beginSheetForDirectory:nil
- file:SPExportFavoritesFilename
+ file:fileName
modalForWindow:[dbDocument parentWindow]
modalDelegate:self
didEndSelector:@selector(importExportFavoritesSheetDidEnd:returnCode:contextInfo:)