diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-27 13:04:00 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-27 13:04:00 +0000 |
commit | 449dd2fa0f79ea68566f04399b3860b59762bc62 (patch) | |
tree | f701362fb866e7dbd065db7a4b9d8881d24fb9c1 /chrome/app/nibs | |
parent | b004209b94e258e9ca5a2356e4bd108f8443e142 (diff) | |
download | chromium_src-449dd2fa0f79ea68566f04399b3860b59762bc62.zip chromium_src-449dd2fa0f79ea68566f04399b3860b59762bc62.tar.gz chromium_src-449dd2fa0f79ea68566f04399b3860b59762bc62.tar.bz2 |
Fix issue where cmd-w was hard-coded to closing a browser tab regardless of the frontmost window type. Have cmd-key equiv correctly set depending on the window type and the number of tabs in the window. Broadcast notification when the number of tabs changes in the model. Disable "close tab" item when there's only 1 tab in the browser window.
BUG=10047
TEST=cmd-w correctly closes the expected thing (frontmost window, or tab in the frontmost window). close tab should be disabled when the frontmost tab is not a browser or if there is only 1 tab in the window.
Review URL: http://codereview.chromium.org/115789
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16981 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/nibs')
-rw-r--r-- | chrome/app/nibs/en.lproj/MainMenu.xib | 82 |
1 files changed, 35 insertions, 47 deletions
diff --git a/chrome/app/nibs/en.lproj/MainMenu.xib b/chrome/app/nibs/en.lproj/MainMenu.xib index 1e452d8..e0a917c 100644 --- a/chrome/app/nibs/en.lproj/MainMenu.xib +++ b/chrome/app/nibs/en.lproj/MainMenu.xib @@ -8,7 +8,7 @@ <string key="IBDocument.HIToolboxVersion">352.00</string> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="111"/> + <integer value="81"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -305,7 +305,8 @@ <object class="NSMenuItem" id="776162233"> <reference key="NSMenu" ref="720053764"/> <string key="NSTitle">Close Window</string> - <string key="NSKeyEquiv"/> + <string key="NSKeyEquiv">w</string> + <int key="NSKeyEquivModMask">1048576</int> <int key="NSMnemonicLoc">2147483647</int> <reference key="NSOnImage" ref="353210768"/> <reference key="NSMixedImage" ref="549394948"/> @@ -313,8 +314,7 @@ <object class="NSMenuItem" id="1059729334"> <reference key="NSMenu" ref="720053764"/> <string key="NSTitle">Close Tab</string> - <string key="NSKeyEquiv">w</string> - <int key="NSKeyEquivModMask">1048576</int> + <string key="NSKeyEquiv"/> <int key="NSMnemonicLoc">2147483647</int> <reference key="NSOnImage" ref="353210768"/> <reference key="NSMixedImage" ref="549394948"/> @@ -1573,6 +1573,22 @@ <int key="connectionID">615</int> </object> <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">closeWindowMenuItem_</string> + <reference key="source" ref="168151378"/> + <reference key="destination" ref="776162233"/> + </object> + <int key="connectionID">622</int> + </object> + <object class="IBConnectionRecord"> + <object class="IBOutletConnection" key="connection"> + <string key="label">closeTabMenuItem_</string> + <reference key="source" ref="168151378"/> + <reference key="destination" ref="1059729334"/> + </object> + <int key="connectionID">623</int> + </object> + <object class="IBConnectionRecord"> <object class="IBActionConnection" key="connection"> <string key="label">orderFrontStandardAboutPanel:</string> <reference key="source" ref="168151378"/> @@ -2669,7 +2685,7 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <integer value="1" id="9"/> - <string>{{929, 698}, {190, 23}}</string> + <string>{{715, 938}, {190, 23}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> <string>{{596, 852}, {216, 23}}</string> @@ -2779,7 +2795,7 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> <string>{{525, 802}, {197, 73}}</string> - <string>{{398, 662}, {535, 20}}</string> + <string>{{539, 1064}, {535, 20}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> <string>{74, 862}</string> @@ -2879,7 +2895,7 @@ <reference ref="9"/> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> - <string>{{561, 418}, {249, 303}}</string> + <string>{{645, 761}, {249, 303}}</string> <string>com.apple.InterfaceBuilder.CocoaPlugin</string> <reference ref="9"/> <string>{{323, 672}, {199, 203}}</string> @@ -2911,49 +2927,12 @@ </object> </object> <nil key="sourceID"/> - <int key="maxID">619</int> + <int key="maxID">623</int> </object> <object class="IBClassDescriber" key="IBDocument.Classes"> <object class="NSMutableArray" key="referencedPartialClassDescriptions"> <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBPartialClassDescription"> - <string key="className">AboutController</string> - <string key="superclassName">NSWindowController</string> - <object class="NSMutableDictionary" key="actions"> - <string key="NS.key.0">updateNow:</string> - <string key="NS.object.0">id</string> - </object> - <object class="NSMutableDictionary" key="outlets"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSMutableArray" key="dict.sortedKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>spinner_</string> - <string>upToDate_</string> - <string>updateCompleted_</string> - <string>version_</string> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>NSProgressIndicator</string> - <string>NSTextField</string> - <string>NSTextField</string> - <string>NSTextField</string> - </object> - </object> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBProjectSource</string> - <string key="minorKey">browser/cocoa/about_controller.h</string> - </object> - </object> - <object class="IBPartialClassDescription"> - <string key="className">AboutController</string> - <string key="superclassName">NSWindowController</string> - <object class="IBClassDescriptionSource" key="sourceIdentifier"> - <string key="majorKey">IBUserSource</string> - <string key="minorKey"/> - </object> - </object> - <object class="IBPartialClassDescription"> <string key="className">AppController</string> <string key="superclassName">NSObject</string> <object class="NSMutableDictionary" key="actions"> @@ -2972,8 +2951,17 @@ </object> </object> <object class="NSMutableDictionary" key="outlets"> - <string key="NS.key.0">aboutController_</string> - <string key="NS.object.0">AboutController</string> + <bool key="EncodedWithXMLCoder">YES</bool> + <object class="NSMutableArray" key="dict.sortedKeys"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>closeTabMenuItem_</string> + <string>closeWindowMenuItem_</string> + </object> + <object class="NSMutableArray" key="dict.values"> + <bool key="EncodedWithXMLCoder">YES</bool> + <string>NSMenuItem</string> + <string>NSMenuItem</string> + </object> </object> <object class="IBClassDescriptionSource" key="sourceIdentifier"> <string key="majorKey">IBProjectSource</string> |