I moved it to a C header. An alternative would be to put some #ifdef’s around the Objective-C stuff in OakAppKit.h, but with the standalone header, it’s clear that this is the only thing we need from OakAppKit.
When two neighboring characters have different character class or one is an alpha numeric character (excl. underscore) and the other is not, we consider this a valid boundary for a tab trigger.
This closes issue #157.
I was initially under the impression that no data should be sent past EOF but from testing it is clear that this assumption is incorrect. It’s unimportant though as we do handle the case (though we didn’t initially, and that’s why I put in the fprintf, to verify the situation I guarded for actually was happening).
The fs::snapsot_t class creates a finger print of a folder. We used the source tree for testing, but if the source tree hosts the build directory, then the fingerprint will (likely) change, since we run simultaneous build jobs.
It now uses the Frameworks folder in the source tree, as it’s unlikely that someone would place their build directory in this location.
The key is consistent with the default key for bringing up the context menu in the text view — that key is however taken from the key bindings dictionary, so ideally we’d do the same in the file browser. Need to factor out the key bindings parsing code first though, and in theory the key bindings dictionary allow for multi-stroke bindings.
This implements issue #18.
This code was using (the no longer there in the 10.7 SDK) GetPortBounds() to be able to render into a CGContextRef.
It was also using the private _NSGetCarbonMenu to be able to install the menu handler (that augmented the rendering).
This is using NSAttributedString’s NSTextTableBlocks:
* Font is determined from current menu rather than hardcoded
* Fixed: Invalid font size on bundle-item popup
* Fixed: Both tab triggers and key equivalents can co exists on single menu item
* No relayout calculations are needed after menu update (this is done automatically by NSLayoutManager when using NSTextTables)
* Uses 10.5 compatible API
This is actually not entirely trivial since we can have a path that starts with a slash but includes more ‘..’ components than there are actual directories in the path.
If we set projectDirectory to a non-path (e.g. ‘dummy’) then that value makes it into the default folder to search (on ⇧⌘F). Since we want folder specific settings for the path we are about to search (include/exclude patterns) then we would ask for settings for a non-path, which the settings framework couldn’t handle (it kept asking for the parent of this non-path expecting to eventually get to either the user’s home folder or the root of the disk, but instead it would loop infinitely).
This fixes issue #19.
This turned out to be a little more involved due to how we need to make a distinction between a forward delete (prepend) and backward delete (append).
Implements issue #118.
We now bypass the global proxy if trying to connect to localhost (as some of our tests do) and we also hand the actual target URL to the potential proxy auto configuration (PAC) script.
The old techniques used to set key equivalents no longer work. Unfortunately, this technique is only a workaround and is not pixel-for-pixel identical due to the way NSMenuItem lays itself out when rendering a key equivalent; but I think it's the best that can be done for now.
When invoking an action that would replace the marked text (“CJK edit buffer”) with a zero-length string, we would continue to be in “CJK” mode and thus allow the input manager to process the next key press.
In this situation though pressing e.g. escape or backspace would result in the input manager inserting the literal character code for this key.
So we now leave “CJK edit mode” if the “edit buffer” is empty.
There is still an issue though where, if the edit buffer is not empty, and the user press backspace, we correctly (?) ask the input manager to handle this key press, but the input manager will (wrongly) replace the selection with the literal backspace character.
The cf::wrap function returns a temporary object that can be converted to a CFType, but this object’s lifetime is that of the temporary object returned. By putting the result of cf::wrap into a C array we keep the CFTypeRef around longer than the temporary object.
We have our own version of interpretKeyEvents: because we want to augment the default key bindings dictionaries (and support multi-stroke key bindings).
When there is marked text (as part of inserting CJK or similar) the system’s version of interpretKeyEvents: seems to handle key bindings slightly different, for example where ↩ is normally bound to insertNewline:, this might be suppressed when the user has just selected a “translation”.