diff options
author | Abhi Beckert <abhi@abhibeckert.com> | 2016-01-29 06:40:18 +1000 |
---|---|---|
committer | Abhi Beckert <abhi@abhibeckert.com> | 2016-01-29 06:40:18 +1000 |
commit | f4c4300dca0c416c12b3992204778ef9f37981ec (patch) | |
tree | e76a4747bf1c3f82bc037990bf84e3f13062601e /Source/SPExtendedTableInfo.m | |
parent | 465062dacc96c2c84bfe9cff1ded58c14d01bdcd (diff) | |
parent | 3aadea1be33212ca50e7faffcd0620ea976f9d59 (diff) | |
download | sequelpro-f4c4300dca0c416c12b3992204778ef9f37981ec.tar.gz sequelpro-f4c4300dca0c416c12b3992204778ef9f37981ec.tar.bz2 sequelpro-f4c4300dca0c416c12b3992204778ef9f37981ec.zip |
Merge remote-tracking branch 'sequelpro/master'
Diffstat (limited to 'Source/SPExtendedTableInfo.m')
-rw-r--r-- | Source/SPExtendedTableInfo.m | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/Source/SPExtendedTableInfo.m b/Source/SPExtendedTableInfo.m index d3b332d0..26574621 100644 --- a/Source/SPExtendedTableInfo.m +++ b/Source/SPExtendedTableInfo.m @@ -119,7 +119,7 @@ static NSString *SPMySQLCommentField = @"Comment"; if ([currentType isEqualToString:newType]) return; // If the table is empty, perform the change directly - if ([[[tableDataInstance statusValues] objectForKey:SPMySQLRowsField] isEqualToString:@"0"]) { + if ([[tableDataInstance statusValueForKey:SPMySQLRowsField] isEqualToString:@"0"]) { [self _changeCurrentTableTypeFrom:currentType to:newType]; return; } @@ -171,9 +171,11 @@ static NSString *SPMySQLCommentField = @"Comment"; else { [sender selectItemWithTitle:currentEncoding]; - SPBeginAlertSheet(NSLocalizedString(@"Error changing table encoding", @"error changing table encoding message"), - NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp mainWindow], self, nil, nil, - [NSString stringWithFormat:NSLocalizedString(@"An error occurred when trying to change the table encoding to '%@'.\n\nMySQL said: %@", @"error changing table encoding informative message"), newEncoding, [connection lastErrorMessage]]); + SPOnewayAlertSheet( + NSLocalizedString(@"Error changing table encoding", @"error changing table encoding message"), + [NSApp mainWindow], + [NSString stringWithFormat:NSLocalizedString(@"An error occurred when trying to change the table encoding to '%@'.\n\nMySQL said: %@", @"error changing table encoding informative message"), newEncoding, [connection lastErrorMessage]] + ); } } @@ -198,9 +200,11 @@ static NSString *SPMySQLCommentField = @"Comment"; else { [sender selectItemWithTitle:currentCollation]; - SPBeginAlertSheet(NSLocalizedString(@"Error changing table collation", @"error changing table collation message"), - NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp mainWindow], self, nil, nil, - [NSString stringWithFormat:NSLocalizedString(@"An error occurred when trying to change the table collation to '%@'.\n\nMySQL said: %@", @"error changing table collation informative message"), newCollation, [connection lastErrorMessage]]); + SPOnewayAlertSheet( + NSLocalizedString(@"Error changing table collation", @"error changing table collation message"), + [NSApp mainWindow], + [NSString stringWithFormat:NSLocalizedString(@"An error occurred when trying to change the table collation to '%@'.\n\nMySQL said: %@", @"error changing table collation informative message"), newCollation, [connection lastErrorMessage]] + ); } } @@ -546,9 +550,11 @@ static NSString *SPMySQLCommentField = @"Comment"; [self reloadTable:self]; } else { - SPBeginAlertSheet(NSLocalizedString(@"Error changing table comment", @"error changing table comment message"), - NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp mainWindow], self, nil, nil, - [NSString stringWithFormat:NSLocalizedString(@"An error occurred when trying to change the table's comment to '%@'.\n\nMySQL said: %@", @"error changing table comment informative message"), newComment, [connection lastErrorMessage]]); + SPOnewayAlertSheet( + NSLocalizedString(@"Error changing table comment", @"error changing table comment message"), + [NSApp mainWindow], + [NSString stringWithFormat:NSLocalizedString(@"An error occurred when trying to change the table's comment to '%@'.\n\nMySQL said: %@", @"error changing table comment informative message"), newComment, [connection lastErrorMessage]] + ); } } } @@ -650,9 +656,11 @@ static NSString *SPMySQLCommentField = @"Comment"; [tableTypePopUpButton selectItemWithTitle:currentType]; - SPBeginAlertSheet(NSLocalizedString(@"Error changing table type", @"error changing table type message"), - NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp mainWindow], self, nil, nil, - [NSString stringWithFormat:NSLocalizedString(@"An error occurred when trying to change the table type to '%@'.\n\nMySQL said: %@", @"error changing table type informative message"), newType, [connection lastErrorMessage]]); + SPOnewayAlertSheet( + NSLocalizedString(@"Error changing table type", @"error changing table type message"), + [NSApp mainWindow], + [NSString stringWithFormat:NSLocalizedString(@"An error occurred when trying to change the table type to '%@'.\n\nMySQL said: %@", @"error changing table type informative message"), newType, [connection lastErrorMessage]] + ); return; } |