summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-03 17:18:08 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-03 17:18:08 +0000
commit4747f48db280ea100258ab20881dc7e0bfeb3f68 (patch)
treec70219d6a861f4306fd6cfe837db4f94401dc366 /views
parent9ab86d92329333998be78bb3f1cebad74cc92f7e (diff)
downloadchromium_src-4747f48db280ea100258ab20881dc7e0bfeb3f68.zip
chromium_src-4747f48db280ea100258ab20881dc7e0bfeb3f68.tar.gz
chromium_src-4747f48db280ea100258ab20881dc7e0bfeb3f68.tar.bz2
Adding registration of accelerators for the browser in toolkit_views.
BUG=None TEST=Open Chrome built with toolkit_views, test that accelerators work. See review: http://codereview.chromium.org/160502 Review URL: http://codereview.chromium.org/159790 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22277 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/event.h2
-rw-r--r--views/event_gtk.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/views/event.h b/views/event.h
index 843ed00..ee9a838 100644
--- a/views/event.h
+++ b/views/event.h
@@ -234,7 +234,7 @@ class KeyEvent : public Event {
// Create a new key event
KeyEvent(EventType type, int ch, int repeat_count, int message_flags);
#elif defined(OS_LINUX)
- KeyEvent(GdkEventKey* event, bool make_upper_case);
+ KeyEvent(GdkEventKey* event, bool make_lower_case);
#endif
int GetCharacter() const {
diff --git a/views/event_gtk.cc b/views/event_gtk.cc
index d1b9d88..6f1e450 100644
--- a/views/event_gtk.cc
+++ b/views/event_gtk.cc
@@ -11,12 +11,12 @@ namespace views {
// TODO(jcampan): the same physical key can send different keyvals (ex: a or A).
// In order for accelerators to work, we need to normalize that. The right
// solution should probably to get the key-code out of the keystate.
-KeyEvent::KeyEvent(GdkEventKey* event, bool make_upper_case)
+KeyEvent::KeyEvent(GdkEventKey* event, bool make_lower_case)
: Event(event->type == GDK_KEY_PRESS ?
Event::ET_KEY_PRESSED : Event::ET_KEY_RELEASED,
GetFlagsFromGdkState(event->state)),
// TODO(erg): All these values are iffy.
- character_(make_upper_case ? gdk_keyval_to_upper (event->keyval) :
+ character_(make_lower_case ? gdk_keyval_to_lower(event->keyval) :
event->keyval),
repeat_count_(0),
message_flags_(0) {