Commit Graph

854 Commits

Author SHA1 Message Date
Allan Odgaard
066acad708 Remove use of WATCH_LEAKS (C++) 2020-06-05 21:22:50 +07:00
Allan Odgaard
c93030b385 Remove all debug output from custom log macros
This provided value during early development, but has been unused for years, and it would generate too much noise if converted to os_log.

So better to just remove it all and add os_log statements as needed.
2020-06-05 21:22:50 +07:00
Allan Odgaard
5246f168a4 Call os_log_error if AESendMessage fails 2020-06-05 21:22:50 +07:00
Allan Odgaard
4ec10c0923 Don’t annotate types and classes with PUBLIC
This was required when we linked each framework as its own thing, which we do not do anymore, and if we do go back to this system, we can simply have symbols public by default.
2020-06-05 21:22:50 +07:00
Allan Odgaard
70988c684f Use a custom class for favorite items (instead of NSDictionary) 2020-06-03 21:25:36 +07:00
Allan Odgaard
3d721f908c Use ‘valueForKey:’ to get ‘path’ from items in didSelectFavorite:
This allows path to be either stored in a dictionary (as currently done) or be a getter method of a custom subclass.
2020-06-03 21:22:43 +07:00
Allan Odgaard
d500f6e53d Remove support for initial first responder in OakSetupKeyViewLoop 2020-05-25 12:47:47 +07:00
Allan Odgaard
58d1cce527 Do not rely on OakSetupKeyViewLoop to set initial first responder
We either set it explicitly or rely on automatic key view loop calculations.

As for the latter: When auto-layout was initially introduced, the automatic key view loop calculation broke, as it used the view frames before layout. It should have been fixed several OS versions ago though, so we can use it again, as long as we are not working with view-based table views.
2020-05-25 12:47:47 +07:00
Allan Odgaard
2c407be15b Obtain OS version via NSProcessInfo.processInfo.operatingSystemVersion
The oak::os_major, oak::os_minor, and oak::os_patch functions are wrapping deprecated API.
2020-05-22 21:48:09 +07:00
Allan Odgaard
3ea2cd2423 Use compile-time string concatenation instead of %s 2020-05-22 21:48:09 +07:00
Allan Odgaard
dce26956e7 Rename methods and constants to use software update in singular form
The program only checks for a single update.
2020-05-22 21:48:09 +07:00
Allan Odgaard
05cf51d42e Move software update signing key to Info.plist
This simplifies usage of the software update singleton and still allows to use it in other projects that have different signing key(s).
2020-05-22 21:48:09 +07:00
Allan Odgaard
733ab302e2 Change variable name: observerId → token
Several places already used ‘token’ as the name for the result from NSNotificationCenter’s addObserver:… so this change is to be consistent.

While ‘token’ is less meaningful than ‘observerId’, the variable is only used with NSNotificationCenter API where the context makes it clear.
2020-05-22 21:48:09 +07:00
Allan Odgaard
569dc9a198 Make token used in notification block weak as it retains the block
This is not made clear from the documentation, however, the documentation does state that the token will be strongly held by the notification center, until the notification is removed, therefore it is safe to only keep a weak reference to the token (even if the implementation should change).
2020-05-22 21:48:09 +07:00
Allan Odgaard
dcd630e649 Use constants for find panel and font manager tag values in main menu 2020-05-22 21:48:09 +07:00
Allan Odgaard
8200f445bc Use a dynamic name for the commit window’s service 2020-05-22 21:48:09 +07:00
Allan Odgaard
2e5d4d1d6b Checkin release notes for 2.0.15 2020-05-16 07:24:33 +07:00
Allan Odgaard
d04c76b15b QuickLook plug-in selects theme the same as TextMate (supporting auto) 2020-05-16 07:12:01 +07:00
Allan Odgaard
2134480791 Checkin release notes for 2.0.14 2020-05-14 20:48:49 +07:00
Ronald Wampler
dde90fe4f5 Fix crash in AboutWindowController when license owner is nil 2020-05-14 20:42:52 +07:00
Allan Odgaard
666d93db27 Checkin release notes for 2.0.13 2020-05-14 15:52:43 +07:00
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
8e6791324a Let app delegate handle workaround for “Move to Active Space” behavior
I don’t think the default behavior ever makes sense, so we are applying the change to all windows instead of handling it on a one-by-one basis.
2020-05-13 18:50:02 +07:00
Allan Odgaard
0e1c51c0bd Eliminate redundant content view in About window 2020-05-13 18:49:55 +07:00
Allan Odgaard
611431bd80 Use WKWebView in the about window
To get scroll content behind title/toolbar we need to set NSWindowStyleMaskFullSizeContentView which appears to have been inferred with the old (deprecated) WebView.
2020-05-13 18:49:55 +07:00
Allan Odgaard
16aa95a018 Use NSPanel for the about window
This is basically just so that we can close it with the escape key.
2020-05-13 18:49:55 +07:00
Allan Odgaard
2c04850b46 Use a Dark Mode media query for the About window’s CSS colors 2020-05-13 18:49:55 +07:00
Allan Odgaard
4af8f47cdc Checkin release notes for 2.0.12 2020-05-10 20:19:18 +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
d4b0b4b35e Remove MASPreferences submodule 2020-05-10 20:07:30 +07:00
Allan Odgaard
9103d32ed8 Don’t associate real name with public signing keys
They already have a unique identifier.
2020-05-10 20:07:30 +07:00
Allan Odgaard
caaa36161d Change most fprintf log statements to using os_log 2020-05-04 19:20:04 +07:00
Allan Odgaard
cafc884c61 Checkin release notes for 2.0.11 2020-04-30 14:03:54 +07:00
Allan Odgaard
9f822f6580 Remove handling of SIGUSR1 (would previously cause a relaunch) 2020-04-30 13:28:24 +07:00
Allan Odgaard
1b09d05221 mate: We no longer need to link with the ‘cf’ framework
This is since commit a31dd336b4.
2020-04-29 08:02:02 +07:00
Allan Odgaard
e6ceaf86b4 Rework code that checks if ⌘[ / ⌘] should be text or navigation actions
The property is renamed from ‘currentResponderIsOakTextView’ to the more appropriate ‘keyWindowHasBackAndForwardActions’.

Furthermore, the menu items are found via indexOfItemWithTarget:andAction: instead of by title, although the title of the submenus for these menu items is still hardcoded.
2020-04-28 12:35:43 +07:00
Allan Odgaard
02a6128571 Change check for when ⌘[ / ⌘] should be Shift Left/Right or Back/Forward
The problem is that if shiftLeft:/shiftRight: exist after goBack:/goForward: in the responder chain, we would prefer the former. This can happen because main window is after the key window in the responder chain, so if the former contains an OakTextView, a potential responder in the key window would never be found.
2020-04-28 09:52:10 +07:00
Allan Odgaard
d3a14a4012 Checkin release notes for 2.0.10 2020-04-23 22:48:14 +07:00
Allan Odgaard
6328ac68b5 Remove some migration code that should no longer be relevant 2020-04-23 12:25:11 +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
f66788f4a7 Use non-deprecated API to obtain socket from privileged launch daemon 2020-04-23 12:25:11 +07:00
Allan Odgaard
57d384ab66 Checkin release notes for 2.0.9 2020-04-22 22:33:29 +07:00
Allan Odgaard
f4c863c6aa Use a GCD source for observing sockets instead of CFSocket
This is motivated by having received several crash reports from CFSocketManager over the years, example crash log from TextMate 2.0.8:

    Thread 5 Crashed:: com.apple.CFSocket.private
    0  libsystem_kernel.dylib    os_fault_with_payload + 10
    1  libsystem_kernel.dylib    __darwin_check_fd_set_overflow.cold.1 + 31
    2  libsystem_kernel.dylib    __darwin_check_fd_set_overflow + 79
    3  com.apple.CoreFoundation  __CFSocketManager + 939
    4  libsystem_pthread.dylib   _pthread_start + 148
    5  libsystem_pthread.dylib   thread_start + 15
2020-04-22 22:28:55 +07:00
Allan Odgaard
a31dd336b4 Change away from deprecated API
Although one of the new API methods is deprecated starting with macOS 10.15, but that change is minor, and the replacement wasn’t introduced before macOS 10.15.
2020-04-21 15:05:50 +07:00
Allan Odgaard
b7c6720074 Don’t go through wrappers for unlink, copyfile, and access
The wrappers doesn’t add anything useful in this context.
2020-04-21 15:05:50 +07:00
Allan Odgaard
5bcb4ea4f9 Enable Objective-C for mate executable
This is so that we can move away from deprecated APIs.
2020-04-21 15:05:50 +07:00
Allan Odgaard
7ff507b90a Checkin release notes for 2.0.8 2020-04-19 16:38:10 +07:00