aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPConnectionDelegate.m')
-rw-r--r--Source/SPConnectionDelegate.m13
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/SPConnectionDelegate.m b/Source/SPConnectionDelegate.m
index ae67697c..258b4402 100644
--- a/Source/SPConnectionDelegate.m
+++ b/Source/SPConnectionDelegate.m
@@ -28,6 +28,7 @@
#import "SPQueryController.h"
#import "SPKeychain.h"
#import "SPConstants.h"
+#import "SPAlertSheets.h"
@implementation TableDocument (SPConnectionDelegate)
@@ -102,7 +103,7 @@
*/
- (void)noConnectionAvailable:(id)connection
{
- NSBeginAlertSheet(NSLocalizedString(@"No connection available", @"no connection available message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, nil, NSLocalizedString(@"An error has occured and there doesn't seem to be a connection available.", @"no connection available informatie message"));
+ SPBeginAlertSheet(NSLocalizedString(@"No connection available", @"no connection available message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, NSLocalizedString(@"An error has occured and there doesn't seem to be a connection available.", @"no connection available informatie message"));
}
/**
@@ -132,6 +133,16 @@
}
/**
+ * Invoke to display an informative but non-fatal error directly to the user.
+ */
+- (void)showErrorWithTitle:(NSString *)theTitle message:(NSString *)theMessage
+{
+ if ([tableWindow isVisible]) {
+ SPBeginAlertSheet(theTitle, NSLocalizedString(@"OK", @"OK button"), nil, nil, tableWindow, self, nil, nil, theMessage);
+ }
+}
+
+/**
* Invoked when user dismisses the error sheet displayed as a result of the current connection being lost.
*/
- (IBAction)closeErrorConnectionSheet:(id)sender