This is not overly useful but the code serves as copy/paste for future endeavors into restoring non-document windows.
The feature requires that “Close windows when quitting an application” is disabled in System Preferences → General (I think that option is enabled by default, at least on 10.9).
Instead we access it when either we need to submit a crash report, when the preferences window open (where the contact address is shown), or when creating a new bundle (where email is also used for the bundle’s contact).
An option called "Auto-reveal open file in project browser" has been
added to the Projects preference pane. When checked, the currently open
file will be revealed in the project's file browser. By default, the
option is not checked and thus the behavior is as it was before.
When this setting is enabled it will render the file browser with the source list style, that is, the same style as the sidebar in Finder.
To enable run: defaults write com.macromates.TextMate.preview fileBrowserStyle SourceList
The “proper” replacement for this API is to use the ServiceManagement framework’s SMJobBless() to bless our helper tool. In two of the three use-cases our helper tool is however regular shell commands, so it seems redundant to wrap these shell tools as helper tools we can install as launchd jobs.
This takes the user to the bundle’s home (generally a GitHub page) which should make it easier to clone the source repository or report issues via the bundle’s issue tracker.
When using an integer it got “pretty printed” by NSTextField (to have a thousand separator). If the user would “commit” this version, the version with the thousand separator would be stored in user defaults, which would make TextMate fail t listen to the desired port.
Initially I wanted all keys in a single header file but to avoid circular dependencies then this header would need to be in a framework that doesn’t depend on anything else, and the main benefit was only to have a single place to look for which keys exist, but now that we consistently prefix settings keys with ‘kUserDefaults’ then it’s easy to extract all keys via search.
This change adds new option for showing tab bar only above document, so the
file browser header lines up with tab bar.
File browser header height reduced by 1 pixel to match tab bar height. It also
draws optional top divider when in same line as tab bar
Previously we placed the views with a one point gap between them and had the superview fill the background. This works fine, but has the somewhat theoretical disadvantage that the superview then needs to implement drawRect: and for performance reasons declare that it is “opaque” which means subviews can’t use the (true) window background, should they want to.
Also add a preferences key for “tabs above document” (issue issue #214), but not hooked up in this commit.
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.
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.
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.