Removed some unecessary uses of sprintf.

Reviewed by me.
This commit is contained in:
Francisco Ryan Tolmasky I committed 2010-02-25 12:38:50 -08:00
1 parent 68d30c8802
commit 756877b94c
3 files changed
+5 -6

No files matched your search

+3 -3
View File
@@ -379,10 +379,10 @@ CPRunContinuesResponse = -1002;
[applicationLabel setStringValue:applicationTitle || ""];
if (version && applicationVersion)
[versionLabel setStringValue:sprintf(@"Version %@ (%@)", applicationVersion, version)];
if (applicationVersion && version)
[versionLabel setStringValue:@"Version " + applicationVersion + " (" + version + ")"];
else if (applicationVersion || version)
[versionLabel setStringValue:sprintf(@"Version %@", applicationVersion || version)];
[versionLabel setStringValue:@"Version " + (applicationVersion || version)];
else
[versionLabel setStringValue:@""];
+1 -2
View File
@@ -888,8 +888,7 @@ var CPDocumentUntitledCount = 0;
[_canCloseAlert setDelegate:self];
[_canCloseAlert setAlertStyle:CPWarningAlertStyle];
[_canCloseAlert setTitle:@"Unsaved Document"];
[_canCloseAlert setMessageText:sprintf(@"Do you want to save the changes you've made to the document \"%@\"?",
[self displayName] || [self fileName])];
[_canCloseAlert setMessageText:@"Do you want to save the changes you've made to the document \"" + ([self displayName] || [self fileName]) + "\"?"];
[_canCloseAlert addButtonWithTitle:@"Save"];
[_canCloseAlert addButtonWithTitle:@"Cancel"];
+1 -1
View File
@@ -350,7 +350,7 @@ var CPToolbarConfigurationsByIdentifier = nil;
item = [[_delegate toolbar:self itemForItemIdentifier:identifier willBeInsertedIntoToolbar:toolbar] copy];
if (!item)
[CPException raise:CPInvalidArgumentException
reason:sprintf(@"_delegate %s returned nil toolbar item returned for identifier %s", _delegate, identifier)];
reason:@"Toolbar delegate " + _delegate + " returned nil toolbar item for identifier " + identifier];
}
[_identifiedItems setObject:item forKey:identifier];