Commit Graph

3449 Commits

Author SHA1 Message Date
Allan Odgaard
b3ec7b4c05 Setup key view loop manually for main window
The auto-calculated key view loop includes everything, which means dynamically added elements such as the close buttons for tab view items, but worse, the subviews of a view-based table view. So this change is required before switching to a view-based file browser.
2015-07-20 11:40:59 +02:00
Allan Odgaard
2f30d7d368 Remove support for nested arrays when setting key view loop 2015-07-20 11:40:22 +02:00
Allan Odgaard
699cdd72cb Include scope bar in key view loop (rather than its buttons) 2015-07-20 11:40:14 +02:00
Allan Odgaard
7cb3835c3b Preserve next key view when a descendent of our previous key view
This allows bottom-up construction of the key view loop.
2015-07-20 11:39:54 +02:00
Allan Odgaard
da92f21e5e Do not activate file browser for double-click 2015-07-20 11:37:57 +02:00
Allan Odgaard
d64dfa661d Delete code that tests if field editor was dismissed
It seems that after the field editor has been dismissed, the first responder reverts to the outline view (file browser), even though we are asked if we accept first responder.

So now we simply check if we are already first responder, and that seems to work just as well (for clicking on an outline view row while the field editor is showing).
2015-07-20 11:36:00 +02:00
Allan Odgaard
cce3417962 Remove custom handling of ‘return’ to edit items in file browser
This behavior is already implemented by the OS (although maybe not for older versions).
2015-07-20 11:34:38 +02:00
Allan Odgaard
2e456c0d77 Include FSFileItem’s ‘missing’ property in equivalence check
In theory we should include all instance variables, but we only use this check to see if we need to cause a file browser reload (when a row is being edited) and long-term (when we switch to NSTableCellView) most changes can be done without needing to reload the file browser items.
2015-07-20 11:33:42 +02:00
Allan Odgaard
a2b9064894 When changing FSItem’s SCM status we update our icon property
This way it is possible to bind an image view’s value property directly to FSItem’s icon and not worry about having to manually trigger a redraw when the SCM status changes.
2015-07-20 11:32:09 +02:00
Allan Odgaard
ae9fef95a4 Fix copy support for OakFileIconImage 2015-07-20 11:30:45 +02:00
Allan Odgaard
5a9ba13ec4 Remove file browser’s code for return/backtab in field editor
Handling return was to prevent that key to move to editing the next row, though it does not seem to have this behavior anymore.

Backtab was to support editing the row above, though Apple has a defined behavior for how tab/backtab should work when editing table view items, so we shouldn’t change that.
2015-07-20 11:28:55 +02:00
Allan Odgaard
2de5395ba5 Remove reference to OFBPathInfoCell 2015-07-20 11:28:53 +02:00
Allan Odgaard
bf2c92b73a Checkin release notes v2.0-beta.7.6 2015-07-17 16:51:52 +02:00
Allan Odgaard
94d825c720 Remove potential cycles from bundle menus
A cycle would cause an infinite loop when generating an item’s full display name.
2015-07-17 12:03:31 +02:00
Allan Odgaard
29ded47820 Ensure all file URLs are constructed via NSURL
It’s important that URLs pointing to the same path are testing as equal, which previously could fail because NSURL doesn’t use ‘localhost’ in its file URLs.
2015-07-16 00:29:41 +02:00
Allan Odgaard
1fb6c978d5 Request “system font” for about window and help book (web views)
Reference http://furbo.org/2015/07/09/i-left-my-system-fonts-in-san-francisco/
2015-07-16 00:29:41 +02:00
Allan Odgaard
2715f1148d Improve which item is selected when right-clicking file browser
We no longer select items that the delegate tells us are non-selectable (header items) and we no longer deselect when right-clicking outside selectable items.
2015-07-16 00:29:41 +02:00
Allan Odgaard
5ff6161275 Showing SCM status now have a SCM icon in file browser’s header 2015-07-16 00:29:41 +02:00
Allan Odgaard
9138e51389 Use NSImage instead of OakFileIconImage for SCM folder icon 2015-07-16 00:29:41 +02:00
Allan Odgaard
514a3fe2bc Add scmStatus property to FSItem and change icon to NSImage 2015-07-16 00:29:41 +02:00
Allan Odgaard
7b1f480a1d Don’t rely on the declared type of FSItem’s icon property 2015-07-16 00:29:41 +02:00
Allan Odgaard
86b0b1350a Don’t rely on FSItem’s icon for path and exists info 2015-07-16 00:29:40 +02:00
Allan Odgaard
b7c5a4b806 Add number of children to FSItem’s description 2015-07-16 00:29:40 +02:00
Allan Odgaard
f72153e045 Remove support for old FSDataSource API 2015-07-16 00:29:40 +02:00
Allan Odgaard
4164059f7a Improve FSSCMDataSource to work better with new API 2015-07-16 00:29:40 +02:00
Allan Odgaard
c151465d98 Improve FSVolumesDataSource to work better with new API 2015-07-16 00:29:40 +02:00
Allan Odgaard
a9c22cf803 Make FSItem’s initWithURL: method public
This is the designated initializer that should be used by subclasses.
2015-07-16 00:29:40 +02:00
Allan Odgaard
0b5d478b37 Refactor the file browser
We now subclass NSOutlineView to detect recursive expansion/collapsing rather than look at the current event (and testing for option). This should be more reliable, for example previously using drag’n’drop with option could falsely trigger recursive expansion.

The way background folder content is loaded is also made simpler with a fairly straightforward code flow (thanks in part to the use of blocks) without the need for “pendingXYZ” variables that got checked at somewhat arbitrary times (to see if we needed to expand/select items that got loaded).

This also better tracks expanded items, as we now remove items that are collapsed from the session info the minute they are collapsed, rather than take a snapshot of the outline view during application termination. This should close #1111.

Another improvement is that we wrap item updating in begin/end update calls to get animated expansion of folders.

There are still a few issues, for example switching to using the view-based API for the outline view and handling reloading items while the field editor is up (which I think require the former).

Also, this commit does not change the data source API so there is some redundant work being done, as we request a reload after getting a “did reload” notification.
2015-07-16 00:29:40 +02:00
Allan Odgaard
6bade2e18d Add property tracking if expand/collapse includes children
This can then be checked in will/did expand/collapse delegate methods.
2015-07-15 22:07:01 +02:00
Allan Odgaard
63b1d2a7fe Add hash implementation to FSItem
The NSOutlineView uses an NSSet to track expanded items (during reload), so for items used in an NSOutlineView this method is sort of required.
2015-07-15 22:05:25 +02:00
Allan Odgaard
3b49fd173e Add block-based API to asynchronously load FSDataSource items 2015-07-15 22:04:25 +02:00
Allan Odgaard
8a2b97207c Refactor FSDirectoryDataSource
All code has been moved to the FSItem subclass.

The advantage is that bookkeeping becomes easier, for example no need to explicitly unregister paths (instead we can do that in the destructor).

The disadvantage is that sharing resources between items becomes harder, for example all (expanded) folders track file system and version control changes, though the existing code only accidentally shared these resources for identical paths, and it actually lacked a tracking system for retain counts.
2015-07-15 22:02:16 +02:00
Allan Odgaard
c56bb0c9f1 Double-tapping shift disables “freehanded mode” for single caret 2015-06-25 23:01:58 +02:00
Allan Odgaard
bf7f7b21d1 Checkin release notes v2.0-beta.7.5 2015-06-25 19:27:25 +02:00
Allan Odgaard
a69711755f Read the line number scale factor from user defaults
If you dislike the downscaling of the line numbers then run the following in a terminal:

    defaults write com.macromates.TextMate.preview lineNumberScaleFactor -float 1
2015-06-25 17:09:54 +02:00
Allan Odgaard
3fdc72b93a Support spell checking being “automatic by language”
This must be set in the spelling panel and changing language via the spelling panel does not update the buffer (recheck the text with the new spelling language), so toggle automatic spelling after using the spelling panel to change language.

Closes #1139
2015-06-24 00:46:49 +02:00
Allan Odgaard
86dc42fdf4 Add ability to unlearn words (as being spelled correctly)
This option is available in the context menu when bringing it up for previously learned words.
2015-06-24 00:42:05 +02:00
Allan Odgaard
f5fca8eb02 Refactor how we create context menu 2015-06-24 00:08:59 +02:00
Allan Odgaard
457969788e Use std::tuple for the OS version
This makes compatibility checks simpler, since we can use a single comparison operator.
2015-06-23 22:46:58 +02:00
Allan Odgaard
1767842229 Skip looking for shift/option modifier changes when mouse is down
Also skip updating the state if there has been no change (to the modifiers we’re interested in).
v2.0-beta.7.4
2015-06-18 19:21:52 +02:00
Allan Odgaard
265bdb6713 No need to queue an auto-refresh in the flagsChanged: method 2015-06-18 19:11:39 +02:00
Allan Odgaard
1919bce337 Delay context menu to next event loop cycle when using keyboard
This also failed prior to the recent refactoring. Might have started with 10.10, as I haven’t noticed this until recently.
2015-06-17 21:56:41 +02:00
Allan Odgaard
5d30498be2 Provide full line of context when asking for spelling suggestions 2015-06-17 21:41:10 +02:00
Allan Odgaard
70ef4c94c1 Remove use of deprecated NSSpellChecker API
We do not provide the full line to the new API, this will require a bit of refactoring.
2015-06-16 16:31:35 +02:00
Allan Odgaard
1ac59e2553 Update OakTextView to use NSDraggingSession API (10.7) 2015-06-16 16:20:39 +02:00
Allan Odgaard
af82d6e540 Update OakTabBarView to use NSDraggingSession API (10.7)
Previously used API has been deprecated.
2015-06-15 16:47:01 +02:00
Allan Odgaard
e8cba4dbae Support reloading tab bar view while a tab is being dragged
This would happen if dragging a tab into an unmodified document (in the same window) while holding down control (to insert the path of the dragged tab).

Here the document would change state to “modified” which would trigger a tab bar view reload, but since the drag session isn’t completed, we reload the tabs while one of them is “outside” the bar, which causes it to be added, and once the drag session completes, the original tab outside the bar, will be re-added, leading to two copies of the same tab.
2015-06-15 12:37:09 +02:00
Allan Odgaard
cb9e2e5fa4 Revert "Suppress warning from the atos Xcode tool"
The option that was recently made mandatory has now been removed.

This reverts commit b0814dfbd9.
2015-06-15 11:59:17 +02:00
Allan Odgaard
9d1d1a1a5a Link directly with static versions of boost libraries
This is currently using absolute paths since it’s a quick fix.
v2.0-beta.7.3
2015-06-13 19:16:10 +02:00
Allan Odgaard
9dc71d5687 Checkin release notes v2.0-beta.7.2 2015-06-13 18:09:29 +02:00