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

Side by Side Diff: chrome/browser/gtk/find_bar_gtk.cc

Issue 122047: GTK: shift-enter in find bar searches backwards.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/gtk/find_bar_gtk.h" 5 #include "chrome/browser/gtk/find_bar_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/gfx/gtk_util.h" 10 #include "base/gfx/gtk_util.h"
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 391
392 // static 392 // static
393 gboolean FindBarGtk::OnKeyPressEvent(GtkWidget* widget, GdkEventKey* event, 393 gboolean FindBarGtk::OnKeyPressEvent(GtkWidget* widget, GdkEventKey* event,
394 FindBarGtk* find_bar) { 394 FindBarGtk* find_bar) {
395 if (find_bar->MaybeForwardKeyEventToRenderer(event)) { 395 if (find_bar->MaybeForwardKeyEventToRenderer(event)) {
396 return TRUE; 396 return TRUE;
397 } else if (GDK_Escape == event->keyval) { 397 } else if (GDK_Escape == event->keyval) {
398 find_bar->find_bar_controller_->EndFindSession(); 398 find_bar->find_bar_controller_->EndFindSession();
399 return TRUE; 399 return TRUE;
400 } else if (GDK_Return == event->keyval) { 400 } else if (GDK_Return == event->keyval) {
401 find_bar->FindEntryTextInContents(true); 401 bool forward = (event->state & gtk_accelerator_get_default_mod_mask()) !=
402 GDK_SHIFT_MASK;
403 find_bar->FindEntryTextInContents(forward);
402 return TRUE; 404 return TRUE;
403 } 405 }
404 return FALSE; 406 return FALSE;
405 } 407 }
406 408
407 // static 409 // static
408 gboolean FindBarGtk::OnKeyReleaseEvent(GtkWidget* widget, GdkEventKey* event, 410 gboolean FindBarGtk::OnKeyReleaseEvent(GtkWidget* widget, GdkEventKey* event,
409 FindBarGtk* find_bar) { 411 FindBarGtk* find_bar) {
410 return find_bar->MaybeForwardKeyEventToRenderer(event); 412 return find_bar->MaybeForwardKeyEventToRenderer(event);
411 } 413 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 } 470 }
469 471
470 // static 472 // static
471 gboolean FindBarGtk::OnButtonPress(GtkWidget* text_entry, GdkEventButton* e, 473 gboolean FindBarGtk::OnButtonPress(GtkWidget* text_entry, GdkEventButton* e,
472 FindBarGtk* find_bar) { 474 FindBarGtk* find_bar) {
473 find_bar->StoreOutsideFocus(); 475 find_bar->StoreOutsideFocus();
474 476
475 // Continue propagating the event. 477 // Continue propagating the event.
476 return FALSE; 478 return FALSE;
477 } 479 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698