summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_menu_bridge.mm
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 17:28:46 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 17:28:46 +0000
commitc83aca60c53e6196a38fac5431b25a82b0a0c94a (patch)
tree4899d1769063be0e803bd680d42562bb784c761d /chrome/browser/cocoa/bookmark_menu_bridge.mm
parent2de1e53f716e5fc1264a680be94f371d01002108 (diff)
downloadchromium_src-c83aca60c53e6196a38fac5431b25a82b0a0c94a.zip
chromium_src-c83aca60c53e6196a38fac5431b25a82b0a0c94a.tar.gz
chromium_src-c83aca60c53e6196a38fac5431b25a82b0a0c94a.tar.bz2
Bookmark menus not updated when their name is edited in the bookmark bar.
BUG=http://crbug.com/23301 TEST=see bug Review URL: http://codereview.chromium.org/245035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27502 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_menu_bridge.mm')
-rw-r--r--chrome/browser/cocoa/bookmark_menu_bridge.mm13
1 files changed, 9 insertions, 4 deletions
diff --git a/chrome/browser/cocoa/bookmark_menu_bridge.mm b/chrome/browser/cocoa/bookmark_menu_bridge.mm
index 22a207f..70a0983 100644
--- a/chrome/browser/cocoa/bookmark_menu_bridge.mm
+++ b/chrome/browser/cocoa/bookmark_menu_bridge.mm
@@ -94,14 +94,14 @@ void BookmarkMenuBridge::BookmarkNodeChanged(BookmarkModel* model,
const BookmarkNode* node) {
NSMenuItem* item = MenuItemForNode(node);
if (item)
- ConfigureMenuItem(node, item);
+ ConfigureMenuItem(node, item, true);
}
void BookmarkMenuBridge::BookmarkNodeFavIconLoaded(BookmarkModel* model,
const BookmarkNode* node) {
NSMenuItem* item = MenuItemForNode(node);
if (item)
- ConfigureMenuItem(node, item);
+ ConfigureMenuItem(node, item, false);
}
void BookmarkMenuBridge::BookmarkNodeChildrenReordered(
@@ -180,13 +180,18 @@ void BookmarkMenuBridge::AddNodeToMenu(const BookmarkNode* node, NSMenu* menu) {
[menu setSubmenu:submenu forItem:item];
AddNodeToMenu(child, submenu); // recursive call
} else {
- ConfigureMenuItem(child, item);
+ ConfigureMenuItem(child, item, false);
}
}
}
void BookmarkMenuBridge::ConfigureMenuItem(const BookmarkNode* node,
- NSMenuItem* item) {
+ NSMenuItem* item,
+ bool set_title) {
+ if (set_title) {
+ NSString* title = [BookmarkMenuCocoaController menuTitleForNode:node];
+ [item setTitle:title];
+ }
[item setTarget:controller_];
[item setAction:@selector(openBookmarkMenuItem:)];
[item setTag:node->id()];