Commit Graph

827 Commits

Author SHA1 Message Date
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
Allan Odgaard
4a97f6e64d Save All with more than one document would crash 2013-01-10 21:03:29 +01:00
Allan Odgaard
80c358f947 Remove unnecessary hack
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).
2013-01-10 21:03:28 +01:00
Allan Odgaard
81b05711f0 Improve how we find window for new documents
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).
v2.0-alpha.9341
2013-01-10 06:46:44 +01:00
Allan Odgaard
bccaee4be6 Simplify document open API
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).
2013-01-10 06:46:44 +01:00
Allan Odgaard
d8cc115a5e Ensure we have a document in showWindow:
Also move (back) to using DocumentController instead of document::show().
2013-01-10 06:46:44 +01:00
Allan Odgaard
759b7d1ae5 Introduce ui_proxy_t::show_browser 2013-01-10 06:46:44 +01:00
Allan Odgaard
db3c1a6f33 Fix missing removeObserver:forKeyPath: 2013-01-10 06:46:44 +01:00
Allan Odgaard
7b6515169f Remove unnecessary stuff
This includes the OakFilterWindow factory method as ‘new’ is just as good (now that ARC automatically autoreleases).
2013-01-10 06:46:44 +01:00
Allan Odgaard
211acb8a84 Use proper (specialized) type instead of ‘id’ 2013-01-10 06:46:43 +01:00
Allan Odgaard
cd124ac404 Iterate controllers instead of all window delegates 2013-01-10 06:46:43 +01:00
Allan Odgaard
531e8a44f1 Handle app termination in class method
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).
2013-01-10 06:46:43 +01:00
Allan Odgaard
a7a633f993 Remove procedural API for load/save of session
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.
2013-01-10 06:46:43 +01:00
Allan Odgaard
082ef43b0d Use Objective-C types in session read/write code
With the new compiler support for property list types it might be time to phase out the plist_t C++ wrapper.
2013-01-10 06:46:43 +01:00
Allan Odgaard
874520f49a Remove need for explicitly calling ‘monitor_controller’
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.
2013-01-10 06:40:03 +01:00
Allan Odgaard
738456dbc7 Only let DocumentController schedule session saves 2013-01-10 06:40:03 +01:00
Allan Odgaard
e325e26df5 fixup! Make HTML output window a panel 2013-01-10 06:40:03 +01:00
Allan Odgaard
c9f31cac71 Remove tmCommand load/save converters 2013-01-10 06:40:03 +01:00
Allan Odgaard
7328f0fd6a Checkin release notes 2013-01-10 06:40:03 +01:00
Allan Odgaard
362bf74fd9 Provide fallback search folder for non-project windows 2013-01-09 06:48:03 +01:00
Allan Odgaard
03398ed9e6 Insignificant source file touchup 2013-01-09 06:48:03 +01:00
Allan Odgaard
494c836217 Add (unused) code to prune tab bar 2013-01-09 06:48:02 +01:00
Allan Odgaard
6d46ba5363 Disable Go → Project Folder when unavailable 2013-01-09 06:48:02 +01:00
Allan Odgaard
772e7ae1b4 Use weak pointer for file browser’s delegate 2013-01-09 02:59:18 +01:00
Allan Odgaard
e13d531d70 Render glyphs in Unicode’s “private use area”
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.
2013-01-09 02:59:18 +01:00