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

Side by Side Diff: ui/views/controls/textfield/native_textfield_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 <gdk/gdkkeysyms.h> 5 #include <gdk/gdkkeysyms.h>
6 #include <gtk/gtk.h> 6 #include <gtk/gtk.h>
7 7
8 #include "ui/views/controls/textfield/native_textfield_gtk.h" 8 #include "ui/views/controls/textfield/native_textfield_gtk.h"
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 void NativeTextfieldGtk::UpdateIsPassword() { 169 void NativeTextfieldGtk::UpdateIsPassword() {
170 if (!native_view()) 170 if (!native_view())
171 return; 171 return;
172 gtk_entry_set_visibility(GTK_ENTRY(native_view()), !textfield_->IsPassword()); 172 gtk_entry_set_visibility(GTK_ENTRY(native_view()), !textfield_->IsPassword());
173 } 173 }
174 174
175 void NativeTextfieldGtk::UpdateEnabled() { 175 void NativeTextfieldGtk::UpdateEnabled() {
176 if (!native_view()) 176 if (!native_view())
177 return; 177 return;
178 SetEnabled(textfield_->IsEnabled()); 178 SetEnabled(textfield_->enabled());
179 } 179 }
180 180
181 gfx::Insets NativeTextfieldGtk::CalculateInsets() { 181 gfx::Insets NativeTextfieldGtk::CalculateInsets() {
182 if (!native_view()) 182 if (!native_view())
183 return gfx::Insets(); 183 return gfx::Insets();
184 184
185 GtkWidget* widget = native_view(); 185 GtkWidget* widget = native_view();
186 gfx::Insets insets; 186 gfx::Insets insets;
187 187
188 GtkEntry* entry = GTK_ENTRY(widget); 188 GtkEntry* entry = GTK_ENTRY(widget);
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 429
430 // static 430 // static
431 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( 431 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper(
432 Textfield* field) { 432 Textfield* field) {
433 if (Widget::IsPureViews()) 433 if (Widget::IsPureViews())
434 return new NativeTextfieldViews(field); 434 return new NativeTextfieldViews(field);
435 return new NativeTextfieldGtk(field); 435 return new NativeTextfieldGtk(field);
436 } 436 }
437 437
438 } // namespace views 438 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/table/table_view.cc ('k') | ui/views/controls/textfield/native_textfield_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698