* Renamed the "Find {Forward,Backward}" menu entries to "Find {Previous/Next}"
and assigned the usual shortcut keys (Cmd-[Shift-]G). * Changed the behavior so that "Find Next" continues looking in the search direction. I'm somewhat undecided whether this is confusing, since the default (and usually desired) search direction is backward. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32386 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -57,9 +57,9 @@ const uint32 MENU_SHOW_GPL = 'Mgpl';
|
|||||||
const uint32 MENU_ENCODING = 'Menc';
|
const uint32 MENU_ENCODING = 'Menc';
|
||||||
const uint32 MENU_PAGE_SETUP = 'Mpst';
|
const uint32 MENU_PAGE_SETUP = 'Mpst';
|
||||||
const uint32 MENU_PRINT = 'Mpnt';
|
const uint32 MENU_PRINT = 'Mpnt';
|
||||||
const uint32 MENU_FIND_STRING = 'Mfnd';
|
const uint32 MENU_FIND_STRING = 'Mfpr';
|
||||||
const uint32 MENU_FIND_FORWARD = 'Mffw';
|
const uint32 MENU_FIND_NEXT = 'Mfnx';
|
||||||
const uint32 MENU_FIND_BACKWARD = 'Mfbw';
|
const uint32 MENU_FIND_PREVIOUS = 'Mfbw';
|
||||||
const uint32 MENU_SHOW_COLOR = 'Mcol';
|
const uint32 MENU_SHOW_COLOR = 'Mcol';
|
||||||
|
|
||||||
const uint32 M_GET_DEVICE_NUM = 'Mgdn';
|
const uint32 M_GET_DEVICE_NUM = 'Mgdn';
|
||||||
|
|||||||
@@ -289,12 +289,12 @@ TermWindow::_SetupMenu()
|
|||||||
fEditmenu->AddSeparatorItem();
|
fEditmenu->AddSeparatorItem();
|
||||||
fEditmenu->AddItem(new BMenuItem("Find" B_UTF8_ELLIPSIS,
|
fEditmenu->AddItem(new BMenuItem("Find" B_UTF8_ELLIPSIS,
|
||||||
new BMessage(MENU_FIND_STRING),'F'));
|
new BMessage(MENU_FIND_STRING),'F'));
|
||||||
fFindBackwardMenuItem = new BMenuItem("Find Backward",
|
fFindBackwardMenuItem = new BMenuItem("Find Previous",
|
||||||
new BMessage(MENU_FIND_BACKWARD), '[');
|
new BMessage(MENU_FIND_PREVIOUS), 'G', B_SHIFT_KEY);
|
||||||
fEditmenu->AddItem(fFindBackwardMenuItem);
|
fEditmenu->AddItem(fFindBackwardMenuItem);
|
||||||
fFindBackwardMenuItem->SetEnabled(false);
|
fFindBackwardMenuItem->SetEnabled(false);
|
||||||
fFindForwardMenuItem = new BMenuItem("Find Forward",
|
fFindForwardMenuItem = new BMenuItem("Find Next",
|
||||||
new BMessage(MENU_FIND_FORWARD), ']');
|
new BMessage(MENU_FIND_NEXT), 'G');
|
||||||
fEditmenu->AddItem(fFindForwardMenuItem);
|
fEditmenu->AddItem(fFindForwardMenuItem);
|
||||||
fFindForwardMenuItem->SetEnabled(false);
|
fFindForwardMenuItem->SetEnabled(false);
|
||||||
|
|
||||||
@@ -451,8 +451,9 @@ TermWindow::MessageReceived(BMessage *message)
|
|||||||
fFindForwardMenuItem->SetEnabled(true);
|
fFindForwardMenuItem->SetEnabled(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_FIND_FORWARD:
|
case MENU_FIND_NEXT:
|
||||||
findresult = _ActiveTermView()->Find(fFindString, true, fMatchCase, fMatchWord);
|
findresult = _ActiveTermView()->Find(fFindString, fForwardSearch,
|
||||||
|
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,
|
||||||
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||||
@@ -460,8 +461,9 @@ TermWindow::MessageReceived(BMessage *message)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_FIND_BACKWARD:
|
case MENU_FIND_PREVIOUS:
|
||||||
findresult = _ActiveTermView()->Find(fFindString, false, fMatchCase, fMatchWord);
|
findresult = _ActiveTermView()->Find(fFindString, !fForwardSearch,
|
||||||
|
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,
|
||||||
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT);
|
||||||
|
|||||||
Reference in New Issue
Block a user