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

Side by Side Diff: chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.cc

Issue 12335026: Add GetDefaultIndex() to ComboboxModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: UI_EXPORT Created 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/gtk/bookmarks/bookmark_bubble_gtk.h" 5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 folder_combo_model_.reset(new RecentlyUsedFoldersComboModel(model_, node)); 310 folder_combo_model_.reset(new RecentlyUsedFoldersComboModel(model_, node));
311 311
312 // We always have nodes + 1 entries in the combo. The last entry will be 312 // We always have nodes + 1 entries in the combo. The last entry will be
313 // the 'Select another folder...' entry that opens the bookmark editor. 313 // the 'Select another folder...' entry that opens the bookmark editor.
314 for (int i = 0; i < folder_combo_model_->GetItemCount(); ++i) { 314 for (int i = 0; i < folder_combo_model_->GetItemCount(); ++i) {
315 gtk_combo_box_append_text(GTK_COMBO_BOX(folder_combo_), 315 gtk_combo_box_append_text(GTK_COMBO_BOX(folder_combo_),
316 UTF16ToUTF8(folder_combo_model_->GetItemAt(i)).c_str()); 316 UTF16ToUTF8(folder_combo_model_->GetItemAt(i)).c_str());
317 } 317 }
318 318
319 gtk_combo_box_set_active(GTK_COMBO_BOX(folder_combo_), 319 gtk_combo_box_set_active(GTK_COMBO_BOX(folder_combo_),
320 folder_combo_model_->node_parent_index()); 320 folder_combo_model_->GetDefaultIndex());
321 } 321 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698