diff options
author | rowanbeentje <rowan@beent.je> | 2010-01-20 23:51:15 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-01-20 23:51:15 +0000 |
commit | a485d370c24cb6378a52c3452dc0cdbadfefd50f (patch) | |
tree | f3bb2ded2b5571d860d7677cca509d575ec5ef81 /Source/SPExtendedTableInfo.m | |
parent | 38ed0a7356c24b2113e157fbec26004100b5f1e9 (diff) | |
download | sequelpro-a485d370c24cb6378a52c3452dc0cdbadfefd50f.tar.gz sequelpro-a485d370c24cb6378a52c3452dc0cdbadfefd50f.tar.bz2 sequelpro-a485d370c24cb6378a52c3452dc0cdbadfefd50f.zip |
Address Issue #546 (format string bugs):
- Fix incorrect uses of [NSString stringWithFormat:] with preconstructed strings and no arguments in SPUserManager
- To fix display issues, replace NSBeginAlertSheet (which includes automatic sprintf expansion of the message) with a safely-escaped SPBeginAlertSheet in many files
Diffstat (limited to 'Source/SPExtendedTableInfo.m')
-rw-r--r-- | Source/SPExtendedTableInfo.m | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/SPExtendedTableInfo.m b/Source/SPExtendedTableInfo.m index 8b414219..88c91981 100644 --- a/Source/SPExtendedTableInfo.m +++ b/Source/SPExtendedTableInfo.m @@ -30,6 +30,7 @@ #import "SPStringAdditions.h" #import "SPConstants.h" #import "TableDocument.h" +#import "SPAlertSheets.h" @interface SPExtendedTableInfo (PrivateAPI) @@ -106,7 +107,7 @@ else { [sender selectItemWithTitle:currentType]; - NSBeginAlertSheet(NSLocalizedString(@"Error changing table type", @"error changing table type message"), + SPBeginAlertSheet(NSLocalizedString(@"Error changing table type", @"error changing table type message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp mainWindow], self, nil, 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 getLastErrorMessage]]); } @@ -135,7 +136,7 @@ else { [sender selectItemWithTitle:currentEncoding]; - NSBeginAlertSheet(NSLocalizedString(@"Error changing table encoding", @"error changing table encoding message"), + SPBeginAlertSheet(NSLocalizedString(@"Error changing table encoding", @"error changing table encoding message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp mainWindow], self, nil, 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 getLastErrorMessage]]); } @@ -164,7 +165,7 @@ else { [sender selectItemWithTitle:currentCollation]; - NSBeginAlertSheet(NSLocalizedString(@"Error changing table collation", @"error changing table collation message"), + SPBeginAlertSheet(NSLocalizedString(@"Error changing table collation", @"error changing table collation message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp mainWindow], self, nil, 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 getLastErrorMessage]]); } @@ -352,7 +353,7 @@ [self reloadTable:self]; } else { - NSBeginAlertSheet(NSLocalizedString(@"Error changing table comment", @"error changing table comment message"), + SPBeginAlertSheet(NSLocalizedString(@"Error changing table comment", @"error changing table comment message"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [NSApp mainWindow], self, nil, 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 getLastErrorMessage]]); } |