DiskProbe: select Find window text

Select the text to find as the Find window is opened.
This makes the behavior more consistent with other apps.
Fixes the main subject of #10844.

Also removes trailing whitespace.

Signed-off-by: Axel Dörfler <[email protected]>
This commit is contained in:
Gabriel Maia
2016-09-17 11:33:54 +02:00
committed by Axel Dörfler
parent ed1b81b72b
commit 1bf0271fa0
2 changed files with 10 additions and 1 deletions
+9 -1
View File
@@ -509,7 +509,7 @@ FindWindow::FindWindow(BRect _rect, BMessage& previous, BMessenger& target,
message->AddInt8("mode", kAsciiMode);
if (mode == kAsciiMode)
item->SetMarked(true);
fMenu->AddItem(item = new BMenuItem(B_TRANSLATE_COMMENT("Hexadecimal",
fMenu->AddItem(item = new BMenuItem(B_TRANSLATE_COMMENT("Hexadecimal",
"A menu item, as short as possible, noun is recommended if it is "
"shorter than adjective."), message = new BMessage(kMsgFindMode)));
message->AddInt8("mode", kHexMode);
@@ -631,6 +631,14 @@ FindWindow::QuitRequested()
}
void
FindWindow::Show()
{
fTextView->SelectAll();
BWindow::Show();
}
void
FindWindow::SetTarget(BMessenger& target)
{
+1
View File
@@ -30,6 +30,7 @@ class FindWindow : public BWindow {
virtual void WindowActivated(bool active);
virtual void MessageReceived(BMessage *message);
virtual bool QuitRequested();
virtual void Show();
void SetTarget(BMessenger &target);