Made the "Not Found." alerts closable via escape key. Not sure, whether we need
those alerts at all, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32389 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -440,6 +440,7 @@ TermWindow::MessageReceived(BMessage *message)
|
|||||||
if (!findresult) {
|
if (!findresult) {
|
||||||
BAlert *alert = new BAlert("find failed", "Not Found.", "Okay", NULL,
|
BAlert *alert = new BAlert("find failed", "Not Found.", "Okay", NULL,
|
||||||
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||||
|
alert->SetShortcut(0, B_ESCAPE);
|
||||||
alert->Go();
|
alert->Go();
|
||||||
fFindPreviousMenuItem->SetEnabled(false);
|
fFindPreviousMenuItem->SetEnabled(false);
|
||||||
fFindNextMenuItem->SetEnabled(false);
|
fFindNextMenuItem->SetEnabled(false);
|
||||||
@@ -452,21 +453,14 @@ TermWindow::MessageReceived(BMessage *message)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_FIND_NEXT:
|
case MENU_FIND_NEXT:
|
||||||
findresult = _ActiveTermView()->Find(fFindString, fForwardSearch,
|
|
||||||
fMatchCase, fMatchWord);
|
|
||||||
if (!findresult) {
|
|
||||||
BAlert *alert = new BAlert("find failed", "Not Found.", "Okay", NULL,
|
|
||||||
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
|
||||||
alert->Go();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MENU_FIND_PREVIOUS:
|
case MENU_FIND_PREVIOUS:
|
||||||
findresult = _ActiveTermView()->Find(fFindString, !fForwardSearch,
|
findresult = _ActiveTermView()->Find(fFindString,
|
||||||
|
(message->what == MENU_FIND_NEXT) == fForwardSearch,
|
||||||
fMatchCase, fMatchWord);
|
fMatchCase, fMatchWord);
|
||||||
if (!findresult) {
|
if (!findresult) {
|
||||||
BAlert *alert = new BAlert("find failed", "Not Found.", "Okay", NULL,
|
BAlert *alert = new BAlert("find failed", "Not Found.", "Okay",
|
||||||
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
NULL, NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||||
|
alert->SetShortcut(0, B_ESCAPE);
|
||||||
alert->Go();
|
alert->Go();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user