diff options
Diffstat (limited to 'Source/SPConnectionControllerDelegate.m')
-rw-r--r-- | Source/SPConnectionControllerDelegate.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m index dc429faf..e2557601 100644 --- a/Source/SPConnectionControllerDelegate.m +++ b/Source/SPConnectionControllerDelegate.m @@ -40,6 +40,7 @@ static NSString *SPDatabaseImage = @"database-small"; @interface SPConnectionController () - (void)_checkHost; +- (void)_sortFavorites; - (void)_favoriteTypeDidChange; - (void)_reloadFavoritesViewData; - (void)_updateFavoritePasswordsFromField:(NSControl *)control; @@ -526,6 +527,17 @@ static NSString *SPDatabaseImage = @"database-small"; */ - (void)favoritesImportData:(NSArray *)data { + // Add each of the imported favorites to the root node + for (NSMutableDictionary *favorite in data) + { + [favoritesController addFavoriteNodeWithData:favorite asChildOfNode:nil]; + } + + if (currentSortItem > SPFavoritesSortUnsorted) { + [self _sortFavorites]; + } + + [self _reloadFavoritesViewData]; } /** |