Allan Odgaard
a7e23d2722
Expose automatic theme switching in View → Themes submenu
...
Theme is now stored only with OakTextView (observed by OakDocumentView) and the “global” setting is stored in user defaults (not Global.tmProperties), though it is still possible to override theme on a file-by-file basis via .tm_properties files.
2020-05-14 15:43:24 +07:00
Allan Odgaard
ad1cc8abd8
Deliver all NSUserDefaultsDidChangeNotification in main queue
...
This is easier than ensuring that we do not update user defaults from a background thread.
2020-05-14 09:52:38 +07:00
Allan Odgaard
c939c53f34
Don’t let HTMLOutputWindowController handle toggleHTMLOutput:
...
Now that the window is a panel, we can rely on the main window to close the window on toggle, even with the HTML window having key.
2020-05-13 18:50:02 +07:00
Allan Odgaard
90a2517600
Allow opening “Find in Project” from pasteboard history chooser
...
This is triggered by holding option when selecting Find Next. Improving discoverability is work in progress.
2020-05-10 20:07:31 +07:00
Allan Odgaard
9bfae1aada
Use FFSearchTarget instead of find_tags enumeration
...
This avoids the need to map between the two enumeration constants, although we handle some of the constants before passing them to the find singleton, so the code has not yet been updated to remove the redundant mappings.
2020-05-10 20:07:31 +07:00
Allan Odgaard
6fde32efac
Move can_reach_host out of network framework
...
We only call this function from a single place, so no need to make it public API.
2020-05-04 19:20:04 +07:00
Allan Odgaard
e541250309
Add object type information when using OakHistoryList
2020-04-30 13:28:24 +07:00
Allan Odgaard
e4f61f12b7
Change a few leading spaces to tabs
2020-04-30 13:28:24 +07:00
Allan Odgaard
b514114ec7
Access most system singletons using dot syntax
...
These are identified by having a prefix of shared, default, or standard in the class method.
2020-04-23 12:25:11 +07:00
Allan Odgaard
814a3c78b4
Access sharedInstance using dot syntax
2020-04-23 12:25:11 +07:00
Allan Odgaard
715d023673
Declare “sharedInstance” as a class property
2020-04-23 12:25:11 +07:00
Allan Odgaard
d63f12993f
Use class properties for general, find, and replace pasteboard instances
2020-04-14 12:58:10 +07:00
Allan Odgaard
61ec959b37
Change data type of file browser state from dictionary to opaque object
...
This gives us more flexibility in how we wish to represent the state, although the state should be a property list object.
2020-04-14 12:58:10 +07:00
Allan Odgaard
4013020b14
Use dot syntax for NSNumber’s boolValue property
2020-04-14 12:58:10 +07:00
Allan Odgaard
6c692099ff
Change OakTabBarView to use tab item’s identifier in drag’n’drop API
...
This is instead of passing instances of the “internal” OakTabItem class.
2020-04-14 12:58:10 +07:00
Allan Odgaard
3cde965415
Make OakTabBarView’s selectedTabIndex a r/w property but no KVO support
...
The property returns NSNotFound when there is no selection. This seems to be consistent with NSArrayController’s selectionIndex (but inconsistent with many other views, like NSTableView, which return -1 when there is no selection).
2020-04-14 12:58:10 +07:00
Allan Odgaard
e3bd910e8c
Change type of tab identifier from NSString to NSUUID
...
While AppKit identifiers are generally strings, which have more flexibility, I think this is mainly because NSUUID was introduced later, and for tab items, identifiers must be unique, which is not enforced (or implied) when using strings.
2020-04-14 12:58:10 +07:00
Allan Odgaard
67694d1b5a
Use OakCreateNSBoxSeparator() in main (document) window
2020-04-14 12:58:10 +07:00
Allan Odgaard
d7ec9e6690
Use OakCreateNSBoxSeparator() for live search and grammar installation
...
This is instead of the more opaque OakCreateHorizontalLine(OakBackgroundFillViewStyleDivider).
2020-03-29 10:21:30 +07:00
Allan Odgaard
3428c5cdfb
Fix missing default folder location for new file browser windows
2020-03-20 15:06:23 +07:00
Allan Odgaard
66bfb817d6
Set NSWindowAnimationBehaviorDocumentWindow for our document window
2020-02-29 13:18:55 +07:00
Allan Odgaard
aff1273d53
Context menu items for tabs would be disabled in full screen mode
...
Apparently the window’s delegate is not used for context menu actions in full screen mode, although NSApp’s targetForAction: does find the receiver, so this appears to be a framework bug.
2019-10-27 15:20:14 +01:00
Allan Odgaard
079377ed49
Require macOS 10.12 and remove compatibility checks
2019-10-07 21:28:16 +02:00
Allan Odgaard
3c7895f578
Simplify code by using NSOffsetRect
2019-10-06 10:35:55 +02:00
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