Instead of letting the window reroute the messages, I just learned the
target can also simply be set to the preferred handler by using the BInvoker::SetTarget(NULL, Looper()) form. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13068 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b4ca6a8fc1
commit
e53168541f
@ -1252,9 +1252,12 @@ ProbeView::AttachedToWindow()
|
||||
fRedoMenuItem->SetTarget(fDataView);
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(item = new BMenuItem("Copy", new BMessage(B_COPY), 'C', B_COMMAND_KEY));
|
||||
item->SetTarget(NULL, Window());
|
||||
menu->AddItem(fPasteMenuItem = new BMenuItem("Paste", new BMessage(B_PASTE), 'V', B_COMMAND_KEY));
|
||||
fPasteMenuItem->SetTarget(NULL, Window());
|
||||
CheckClipboard();
|
||||
menu->AddItem(item = new BMenuItem("Select All", new BMessage(B_SELECT_ALL), 'A', B_COMMAND_KEY));
|
||||
item->SetTarget(NULL, Window());
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(item = new BMenuItem("Find" B_UTF8_ELLIPSIS, new BMessage(kMsgOpenFindWindow),
|
||||
'F', B_COMMAND_KEY));
|
||||
|
@ -39,17 +39,6 @@ ProbeWindow::MessageReceived(BMessage *message)
|
||||
break;
|
||||
}
|
||||
|
||||
case B_CUT:
|
||||
case B_COPY:
|
||||
case B_PASTE:
|
||||
case B_SELECT_ALL:
|
||||
{
|
||||
BView *view = CurrentFocus();
|
||||
if (view != NULL)
|
||||
view->MessageReceived(message);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
BWindow::MessageReceived(message);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user