diff options
author | stuconnolly <stuart02@gmail.com> | 2012-05-03 14:20:19 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2012-05-03 14:20:19 +0000 |
commit | 830790b9251a36f3d1290a3f9ead62195d61f00a (patch) | |
tree | 58026a919958b642e54eef01dff2c6b6069f895b | |
parent | 49bd7f5160135ec798aaad0b5944bb500e01728c (diff) | |
download | sequelpro-830790b9251a36f3d1290a3f9ead62195d61f00a.tar.gz sequelpro-830790b9251a36f3d1290a3f9ead62195d61f00a.tar.bz2 sequelpro-830790b9251a36f3d1290a3f9ead62195d61f00a.zip |
When creating a connection favorite from the entered details, replace the use of NSRunAlertPanel with SPBeginAlertSheet.
-rw-r--r-- | Source/SPConnectionController.m | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index df64b738..bc1fe0c0 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -669,13 +669,17 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, // Ensure that host is not empty if this is a TCP/IP or SSH connection if (([self type] == SPTCPIPConnection || [self type] == SPSSHTunnelConnection) && ![[self host] length]) { - NSRunAlertPanel(NSLocalizedString(@"Insufficient connection details", @"insufficient details message"), NSLocalizedString(@"Insufficient details provided to establish a connection. Please provide at least a host.", @"insufficient details informative message"), NSLocalizedString(@"OK", @"OK button"), nil, nil); + SPBeginAlertSheet(NSLocalizedString(@"Insufficient connection details", @"insufficient details message"), + NSLocalizedString(@"OK", @"OK button"), nil, nil, [dbDocument parentWindow], nil, nil, nil, + NSLocalizedString(@"Insufficient details provided to establish a connection. Please provide at least a host.", @"insufficient details informative message")); return; } // If SSH is enabled, ensure that the SSH host is not nil if ([self type] == SPSSHTunnelConnection && ![[self sshHost] length]) { - NSRunAlertPanel(NSLocalizedString(@"Insufficient connection details", @"insufficient details message"), NSLocalizedString(@"Please enter the hostname for the SSH Tunnel, or disable the SSH Tunnel.", @"message of panel when ssh details are incomplete"), NSLocalizedString(@"OK", @"OK button"), nil, nil); + SPBeginAlertSheet(NSLocalizedString(@"Insufficient connection details", @"insufficient details message"), + NSLocalizedString(@"OK", @"OK button"), nil, nil, [dbDocument parentWindow], nil, nil, nil, + NSLocalizedString(@"Please enter the hostname for the SSH Tunnel, or disable the SSH Tunnel.", @"message of panel when ssh details are incomplete")); return; } |