594 Commits

Author SHA1 Message Date
Allan Odgaard
36dc1374f9 Revert "Add debug output when TextMate is activated via mate"
This reverts the following 3 commits:

- commit 306d46ec71
- commit eecfe6e619
- commit 2ffc74ad8b
2019-08-26 21:19:17 +02:00
Allan Odgaard
306d46ec71 Add even more debug output for when TextMate is activated via mate 2019-08-21 11:51:26 +02:00
Allan Odgaard
dae1103728 Update LINK declarations 2019-07-16 19:42:29 +02:00
Allan Odgaard
eecfe6e619 Add more debug output for when TextMate is activated via mate
Related to 2ffc74ad8b
2019-07-16 08:33:05 +02:00
Allan Odgaard
2ffc74ad8b Add debug output when TextMate is activated via mate
Some users report a significant delay from executing mate until the TextMate window is brought to front.

The debug information can be extracted by running the following in a terminal:

    log show --predicate 'subsystem = "com.macromates.TextMate" && category = "BringToFront"'

Alternatively use `stream` instead of `log` to get a live stream of debug output.

See `man log` for options such as `--start date/time` (to limit the query to e.g. the last 10 minutes)
2019-07-13 10:20:09 +02:00
Ronald Wampler
b1fdd4377b Allow customization of DocumentWindowController touch bar items 2019-06-30 10:32:45 +02:00
Ronald Wampler
2294d369d0 Add accessibility support for DocumentWindowController's touch bar 2019-06-29 19:21:45 -04:00
Ronald Wampler
d8b17a1f06 Let DocumentWindowController's touch bar support nested touch bars 2019-06-29 19:21:45 -04:00
Allan Odgaard
1ef78b3af7 Rename symbols to what’s expected by the 10.14 SDK 2019-06-29 20:14:15 +02:00
Allan Odgaard
b5b36a558b Add missing framework dependencies 2019-06-26 13:21:11 +02:00
Allan Odgaard
1a1a910c92 Introduce find dialog delegate instead of using project identifier 2018-12-06 22:00:22 +07:00
Allan Odgaard
7030b0041e Update documents array and selected document inside animation group 2018-12-02 18:08:38 +07:00
Allan Odgaard
f244e223fd Rename a few menu items 2018-11-20 22:21:50 +07:00
Allan Odgaard
180dfb971f Make document window controller’s document array a read only property
This is because we may sometimes want to enable implicit animations when updating this property, by making it read-only we limit places from where it can be updated, to make it easier to audit the code.

Currently no-one outside the class actually uses the property, so we could (and may) make it private.
2018-11-19 09:42:33 +07:00
Allan Odgaard
79172d552e Set controlSize on NSControl instead of its cell 2018-11-17 20:20:55 +07:00
Allan Odgaard
f95c68475d Use systemFontSizeForControlSize: when changing button’s control size 2018-11-17 11:35:40 +07:00
Allan Odgaard
efde68385f Remove unnecessary property 2018-11-15 16:17:21 +07:00
Allan Odgaard
162c499e91 No need to set view’s next responder to its view controller (10.10) 2018-11-10 15:31:54 +07:00
Allan Odgaard
38f892b496 Use values from NSWindow to calculate the cascade offset for new windows 2018-11-07 15:28:43 +07:00
Allan Odgaard
e830f6600c Hide tab bar view using the view controller’s hidden property (10.12)
For users on an OS earlier than 10.12, the tab bar will always be visible, even when configured to not show for windows with only a single document (tab).
2018-11-07 15:28:43 +07:00
Allan Odgaard
1e71ce0855 Use hypot function to calculate mouse drag distance
Also update the threshold from 1.0 to 2.5 pixels, as that was already used a few other places, and a single pixel’s threshold seems low.
2018-11-06 17:27:07 +07:00
Allan Odgaard
1d41f708e0 Move tabs to title bar 2018-11-05 19:16:24 +07:00
Allan Odgaard
5f63ee096b Remove ability to have file browser header in the tab bar
This style is not easily compatible with moving the tab bar view to the window title.
2018-11-05 19:16:24 +07:00
Allan Odgaard
d8b0801a63 Update selected tab index when tab bar has no selected tab
Currently OakTabBarView defaults to selecting first tab, but we shouldn’t assume that.
2018-11-05 19:16:24 +07:00
Allan Odgaard
1350c4c904 Send performClose: to window delegate instead of to OakTabBarView
This is in preparation of moving the tab bar view out of the window content view and into the titlebar.
2018-11-05 19:16:24 +07:00
Allan Odgaard
a03c2afd66 Add missing include 2018-11-05 19:16:24 +07:00
Allan Odgaard
10ef832b37 Rename setSelectedTab: → setSelectedTabIndex: 2018-11-05 19:16:24 +07:00
Allan Odgaard
e2b0d44ce2 Do not open document in existing project if option key is down 2018-11-01 11:49:01 +07:00
Allan Odgaard
1cbaf05615 Set titlebarAppearsTransparent for main window
This makes the title bar render in the same color as it did prior to building on 10.14, so that the current tab colors match.

It does however make sheets appear from “above” the title bar and makes the Dark Mode style darker, so this is just an intermediate fix until the tab bar gets revamped for 10.14.
2018-11-01 00:10:20 +07:00
Allan Odgaard
4e5f5f71a2 Use beginSheetModalForWindow:completionHandler: over deprecated API 2018-10-31 23:10:31 +07:00
Allan Odgaard
0d75927528 Update OakFileBrowserDelegate protocol to new file browser controller 2018-10-28 13:36:33 +07:00
Allan Odgaard
7cf482fe25 Rename notification constants 2018-10-28 13:32:14 +07:00
Allan Odgaard
c822943b93 Move OakFileBrowser delegate protocol and constants to new file browser 2018-10-28 13:15:39 +07:00
Ronald Wampler
e64b09b688 Introduce overloads for the new divider styles
Also, switch to use the new divider styles in most places. The remaining usage of the old "OakCreateLine" functions are in the OakChooser windows. These will be refactor for better dark mode support next.
2018-10-28 11:07:03 +07:00
Allan Odgaard
83a0d66563 Add some additional defaults for Filter Through Command
The ‘seq 100’ command is useful with columns selections / multiple insertion points to enumerate items.
2018-10-28 10:15:56 +07:00
Allan Odgaard
e26b8ea868 Switch to new file browser 2018-10-28 10:15:56 +07:00
Allan Odgaard
fcf9ae3aa2 Don’t move focus to text view by default when opening/closing documents
For example when implicitly opening documents because we are duplicating the active document in the file browser, or closing a document because its file got deleted in the file browser, we want focus to stay in the file browser.

Previously we refocused the file browser when closing documents as a result of deleting files.

For duplicating files, this seemed to work because the file browser would not start editing the new file name until it had detected disk changes, thus it would happen after a slight delay.
2018-10-28 00:28:02 +07:00
Allan Odgaard
b00f01a992 Fix potential exception when deleting rows that show the field editor
The issue is that we call NSWindow’s makeFirstResponder: with the old field editor, but there is no guarantee that the old field editor is still part of the window’s view hierarchy.
2018-10-28 00:28:02 +07:00
Allan Odgaard
cff93ee2cb Do not bypass the type checker when forwarding methods to file browser 2018-10-15 06:11:39 +02:00
Allan Odgaard
a012f4357a Change ‘url’ property to ‘URL’
This seems to follow Apple’s style of uppercasing abbreviations even when they are the first part of a method/property.
2018-10-12 19:38:11 +02:00
Allan Odgaard
866d1f16c3 Go through OakFileBrowser to create new files in directory
This avoids having to support editURL: as public API for the file browser and limits the use of OakFileManager to OakFileBrowser (except for the “deleted item” notification being observed by the document window).
2018-10-12 19:28:01 +02:00
Allan Odgaard
f6fa273912 Update coding style for where to place colon after dictionary keys
This follows the Swift style and also makes it possible to align dictionary values using TextMate’s Align Assignments command.
2018-10-07 09:54:45 +02:00
Allan Odgaard
3d497e9634 Take precautions to make TextMate stay active after opening a document
See comment in the code for further details.
2018-10-05 18:15:11 +02:00
Allan Odgaard
e70791ee89 Rename a bunch of constants to fix deprecation warnings (10.12) 2018-06-16 22:55:30 +02:00
Allan Odgaard
a623b8b6ec Fix typo: NSLeftMouseDown → NSLeftMouseDownMask 2018-06-16 22:42:12 +02:00
Allan Odgaard
c11b81b9da Use MBCreateMenu for a few pop-up menus 2018-04-30 15:30:48 +07:00
Ryan Schmidt
bade4054dc Mark strong properties as strong
Versions of the OS X 10.11 SDK prior to 10.11.4 require this to
be done explicitly. This fixes the build on OS X 10.10 when
using the OS X 10.11 SDK from Xcode 7.2.1 and earlier.
2018-02-06 17:23:26 +07:00
Allan Odgaard
503d493f47 Move OakTabBarView into its own framework
The motivation is to get an OakAppKit that does not include hundres of image resources.
2017-10-07 13:58:35 +02:00
Jake Kirshner
9f1cec343e Add basic touch-bar support 2017-10-03 21:56:54 +02:00
Allan Odgaard
4d86258e47 Use new alert style enumeration names (10.12) 2017-05-31 21:58:31 +02:00