diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-11 03:59:44 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-11 03:59:44 +0000 |
commit | b24740e3b9555bc7b28b602a588a36665882602e (patch) | |
tree | 1f5714dc4f932b4707455717d68f1eced18c1052 /chrome/browser/bookmarks | |
parent | 4831051e6bce5f55c3954bea208c0ce118ea25ff (diff) | |
download | chromium_src-b24740e3b9555bc7b28b602a588a36665882602e.zip chromium_src-b24740e3b9555bc7b28b602a588a36665882602e.tar.gz chromium_src-b24740e3b9555bc7b28b602a588a36665882602e.tar.bz2 |
Fixes a handful of related bookmark manager bugs/requests:
. Adds a search field before the text field.
. When the search node is selected and there are no results or no
search text, a descriptive label is drawn on top of the table
telling the user what's happening.
. In the bookmark menus Edit... is now Rename... for folders.
BUG=5272 5319 5273 4165
TEST=see individual bugs
Review URL: http://codereview.chromium.org/13724
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6777 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_context_menu.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/bookmarks/bookmark_context_menu.cc b/chrome/browser/bookmarks/bookmark_context_menu.cc index 4da52e1..51797ad 100644 --- a/chrome/browser/bookmarks/bookmark_context_menu.cc +++ b/chrome/browser/bookmarks/bookmark_context_menu.cc @@ -253,8 +253,13 @@ BookmarkContextMenu::BookmarkContextMenu( menu_->AppendSeparator(); } - menu_->AppendMenuItemWithLabel(IDS_BOOKMARK_BAR_EDIT, - l10n_util::GetString(IDS_BOOKMARK_BAR_EDIT)); + if (selection.size() == 1 && selection[0]->is_folder()) { + menu_->AppendMenuItemWithLabel(IDS_BOOKMARK_BAR_RENAME_FOLDER, + l10n_util::GetString(IDS_BOOKMARK_BAR_RENAME_FOLDER)); + } else { + menu_->AppendMenuItemWithLabel(IDS_BOOKMARK_BAR_EDIT, + l10n_util::GetString(IDS_BOOKMARK_BAR_EDIT)); + } menu_->AppendMenuItemWithLabel( IDS_BOOKMARK_BAR_REMOVE, l10n_util::GetString(IDS_BOOKMARK_BAR_REMOVE)); @@ -346,6 +351,7 @@ void BookmarkContextMenu::ExecuteCommand(int id) { break; } + case IDS_BOOKMARK_BAR_RENAME_FOLDER: case IDS_BOOKMARK_BAR_EDIT: UserMetrics::RecordAction(L"BookmarkBar_ContextMenu_Edit", profile_); @@ -473,6 +479,7 @@ bool BookmarkContextMenu::IsCommandEnabled(int id) const { case IDS_BOOMARK_BAR_OPEN_ALL_NEW_WINDOW: return HasURLs(); + case IDS_BOOKMARK_BAR_RENAME_FOLDER: case IDS_BOOKMARK_BAR_EDIT: return selection_.size() == 1 && !is_root_node; |