Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc

Issue 7483003: Removed separator in bookmarks sub-menu if there are no bookmarks or folders to display (only fix... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc
===================================================================
--- chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc (revision 93383)
+++ chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc (working copy)
@@ -358,6 +358,12 @@
int* next_menu_id) {
DCHECK(!parent->child_count() ||
start_child_index < parent->child_count());
+
+ if ((start_child_index < parent->child_count()) &&
+ (parent == profile_->GetBookmarkModel()->GetBookmarkBarNode())) {
+ menu->AppendSeparator();
+ }
+
Roger Tawa OOO till Jul 10th 2011/07/21 20:41:48 I think it would be better to check if the menu ar
Roger Tawa OOO till Jul 10th 2011/07/21 20:43:54 Sorry, meant to say "one or more children", not "m
for (int i = start_child_index; i < parent->child_count(); ++i) {
const BookmarkNode* node = parent->GetChild(i);
int id = *next_menu_id;

Powered by Google App Engine
This is Rietveld 408576698