mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-18 20:49:22 +00:00
Removed some unecessary uses of sprintf.
Reviewed by me.
This commit is contained in:
1 parent
68d30c8802
commit
756877b94c
3 files changed
+5
-6
No files matched your search
@@ -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
@@ -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
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user