This was broken by 645f8d91e1.
The issue is that if the user press a key not in our managed menu, then the menu delegate will no longer be asked to update the menu for keys not in this (cached) menu.
Example: If there are items for ⌘1-3 in the menu and the user press ⌥⌘N a few times (to create more tabs), then the delegate is asked to update the menu on the first press, but as ⌥⌘N is not in the menu, successive events will not cause the menu to be updated. If the user then press ⌘5 (to go to the 5’th tab), nothing will happen, because our menu only holds 3 items, and the delegate is not asked to update the menu.
This is to be used with file actions done from the UI: Actions are undoable, proper dialogs will be shown for errors or to confirm permanent deletes on volumes without a trashcan (closes#589). Interface sounds will also be played (when moving, trashing, and duplicating items).
I decided not to use the asynchronous file system methods that NSWorkspace offer. Mainly because they can only be used for the initial operation, not during replay, as performing asynchronous operations during replay may cause issues if user moves quickly between items (something that seems to be an actual problem for Finder). The problem though only exist as long as we rely on NSUndoManager to manage the process.
Presently there is no API for batch operations, which leads to suboptimal action titles when performing multiple file system operations in the same undo group.
My memory is a little vague here, but I believe the point of handling the menu keys was to workaround a bug in NSMenu.
The bug was that NSMenu would look at (the target of) cached menu items, probably for UI validation, so potentially sending methods to unretained objects, which could lead to a crash. Several workarounds were attempted (like clearing the target property after the menu had been displayed) but the only effective one was overloading key handling.
I’m quite sure though that this bug is no longer relevant.
Issues remaining:
* VoiceOver for some reason cannot track keyboard focus
(i.e. moving down the list with just down arrow does not move
VoiceOver cursor). User has to move the VO cursor instead using VO-down
(and keyboard cursor follows in this case)
* the pasteboard window isn't focused automatically for VoiceOver, user
has to switch manually to it using VO-F2-F2
When opening a new window we ignore windows in full screen or on another space when searching for a window we can cascade to.
Full screen status of a window is restored after a relaunch and the bigger frame (when in full screen mode) is not stored in the session data or user defaults (as it should not be used).
Closes issue #667.
Preview can now be initiated with multiple items and while the preview panel is showing, one can use arrow up/down to switch to other items (in the file browser).
We now explicitly disable it for targets that hasn’t yet been upgraded to ARC. This way, it’s easier to get an overview of which targets hasn’t yet been upgraded and ensures new targets has ARC enabled.
This is only motivated by easier transition to ARC (one framework at a time) as the ns/attr_string.h header contains manual memory management, which thus cannot be included by a framework using ARC, yet the code needs to be in the header since the code is template-based.
We now set the isExpanded property during initialize and use a property to reflect the current user preference for wether or not to collapse when there is just one tab.
We didn’t actually use the file itself, only its parent directory, and there are several places we want SCM info for an untitled file’s project directory, so removing the need for a file simplifies things.
It’s not feasible to maintain the old-style xib translations while we work on the UI. We’ll soon move fully to constraint-based layout which should allow translations to be purely string-based.
With auto-layout the tab bar view can simply invalidate its intrinsic size when it should expand/collapse. This is also done if the global user setting for disabling tab bar collapsing is changed.