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

Side by Side Diff: chrome/browser/views/bookmark_editor_view.cc

Issue 27262: Wires up sorting of bookmarks to the 'organize menu' in the bookmark... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/views/bookmark_editor_view.h" 5 #include "chrome/browser/views/bookmark_editor_view.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/browser/history/history.h" 10 #include "chrome/browser/history/history.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 BookmarkNode* node) { 328 BookmarkNode* node) {
329 if ((node_ && node_->HasAncestor(node)) || 329 if ((node_ && node_->HasAncestor(node)) ||
330 (parent_ && parent_->HasAncestor(node))) { 330 (parent_ && parent_->HasAncestor(node))) {
331 // The node, or its parent was removed. Close the dialog. 331 // The node, or its parent was removed. Close the dialog.
332 window()->Close(); 332 window()->Close();
333 } else { 333 } else {
334 Reset(); 334 Reset();
335 } 335 }
336 } 336 }
337 337
338 void BookmarkEditorView::BookmarkNodeChildrenReordered(BookmarkModel* model,
339 BookmarkNode* node) {
340 Reset();
341 }
342
338 void BookmarkEditorView::Reset() { 343 void BookmarkEditorView::Reset() {
339 if (!show_tree_) { 344 if (!show_tree_) {
340 if (GetParent()) 345 if (GetParent())
341 UserInputChanged(); 346 UserInputChanged();
342 return; 347 return;
343 } 348 }
344 349
345 new_group_button_->SetEnabled(true); 350 new_group_button_->SetEnabled(true);
346 351
347 // Do this first, otherwise when we invoke SetModel with the real one 352 // Do this first, otherwise when we invoke SetModel with the real one
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 break; 577 break;
573 } 578 }
574 } 579 }
575 DCHECK(child_bb_node); 580 DCHECK(child_bb_node);
576 bb_model_->SetTitle(child_bb_node, child_b_node->GetTitle()); 581 bb_model_->SetTitle(child_bb_node, child_b_node->GetTitle());
577 } 582 }
578 ApplyNameChangesAndCreateNewGroups(child_bb_node, child_b_node, 583 ApplyNameChangesAndCreateNewGroups(child_bb_node, child_b_node,
579 parent_b_node, parent_bb_node); 584 parent_b_node, parent_bb_node);
580 } 585 }
581 } 586 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698