summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/nibs/About.xib293
-rw-r--r--chrome/browser/cocoa/about_window_controller.h3
-rw-r--r--chrome/browser/cocoa/about_window_controller.mm29
3 files changed, 79 insertions, 246 deletions
diff --git a/chrome/app/nibs/About.xib b/chrome/app/nibs/About.xib
index 123a99e..6b5bd0c 100644
--- a/chrome/app/nibs/About.xib
+++ b/chrome/app/nibs/About.xib
@@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">9L31a</string>
+ <string key="IBDocument.SystemVersion">9L30</string>
<string key="IBDocument.InterfaceBuilderVersion">677</string>
<string key="IBDocument.AppKitVersion">949.54</string>
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="4"/>
+ <integer value="3"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -48,163 +48,41 @@
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSScrollView" id="326364230">
+ <object class="NSTextField" id="564072719">
<reference key="NSNextResponder" ref="498033215"/>
- <int key="NSvFlags">256</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSClipView" id="921985605">
- <reference key="NSNextResponder" ref="326364230"/>
- <int key="NSvFlags">2304</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSTextView" id="717893057">
- <reference key="NSNextResponder" ref="921985605"/>
- <int key="NSvFlags">2322</int>
- <object class="NSMutableSet" key="NSDragTypes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="set.sortedObjects">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>Apple HTML pasteboard type</string>
- <string>Apple PDF pasteboard type</string>
- <string>Apple PICT pasteboard type</string>
- <string>Apple PNG pasteboard type</string>
- <string>Apple URL pasteboard type</string>
- <string>CorePasteboardFlavorType 0x6D6F6F76</string>
- <string>CorePasteboardFlavorType 0x75726C20</string>
- <string>NSColor pasteboard type</string>
- <string>NSFilenamesPboardType</string>
- <string>NSStringPboardType</string>
- <string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
- <string>NeXT RTFD pasteboard type</string>
- <string>NeXT Rich Text Format v1.0 pasteboard type</string>
- <string>NeXT TIFF v4.0 pasteboard type</string>
- <string>NeXT font pasteboard type</string>
- <string>NeXT ruler pasteboard type</string>
- <string>WebURLsWithTitlesPboardType</string>
- </object>
- </object>
- <string key="NSFrameSize">{410, 0}</string>
- <reference key="NSSuperview" ref="921985605"/>
- <object class="NSTextContainer" key="NSTextContainer" id="448455574">
- <object class="NSLayoutManager" key="NSLayoutManager">
- <object class="NSTextStorage" key="NSTextStorage">
- <object class="NSMutableString" key="NSString">
- <characters key="NS.bytes"/>
- </object>
- <nil key="NSDelegate"/>
- </object>
- <object class="NSMutableArray" key="NSTextContainers">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="448455574"/>
- </object>
- <int key="NSLMFlags">6</int>
- <nil key="NSDelegate"/>
- </object>
- <reference key="NSTextView" ref="717893057"/>
- <double key="NSWidth">4.100000e+02</double>
- <int key="NSTCFlags">1</int>
- </object>
- <object class="NSTextViewSharedData" key="NSSharedData">
- <int key="NSFlags">2055</int>
- <object class="NSColor" key="NSBackgroundColor" id="540137930">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- </object>
- <object class="NSColor" key="NSInsertionColor" id="568235873">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MAA</bytes>
- </object>
- <object class="NSDictionary" key="NSSelectedAttributes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSBackgroundColor</string>
- <string>NSColor</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">selectedTextBackgroundColor</string>
- <object class="NSColor" key="NSColor" id="775961365">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
- </object>
- </object>
- <object class="NSColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">selectedTextColor</string>
- <reference key="NSColor" ref="568235873"/>
- </object>
- </object>
- </object>
- <nil key="NSMarkedAttributes"/>
- <object class="NSDictionary" key="NSLinkAttributes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="dict.sortedKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>NSColor</string>
- <string>NSUnderline</string>
- </object>
- <object class="NSMutableArray" key="dict.values">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSColor">
- <int key="NSColorSpace">1</int>
- <bytes key="NSRGB">MCAwIDEAA</bytes>
- </object>
- <integer value="1"/>
- </object>
- </object>
- <nil key="NSDefaultParagraphStyle"/>
- </object>
- <int key="NSTVFlags">6</int>
- <string key="NSMaxSize">{900, 1e+07}</string>
- <string key="NSMinize">{3, 0}</string>
- <nil key="NSDelegate"/>
- </object>
- </object>
- <string key="NSFrameSize">{410, 41}</string>
- <reference key="NSSuperview" ref="326364230"/>
- <reference key="NSNextKeyView" ref="717893057"/>
- <reference key="NSDocView" ref="717893057"/>
- <reference key="NSBGColor" ref="540137930"/>
- <object class="NSCursor" key="NSCursor">
- <string key="NSHotSpot">{4, -5}</string>
- <int key="NSCursorType">1</int>
- </object>
- <int key="NScvFlags">2</int>
+ <int key="NSvFlags">266</int>
+ <string key="NSFrame">{{17, 52}, {416, 41}}</string>
+ <reference key="NSSuperview" ref="498033215"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="965526644">
+ <int key="NSCellFlags">-2080244224</int>
+ <int key="NSCellFlags2">1346502656</int>
+ <string key="NSContents">textblock</string>
+ <object class="NSFont" key="NSSupport" id="26">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">1.100000e+01</double>
+ <int key="NSfFlags">3100</int>
</object>
- <object class="NSScroller" id="449449077">
- <reference key="NSNextResponder" ref="326364230"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{-100, -100}, {15, 39}}</string>
- <reference key="NSSuperview" ref="326364230"/>
- <reference key="NSTarget" ref="326364230"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSPercent">3.823529e-01</double>
+ <reference key="NSControlView" ref="564072719"/>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">textBackgroundColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
</object>
- <object class="NSScroller" id="176144236">
- <reference key="NSNextResponder" ref="326364230"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{-100, -100}, {87, 18}}</string>
- <reference key="NSSuperview" ref="326364230"/>
- <int key="NSsFlags">1</int>
- <reference key="NSTarget" ref="326364230"/>
- <string key="NSAction">_doScroller:</string>
- <double key="NSCurValue">1.000000e+00</double>
- <double key="NSPercent">9.456522e-01</double>
+ <object class="NSColor" key="NSTextColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">textColor</string>
+ <object class="NSColor" key="NSColor" id="568235873">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MAA</bytes>
+ </object>
</object>
</object>
- <string key="NSFrame">{{20, 52}, {410, 41}}</string>
- <reference key="NSSuperview" ref="498033215"/>
- <reference key="NSNextKeyView" ref="921985605"/>
- <int key="NSsFlags">0</int>
- <reference key="NSVScroller" ref="449449077"/>
- <reference key="NSHScroller" ref="176144236"/>
- <reference key="NSContentView" ref="921985605"/>
</object>
<object class="NSCustomView" id="4268204">
<reference key="NSNextResponder" ref="498033215"/>
@@ -221,17 +99,16 @@
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">4326400</int>
<string key="NSContents">version</string>
- <object class="NSFont" key="NSSupport" id="26">
- <string key="NSName">LucidaGrande</string>
- <double key="NSSize">1.100000e+01</double>
- <int key="NSfFlags">3100</int>
- </object>
+ <reference key="NSSupport" ref="26"/>
<reference key="NSControlView" ref="171870711"/>
<object class="NSColor" key="NSBackgroundColor" id="782671173">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
- <reference key="NSColor" ref="775961365"/>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC42NjY2NjY2OQA</bytes>
+ </object>
</object>
<object class="NSColor" key="NSTextColor" id="253483895">
<int key="NSColorSpace">6</int>
@@ -472,6 +349,14 @@
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
+ <string key="label">legalBlock_</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="564072719"/>
+ </object>
+ <int key="connectionID">46</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
<string key="label">updateBlock_</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="979682390"/>
@@ -518,30 +403,6 @@
</object>
<int key="connectionID">61</int>
</object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">delegate</string>
- <reference key="source" ref="717893057"/>
- <reference key="destination" ref="1001"/>
- </object>
- <int key="connectionID">72</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">legalBlock_</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="326364230"/>
- </object>
- <int key="connectionID">73</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">legalText_</string>
- <reference key="source" ref="1001"/>
- <reference key="destination" ref="717893057"/>
- </object>
- <int key="connectionID">74</int>
- </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -588,12 +449,26 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="4268204"/>
+ <reference ref="564072719"/>
<reference ref="979682390"/>
- <reference ref="326364230"/>
</object>
<reference key="parent" ref="820943852"/>
</object>
<object class="IBObjectRecord">
+ <int key="objectID">8</int>
+ <reference key="object" ref="564072719"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="965526644"/>
+ </object>
+ <reference key="parent" ref="498033215"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">15</int>
+ <reference key="object" ref="965526644"/>
+ <reference key="parent" ref="564072719"/>
+ </object>
+ <object class="IBObjectRecord">
<int key="objectID">34</int>
<reference key="object" ref="4268204"/>
<object class="NSMutableArray" key="children">
@@ -724,32 +599,6 @@
<reference key="object" ref="870089784"/>
<reference key="parent" ref="309109286"/>
</object>
- <object class="IBObjectRecord">
- <int key="objectID">67</int>
- <reference key="object" ref="326364230"/>
- <object class="NSMutableArray" key="children">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="449449077"/>
- <reference ref="176144236"/>
- <reference ref="717893057"/>
- </object>
- <reference key="parent" ref="498033215"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">68</int>
- <reference key="object" ref="449449077"/>
- <reference key="parent" ref="326364230"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">69</int>
- <reference key="object" ref="176144236"/>
- <reference key="parent" ref="326364230"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">70</int>
- <reference key="object" ref="717893057"/>
- <reference key="parent" ref="326364230"/>
- </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -763,6 +612,7 @@
<string>11.IBPluginDependency</string>
<string>12.IBPluginDependency</string>
<string>13.IBPluginDependency</string>
+ <string>15.IBPluginDependency</string>
<string>16.IBPluginDependency</string>
<string>17.IBPluginDependency</string>
<string>3.IBEditorWindowLastContentRect</string>
@@ -778,11 +628,8 @@
<string>58.IBPluginDependency</string>
<string>59.IBPluginDependency</string>
<string>6.IBPluginDependency</string>
- <string>67.IBPluginDependency</string>
- <string>68.IBPluginDependency</string>
- <string>69.IBPluginDependency</string>
<string>7.IBPluginDependency</string>
- <string>70.IBPluginDependency</string>
+ <string>8.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -795,7 +642,8 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{652, 526}, {450, 246}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{524, 526}, {450, 246}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{524, 526}, {450, 246}}</string>
<boolean value="NO"/>
@@ -814,9 +662,6 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -839,7 +684,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">74</int>
+ <int key="maxID">61</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -857,10 +702,11 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<string>backgroundView_</string>
<string>legalBlock_</string>
- <string>legalText_</string>
<string>logoView_</string>
<string>spinner_</string>
+ <string>upToDate_</string>
<string>updateBlock_</string>
+ <string>updateCompleted_</string>
<string>updateNowButton_</string>
<string>updateStatusIndicator_</string>
<string>updateText_</string>
@@ -869,11 +715,12 @@
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>BackgroundTileView</string>
- <string>NSView</string>
- <string>NSTextView</string>
+ <string>NSTextField</string>
<string>NSImageView</string>
<string>NSProgressIndicator</string>
+ <string>NSTextField</string>
<string>NSView</string>
+ <string>NSTextField</string>
<string>NSButton</string>
<string>NSImageView</string>
<string>NSTextField</string>
diff --git a/chrome/browser/cocoa/about_window_controller.h b/chrome/browser/cocoa/about_window_controller.h
index d69a938..f9c7528 100644
--- a/chrome/browser/cocoa/about_window_controller.h
+++ b/chrome/browser/cocoa/about_window_controller.h
@@ -21,8 +21,7 @@
IBOutlet NSTextField* version_;
IBOutlet BackgroundTileView* backgroundView_;
IBOutlet NSImageView* logoView_;
- IBOutlet NSView* legalBlock_;
- IBOutlet NSTextView* legalText_;
+ IBOutlet NSTextField* legalBlock_;
IBOutlet NSView* updateBlock_; // Holds everything related to updates
IBOutlet NSProgressIndicator* spinner_;
IBOutlet NSImageView* updateStatusIndicator_;
diff --git a/chrome/browser/cocoa/about_window_controller.mm b/chrome/browser/cocoa/about_window_controller.mm
index 01f21d9..2dff4ed 100644
--- a/chrome/browser/cocoa/about_window_controller.mm
+++ b/chrome/browser/cocoa/about_window_controller.mm
@@ -10,7 +10,6 @@
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#import "chrome/app/keystone_glue.h"
-#include "chrome/browser/browser_list.h"
#import "chrome/browser/cocoa/about_window_controller.h"
#import "chrome/browser/cocoa/background_tile_view.h"
#include "chrome/browser/cocoa/restart_browser.h"
@@ -163,7 +162,7 @@ NSAttributedString* BuildLegalTextBlock() {
NSString* about_terms = base::SysWideToNSString(w_about_terms);
NSString* terms_link_text = l10n_util::GetNSString(IDS_TERMS_OF_SERVICE);
- AttributedStringAppendString(legal_block, @"\n\n");
+ AttributedStringAppendString(legal_block, @"\n");
sub_str = [about_terms substringToIndex:url_offsets[0]];
AttributedStringAppendString(legal_block, sub_str);
AttributedStringAppendHyperlink(legal_block, terms_link_text, kTOS);
@@ -210,16 +209,9 @@ NSAttributedString* BuildLegalTextBlock() {
DCHECK(logoImage);
[logoView_ setImage:logoImage];
- [legalText_ insertText:BuildLegalTextBlock()];
+ // Put the legal text into
+ [legalBlock_ setAttributedStringValue:BuildLegalTextBlock()];
- // Resize our text view now so that the |updateShift| below is set correctly.
- NSRect oldLegalRect = [legalBlock_ frame];
- [legalText_ sizeToFit];
- NSRect newRect = oldLegalRect;
- newRect.size.height = [legalText_ frame].size.height;
- [legalBlock_ setFrame:newRect];
- CGFloat legalShift = newRect.size.height - oldLegalRect.size.height;
-
KeystoneGlue* keystone = [self defaultKeystoneGlue];
CGFloat updateShift = 0.0;
if (keystone) {
@@ -234,8 +226,12 @@ NSAttributedString* BuildLegalTextBlock() {
// (and it's spacing).
updateShift = NSMinY([legalBlock_ frame]) - NSMinY([updateBlock_ frame]);
}
-
+
// Adjust the sizes/locations.
+
+ CGFloat legalShift =
+ [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:legalBlock_];
+
NSRect rect = [legalBlock_ frame];
rect.origin.y -= updateShift;
[legalBlock_ setFrame:rect];
@@ -384,15 +380,6 @@ NSAttributedString* BuildLegalTextBlock() {
}
}
-- (BOOL)textView:(NSTextView *)aTextView
- clickedOnLink:(id)link
- atIndex:(NSUInteger)charIndex {
- BrowserList::GetLastActive()->
- OpenURL(GURL([link UTF8String]), GURL(), NEW_WINDOW,
- PageTransition::LINK);
- return YES;
-}
-
- (NSButton*)updateButton {
return updateNowButton_;
}