Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "autofill_popup_view_gtk.h" | 5 #include "autofill_popup_view_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 231 SetSelectedLine(0); | 231 SetSelectedLine(0); |
| 232 return true; | 232 return true; |
| 233 case GDK_Page_Down: | 233 case GDK_Page_Down: |
| 234 SetSelectedLine(autofill_values().size() - 1); | 234 SetSelectedLine(autofill_values().size() - 1); |
| 235 return true; | 235 return true; |
| 236 case GDK_Escape: | 236 case GDK_Escape: |
| 237 Hide(); | 237 Hide(); |
| 238 return true; | 238 return true; |
| 239 case GDK_Delete: | 239 case GDK_Delete: |
| 240 case GDK_KP_Delete: | 240 case GDK_KP_Delete: |
| 241 return (event->state == GDK_SHIFT_MASK) && RemoveSelectedLine(); | 241 return (event->state & GDK_SHIFT_MASK) && RemoveSelectedLine(); |
|
Ilya Sherman
2012/04/17 08:31:20
Does this mean that ctrl-shift-delete and other su
csharp
2012/04/18 15:35:58
Fixed. There seem to be other modifiers on by defa
Ilya Sherman
2012/04/18 18:12:51
Ah, that's tricky. Nice job finding how to do tha
| |
| 242 case GDK_Return: | 242 case GDK_Return: |
| 243 case GDK_KP_Enter: | 243 case GDK_KP_Enter: |
| 244 return AcceptSelectedLine(); | 244 return AcceptSelectedLine(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 return false; | 247 return false; |
| 248 } | 248 } |
| 249 | 249 |
| 250 void AutofillPopupViewGtk::SetupLayout(const gfx::Rect& window_rect, | 250 void AutofillPopupViewGtk::SetupLayout(const gfx::Rect& window_rect, |
| 251 const GdkColor& text_color) { | 251 const GdkColor& text_color) { |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 276 kMiddlePadding + | 276 kMiddlePadding + |
| 277 font_.GetStringWidth(autofill_labels()[i])); | 277 font_.GetStringWidth(autofill_labels()[i])); |
| 278 } | 278 } |
| 279 | 279 |
| 280 return popup_width; | 280 return popup_width; |
| 281 } | 281 } |
| 282 | 282 |
| 283 int AutofillPopupViewGtk::LineFromY(int y) { | 283 int AutofillPopupViewGtk::LineFromY(int y) { |
| 284 return y / row_height_; | 284 return y / row_height_; |
| 285 } | 285 } |
| OLD | NEW |