From 92c07b88860b19bd78d2a1bec98e6b17bc458c03 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Mon, 23 Jan 2012 22:58:29 +0000 Subject: When exporting a single favorite, make the filename the name of the favorite. --- Source/SPConnectionController.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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:) -- cgit v1.2.3