diff options
author | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-24 23:17:31 +0000 |
---|---|---|
committer | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-24 23:17:31 +0000 |
commit | 1f8141255fef5bff961b8fc2e2387053aae87d78 (patch) | |
tree | 34331800943845bd84d7cb54828f099a32eca3d7 /chrome | |
parent | a3e1b9618256709ac3a740bd0c2c56ffc042465b (diff) | |
download | chromium_src-1f8141255fef5bff961b8fc2e2387053aae87d78.zip chromium_src-1f8141255fef5bff961b8fc2e2387053aae87d78.tar.gz chromium_src-1f8141255fef5bff961b8fc2e2387053aae87d78.tar.bz2 |
Fix bookmarks in the chevron "off the side" menu.
BUG=39196
TEST=bookmarks in the chevron "off the side" menu now work.
Context menu over a folder of bookmarks has "open all..." enabled.
Context menu over an empty bookmark folder has "open all..." DISabled.
Review URL: http://codereview.chromium.org/1223004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42554 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/cocoa/bookmark_bar_controller.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.mm b/chrome/browser/cocoa/bookmark_bar_controller.mm index 163dfd4..87b1d7e 100644 --- a/chrome/browser/cocoa/bookmark_bar_controller.mm +++ b/chrome/browser/cocoa/bookmark_bar_controller.mm @@ -976,9 +976,15 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) { // Enable or disable items. We are the menu delegate for both the bar // and for bookmark folder buttons. - (BOOL)validateUserInterfaceItem:(id)item { + // Yes for everything we don't explicitly deny. if (![item isKindOfClass:[NSMenuItem class]]) return YES; + // Yes if we're not a special BookmarkMenu. + if (![[item menu] isKindOfClass:[BookmarkMenu class]]) + return YES; + + // No if we think it's a special BookmarkMenu but have trouble. const BookmarkNode* node = [self nodeFromMenuItem:item]; if (!node) return NO; |