Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#531 closed bug (fixed)

[Tracker] some shortcuts doesn't work

Reported by: diver Owned by: axeld
Priority: normal Milestone: R1
Component: - General Version:
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All


For example Alt+n works in desktop, but if you open Home folder it will not create a floder.

Change History (14)

comment:1 by axeld, 14 years ago

Owner: changed from axeld to jackburton

comment:2 by axeld, 14 years ago

Could you have a look at it, Stefano? What obviously happens is that the menu item shortcuts in the submenus aren't set. It looks like BView::AttachedToWindow() is not called for submenus before they are actually shown on screen - unlike R5.

comment:3 by jackburton, 14 years ago

Ok, I'll have a look.

comment:4 by jackburton, 14 years ago

Status: newassigned

comment:5 by jackburton, 14 years ago

I had a look, and I don't think your diagnosis is correct. Alt-N doesn't work in any tracker window, unless you click once on the menubar, but it works even if you click on the empty space in the menubar. I think it's more a focus or target problem. Might be app_server or BWindow related.

comment:6 by jackburton, 14 years ago

Cc: axeld@… added

comment:7 by axeld, 14 years ago

No, there is no shortcut created for the window. The key down message comes in (that's why you select an entry starting with "n" when you press the Alt-N shortcut). IIRC the BMenuItem shortcut is added in Install(), and that's apparently *not* called before.

comment:8 by jackburton, 13 years ago

I investigated it a bit, looks like tracker' ContainerWindow enables these shortcuts in UpdateMenu, called from MenusBeginning; that's why shortcuts work once you click once on the BMenuBar (BWindow::MenusBeginning is called, then).

ContainerWindow::MenusBeginning() has this interesting code snippet: if (CurrentMessage() && CurrentMessage()->what == B_MOUSE_DOWN)

don't commit active pose if only a keyboard shortcut is invoked - this would prevent Cut/Copy/Paste from working

So, apparently, MenusBeginning() could also be called when a shortcut is invoked , or at least, not only when menus are opened.

comment:9 by axeld, 13 years ago

Owner: changed from jackburton to axeld
Status: assignednew

comment:10 by axeld, 13 years ago

Status: newassigned

comment:11 by axeld, 13 years ago

Okay, that could even make some weird sense :-) Thanks for having a look into it, I'll add MenusBeginning() & MenusEnd() calls into the shortcut processing, then - that should do the trick.

comment:12 by axeld, 13 years ago

Status: assignedclosed

comment:13 by axeld, 13 years ago

Thanks Stefano, that did the trick! Fixed in hrev18338.

comment:14 by axeld, 13 years ago

Resolution: fixed
Note: See TracTickets for help on using tickets.