* Implements enhancement #2829, ie: change the modifier key (now shift) to force identify on
already identified files and change the menu item label accordingly so that the 'feature' is not hidden anymore. The identification mechanism will probably be automated in the future, forcing identification would then become the only use of this menu item. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29940 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
349a150359
commit
561b5d977b
@ -2357,12 +2357,12 @@ BContainerWindow::SetupMoveCopyMenus(const entry_ref *item_ref, BMenu *parent)
|
||||
parent->AddItem(fCreateLinkItem, index);
|
||||
}
|
||||
|
||||
// Set the "Create Link" item label here so it
|
||||
// appears correctly when menus are disabled, too.
|
||||
if (modifierKeys & B_SHIFT_KEY)
|
||||
fCreateLinkItem->SetLabel("Create Relative Link");
|
||||
else
|
||||
fCreateLinkItem->SetLabel("Create Link");
|
||||
// Set the "Create Link" item label here so it
|
||||
// appears correctly when menus are disabled, too.
|
||||
if (modifierKeys & B_SHIFT_KEY)
|
||||
fCreateLinkItem->SetLabel("Create Relative Link");
|
||||
else
|
||||
fCreateLinkItem->SetLabel("Create Link");
|
||||
|
||||
// only enable once the menus are built
|
||||
fMoveToItem->SetEnabled(false);
|
||||
@ -2405,6 +2405,15 @@ BContainerWindow::SetupMoveCopyMenus(const entry_ref *item_ref, BMenu *parent)
|
||||
fMoveToItem->SetEnabled(true);
|
||||
fCopyToItem->SetEnabled(true);
|
||||
fCreateLinkItem->SetEnabled(true);
|
||||
|
||||
// Set the "Identify" item label
|
||||
BMenuItem *identifyItem = parent->FindItem(kIdentifyEntry);
|
||||
if (identifyItem != NULL) {
|
||||
if (modifierKeys & B_SHIFT_KEY)
|
||||
identifyItem->SetLabel("Force Identify");
|
||||
else
|
||||
identifyItem->SetLabel("Identify");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -7709,7 +7709,7 @@ BPoseView::OpenParent()
|
||||
void
|
||||
BPoseView::IdentifySelection()
|
||||
{
|
||||
bool force = (modifiers() & B_OPTION_KEY) != 0;
|
||||
bool force = (modifiers() & B_SHIFT_KEY) != 0;
|
||||
int32 count = fSelectionList->CountItems();
|
||||
for (int32 index = 0; index < count; index++) {
|
||||
BPose *pose = fSelectionList->ItemAt(index);
|
||||
@ -8890,21 +8890,21 @@ BPoseView::HiliteDropTarget(bool hiliteState)
|
||||
// note: fAlreadySelectedDropTarget is a trick to avoid to really search
|
||||
// fSelectionList. Another solution would be to add Hilite/IsHilited just
|
||||
// like Select/IsSelected in BPose and let it handle this case internally
|
||||
|
||||
|
||||
// can happen when starting a new drag
|
||||
if (fAlreadySelectedDropTarget != fDropTarget)
|
||||
fAlreadySelectedDropTarget = NULL;
|
||||
|
||||
if (fAlreadySelectedDropTarget != fDropTarget)
|
||||
fAlreadySelectedDropTarget = NULL;
|
||||
|
||||
// don't select, this droptarget was already part of a user selection
|
||||
if (fDropTarget->IsSelected() && hiliteState) {
|
||||
fAlreadySelectedDropTarget = fDropTarget;
|
||||
return;
|
||||
}
|
||||
|
||||
if (fDropTarget->IsSelected() && hiliteState) {
|
||||
fAlreadySelectedDropTarget = fDropTarget;
|
||||
return;
|
||||
}
|
||||
|
||||
// don't unselect the fAlreadySelectedDropTarget
|
||||
if ((fAlreadySelectedDropTarget == fDropTarget) && !hiliteState) {
|
||||
fAlreadySelectedDropTarget = NULL;
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
fDropTarget->Select(hiliteState);
|
||||
|
Loading…
Reference in New Issue
Block a user