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

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
« no previous file with comments | « chrome/browser/ui/toolbar/wrench_menu_model.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc
===================================================================
--- chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc (revision 93451)
+++ chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc (working copy)
@@ -64,15 +64,16 @@
parent_menu_item_ = parent;
int initial_count = parent->GetSubmenu() ?
parent->GetSubmenu()->GetMenuItemCount() : 0;
+ if ((start_child_index < node->child_count()) &&
+ (initial_count > 0)) {
+ parent->AppendSeparator();
+ }
BuildMenu(node, start_child_index, parent, &next_menu_id_);
if (show_options == SHOW_OTHER_FOLDER) {
const BookmarkNode* other_folder =
profile_->GetBookmarkModel()->other_node();
- if (other_folder->child_count() > 0) {
- int current_count = parent->GetSubmenu() ?
- parent->GetSubmenu()->GetMenuItemCount() : 0;
- if (current_count != initial_count)
- parent->AppendSeparator();
+ if (!other_folder->empty()) {
+ parent->AppendSeparator();
BuildOtherFolderMenu(parent, &next_menu_id_);
}
}
« no previous file with comments | « chrome/browser/ui/toolbar/wrench_menu_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698