Commit Graph

3518 Commits

Author SHA1 Message Date
Allan Odgaard
60050cf026 Add Export Bundle… to bundle editor’s context menu v2.0-beta.7.8 2015-08-08 11:35:23 +02:00
Allan Odgaard
c259dd582b Add API to save bundle item to arbitrary location 2015-08-08 11:34:55 +02:00
Allan Odgaard
3acd714402 Refactor 2015-08-08 11:34:35 +02:00
Allan Odgaard
70b830b557 Add API to skip resolving proxy items when querying bundle items
This is useful for obtaining a list of “physical” bundle items in a bundle.
2015-08-08 11:34:06 +02:00
Allan Odgaard
05e087f087 Use view-based table view in pop-up menu usable from snippets
Starting with 10.10 (I think) the text was no longer drawn in the proper highlight color. Switching to a view-based table view fixed that issue.
2015-08-08 11:34:06 +02:00
Allan Odgaard
6b387eea6e Implement setNilValueForKey:
When running a debug build we get an exception due to lacking this method and the documentation does seem to indicate this is required for scalar keys.
2015-08-05 12:32:40 +02:00
Allan Odgaard
068855b4e0 Disable deprecation warning for API working on resource forks
There doesn’t seem to be any replacement API for this so while the warning (when building with the 10.8 SDK) may serve as a reminder to update the code, the only possible update I can see is to drop support for reading text clippings.
2015-08-05 12:32:06 +02:00
Allan Odgaard
8fe7681ebd Remove unnecessary include of oak/compat.h 2015-08-05 12:31:20 +02:00
Allan Odgaard
d1ed42fef1 Use isOperatingSystemAtLeastVersion: to check for 10.10
The method wasn’t public before 10.10 but since we need to check for 10.10 we can simply conclude that lack of this method means that we are not running on 10.10.
2015-08-05 12:29:33 +02:00
Allan Odgaard
c75b89c048 Avoid temporary CFStringRef when creating file system CFURLRef 2015-08-05 12:29:24 +02:00
Allan Odgaard
6ffd12e805 Improve algorithm to find root when using reveal in file browser
The algorithm will avoid changing root when possible. If root has to be changed, we favor the current project folder, if that is not possible, we use the parent for the item being selected, unless the item is in a file package below the project folder, in that case, we use the root of the file package.
2015-08-05 12:29:12 +02:00
Allan Odgaard
d550eae4a0 Remove legacy code for relaunching already running instance 2015-08-05 12:28:07 +02:00
Allan Odgaard
b2c76df2da Fix incorrect type declaration 2015-08-05 12:27:06 +02:00
Allan Odgaard
82e5e14ae1 Remove unused function: is_trashed
The intent was to use this to decide if the proxy icon should be hidden but the API used by the function is deprecated on 10.8.
2015-08-05 12:26:17 +02:00
Allan Odgaard
7d9b2d5470 Unbind properties when disposing our view
Since we dispose the subviews that the bindings are hooked up to, this shouldn’t be necessary, but it’s good for symmetri.
2015-08-05 12:25:12 +02:00
Allan Odgaard
9efde6d41b Don’t place a caret when ⌘-clicking a selection 2015-08-05 12:24:39 +02:00
Allan Odgaard
b3478a2628 Use “modern” API to examine and resolve alias files 2015-08-05 12:23:35 +02:00
Allan Odgaard
34b374c185 Avoid two uses of FSRef (which is deprecated from 10.8) 2015-08-05 12:23:29 +02:00
Allan Odgaard
35e78feafc Check if we have an editor instance in input client methods
I’m seeing a few crashes where the most likely explanation is that input client methods are called either before setting up an editor instance, or after disposing it.
2015-08-05 12:23:06 +02:00
Allan Odgaard
0b70563c73 Add crash log info to track down a bug
Crash is in CFStringGetLength called from _CFURLCreateWithFileSystemPath, so it appears that some sort of malformed string can find its way to this call.
2015-08-05 12:22:50 +02:00
Allan Odgaard
15d57f7aed Checkin release notes v2.0-beta.7.7 2015-07-31 12:49:32 +02:00
Allan Odgaard
98206004dc Support fallback units for multiple carets
For example a command that works on selection but falls back to current word will now also work with multiple carets.
2015-07-31 12:37:29 +02:00
Allan Odgaard
755a9e1f7e Look at all carets to decide if there is a selection
Previously we only looked at the last caret, and if this one was not a selection then we would treat the multiple carets (selection ranges) as nothing being selected, and thus, a command replacing the carets, would not leave anything selected.
2015-07-31 12:18:53 +02:00
Allan Odgaard
3047212ed2 Use empty last line from commands working on multiple selections
When pasting or using Filter Through Command with multiple carets, we ignore a potential final empty line, this is because our text will be something like “foo\nbar\n” and we split on the newline, so we end up with (“foo”, “bar”, “”) and if we have more than two carets, then we insert the empty string for every third caret.

For a command though we expect there is a 1:1 between number of carets and newlines in the result, so we should never skip the last element.
2015-07-31 12:01:46 +02:00
Allan Odgaard
58bacfb763 Command with multiple selections would never select output
This now uses the same logic as with a single selection.
2015-07-31 11:48:56 +02:00
Allan Odgaard
0aa9cd8166 Don’t skip binary files when using Find All with open documents 2015-07-31 11:29:42 +02:00
Allan Odgaard
b440a8681f Remove OakImageAndTextCell class 2015-07-30 22:18:39 +02:00
Allan Odgaard
2a9220c570 Update dialog plug-in (add own image and text cell) 2015-07-30 22:18:07 +02:00
Allan Odgaard
f2387c9bc3 Ensure that the outline view’s clicked row is valid
The problem is if we right-click an item that causes content to be changed (e.g. Show Enclosing Folder) then later in the same run loop cycle ask for selected items, we prefer the clicked row, but this one might now no longer exist.
2015-07-30 22:00:06 +02:00
Allan Odgaard
14a1110199 Don’t pass NSTableCellView to OakFileManager
The view passed to the file manager is used to request the undo manager. The problem with using an NSTableCellView instance is that this view may be taken out of the view hierarchy (and thus responder chain) which makes it lose its undo manager.

This isn’t an immediate problem but if we later use undo/redo, it might be.
2015-07-30 21:56:00 +02:00
Allan Odgaard
a92b34fcaa Prefer insert/removeItemsAtIndexes: over reloadItem:
This way we only have to abort editing if the item being edited is going away.

View-based table views do not supported editedRow so this commit also change the way to figure out if a row is being edited.
2015-07-30 14:12:07 +02:00
Allan Odgaard
8abf5f2c9a Improve selection in file browser after deleting items
Previously if we deleted an expanded folder it would select the first child of this item which would then be removed and leave nothing selected.

There are still a few edge-cases left though where what’s selected after deleting items is not ideal.
2015-07-30 14:12:07 +02:00
Allan Odgaard
f0f056318d Update scmStatus and missing FSItem properties in SCM data source 2015-07-30 14:12:07 +02:00
Allan Odgaard
ecf8cbc0bf Never update OakFileIconImage states that are not marked dirty 2015-07-30 14:12:07 +02:00
Allan Odgaard
9cb059fa7b Move FSFileItem’s missing property to superclass 2015-07-30 14:12:07 +02:00
Allan Odgaard
16363f3aa0 Let the SCM data source re-use its FSItem instances 2015-07-30 14:12:07 +02:00
Allan Odgaard
bf9102f789 Re-use FSFileItems that represent missing files 2015-07-30 14:12:07 +02:00
Allan Odgaard
d40d9b0f24 Draw white circle around label swatch when row is selected
We previously did this when the background style was set to dark, but the code for this only works when the view is a direct descendent of the NSTableCellView and also, when a row is selected in an inactive table view, the background style is not set to dark.
2015-07-30 14:12:06 +02:00
Allan Odgaard
5b357d58c2 Track open state in FSItem
This eliminates the need for the last binding that was causing a retain cycle.
2015-07-27 18:45:32 +02:00
Allan Odgaard
79d012dba2 Dynamically create and dispose close button and label view 2015-07-27 18:44:49 +02:00
Allan Odgaard
a2052592ef Move construction of open/close buttons to table cell view
This gives us a bit more flexibility which we will need to properly toggle the close button.
2015-07-27 18:43:36 +02:00
Allan Odgaard
297c1c7ea5 Limit the tab bar items’ tool tips to the title string
This prevents having a tool tip show when hovering the close button (as can often happen when closing multiple tabs).
2015-07-27 18:43:14 +02:00
Allan Odgaard
0c2a8b7e0c File browser’s undo/redo menu items only worked when it had focus
We only want to use first responder’s (local) undo manager when the first responder is a descendent of the file browser itself, e.g. the field editor.
2015-07-27 18:42:03 +02:00
Allan Odgaard
33d5538967 Make the datasource setter more robust
Previously it would throw an exception if datasource was set to nil after the outline view had been disposed.
2015-07-27 18:40:38 +02:00
Allan Odgaard
2d1804fc4c Don’t handle “item did reload” notifications for leaf items
In the view-based system all changes to a single item should be done by updating the properties of this item.
2015-07-27 18:39:43 +02:00
Allan Odgaard
e52efd5486 Avoid binding each table cell view to the modifiedURLs property
This removes a retain cycle though we still have one left caused by the openURLs property.
2015-07-27 18:39:37 +02:00
Allan Odgaard
f66abfa33d Add isModified property to FSItem 2015-07-27 18:39:26 +02:00
Allan Odgaard
b67713e9e5 Add custom view to draw label swatch
This mimics the new look used by Finder and we also fix a retain cycle by not binding to ‘self’ for the labelIndex property.
2015-07-27 18:39:25 +02:00
Allan Odgaard
161ffdc3fc Remove “cut” from file browser’s menu
It’s still possible to use ⌘X but I will probably remove the functionality in the future.
2015-07-24 23:41:06 +02:00
Allan Odgaard
909e36b516 Support using ⌥⌘V in file browser to “move” an item
This is consistent with Finder and slightly more flexible as it allows copying items in Finder and pasting them in TextMate via ⌥⌘V.
2015-07-24 23:34:05 +02:00