This is a feature I have never used myself and it was somewhat limited by having the recent locations unique for each window.
If the feature should be revived it should be via a globally shared list of recent locations (and should persist across relaunch).
Presently this is non-functional but removing the OakStatusBar.h dependency makes it easier to convert to ARC, so that’ll be the next step, before actually making OFBHeaderView functional.
The problem with hg is that running ‘hg status’ may trigger fsevents, which would normally have us call ‘hg status’ again. To avoid this, we check if there actually are changes compared to the last time we ran the SCM driver. This has some overhead, as we need to scan the disk to produce the fingerprint.
Additionally the throttling has been improved. Previously we would delay a status fetch if it had been less than 3 seconds since the last request, but during this “penalty wait” more requests could still be submitted (in case of disk activity) and would be queued for later execution — now such requests are dropped.
When we quit, objects with static storage are destroyed. Since the order is undefined, we basically cannot reference other objects in destructors, unless we own them or they are reference counted.
One case that seems to be an actual problem is the oak::process_t type — based on crash logs this often seems to be destroyed last, and it unregisters itself in its destructor, but using an object that it previously did not own (but obtained via a sort of factory function).
The issue this code solved was that setting the proxy icon via represented file before a file actually exists on disk would lead to no icon so we would have to update it again after a successful save.
This however is already done (by the save callback passed in).
We first search for a window containing one of the documents we wish to open, then for the window with a best match for project folder (for any of our documents), then check if frontmost window is a scratch window, and if none of the above gives a candidate, we create a new window (and give it a project folder based on the document(s) we opened).
Removed the ability to specify wether documents should open in current window or a new window — all documents opened via this API will go through the same algorithm to find where the documents should end up (more choice is just adding confusion and complexity).
It didn’t really make sense as an instance method since it iterate all instances, and we also want to execute code incase of no instances (save that fact as session data).
Since everything about session is now contained in the DocumentController class there is no need for invoking this from elsewhere and thus no need for the previous indirection.
Instead we register the class (causing a retain) when setting the object’s identifier (to a non-nil value).
This is a much better design as it (again) makes it safe to just instantiate a document controller w/o going through a special factory method. Additionally it makes it safe to change the identifier of an already created (and registered) instance.
Previously we would render these with their code point value but since there are probably a few hundred glyphs available (on OS X) in the private use area, it was a disputed choice.