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

Side by Side Diff: ui/views/controls/combobox/native_combobox_gtk.cc

Issue 8909002: views: Convert IsEnabled() to just enabled() since it's just a simple accessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ui/views/controls/combobox/native_combobox_gtk.h" 5 #include "ui/views/controls/combobox/native_combobox_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 void NativeComboboxGtk::UpdateSelectedItem() { 56 void NativeComboboxGtk::UpdateSelectedItem() {
57 if (!native_view()) 57 if (!native_view())
58 return; 58 return;
59 gtk_combo_box_set_active( 59 gtk_combo_box_set_active(
60 GTK_COMBO_BOX(native_view()), combobox_->selected_item()); 60 GTK_COMBO_BOX(native_view()), combobox_->selected_item());
61 } 61 }
62 62
63 void NativeComboboxGtk::UpdateEnabled() { 63 void NativeComboboxGtk::UpdateEnabled() {
64 SetEnabled(combobox_->IsEnabled()); 64 SetEnabled(combobox_->enabled());
65 } 65 }
66 66
67 int NativeComboboxGtk::GetSelectedItem() const { 67 int NativeComboboxGtk::GetSelectedItem() const {
68 if (!native_view()) 68 if (!native_view())
69 return 0; 69 return 0;
70 return gtk_combo_box_get_active(GTK_COMBO_BOX(native_view())); 70 return gtk_combo_box_get_active(GTK_COMBO_BOX(native_view()));
71 } 71 }
72 72
73 bool NativeComboboxGtk::IsDropdownOpen() const { 73 bool NativeComboboxGtk::IsDropdownOpen() const {
74 if (!native_view()) 74 if (!native_view())
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 // static 220 // static
221 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper( 221 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper(
222 Combobox* combobox) { 222 Combobox* combobox) {
223 if (Widget::IsPureViews()) 223 if (Widget::IsPureViews())
224 return new NativeComboboxViews(combobox); 224 return new NativeComboboxViews(combobox);
225 return new NativeComboboxGtk(combobox); 225 return new NativeComboboxGtk(combobox);
226 } 226 }
227 227
228 } // namespace views 228 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/text_button.cc ('k') | ui/views/controls/combobox/native_combobox_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698