Commit Graph

851 Commits

Author SHA1 Message Date
Allan Odgaard
de79c30f69 Checkin release notes v2.0-alpha.9345 2013-01-13 11:56:08 +01:00
Allan Odgaard
b1dc3fce66 Fix missing variables for windowless commands 2013-01-13 11:56:08 +01:00
Allan Odgaard
44e760a7d9 Improve support for full screen mode
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.
2013-01-13 11:56:07 +01:00
Allan Odgaard
000923d412 Avoid static storage in threads
The problem is that during program termination all data with static storage is destructed but that may happen before the threads have finished their work.
2013-01-13 11:56:07 +01:00
Allan Odgaard
5c97afd3bf Convert helpers to lambda functions 2013-01-13 11:56:07 +01:00
Allan Odgaard
cb631fdc62 Fix bad ranking of learned abbreviations
If multiple paths were associated with the same abbreviations, all but the first one would be placed last in the results list.
2013-01-13 11:56:07 +01:00
Allan Odgaard
4b369e3bf1 Close HTML output view when using exit_discard
This was also done by TextMate 1.x.
2013-01-13 11:56:07 +01:00
Allan Odgaard
cd153b6605 Let selectURLs:expandChildren: deselect all
It also clears the history of non-visible items that was left selected.
2013-01-13 11:56:07 +01:00
Allan Odgaard
64f0f209da Using Go → Enclosing Folder selects the child
This is consistent with how Finder works and I think this is desired behavior to sort of track where we came from.
2013-01-13 11:56:07 +01:00
Allan Odgaard
c78c758c4a Remember current file browser selection in session data
This ensures that we restore the selection for the currently visible folder on relaunch. Selections in other folders is lost, see previous commit for more info.
2013-01-13 11:56:06 +01:00
Allan Odgaard
0d8ade2687 Insignificant stylistic change 2013-01-13 11:56:06 +01:00
Allan Odgaard
06fea983fc Don’t keep selected items in defaults
This means the set of selected file browser items is reset on relaunch — I’ve found that restoring selection when navigating to a folder was often not really desired.
2013-01-13 11:56:06 +01:00
Allan Odgaard
54f1343ca2 Folder search now reads all relevant exclude patterns
Previously it wouldn’t read kSettingsExcludeDirectoriesKey and kSettingsExcludeFilesKey.
2013-01-13 11:56:06 +01:00
Allan Odgaard
9167035ad9 Don’t reload file browser for non-visible files
Previously we would reload the changed entries, if they were all visible, falling back on a full reload if not.

If items are not visible there should be no reason to do a full reload — I imagine the thinking was that the NSOutlineView may have previously fetched (and cached) one of the non-visible items (since one of its ancestors could just be collapsed). Since this is just a display attribute, it shouldn’t matter, even if the NSOutlineView would work like this.
2013-01-13 11:56:06 +01:00
Allan Odgaard
d861ae238e Let the pretty_plist CLI tool accept file name
Previously it only supported stdin meaning it couldn’t be used with find, xargs, and similar.
2013-01-13 11:56:06 +01:00
Allan Odgaard
65a279802d Rename function name
We not only convert between NSArray and NSSet, but also the type of the contained object (NSURL ⇔ NSString).
2013-01-13 11:56:05 +01:00
Allan Odgaard
f477776ae0 Better console message for orphaned bundle items 2013-01-13 11:56:05 +01:00
Allan Odgaard
8be514ccb2 Rename byExpandingAncestors: → expandChildren:
We are expanding the children of the root item to select the provided URLs.
2013-01-13 11:56:05 +01:00
Allan Odgaard
59ff33fc5b Insert file browser into responder chain
This is required to have the object respond to various action methods such as cut:, copy:, paste:, and delete: — ideally though the class would handle it by itself, as OFB responsibility is bleeding into the document controller (though long-term I think it makes sense to instead let the document controller implement the OFB action methods).
2013-01-12 13:09:19 +01:00
Allan Odgaard
5e291d8a22 Improve QuickLook support
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).
2013-01-12 13:09:19 +01:00
Allan Odgaard
35d413225d Send method to class name instead of ‘self’
This avoids potential compiler errors where multiple methods with same signature but different parameter/result types.
2013-01-12 13:09:19 +01:00
Allan Odgaard
d6759dc9df Tidy up OakFileBrowser 2013-01-12 13:09:19 +01:00
Allan Odgaard
be1cfeb458 Improve file browser API
We now expose the root URL and allows mutating it.

We also provide the selectURL:withParentURL: method instead of the two showURL: and revealURL:.
2013-01-12 13:09:19 +01:00
Allan Odgaard
0ed119122f Refactor “reveal file” methods
Both methods are now based on selectURL:withParentURL: which contain the necessary checks (file already visible? parent actually valid?).
2013-01-12 13:09:18 +01:00
Allan Odgaard
15409e2eec Rename pushURL: → goToURL:
Also change showURL: calls into using goToURL: (when we know the URL is not a non-directory file URL that should be selected).
2013-01-12 13:09:18 +01:00
Allan Odgaard
10ef2f1034 Rename property (location → path) 2013-01-12 13:09:18 +01:00
Allan Odgaard
c323486250 Merge history controller into OakFileBrowser 2013-01-12 13:09:18 +01:00
Allan Odgaard
49c587e6bd Do not track recent locations 2013-01-12 13:09:18 +01:00
Allan Odgaard
b4066afc9a Omit recent items from file browser menu
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).
2013-01-12 13:09:18 +01:00
Allan Odgaard
5224d0b89c Refactor OFBHeaderView 2013-01-12 13:09:17 +01:00
Allan Odgaard
73e18d30db Merge OFBView into main controller
Using an NSView subclass wasn’t justified.
2013-01-12 13:09:17 +01:00
Allan Odgaard
87f1c109d3 Proper delegate/datasource removal 2013-01-12 13:09:17 +01:00
Allan Odgaard
3427639993 Switch to generated properties
Also remove implementation details from public header.
2013-01-12 13:09:17 +01:00
Allan Odgaard
f3f0f577bf ARC: Update OakFileBrowser framework 2013-01-12 13:09:17 +01:00
Allan Odgaard
f3c8b589b5 Replace OakStatusBar with OFBHeaderView
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.
2013-01-12 13:09:17 +01:00
Allan Odgaard
f5ac423ecf Remove instance data from interface 2013-01-12 13:09:16 +01:00
Allan Odgaard
546b55a407 Only fingerprint file system for hg
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.
2013-01-12 13:09:16 +01:00
Allan Odgaard
a222dfd805 Use libdispatch for SCM status
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.
2013-01-12 13:09:16 +01:00
Allan Odgaard
0f4fc14462 Improve stability during quit
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).
2013-01-12 13:09:16 +01:00
Allan Odgaard
4b5d668d85 Delete constructor instead of making it private 2013-01-12 13:09:16 +01:00
Allan Odgaard
407737259a Avoid compiler security warning about format strings
The warning is about using ‘%n’ in format strings [-Wformat-security]
2013-01-12 13:09:16 +01:00
Allan Odgaard
a9745164c7 Exclude backups from document::find by default 2013-01-12 13:09:16 +01:00
Allan Odgaard
0b9e591b7d Bundle editor was holding an untitled counter
This meant after opening the bundle editor the next untitled document created would have a number prefix one higher than expected.
2013-01-11 23:23:41 +01:00
Allan Odgaard
d8bec5b761 Fix bad memory access
We wrote to instance data after potentially having been released.
2013-01-11 23:23:40 +01:00
Allan Odgaard
fae30ed6e8 Use wrapper for getpwuid() to avoid crash
Based on crash logs this problem still exists on 10.8.2 <rdar://10261043>.
2013-01-10 23:48:46 +01:00
Allan Odgaard
6c6332ac78 Checkin release notes v2.0-alpha.9343 2013-01-10 21:08:55 +01:00
Allan Odgaard
a545598e78 fixup! Iterate controllers instead of all window delegates 2013-01-10 21:03:29 +01:00
Allan Odgaard
9f02e86e00 Cap document array index 2013-01-10 21:03:29 +01:00
Allan Odgaard
abab5d8725 Make openItems:closingOtherTabs: more robust 2013-01-10 21:03:29 +01:00
Allan Odgaard
c8bfc8be7c Suppress atos debug output 2013-01-10 21:03:29 +01:00