From 1f8141255fef5bff961b8fc2e2387053aae87d78 Mon Sep 17 00:00:00 2001 From: "jrg@chromium.org" Date: Wed, 24 Mar 2010 23:17:31 +0000 Subject: 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 --- chrome/browser/cocoa/bookmark_bar_controller.mm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'chrome') 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; -- cgit v1.1