Commit a3a307c8 authored by sangwoo.ko's avatar sangwoo.ko Committed by Commit Bot

Update buttons' state when FindPboard is updated

When global FindPboard is updated, find result is cleared
and next/prev buttons are disabled. But this makes
users unabled to find the exact string without
editing text. So enable buttons unless the text from pboard
is empty.

Bug: 739735
Change-Id: Iad72ae1e0a88165774fecd21fe26c3a2949c60c4
Reviewed-on: https://chromium-review.googlesource.com/888229Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532459}
parent 4719ef1a
......@@ -187,6 +187,10 @@ const int kUndefinedResultCount = -1;
if (!suppressPboardUpdateActions_)
[self prepopulateText:[[FindPasteboard sharedInstance] findText]];
[self clearFindResultsForCurrentBrowser];
BOOL buttonsEnabled = [[findText_ stringValue] length] > 0 ? YES : NO;
[previousButton_ setEnabled:buttonsEnabled];
[nextButton_ setEnabled:buttonsEnabled];
}
- (void)positionFindBarViewAtMaxY:(CGFloat)maxY maxWidth:(CGFloat)maxWidth {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment