Since we have the ‘drawAsHighlighted’ property it makes sense to make it post the accessibility notification when this property is set to YES and we do not have focus, rather than have the controller which change our selection be responsible for this.
A minor disadvantage is that there are multiple ways to change a table view’s selection. We assume that ‘selectRowIndexes:extend:’ is the canonical way to do it (and all code that wants to trigger VO notifications should use that method).
Originally, the "--ask" option was used in the previous commit window to change the NSTextField above the text view; however, no SCM bundles (in textmate's repos) currently uses it.
Only sources in the ui folder use this code and was previously including it from a parent folder, which breaks the hierarchical ordering of sources: you can include child folders, not ancestors.
The latter has been deprecated since 10.6 but hasn’t given any deprecation warnings (and it’s not like I’m eager to touch the NSTextInput protocol implementation, as I just barely understand how this stuff is supposed to work).
This ensures we get all key events, for example in the bundle item chooser window the pop-up button’s menu would previously see the key down event before the key equivalent view, so enabling recording and pressing ⌘1-3 would not record that key equivalent, but instead activate the corresponding (pop-up) menu item.
If `enableLoopFilterList` is set to `YES`:
- when at top, pressing <Up> selects the last item on bottom
- when at bottom, pressing <Down> selects the first item on top
Only values from the root target goes through this code, so it wasn’t causing a problem, as none of those keys had a multi-element array, but in ruby 2.0 embedding an array in a string seems to use inspect instead of to_s:
Ruby 1.8: "#{['foo']}" #=> foo
Ruby 2.0: "#{['foo']}" #=> ["foo"]
Rather than putting tabs in their own node, leave them in the text nodes and allow core text to handle the size. This fixes the issue with using tabs in right-to-left text.
While the memory was released during exit, we didn’t free the authorization right, which is shared between multiple processes, unsure if that would actually leak any resources.
This was to allow third party indexes but we newer got anywhere with that, so it’s just unnecessary code complexity and the potential for problems if the files on disk are wrong.
I experimented a lot with different combination of attributes, this one works
reasonably well compared to the others (even though it is less feature
complete). I may revisit experimenting with it at some later point.
More specifically item's displayed keyboard shortcut or tab trigger is now
announced by VoiceOver.
Implementation of accessibilityAttributeValue:forParameter: returns nil for
some attributes. This is a hack to avoid doing tedious adjustments of certain
parameterized attributes (like AXStringForRange, AXAttributedStringForRange,
AXBoundsForRange, AXRTFForRange) for string AXValue that is extended (appended)
by extra information at its end in accessibilityAttributeValue:. To get an idea
how tedious this is (even though our case is a bit simpler by not *prepending*
anything before the AXValue, and not being an editable field), look at
OakLinkedSearchFieldCell. This looses the ability for the user to interact with
the text, but considering how seldom this will be used (if at all), for now
this seems acceptable.
This is needed because VoiceOver asks for the *StringForRange attributes and if
implemented, will never query AXValue (which is where our custom behavior is).
In the future when tables will be migrated from cell-based to view-based ones,
the tab trigger or shortcut could be a separate NSView, which would probably
allow for much more elegant solution to this problem.
Previously using ⌘F with a multiline selection would automatically set the “in”
pop-up to “Document”. This is no longer the case, but can be brought back by
running: `defaults write alwaysFindInDocument -bool YES`
This fixes an issue with complex input managers.
Using Chinese pinyin input and entering ‘ci’ followed by ‘1’ to insert first glyph would insert the glyph (‘刺’) and then set the pending marked range (0-2), which would have caret end up in the middle of a multi-byte sequence.
Read at most 1 KiB or 50 lines of a file and render the attributed string in a bitmap context.
The theme is set to Mac Classic to ensure a white background for best look when the previews are used as icons in Finder.
The user’s default fixed width font in size 4 is used. With this font size only around 7 lines are shown, so we need to make it smaller, but we probably want to scale down the result to allow fractional line heights.
A lot of code is copy/pasted from the QuickLook preview generator.