OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "chrome/browser/ui/cocoa/about_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/about_window_controller.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/l10n_util_mac.h" | 8 #include "app/l10n_util_mac.h" |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/mac/mac_util.h" | 11 #include "base/mac/mac_util.h" |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 | 638 |
639 - (NSTextField*)updateText { | 639 - (NSTextField*)updateText { |
640 return updateText_; | 640 return updateText_; |
641 } | 641 } |
642 | 642 |
643 + (NSAttributedString*)legalTextBlock { | 643 + (NSAttributedString*)legalTextBlock { |
644 // Windows builds this up in a very complex way, we're just trying to model | 644 // Windows builds this up in a very complex way, we're just trying to model |
645 // it the best we can to get all the information in (they actually do it | 645 // it the best we can to get all the information in (they actually do it |
646 // but created Labels and Links that they carefully place to make it appear | 646 // but created Labels and Links that they carefully place to make it appear |
647 // to be a paragraph of text). | 647 // to be a paragraph of text). |
648 // src/chrome/browser/views/about_chrome_view.cc AboutChromeView::Init() | 648 // src/chrome/browser/ui/views/about_chrome_view.cc AboutChromeView::Init() |
649 | 649 |
650 NSMutableAttributedString* legal_block = | 650 NSMutableAttributedString* legal_block = |
651 [[[NSMutableAttributedString alloc] init] autorelease]; | 651 [[[NSMutableAttributedString alloc] init] autorelease]; |
652 [legal_block beginEditing]; | 652 [legal_block beginEditing]; |
653 | 653 |
654 NSString* copyright = | 654 NSString* copyright = |
655 l10n_util::GetNSStringWithFixup(IDS_ABOUT_VERSION_COPYRIGHT); | 655 l10n_util::GetNSStringWithFixup(IDS_ABOUT_VERSION_COPYRIGHT); |
656 AttributedStringAppendString(legal_block, copyright); | 656 AttributedStringAppendString(legal_block, copyright); |
657 | 657 |
658 // These are the markers directly in IDS_ABOUT_VERSION_LICENSE | 658 // These are the markers directly in IDS_ABOUT_VERSION_LICENSE |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
755 NSRange string_range = NSMakeRange(0, [legal_block length]); | 755 NSRange string_range = NSMakeRange(0, [legal_block length]); |
756 [legal_block addAttribute:NSFontAttributeName | 756 [legal_block addAttribute:NSFontAttributeName |
757 value:[NSFont labelFontOfSize:11] | 757 value:[NSFont labelFontOfSize:11] |
758 range:string_range]; | 758 range:string_range]; |
759 | 759 |
760 [legal_block endEditing]; | 760 [legal_block endEditing]; |
761 return legal_block; | 761 return legal_block; |
762 } | 762 } |
763 | 763 |
764 @end // @implementation AboutWindowController | 764 @end // @implementation AboutWindowController |
OLD | NEW |