Commit Graph

63 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
772e7ae1b4 Use weak pointer for file browser’s delegate 2013-01-09 02:59:18 +01:00
Allan Odgaard
293d9a8e46 Ensure DisplayName doesn’t return nil
Although I don’t know when it would return nil, issue #649 indicates that it sometimes does. We now fallback on the full URL in this case (and returning ‘«nil»’ if the url itself is nil). This should give a hint about what file system entries would fail to return a display name.
2013-01-08 22:48:06 +01:00
Jacob Bandes-Storch
b277613ecd Add "Reveal Current Document" command
This reveals the current document in the file browser, by expanding directories to reach it, rather than changing the root directory of the browser.
2013-01-08 22:48:06 +01:00
Jacob Bandes-Storch
2162082f37 Move FS utility funcs from OFB to a separate file 2013-01-05 04:21:17 +01:00
Allan Odgaard
47fa0f040c Use Objective-C literals for YES/NO 2013-01-02 01:46:48 +01:00
Allan Odgaard
33e11aedb0 Add copyWithZone: to OFBPathInfoCell
This is mainly to manually copy-construct the C++ instance counter that we use (in debug mode) to track leaks (or an erroneous extra release).

For good measure we also set the spinTimer instance variable to nil. Though this functionality isn’t presently used, so hasn’t actually caused a problem.
2012-12-28 02:47:19 +01:00
Allan Odgaard
71be61cbbb Enable ARC by default
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.
2012-12-19 19:42:36 +01:00
Joachim Mårtensson
b03ee2f6ee Use same mechanism to limit redraw in modifiedURLs 2012-12-14 18:03:37 +01:00
Joachim Mårtensson
417ecef624 Refactored calculations of touched filebrowser items into its own method 2012-12-14 18:03:36 +01:00
Joachim Mårtensson
d983d5a5d2 Limit file browser refresh on open/close
If changes are limited to visible rows, we only reload these.
2012-12-11 17:52:16 +01:00
Allan Odgaard
c995b758c8 fixup! Allow disabling document status in file browser
If ‘location’ was nil, we would implicitly create a std::string from that, which is not allowed (and crashes).
2012-11-14 11:18:51 +07:00
Josh Goebel
dc34d5c9d9 Allow disabling document status in file browser
Disabling this is achieved by setting `fileBrowserDocumentStatus` to `false` in `.tm_properties`.

Disabling it should remove potential delays after opening, closing, and saving files when file browser is showing a lot of files. It is meant as a temporary workaround until the performance issues are addressed.
2012-11-12 13:28:34 +07:00
Allan Odgaard
e1fc3993f0 Improve editor performance when file browser show lots of stuff
Delays may still be experienced when a file is opened or its “modified” state is changed but general edits should no longer be affected by how much is showing in the file browser.

This addresses issue #463.
2012-09-26 00:26:01 +02:00
Allan Odgaard
a0c4af64bd Remove trailing whitespace
Only removed from non-empty lines.
2012-09-25 14:16:50 +02:00
Allan Odgaard
56ec46e1f9 fixup! Avoid using objc_ptr 2012-09-21 01:32:41 +02:00
Allan Odgaard
ebab500ba3 Use std::map/set instead of C arrays
These types come with a find() method and avoids having to use helper functions to get the begin/end of the array (for linear search).
2012-09-20 12:22:20 +02:00
Allan Odgaard
8fd7b82cbd Remove CocoaSTL.h include 2012-09-20 12:22:20 +02:00
Allan Odgaard
4273bf968b Get rid of C++ style NSIndexSet iteration 2012-09-20 12:22:19 +02:00
Allan Odgaard
101e0560f6 Avoid using objc_ptr 2012-09-20 12:22:19 +02:00
Allan Odgaard
45763d4afc Don’t require file to get SCM info
We didn’t actually use the file itself, only its parent directory, and there are several places we want SCM info for an untitled file’s project directory, so removing the need for a file simplifies things.
2012-09-18 17:33:02 +02:00
Allan Odgaard
84104c8d9b Constrain size of splits in main window
The main window has now moved fully to constraint based layout which makes it a lot easier to tweak the layout and fixes issue #145.

Presently the option to have HTML output on the right is not supported. It will likely be back with a few other options that have been requested.

The width of file browser and height of HTML output view is always read from defaults rather than restored from previous session. Effectively this results in the same behavior except when there are multiple windows with different sizing of these splits. Unsure if per-window sizes should be brought back.
2012-09-15 15:12:58 +02:00
Allan Odgaard
31fc37edbc Remove unnecessary include 2012-09-15 15:12:57 +02:00
Allan Odgaard
baae923414 Remove resize buttons
Going forward we only allow resizing views by grabbing the dividers.
2012-09-15 15:12:57 +02:00
Allan Odgaard
2b9c27263d Auto-layout: Update file browser and HTML output 2012-09-14 17:14:55 +02:00
Allan Odgaard
4d95db8f66 Auto-layout: Implement intrinsicContentSize 2012-09-14 17:14:55 +02:00
Allan Odgaard
4b76514eeb Implement getter/setter for const& property 2012-09-12 18:30:37 +02:00
Allan Odgaard
6521ff2529 Use glob_list_t in file browser
This changes the way the include/exclude keys work: A path now *must* be matched by an include key to actually be shown.

The default value of the global include key has been changed to include “*” but if users have edited the value, they will see few or no files in the file browser.
2012-09-12 18:30:36 +02:00
Allan Odgaard
45b00164c4 Move document::is_binary to where it is used 2012-09-10 14:24:04 +02:00
Allan Odgaard
59b47e76f0 Fix parent for smart folders 2012-09-03 17:37:11 +02:00
Allan Odgaard
8c55703dea Show Package Contents work for packages with own data source
For example Xcode projects now have their target (URL) set to xcodeproject://path/to/project/file which would cause Show Package Contents to not work, as it expected a file URL.
2012-09-03 17:37:11 +02:00
Zach Drayer
55c0109fa9 Add support for reading xcodeproj files 2012-09-03 17:37:11 +02:00
Zach Drayer
158c931810 Fix a leak in OakHistoryController 2012-09-03 15:32:03 +02:00
Allan Odgaard
161d4b7fd2 Don’t prune items from SCM drivers tracking directories 2012-09-03 15:28:58 +02:00
Allan Odgaard
0e96a04d76 Remove compatibility checks
Since we now require 10.7 we don’t need all of this. Keeping it around is just noise that can lead to confusion about code paths.
2012-08-29 16:02:29 +02:00
Jacob Bandes-Storch
dfdde3283f Use 64-bit: explicit visibility where required 2012-08-28 21:32:47 +02:00
Jacob Bandes-Storch
e3aa997b06 Use libc++: replace std::tr1 with std 2012-08-28 13:30:20 +02:00
Jacob Bandes-Storch
9057d22e06 fixup! ⌘+click a file browser icon to show in Finder
Only attempt to show the item in Finder if it is a file
2012-08-27 01:03:16 +02:00
Allan Odgaard
1c9640f00b fixup! File Browser will now remember it's width
Since the framework doesn’t depend on itself, it cannot include its exported headers.

This closes issue #282.
2012-08-25 16:10:27 +02:00