587 Commits

Author SHA1 Message Date
Allan Odgaard
7116dd777f Workaround for potential stall when calling mate with inactive TextMate
The issue appears to be that accessing the clipboard, as part of setting up a normal document window, will stall when trying to connect to the system’s clipboard server.

Here’s the relevant stack trace:

    -[OakPasteboard checkForExternalPasteboardChanges]
      -[NSPasteboard stringForType:]
        -[NSPasteboard _dataForType:securityScoped:]
          -[NSPasteboard _dataForType:index:usesPboardTypes:combinesItems:securityScoped:]
            -[NSPasteboard _dataWithoutConversionForTypeIdentifier:securityScoped:]
              CFPasteboardCopyData  (in CoreFoundation)
                ___onqueue_CFPasteboardRequestDataFromDaemon_block_invoke.341
                  usleep  (in libsystem_c.dylib)
                    nanosleep  (in libsystem_c.dylib)
                      __semwait_signal  (in libsystem_kernel.dylib)
2019-08-26 21:34:52 +02:00
Allan Odgaard
8f685ff25c Use std::clamp instead of oak::cap (C++17) 2019-08-01 10:23:55 +02:00
Allan Odgaard
acfee9901c Use ‘NSInteger’ for result of selectedRow (instead of legacy ‘int’ type) 2019-08-01 10:11:24 +02:00
Allan Odgaard
f47a7b5f53 Code to bump date in filename is no longer a testable separate function 2019-07-16 14:24:07 +02:00
Allan Odgaard
168915307d Assign small icon to sieve scripts (file browser etc.) 2019-07-13 08:23:06 +02:00
Allan Odgaard
8f3f3d9d16 Update deployment version for xibs to 10.12
This was done using search and replace. Presumably it should be done in Xcode so that it can adjust the xib for the new deployment target, otherwise what is the point of storing deployment version in the xib and provide it as a command line argument to the xib compiler as well (only to get a warning if the versions do not match)?
2019-07-07 18:03:30 +02: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
04c3ce2d73 Filter string was not cleared when closing pasteboard history
This was because our windowWillClose: delegate method was never called, as our object was no longer a window delegate, an issue introduced in 709570049f when the superclass was changed to NSWindowController and I erroneously assumed that the superclass would set itself as delegate.
2019-06-27 22:32:57 +02:00
Allan Odgaard
5aa58e5543 Do not include $APP_NAME in framework’s bundle identifier
Since we have multiple application targets, it doesn’t make sense with a global APP_NAME variable.

Though if building the frameworks as standalone bundles and embedding them in different applications, we may need some sort of unique component in the bundle identifier, but we currently do not do this (they are all statically linked, so the Info.plist is currently unused).
2019-06-26 23:32:54 +02:00
Allan Odgaard
da996b6542 Use “quote” include statements for framework’s own headers 2019-06-26 13:21:11 +02:00
DaeHyun Sung
66c96b8393 Fix typo in character set name: ‘Korean – {ISO-2022-JP → ISO-2022-KR}’ 2019-06-20 16:58:57 +02:00
Allan Odgaard
97fb1f07cd Only use checkbox convenience constructor on 10.14 or later
The button created on 10.12 or 10.13 has a “Button” label next to it when used in table views (as used in the Find in Project results and Commit sheet).
2019-02-13 18:57:44 +07:00
Ronald Wampler
e0ddc61794 OakSyntaxFormatter: Clean up font attributes
See https://lists.macromates.com/textmate/2019-January/040883.html.

The issue is caused by commit f850dbdbc7, which added support for font style changes. It did so by applying a single font across the entire string. But, in some cases not all characters (e.g., Chinese or Japanese characters) may be available for that font so these characters would not be rendered correctly while editing.
2019-02-13 18:47:54 +07:00
Allan Odgaard
8e2ccd0dff Convenience constructor for labels appear to not use controlTextColor
Issue: https://lists.macromates.com/textmate/2018-December/040853.html
2018-12-07 12:55:47 +07:00
Allan Odgaard
b8017b9f22 Do not set NSBackgroundStyleRaised for controls and text in status bars
It appears to be ignored on 10.14 but earlier versions of macOS rendered the elements with a shadow, which is probably not a good fit for our current design.
2018-12-06 22:00:22 +07:00
Allan Odgaard
5c2e646b3f Use fontAttributesInRange: instead of attributesAtIndex:effectiveRange:
Semantically this seems slightly more appropriate, and giving a range allows us to pass the strings length as the length of the range, instead of assuming that the string has a first character for which we can get attributes, although for an empty string, passing in a zero-length range *does* throw an exception, so we must only call this when we know the string is non-empty.
2018-12-05 21:16:54 +07:00
Allan Odgaard
fdc4dd3124 Do not request attributes for an empty NSAttributedString
This would throw an “out of bounds” exception.
2018-12-05 21:16:54 +07:00
Ronald Wampler
ca80254b80 Refactor finder tags to use catalog colors
Also, reworked the OFBFinderTagsChooser to have a similar look as on 10.14.
2018-12-05 21:16:54 +07:00
Allan Odgaard
f7eb32a83b New tool tip material was accidentally disabled in a previous commit
Commit in question: ae0fc82f87
2018-12-02 18:08:38 +07:00
Allan Odgaard
f850dbdbc7 Support font style changes in OakSyntaxFormatter 2018-11-22 16:38:23 +07:00
Allan Odgaard
4eafd59374 Let OakSyntaxFormatter use OakTheme
As the latter supports catalog colors, the styled string should automatically work in both light and dark mode.
2018-11-22 16:38:23 +07:00
Allan Odgaard
f244e223fd Rename a few menu items 2018-11-20 22:21:50 +07:00
Allan Odgaard
b6f9be7fae Introduce statusBarFontSize user defaults key and increase default size 2018-11-17 11:35:40 +07:00
Allan Odgaard
43c0352810 Move OakCreateStatusBarPopUpButton to OTVStatusBar.mm
No other status bar uses pop-up buttons and I don’t foresee them doing so.
2018-11-17 11:35:40 +07:00
Allan Odgaard
62e1c0e491 Use non-deprecated API to create property lists from data 2018-11-15 23:32:14 +07:00
Allan Odgaard
ae0fc82f87 fixup! Use NSVisualEffectMaterialToolTip for tool tips on 10.14 2018-11-15 23:02:30 +07:00
Allan Odgaard
1022be1548 Use NSButton/NSTextField convenience constructors on 10.12
The convenience constructors initializes several additional properties and should be future compatible.

It’s not ideal to have two code paths to construct the UI, but these helper functions should have stabilized by now and will soon be dropped, so this commit also serves to ensure that our UI works with the new convenience constructors.
2018-11-15 16:38:07 +07:00
Allan Odgaard
fe667ba01d Do not set button’s hugging priority in OakCreateButton
We generally do want buttons to hug their content, but as long as there is flexible space in the layout, they should act as desired, as the flexible will get the superfluousness width/height.

I checked several dialogs and found none that breaks with this change, presumably it was required for some layout that no longer exists.
2018-11-15 16:28:54 +07:00
Allan Odgaard
7d6b93c58f Remove unused functions 2018-11-15 16:06:49 +07:00
Allan Odgaard
17eb20d4bc Remove support for OakBackgroundFillViewStyleStatusBar 2018-11-15 12:58:06 +07:00
Allan Odgaard
af3e3fb0c3 Add margin around the “Show Hidden Files” checkbox in file open panel 2018-11-15 11:34:40 +07:00
Allan Odgaard
3c9d295017 Use a divider with a flat appearance
Closes #1425
2018-11-15 11:31:14 +07:00
Allan Odgaard
9d9d7707c9 Use NSVisualEffectMaterialToolTip for tool tips on 10.14
For Dark Mode we enable the text field’s bezel to match how native tool tips looks.
2018-11-08 23:13:33 +07:00
Allan Odgaard
f4f5177613 Use a CALayer for our zooming icon animation
This should ensure smooth animation even when the CPU load is high (which it often is when opening files).
2018-11-08 23:13:33 +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
5ac3a41d58 Update OakScopeBarView to new accessibility API (10.10) 2018-11-05 19:16:24 +07:00
Allan Odgaard
c5f1a6c098 NSVisualEffectBlendingModeWithinWindow requires a layer backed view 2018-11-02 20:52:02 +07:00
Allan Odgaard
74d77b9e59 Use NSBoxSeparator instead of configuring the border manually 2018-11-02 12:10:37 +07:00
Allan Odgaard
f3d8af5ca6 Use full size content view for pasteboard choosers 2018-11-02 08:40:39 +07:00
Allan Odgaard
14ae6019bf Update all instances of accessibilitySetOverrideValue:forAttribute: 2018-11-02 08:40:39 +07:00
Allan Odgaard
709570049f Make OakPasteboardChooser be an NSWindowController subclass 2018-11-02 08:30:55 +07:00
Ronald Wampler
3c56208329 Use dynamic colors for the background and text in OakKeyEquivalentView 2018-11-02 08:22:24 +07:00
Allan Odgaard
6419bec6ce Make the table view in pasteboard history a “full size content view”
This makes the content of the table view scroll behind the title bar and footer.
2018-11-01 18:21:47 +07:00
Allan Odgaard
dd41b992f7 Assume @available directive is available (Xcode 9) 2018-10-31 22:56:24 +07:00
Allan Odgaard
e8a3cb8f57 Do not use OakFileIconImage for menu items and recent projects
On macOS 10.14 this image doesn’t always render, so this is a temporary workaround.

The main advantage of using OakFileIconImage is the added SCM badge and custom icon for known file types.
2018-10-31 00:54:01 +07:00
Allan Odgaard
5933be295b Move search fields to title bar in pasteboard history dialogs
Also change divider colors to use standard separator color.
2018-10-31 00:28:49 +07:00
Allan Odgaard
ef7211a093 Use semantic colors for find dialog history pop-up list 2018-10-31 00:07:14 +07:00
Allan Odgaard
c50d92ba56 Set tool tip text color to black 2018-10-30 20:13:33 +07:00
Allan Odgaard
82de01589f Update deployment target of all xib files to 10.10 2018-10-30 13:46:34 +07:00
Allan Odgaard
e6ae59976b Remove most of our 10.10 compatibility checks 2018-10-30 12:31:51 +07:00