diff options
author | ukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-29 04:57:24 +0000 |
---|---|---|
committer | ukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-29 04:57:24 +0000 |
commit | d14954e8faefd5bcb453ec13709dc5d4f143021a (patch) | |
tree | c5a4251279441d016373579c8b23d5d890e4867a /chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc | |
parent | 31050e9e95d4270484885e2c76d80c7d5829c42c (diff) | |
download | chromium_src-d14954e8faefd5bcb453ec13709dc5d4f143021a.zip chromium_src-d14954e8faefd5bcb453ec13709dc5d4f143021a.tar.gz chromium_src-d14954e8faefd5bcb453ec13709dc5d4f143021a.tar.bz2 |
Support PgUp/PgDn in Omnibox for "first entry/last entry"
BUG=6857
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14827 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc index 93e60ef..20609db 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc @@ -446,15 +446,16 @@ void AutocompleteEditViewGtk::HandleViewMoveCursor( GtkMovementStep step, gint count, gboolean extendion_selection) { - // Handle up / down cursor movement on our own. - if (step == GTK_MOVEMENT_DISPLAY_LINES) { - model_->OnUpOrDownKeyPressed(count); - // move-cursor doesn't use a signal accumulator on the return value (it - // just ignores them), so we have to stop the propagation. - g_signal_stop_emission_by_name(text_view_, "move-cursor"); - return; - } - // Propagate into GtkTextView. + // Handle up/down/pgup/pgdn movement on our own. + int move_amount = count; + if (step == GTK_MOVEMENT_PAGES) + move_amount = model_->result().size() * ((count < 0) ? -1 : 1); + else if (step != GTK_MOVEMENT_DISPLAY_LINES) + return; // Propagate into GtkTextView + model_->OnUpOrDownKeyPressed(move_amount); + // move-cursor doesn't use a signal accumulaqtor on the return value (it + // just ignores then), so we have to stop the propagation. + g_signal_stop_emission_by_name(text_view_, "move-cursor"); } gboolean AutocompleteEditViewGtk::HandleViewSizeRequest(GtkRequisition* req) { |