mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Workaround for “format string is not a string literal” warning
This commit is contained in:
@@ -243,7 +243,7 @@ BOOL HasDocumentWindow (NSArray* windows)
|
||||
|
||||
if(promptUser)
|
||||
{
|
||||
NSInteger choice = NSRunAlertPanel(@"Disable Session Restore?", promptUser, @"Disable", @"Restore Documents", nil);
|
||||
NSInteger choice = NSRunAlertPanel(@"Disable Session Restore?", @"%@", @"Disable", @"Restore Documents", nil, promptUser);
|
||||
if(choice == NSAlertDefaultReturn) // "Disable"
|
||||
restoreSession = NO;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ OAK_DEBUG_VAR(HTMLOutput_WebViewDelegate);
|
||||
|
||||
- (BOOL)webView:(WebView*)sender runJavaScriptConfirmPanelWithMessage:(NSString*)message initiatedByFrame:(WebFrame*)frame
|
||||
{
|
||||
return NSAlertDefaultReturn == NSRunAlertPanel(NSLocalizedString(@"Script Message", @"JavaScript alert title"), message, NSLocalizedString(@"OK", @"JavaScript alert confirmation"), NSLocalizedString(@"Cancel", @"JavaScript alert cancel"), nil);
|
||||
return NSAlertDefaultReturn == NSRunAlertPanel(NSLocalizedString(@"Script Message", @"JavaScript alert title"), @"%@", NSLocalizedString(@"OK", @"JavaScript alert confirmation"), NSLocalizedString(@"Cancel", @"JavaScript alert cancel"), nil, message);
|
||||
}
|
||||
|
||||
- (void)webView:(WebView*)sender runOpenPanelForFileButtonWithResultListener:(id <WebOpenPanelResultListener>)resultListener
|
||||
|
||||
@@ -66,7 +66,7 @@ NSString* const OakFileManagerPathKey = @"directory";
|
||||
NSArray* contents = [[NSFileManager defaultManager] contentsOfDirectoryAtURL:dirURL includingPropertiesForKeys:nil options:NSDirectoryEnumerationSkipsHiddenFiles error:&error];
|
||||
if([contents count] != 0)
|
||||
{
|
||||
NSInteger choice = NSRunCriticalAlertPanel(@"Folder Not Empty!", [self expandFormat:@"Do you wish to delete “%@” and all the contained items?" withURL:dirURL], @"Delete Folder", @"Cancel", nil);
|
||||
NSInteger choice = NSRunCriticalAlertPanel(@"Folder Not Empty!", @"%@", @"Delete Folder", @"Cancel", nil, [self expandFormat:@"Do you wish to delete “%@” and all the contained items?" withURL:dirURL]);
|
||||
if(choice == NSAlertAlternateReturn) // "Cancel"
|
||||
return;
|
||||
}
|
||||
@@ -103,7 +103,7 @@ NSString* const OakFileManagerPathKey = @"directory";
|
||||
{
|
||||
if([fileSize unsignedLongLongValue])
|
||||
{
|
||||
NSInteger choice = NSRunCriticalAlertPanel(@"Document Not Empty!", [self expandFormat:@"Do you wish to delete “%@”?" withURL:fileURL], @"Delete Document", @"Cancel", nil);
|
||||
NSInteger choice = NSRunCriticalAlertPanel(@"Document Not Empty!", @"%@", @"Delete Document", @"Cancel", nil, [self expandFormat:@"Do you wish to delete “%@”?" withURL:fileURL]);
|
||||
if(choice == NSAlertAlternateReturn) // "Cancel"
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user