Tracker: Force Identify - don't require holding shift (#4857)
Don't require to hold shift when clicking on force identify, can now be released after popup menu have appeared.
This commit is contained in:
parent
939600d2ad
commit
205cf6950c
@ -2554,10 +2554,13 @@ BContainerWindow::SetupMoveCopyMenus(const entry_ref* item_ref, BMenu* parent)
|
||||
// Set the "Identify" item label
|
||||
BMenuItem* identifyItem = parent->FindItem(kIdentifyEntry);
|
||||
if (identifyItem != NULL) {
|
||||
if (modifierKeys & B_SHIFT_KEY)
|
||||
if (modifierKeys & B_SHIFT_KEY) {
|
||||
identifyItem->SetLabel(B_TRANSLATE("Force identify"));
|
||||
else
|
||||
identifyItem->Message()->ReplaceBool("force", true);
|
||||
} else {
|
||||
identifyItem->SetLabel(B_TRANSLATE("Identify"));
|
||||
identifyItem->Message()->ReplaceBool("force", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2778,8 +2781,9 @@ BContainerWindow::AddFileContextMenus(BMenu* menu)
|
||||
#endif
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Identify"),
|
||||
new BMessage(kIdentifyEntry)));
|
||||
BMessage* message = new BMessage(kIdentifyEntry);
|
||||
message->AddBool("force", false);
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Identify"), message));
|
||||
BMenu* addOnMenuItem = new BMenu(B_TRANSLATE("Add-ons"));
|
||||
addOnMenuItem->SetFont(be_plain_font);
|
||||
menu->AddItem(addOnMenuItem);
|
||||
|
@ -2368,8 +2368,13 @@ BPoseView::MessageReceived(BMessage* message)
|
||||
break;
|
||||
|
||||
case kIdentifyEntry:
|
||||
IdentifySelection();
|
||||
{
|
||||
bool force;
|
||||
if (message->FindBool("force", &force) != B_OK)
|
||||
force = false;
|
||||
IdentifySelection(force);
|
||||
break;
|
||||
}
|
||||
|
||||
case kEditItem:
|
||||
{
|
||||
@ -8360,9 +8365,8 @@ BPoseView::OpenParent()
|
||||
|
||||
|
||||
void
|
||||
BPoseView::IdentifySelection()
|
||||
{
|
||||
bool force = (modifiers() & B_SHIFT_KEY) != 0;
|
||||
BPoseView::IdentifySelection(bool force)
|
||||
{
|
||||
int32 count = fSelectionList->CountItems();
|
||||
for (int32 index = 0; index < count; index++) {
|
||||
BPose* pose = fSelectionList->ItemAt(index);
|
||||
|
@ -284,7 +284,7 @@ class BPoseView : public BView {
|
||||
void OpenInfoWindows();
|
||||
void SetDefaultPrinter();
|
||||
|
||||
void IdentifySelection();
|
||||
void IdentifySelection(bool force = false);
|
||||
void UnmountSelectedVolumes();
|
||||
virtual void OpenParent();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user