Merge pull request #7979 from electron/credits-attributed-string

Convert about credits to NSAttributedString
This commit is contained in:
Kevin Sawicki 2016-11-16 07:45:07 -08:00 committed by GitHub
commit cb0845fc49

View file

@ -255,6 +255,16 @@ void Browser::DockSetIcon(const gfx::Image& image) {
void Browser::ShowAboutPanel() {
NSDictionary* options = DictionaryValueToNSDictionary(about_panel_options_);
// Credits must be a NSAttributedString instead of NSString
id credits = options[@"Credits"];
if (credits != nil) {
NSMutableDictionary* mutable_options = [options mutableCopy];
mutable_options[@"Credits"] = [[[NSAttributedString alloc]
initWithString:(NSString*)credits] autorelease];
options = [NSDictionary dictionaryWithDictionary:mutable_options];
}
[[AtomApplication sharedApplication]
orderFrontStandardAboutPanelWithOptions:options];
}