diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 20:43:14 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 20:43:14 +0000 |
commit | 04a3942cf4419e0f21105934e92168583e1d49c4 (patch) | |
tree | 4ace473662dcaf431cc392a78cce6dd817e0f08d /chrome/app/nibs | |
parent | 1319d3b2391006b26b095b2d1f69c424eb237ae9 (diff) | |
download | chromium_src-04a3942cf4419e0f21105934e92168583e1d49c4.zip chromium_src-04a3942cf4419e0f21105934e92168583e1d49c4.tar.gz chromium_src-04a3942cf4419e0f21105934e92168583e1d49c4.tar.bz2 |
(Mac) Display the bookmark bar off-the-side menu on mouse down. Also align the menu.
(Basically, make it like Safari's button.)
We make the button into a |MenuButton|, attach a fixed menu to it in the
nib, and make the |BookmarkBarController| the delegate for this menu so
that we can update the menu just before it's displayed.
As a side effect, also fixes bug 20813.
BUG=21093,20813
TEST=Make sure the bookmark bar off-the-side button works properly under a variety of circumstances, making sure the menu is properly aligned, etc.
Review URL: http://codereview.chromium.org/199024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25507 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/nibs')
-rw-r--r-- | chrome/app/nibs/BookmarkBar.xib | 224 |
1 files changed, 152 insertions, 72 deletions
diff --git a/chrome/app/nibs/BookmarkBar.xib b/chrome/app/nibs/BookmarkBar.xib index 30beaba..c2b1784 100644 --- a/chrome/app/nibs/BookmarkBar.xib +++ b/chrome/app/nibs/BookmarkBar.xib @@ -2,15 +2,16 @@ <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03"> <data> <int key="IBDocument.SystemTarget">1050</int> - <string key="IBDocument.SystemVersion">9L30</string> + <string key="IBDocument.SystemVersion">9L31a</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="18"/> - <integer value="4"/> <integer value="1"/> + <integer value="75"/> + <integer value="4"/> + <integer value="18"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -36,6 +37,26 @@ <object class="NSCustomObject" id="1004"> <string key="NSClassName">NSApplication</string> </object> + <object class="NSMenu" id="190917733"> + <string key="NSTitle"/> + <object class="NSMutableArray" key="NSMenuItems"> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMenuItem" id="582055256"> + <reference key="NSMenu" ref="190917733"/> + <string key="NSTitle"/> + <string key="NSKeyEquiv"/> + <int key="NSMnemonicLoc">2147483647</int> + <object class="NSCustomResource" key="NSOnImage" id="932677134"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSMenuCheckmark</string> + </object> + <object class="NSCustomResource" key="NSMixedImage" id="126584967"> + <string key="NSClassName">NSImage</string> + <string key="NSResourceName">NSMenuMixedState</string> + </object> + </object> + </object> + </object> <object class="NSCustomView" id="620641226"> <reference key="NSNextResponder"/> <int key="NSvFlags">-2147483358</int> @@ -85,30 +106,24 @@ <string key="NSTitle">^IDS_BOOMARK_BAR_OPEN_ALL</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <object class="NSCustomResource" key="NSOnImage" id="636322919"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSMenuCheckmark</string> - </object> - <object class="NSCustomResource" key="NSMixedImage" id="607448274"> - <string key="NSClassName">NSImage</string> - <string key="NSResourceName">NSMenuMixedState</string> - </object> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="115646576"> <reference key="NSMenu" ref="183701277"/> <string key="NSTitle">^IDS_BOOMARK_BAR_OPEN_ALL_NEW_WINDOW</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="509003741"> <reference key="NSMenu" ref="183701277"/> <string key="NSTitle">^IDS_BOOMARK_BAR_OPEN_ALL_INCOGNITO</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="694014238"> <reference key="NSMenu" ref="183701277"/> @@ -117,24 +132,24 @@ <string key="NSTitle"/> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="112128065"> <reference key="NSMenu" ref="183701277"/> <string key="NSTitle">^IDS_BOOKMARK_BAR_RENAME_FOLDER</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="168951506"> <reference key="NSMenu" ref="183701277"/> <string key="NSTitle">^IDS_BOOKMARK_BAR_REMOVE</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="1022383113"> <reference key="NSMenu" ref="183701277"/> @@ -143,24 +158,24 @@ <string key="NSTitle"/> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="926809071"> <reference key="NSMenu" ref="183701277"/> <string key="NSTitle">^IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="90793013"> <reference key="NSMenu" ref="183701277"/> <string key="NSTitle">^IDS_BOOMARK_BAR_NEW_FOLDER</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="149427359"> <reference key="NSMenu" ref="183701277"/> @@ -169,16 +184,16 @@ <string key="NSTitle"/> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="61770624"> <reference key="NSMenu" ref="183701277"/> <string key="NSTitle">^IDS_BOOKMARK_MANAGER</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> <int key="NSTag">40011</int> </object> <object class="NSMenuItem" id="23014313"> @@ -186,8 +201,8 @@ <string key="NSTitle">^IDS_BOOMARK_BAR_ALWAYS_SHOW</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> <int key="NSTag">40009</int> </object> </object> @@ -201,24 +216,24 @@ <string key="NSTitle">^IDS_BOOMARK_BAR_OPEN_IN_NEW_TAB</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="308357419"> <reference key="NSMenu" ref="672481054"/> <string key="NSTitle">^IDS_BOOMARK_BAR_OPEN_IN_NEW_WINDOW</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="300791080"> <reference key="NSMenu" ref="672481054"/> <string key="NSTitle">^IDS_BOOMARK_BAR_OPEN_INCOGNITO</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="878416689"> <reference key="NSMenu" ref="672481054"/> @@ -227,24 +242,24 @@ <string key="NSTitle"/> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="182996500"> <reference key="NSMenu" ref="672481054"/> <string key="NSTitle">^IDS_BOOKMARK_BAR_EDIT</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="908072523"> <reference key="NSMenu" ref="672481054"/> <string key="NSTitle">^IDS_BOOKMARK_BAR_REMOVE</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="554011295"> <reference key="NSMenu" ref="672481054"/> @@ -253,24 +268,24 @@ <string key="NSTitle"/> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="527115352"> <reference key="NSMenu" ref="672481054"/> <string key="NSTitle">^IDS_BOOMARK_BAR_ADD_NEW_BOOKMARK</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="595609715"> <reference key="NSMenu" ref="672481054"/> <string key="NSTitle">^IDS_BOOMARK_BAR_NEW_FOLDER</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="422582534"> <reference key="NSMenu" ref="672481054"/> @@ -279,16 +294,16 @@ <string key="NSTitle"/> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> </object> <object class="NSMenuItem" id="807677456"> <reference key="NSMenu" ref="672481054"/> <string key="NSTitle">^IDS_BOOKMARK_MANAGER</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> <int key="NSTag">40011</int> </object> <object class="NSMenuItem" id="515274494"> @@ -296,8 +311,8 @@ <string key="NSTitle">^IDS_BOOMARK_BAR_ALWAYS_SHOW</string> <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> - <reference key="NSOnImage" ref="636322919"/> - <reference key="NSMixedImage" ref="607448274"/> + <reference key="NSOnImage" ref="932677134"/> + <reference key="NSMixedImage" ref="126584967"/> <int key="NSTag">40009</int> </object> </object> @@ -486,14 +501,6 @@ <int key="connectionID">66</int> </object> <object class="IBConnectionRecord"> - <object class="IBActionConnection" key="connection"> - <string key="label">openOffTheSideMenuFromButton:</string> - <reference key="source" ref="1001"/> - <reference key="destination" ref="1071220197"/> - </object> - <int key="connectionID">69</int> - </object> - <object class="IBConnectionRecord"> <object class="IBOutletConnection" key="connection"> <string key="label">menu</string> <reference key="source" ref="610146462"/> @@ -525,6 +532,22 @@ </object> <int key="connectionID">74</int> </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">menu_</string> + <reference key="source" ref="1071220197"/> + <reference key="destination" ref="190917733"/> + </object> + <int key="connectionID">79</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">delegate</string> + <reference key="source" ref="190917733"/> + <reference key="destination" ref="1001"/> + </object> + <int key="connectionID">81</int> + </object> </object> <object class="IBMutableOrderedSet" key="objectRecords"> <object class="NSArray" key="orderedObjects"> @@ -751,6 +774,21 @@ <reference key="object" ref="849863465"/> <reference key="parent" ref="1002"/> </object> + <object class="IBObjectRecord"> + <int key="objectID">75</int> + <reference key="object" ref="190917733"/> + <object class="NSMutableArray" key="children"> + <bool key="EncodedWithXMLCoder">YES</bool> + <reference ref="582055256"/> + </object> + <reference key="parent" ref="1002"/> + <string key="objectName">Off-the-side Menu</string> + </object> + <object class="IBObjectRecord"> + <int key="objectID">76</int> + <reference key="object" ref="582055256"/> + <reference key="parent" ref="190917733"/> + </object> </object> </object> <object class="NSMutableDictionary" key="flattenedProperties"> @@ -788,10 +826,15 @@ <string>5.IBPluginDependency</string> <string>6.IBPluginDependency</string> <string>62.IBPluginDependency</string> + <string>63.CustomClassName</string> <string>63.IBPluginDependency</string> + <string>64.CustomClassName</string> <string>64.IBPluginDependency</string> <string>7.IBPluginDependency</string> <string>72.IBPluginDependency</string> + <string>75.IBEditorWindowLastContentRect</string> + <string>75.IBPluginDependency</string> + <string>76.IBPluginDependency</string> <string>8.IBPluginDependency</string> <string>9.IBPluginDependency</string> </object> @@ -800,16 +843,18 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{519, 477}, {600, 144}}</string> + <string>{{96, 477}, {600, 144}}</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> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>{{380, 543}, {365, 213}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{859, 729}, {365, 213}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -821,15 +866,18 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>{{370, 543}, {375, 213}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> - <string>{{655, 726}, {375, 213}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>MenuButton</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>ClickHoldButtonCell</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> + <string>{{0, 722}, {75, 23}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> @@ -856,7 +904,7 @@ </object> </object> <nil key="sourceID"/> - <int key="maxID">74</int> + <int key="maxID">81</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> @@ -909,7 +957,7 @@ <bool key="EncodedWithXMLCoder">YES</bool> <string>NSMenu</string> <string>NSView</string> - <string>NSButton</string> + <string>MenuButton</string> <string>id</string> <string>id</string> </object> @@ -936,6 +984,18 @@ </object> </object> <object class="IBPartialClassDescription"> + <string key="className">ClickHoldButtonCell</string> + <string key="superclassName">GradientButtonCell</string> + <object class="NSMutableDictionary" key="outlets"> + <string key="NS.key.0">clickHoldTarget_</string> + <string key="NS.object.0">id</string> + </object> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">browser/cocoa/clickhold_button_cell.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">GTMUILocalizer</string> <string key="superclassName">NSObject</string> <object class="NSMutableDictionary" key="outlets"> @@ -959,6 +1019,26 @@ </object> </object> <object class="IBPartialClassDescription"> + <string key="className">GradientButtonCell</string> + <string key="superclassName">NSButtonCell</string> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">browser/cocoa/gradient_button_cell.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> + <string key="className">MenuButton</string> + <string key="superclassName">NSButton</string> + <object class="NSMutableDictionary" key="outlets"> + <string key="NS.key.0">menu_</string> + <string key="NS.object.0">NSMenu</string> + </object> + <object class="IBClassDescriptionSource" key="sourceIdentifier"> + <string key="majorKey">IBProjectSource</string> + <string key="minorKey">browser/cocoa/menu_button.h</string> + </object> + </object> + <object class="IBPartialClassDescription"> <string key="className">NSObject</string> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBProjectSource</string> @@ -992,19 +1072,19 @@ <bool key="EncodedWithXMLCoder">YES</bool> <object class="NSMutableArray" key="dict.sortedKeys"> <bool key="EncodedWithXMLCoder">YES</bool> - <string>backgroundButton_</string> <string>closeButton_</string> <string>contextMenu_</string> <string>iconView_</string> <string>target_</string> + <string>titleView_</string> </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> <string>NSButton</string> - <string>NSButton</string> <string>NSMenu</string> <string>NSView</string> <string>id</string> + <string>NSTextField</string> </object> </object> <object class="IBClassDescriptionSource" key="sourceIdentifier"> |