Commit Graph

485 Commits

Author SHA1 Message Date
Allan Odgaard
2cbb657bbe Do not abort when failing to create persistent storage for CoreData
While rare, it seems to happen for some users for seemingly unknown reason.
2016-11-15 22:32:48 +07:00
Allan Odgaard
c92e0c42d8 Provide save dialog with document’s file type for encoding settings
Previously the save dialog would update encoding settings solely based on the path, but the user could set different line endings or character set for a file type (rather than extension).
2016-11-02 23:02:18 +07:00
Allan Odgaard
fb62334362 Add “small” prefix to our custom document icons
A few of these names clash with our file type icons (Blank, C, JavaScript, Python, Ruby, and Text) so we need to change one of the sets if we want to build TextMate.app with a single Resources folder (instead of keeping resources with their respective frameworks).
2016-11-02 22:59:44 +07:00
Allan Odgaard
e4c408fcad Improve disambiguation of applications in the Open With menu
If there are multiple copies of the same app installed and the version numbers are the same, it will now include location information.
2016-10-24 02:21:29 +07:00
Allan Odgaard
1f0c52a8cf Let Open With use application URL instead of bundle identifier
It is not unlikely to have multiple versions of Xcode installed which all use the same bundle identifier, but we want to select a specific one for opening xib files etc.
2016-10-24 02:21:29 +07:00
Allan Odgaard
50b3da7788 Create Show Hidden Files checkbox in code instead of using a xib 2016-10-24 02:21:29 +07:00
Allan Odgaard
ebe6029137 Register defaults in +initialize instead of using dispatch_once 2016-10-24 02:21:29 +07:00
Allan Odgaard
efecda7526 Reuse variables already initialized 2016-10-24 02:21:29 +07:00
Allan Odgaard
bec3548d55 Avoid extra call to accessor by using instancesRespondToSelector: 2016-10-15 13:07:51 +02:00
Allan Odgaard
0b8c2b3ff5 Add syntax highlight to pasteboard search history
This is only for regular expressions and for these we bypass the normal “show invisibles” code, this is only because it would add code complexity and regular expressions are less likely to contain newlines or tab characters.
2016-10-15 13:07:51 +02:00
Allan Odgaard
8e0b22507a Use LEGACY marker for code that should eventually be retired
This is to make it easier to search for such code.
2016-10-10 22:39:16 +02:00
Allan Odgaard
dfe30c5328 Prune pasteboard history before saving 2016-10-10 22:38:01 +02:00
Allan Odgaard
ff4ad90ac7 Add pruneHistory: method to OakPasteboard 2016-10-10 22:38:00 +02:00
Allan Odgaard
5c1014c578 Add user defaults keys for how much pasteboard history to keep 2016-10-10 22:38:00 +02:00
Allan Odgaard
1a79e15017 Improve Objective-C type info (generics) 2016-10-10 22:38:00 +02:00
Allan Odgaard
a57e4dde1c Minor improvement in pasteboard history’s Clear All 2016-10-10 22:37:53 +02:00
Allan Odgaard
d2a078fd32 Improve handling of delayed pasteboard history saving
Previously we would save 60 seconds after a change, but successive changes would not bump the timer, and we had a timer per pasteboard, so changing both the find and replace pasteboard would schedule two save operations, even though they share context.

Now we save 30 seconds after any of the pasteboards were last changed.
2016-10-10 22:37:25 +02:00
Allan Odgaard
03d912e7c4 Bump date of find/replace pasteboard history items when they are used
Currently this bumping is limited to the Find dialog and happens when executing a search. Selecting from the Show Find History or subsequently using ⌘G, does not bump the date of the selected item (but probably should).
2016-10-10 22:37:12 +02:00
Allan Odgaard
2feb4a497a Use crash_reporter_info_t’s convenience constructor
Also change most ‘crashInfo’ variable names to just ‘info’ to be consistent.
2016-10-07 22:14:33 +02:00
Allan Odgaard
95fc7c8b3e Remove code required when building with the 10.9 and 10.10 SDK
We only support building with the 10.11 and 10.12 SDK, so this code is no longer required.

Also added MAC_OS_X_VERSION_10_10 comments around 10.10 API that we conditionally use. This is just to make it easier to find it when bumping the minimum OS requirement.
2016-10-02 08:08:05 +02:00
Allan Odgaard
a83912489c Require the 10.11 SDK to build TextMate 2016-09-30 12:46:59 +02:00
Allan Odgaard
b514f9c6aa Support passing nil to CanonicalURL 2016-09-29 09:56:50 +02:00
Allan Odgaard
09534b7ffc Use NSWorkspace API instead of LSGetApplicationForURL 2016-09-27 21:49:32 +02:00
Allan Odgaard
e6ed50c107 Introduce kMacClassicThemeUUID since we reference it in multiple places 2016-09-26 11:09:32 +02:00
Allan Odgaard
7f42f439b7 Add NSFormatter subclass that does syntax highlight
The theme used can be set using the UIThemeUUID defaults key. The default is Mac Classic.
2016-09-25 13:08:21 +02:00
Allan Odgaard
5a571ad036 Fix leak: CGPathRef 2016-09-25 07:31:13 +02:00
Allan Odgaard
d36153a08e Do not call orderFront: on our pop-out animation
The child window is already put on-screen when added to the parent, calling orderFront: will bring the parent window to front, which we do not want, as the animation may be triggered e.g. from the Find dialog (using ⌘G/⇧⌘G in that window).
2016-09-24 08:33:32 +02:00
Jacob Bandes-Storch
f36ce366f4 Make OakPopOutAnimation window a child of the main window 2016-09-21 21:00:51 -07:00
Allan Odgaard
6db5ac8de3 Rename performCloseOtherTabs: to performCloseOtherTabsXYZ:
Starting with macOS 10.12 the NSWindow class will swallow this method, even if we set NSWindow.allowsAutomaticWindowTabbing = NO.
2016-09-21 20:39:41 +02:00
Allan Odgaard
ad01eb1ac6 Use stringArrayForKey: where appropriate 2016-09-21 20:39:41 +02:00
Ronald Wampler
f38eaa5315 Let OakPopOutAnimation set the color in the image to black
This makes the text easier to see against the yellow background.
2016-09-21 08:11:48 +02:00
Allan Odgaard
e3874bcecb Only set menu item image when required
The system can be updating the menu only to resolve a key equivalent, hence the image is not required. The document icon can be a little expensive to create because of the SCM badge. This would be noticeable when doing a folder search with hundres or thousands of results and then pressing ⌘1, here it would previously need to create all the document icons before responding to the key.
2016-09-20 18:12:13 +02:00
Allan Odgaard
60441f69e4 Add NSMenuItem category method to be used for dynamic titles
When a menu item has a custom app shortcut it is necessary to keep the original title as we would otherwise lose the custom app shortcut defined by the user (using the original title).
2016-09-20 10:03:45 +02:00
Allan Odgaard
7cc017f343 Harmonize all implementations of sharedInstance 2016-09-19 12:54:19 +02:00
Allan Odgaard
fe831c2fc2 Declare NSMenuDelegate protocol conformance for OakOpenWithMenu 2016-09-19 12:52:46 +02:00
Allan Odgaard
de83ebf06e Introduce OakCreateCloseButton API 2016-09-19 09:01:35 +02:00
Allan Odgaard
ce639d6d09 Move close button graphics to OakAppKit 2016-09-19 08:59:34 +02:00
Allan Odgaard
0fa87d514d Use nicer isXYZ property getter names for tab bar view 2016-09-18 10:26:00 +02:00
Allan Odgaard
7f73203572 Call animationDidStop:finished: to avoid retain cycle
If we order out the window then the animation does not run to completion which means that our delegate’s ‘did stop’ method is not called, but this method is responsible for breaking our retain cycle.
2016-09-13 23:49:17 +02:00
Jacob Bandes-Storch
d6652ff4e8 Hide previous pop-out animations when showing a new one 2016-09-12 23:50:46 -07:00
Allan Odgaard
1587acbecf Remove unused sticky property from OakTabBarView
Ideally we would render a pin or similar for sticky tabs, but until we do, let’s not have this unused property, as it doesn’t reflect the document’s state.
2016-09-13 07:37:16 +02:00
Allan Odgaard
e38df4dbca Use start/finish times for animation instead of durations 2016-09-11 11:53:07 +02:00
Jacob Bandes-Storch
877eabb28c Tweaks to pop-out animation 2016-09-11 02:36:33 -07:00
Jacob Bandes-Storch
d16cd01f67 Minor visual tweaks to OakPasteboardSelector 2016-09-11 11:20:52 +02:00
Jacob Bandes-Storch
f7c11c2436 Update visual style of OakChooser matches 2016-09-11 07:46:09 +02:00
Allan Odgaard
01ced8ecf5 Order out last tool tip immediately when showing a new one
When holding e.g. ⌘G with no matches, we repeatedly create new tool tips and the queue with the “orderOut:” messages appear to not be handled until ⌘G is released, resulting in a lot of tool tips being created.
2016-09-09 05:32:19 +02:00
Allan Odgaard
db99892a96 Use our OakAppKit support for translating actions to table view movement 2016-09-08 20:14:08 +02:00
Allan Odgaard
ed3c8b7ab0 Use our OakAppKit support for translating actions to table view movement 2016-09-08 20:14:08 +02:00
Allan Odgaard
b38cbafe19 Implement only NSResponder’s page up/down methods
There is no movePageUp/Down: though there is a pageUp/DownAndModifySelection:.
2016-09-08 20:14:08 +02:00
Allan Odgaard
af67736108 Remove unused argument from OakPerformTableViewActionFromSelector 2016-09-08 20:14:07 +02:00