diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-01 18:37:39 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-01 18:37:39 +0000 |
commit | 680ed93e5e315143eb7e7478e21d2080689cbd07 (patch) | |
tree | 314dce7a8f82ba13446de7d30a55393835fca4b6 /views/widget | |
parent | ef610457ca8d0d43594a765e2b1f1ea194c5a591 (diff) | |
download | chromium_src-680ed93e5e315143eb7e7478e21d2080689cbd07.zip chromium_src-680ed93e5e315143eb7e7478e21d2080689cbd07.tar.gz chromium_src-680ed93e5e315143eb7e7478e21d2080689cbd07.tar.bz2 |
Porting textfield to toolkit_views Gtk.
BUG=None
TEST=Run the view unit-tests.
See original review:
http://codereview.chromium.org/165512/show
Review URL: http://codereview.chromium.org/180061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25063 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r-- | views/widget/root_view.cc | 10 | ||||
-rw-r--r-- | views/widget/widget_gtk.cc | 4 |
2 files changed, 3 insertions, 11 deletions
diff --git a/views/widget/root_view.cc b/views/widget/root_view.cc index 526e6d1..a0d19ca 100644 --- a/views/widget/root_view.cc +++ b/views/widget/root_view.cc @@ -8,6 +8,7 @@ #include "app/drag_drop_types.h" #include "app/gfx/canvas.h" +#include "base/keyboard_codes.h" #include "base/logging.h" #include "base/message_loop.h" #include "views/fill_layout.h" @@ -780,19 +781,14 @@ bool RootView::ProcessKeyEvent(const KeyEvent& event) { bool consumed = false; View* v = GetFocusedView(); -#if defined(OS_WIN) // Special case to handle right-click context menus triggered by the // keyboard. - if (v && v->IsEnabled() && ((event.GetCharacter() == VK_APPS) || - (event.GetCharacter() == VK_F10 && event.IsShiftDown()))) { + if (v && v->IsEnabled() && ((event.GetCharacter() == base::VKEY_APPS) || + (event.GetCharacter() == base::VKEY_F10 && event.IsShiftDown()))) { gfx::Point screen_loc = v->GetKeyboardContextMenuLocation(); v->ShowContextMenu(screen_loc.x(), screen_loc.y(), false); return true; } -#else - // TODO(port): The above block needs the VK_* refactored out. - NOTIMPLEMENTED(); -#endif for (; v && v != this && !consumed; v = v->GetParent()) { consumed = (event.GetType() == Event::ET_KEY_PRESSED) ? diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index bf086ad..7ab2c31 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -221,7 +221,6 @@ void WidgetGtk::Init(GtkWidget* parent, GDK_POINTER_MOTION_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK); - SetRootViewForWidget(widget_, root_view_.get()); MessageLoopForUI::current()->AddObserver(this); @@ -241,8 +240,6 @@ void WidgetGtk::Init(GtkWidget* parent, G_CALLBACK(CallButtonPress), NULL); g_signal_connect(G_OBJECT(window_contents_), "button_release_event", G_CALLBACK(CallButtonRelease), NULL); - g_signal_connect(G_OBJECT(window_contents_), "focus_out_event", - G_CALLBACK(CallFocusOut), NULL); g_signal_connect(G_OBJECT(window_contents_), "grab_broken_event", G_CALLBACK(CallGrabBrokeEvent), NULL); g_signal_connect(G_OBJECT(window_contents_), "grab_notify", @@ -263,7 +260,6 @@ void WidgetGtk::Init(GtkWidget* parent, G_CALLBACK(CallFocusIn), NULL); g_signal_connect(G_OBJECT(widget_), "focus_out_event", G_CALLBACK(CallFocusOut), NULL); - g_signal_connect(G_OBJECT(widget_), "destroy", G_CALLBACK(CallDestroy), NULL); if (transparent_) { |