Commit Graph

870 Commits

Author SHA1 Message Date
Boris Dušek
7d47dd279f Make OakPasteboardSelector accessible
Issues remaining:

* VoiceOver for some reason cannot track keyboard focus
  (i.e. moving down the list with just down arrow does not move
  VoiceOver cursor). User has to move the VO cursor instead using VO-down
  (and keyboard cursor follows in this case)
* the pasteboard window isn't focused automatically for VoiceOver, user
  has to switch manually to it using VO-F2-F2
2013-01-17 08:53:13 +01:00
Caleb Land
cca891d74c Add “Show in Finder” context menu when no items are selected
When you control-click the empty part of the file browser and select “Show in Finder” a Finder window will open showing the currently selected folder.

You can go about this other ways, but I find that this feature complements the already existing "New Folder" menu item in the no-items-selected context menu of the file browser.

This patch is public domain.
2013-01-17 08:39:00 +01:00
Allan Odgaard
d7661fc7bb Picking “Other…” in file browser would stick
Issue #673.
2013-01-16 04:42:51 +01:00
Allan Odgaard
a2a3bf96b5 Enable ‘Go → Reload’ when text view is focused
Previously would only work if focus was in the file browser.

Issue #674.
2013-01-16 04:42:51 +01:00
Allan Odgaard
2e43970d05 Don’t ask to save untitled documents during quit
This is only if there are no other documents with unsaved changes and the user has ‘open documents from last session’ enabled in preferences.

The rationale behind only offering it for untitled documents is that we can be sure that these will not be modified by another program while TextMate is not running. It also seems to be less valuable to have TextMate keep unsaved changes to a file that exist on disk, in fact, it’s a pretty bad behavior IMHO (and dangerous if other programs may work on the file).
2013-01-16 04:42:51 +01:00
Allan Odgaard
8611aa3f11 Introduce document_t::detach_backup
This will reset the document’s backup path but not delete the backup on disk (which can be found via the document’s identifier).

This is useful if we wish to dispose the document but reconstruct it later (e.g. during application termination).
2013-01-16 04:42:51 +01:00
Allan Odgaard
3835b55a55 Fix resize constraints for file browser / HTML output
These were set to ‘NSLayoutPriorityRequired-1’ which is higher than the window’s size constraints, meaning that resizing the window would not allow shrinking the file browser (or HTML output) views, furthermore, by making the views larger (when dragging the divider) the growth would not be constrained by the current window size, so it was possible to make the window grow with it.

The priority is now the proper NSLayoutPriorityDragThatCannotResizeWindow.
2013-01-16 04:42:51 +01:00
Allan Odgaard
10b794bb96 Creating empty glob_list_t matches everything
This is more than creating a glob_list_t containing just ‘*’, as the latter does not match hidden files, so it is more like ‘{*,.*}’, which is a bit arcane, so I think it’s better to allow using an empty list in cases where you wish to match everything (but the API accepts a glob list for filtering purposes).
2013-01-16 04:42:51 +01:00
Allan Odgaard
fd14df1800 Default file type is Objective-C++ for this project
Previously it was C++ — not sure if a setting like this belongs in the project or should be user-specific. Presently though the .tm_properties system lack a way to include user specific files, and while one can put the settings in ~/.tm_properties and make them target a (project) sub-folder, they would not override the settings set in the project.
2013-01-16 04:42:51 +01:00
Allan Odgaard
4f7deb09d8 Let symbolicator script find and extract dsym.tbz 2013-01-16 04:42:50 +01:00
Allan Odgaard
2d8d393878 Close excess tabs when tab bar overflows 2013-01-16 04:42:50 +01:00
Allan Odgaard
f984664921 Add recursion guard to mouseDown:
It’s not clear to me how we end up calling ourself, but I see (stack overflow) crash reports that has mouseDown: interspersed with forwardMethod.
2013-01-16 04:42:50 +01:00
Allan Odgaard
d178263cca ARC: Update HTMLOutput framework 2013-01-16 04:42:50 +01:00
Allan Odgaard
53bd39b636 Rework HTML output toolbar
The toolbar now uses standard system controls for better accessibility.
2013-01-16 04:41:27 +01:00
Allan Odgaard
69904bef75 Improve look of navigation bar 2013-01-16 04:40:20 +01:00
Allan Odgaard
8618224d00 Use OakCreateViewWithColor() 2013-01-16 04:40:20 +01:00
Allan Odgaard
87162c9897 Introduce OakCreateViewWithColor
This is useful when needing colored dividers in a layouts.
2013-01-16 04:40:20 +01:00
Allan Odgaard
538ba8220d Update to auto-generated instance variables 2013-01-14 00:50:12 +01:00
Allan Odgaard
3bee6cf5c6 Use path before inode to determine file identity
Previously when opening a file TextMate only looked at the (cached) inode of the open documents to learn if the requested file was already open. This could result in opening two versions of the same file e.g. after ‘git rebase’ as git will write new files with new inodes when updating the working copy.

Closes issue #666.
2013-01-13 13:02:46 +01:00
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