aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionControllerDelegate.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-10-02 11:25:26 +0000
committerstuconnolly <stuart02@gmail.com>2011-10-02 11:25:26 +0000
commite23ba5155a53c43a106ac9646f51321ccc7d86f4 (patch)
treeea3da3e76bf62b13696bee5cc4f0096107e9fb48 /Source/SPConnectionControllerDelegate.m
parentd01474532b11014019d4d5a1197a8f8f7d683c0b (diff)
downloadsequelpro-e23ba5155a53c43a106ac9646f51321ccc7d86f4.tar.gz
sequelpro-e23ba5155a53c43a106ac9646f51321ccc7d86f4.tar.bz2
sequelpro-e23ba5155a53c43a106ac9646f51321ccc7d86f4.zip
Favorites import progress.
Diffstat (limited to 'Source/SPConnectionControllerDelegate.m')
-rw-r--r--Source/SPConnectionControllerDelegate.m39
1 files changed, 29 insertions, 10 deletions
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m
index 7d461233..26101071 100644
--- a/Source/SPConnectionControllerDelegate.m
+++ b/Source/SPConnectionControllerDelegate.m
@@ -489,8 +489,6 @@ static NSString *SPDatabaseImage = @"database-small";
else if (rows == 1) {
return (![[self selectedFavoriteNode] isGroup]);
}
-
- return YES;
}
return YES;
@@ -505,23 +503,44 @@ static NSString *SPDatabaseImage = @"database-small";
- (void)favoritesExportCompletedWithError:(NSError *)error
{
if (error) {
- [[NSAlert alertWithError:error] beginSheetModalForWindow:[dbDocument parentWindow]
- modalDelegate:self
- didEndSelector:NULL
- contextInfo:NULL];
+
+ NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Favorites export error", @"favorites export error message")
+ defaultButton:NSLocalizedString(@"OK", @"OK")
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"The following error occurred during the export process:\n\n%@", @"favorites export error informative message"), [error localizedDescription]]];
+
+ [alert beginSheetModalForWindow:[dbDocument parentWindow]
+ modalDelegate:self
+ didEndSelector:NULL
+ contextInfo:NULL];
}
}
/**
+ * Called by the favorites importer when the imported data is available.
+ */
+- (void)favoritesImportData:(NSDictionary *)data
+{
+
+}
+
+/**
* Called by the favorites importer when the import completes.
*/
- (void)favoritesImportCompletedWithError:(NSError *)error
{
if (error) {
- [[NSAlert alertWithError:error] beginSheetModalForWindow:[dbDocument parentWindow]
- modalDelegate:self
- didEndSelector:NULL
- contextInfo:NULL];
+ NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Favorites import error", @"favorites import error message")
+ defaultButton:NSLocalizedString(@"OK", @"OK")
+ alternateButton:nil
+ otherButton:nil
+ informativeTextWithFormat:[NSString stringWithFormat:NSLocalizedString(@"The following error occurred during the import process:\n\n%@", @"favorites import error informative message"), [error localizedDescription]]];
+
+ [alert beginSheetModalForWindow:[dbDocument parentWindow]
+ modalDelegate:self
+ didEndSelector:NULL
+ contextInfo:NULL];
}
}