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:
@@ -2554,10 +2554,13 @@ BContainerWindow::SetupMoveCopyMenus(const entry_ref* item_ref, BMenu* parent)
|
|||||||
// Set the "Identify" item label
|
// Set the "Identify" item label
|
||||||
BMenuItem* identifyItem = parent->FindItem(kIdentifyEntry);
|
BMenuItem* identifyItem = parent->FindItem(kIdentifyEntry);
|
||||||
if (identifyItem != NULL) {
|
if (identifyItem != NULL) {
|
||||||
if (modifierKeys & B_SHIFT_KEY)
|
if (modifierKeys & B_SHIFT_KEY) {
|
||||||
identifyItem->SetLabel(B_TRANSLATE("Force identify"));
|
identifyItem->SetLabel(B_TRANSLATE("Force identify"));
|
||||||
else
|
identifyItem->Message()->ReplaceBool("force", true);
|
||||||
|
} else {
|
||||||
identifyItem->SetLabel(B_TRANSLATE("Identify"));
|
identifyItem->SetLabel(B_TRANSLATE("Identify"));
|
||||||
|
identifyItem->Message()->ReplaceBool("force", false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2778,8 +2781,9 @@ BContainerWindow::AddFileContextMenus(BMenu* menu)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
menu->AddSeparatorItem();
|
menu->AddSeparatorItem();
|
||||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Identify"),
|
BMessage* message = new BMessage(kIdentifyEntry);
|
||||||
new BMessage(kIdentifyEntry)));
|
message->AddBool("force", false);
|
||||||
|
menu->AddItem(new BMenuItem(B_TRANSLATE("Identify"), message));
|
||||||
BMenu* addOnMenuItem = new BMenu(B_TRANSLATE("Add-ons"));
|
BMenu* addOnMenuItem = new BMenu(B_TRANSLATE("Add-ons"));
|
||||||
addOnMenuItem->SetFont(be_plain_font);
|
addOnMenuItem->SetFont(be_plain_font);
|
||||||
menu->AddItem(addOnMenuItem);
|
menu->AddItem(addOnMenuItem);
|
||||||
|
|||||||
@@ -2368,8 +2368,13 @@ BPoseView::MessageReceived(BMessage* message)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case kIdentifyEntry:
|
case kIdentifyEntry:
|
||||||
IdentifySelection();
|
{
|
||||||
|
bool force;
|
||||||
|
if (message->FindBool("force", &force) != B_OK)
|
||||||
|
force = false;
|
||||||
|
IdentifySelection(force);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case kEditItem:
|
case kEditItem:
|
||||||
{
|
{
|
||||||
@@ -8360,9 +8365,8 @@ BPoseView::OpenParent()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BPoseView::IdentifySelection()
|
BPoseView::IdentifySelection(bool force)
|
||||||
{
|
{
|
||||||
bool force = (modifiers() & B_SHIFT_KEY) != 0;
|
|
||||||
int32 count = fSelectionList->CountItems();
|
int32 count = fSelectionList->CountItems();
|
||||||
for (int32 index = 0; index < count; index++) {
|
for (int32 index = 0; index < count; index++) {
|
||||||
BPose* pose = fSelectionList->ItemAt(index);
|
BPose* pose = fSelectionList->ItemAt(index);
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ class BPoseView : public BView {
|
|||||||
void OpenInfoWindows();
|
void OpenInfoWindows();
|
||||||
void SetDefaultPrinter();
|
void SetDefaultPrinter();
|
||||||
|
|
||||||
void IdentifySelection();
|
void IdentifySelection(bool force = false);
|
||||||
void UnmountSelectedVolumes();
|
void UnmountSelectedVolumes();
|
||||||
virtual void OpenParent();
|
virtual void OpenParent();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user