summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 14:59:38 +0000
committerrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 14:59:38 +0000
commit1f29b4590c53fb01f48c6ec95e4c1a6a4a2f3b7b (patch)
tree5e5f2651702c13e6f089a640160c17e51a79bac9
parentbe7f1471f57197e3b0ca9cdbd869beb481703128 (diff)
downloadchromium_src-1f29b4590c53fb01f48c6ec95e4c1a6a4a2f3b7b.zip
chromium_src-1f29b4590c53fb01f48c6ec95e4c1a6a4a2f3b7b.tar.gz
chromium_src-1f29b4590c53fb01f48c6ec95e4c1a6a4a2f3b7b.tar.bz2
[Mac] Force-enable the find next/previous buttons when pressing
Cmd-F to repeat a search. BUG=http://crbug.com/18762 BUG=http://crbug.com/20273 TEST=See test cases in bugs. Both should work now. Review URL: http://codereview.chromium.org/200050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25722 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/find_bar_cocoa_controller.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/find_bar_cocoa_controller.mm b/chrome/browser/cocoa/find_bar_cocoa_controller.mm
index 15b53d6..b0f42c1 100644
--- a/chrome/browser/cocoa/find_bar_cocoa_controller.mm
+++ b/chrome/browser/cocoa/find_bar_cocoa_controller.mm
@@ -128,6 +128,12 @@
- (void)setFocusAndSelection {
[[findText_ window] makeFirstResponder:findText_];
+
+ // Enable the buttons if the find text is non-empty.
+ BOOL buttonsEnabled = ([[findText_ stringValue] length] > 0) ? YES : NO;
+ [previousButton_ setEnabled:buttonsEnabled];
+ [nextButton_ setEnabled:buttonsEnabled];
+
}
- (void)setFindText:(const string16&)findText {