- Removed all deprecated Textual code. It is likely there are no plugins that were using this. The minimum plugin version will be bumped up just incase to force all plugins to be recompiled to load.
- Removed a bunch of macros and initialization check logic that was previously in place to protect against plugin developers trying to abuse the codebase. We need to stop caring about that because it just adds unnecessary overhead.
- Many initializers were cleaned up. -init is now expressly marked as unavailable and throws a proper exception where appropriate.
Do away with stupid way in which paths were computed using a hash and whatnot. Just store NSDate that file was opened and compare that to current day to determine if date changed. More documented in comments why I didn't use a notification.
This was done to resolve deprecation warnings. Textual still uses a lot of string paths internally. I do not see immediate concern to refactor all areas in which that is the case.
Growl has long been a retired feature of Textual. This commit just formalizes it by renaming certain uses of the former app.
Public APIs have shims in place and marked as deprecated. The likelihood of any plugin accessing these features pretty much zero. Better to be safe.
They are accessed within the context of a block after modification.
Without declaring these as such, their values are always nil in the context of the blocks because that is their value when the blocks are created.
On Intel-based Macs, objc_msgSend is variadic, as the variadic calling
convention in use matches the non-variadic one. On Arm-based Macs,
objc_msgSend is defined as void objc_msgSend(void), so any attempt to
pass arguments to it gives an error. If you want to call objc_msgSend on
Arm-based Macs you are thus required to cast a function pointer to the
desired type (and on Intel-based Macs this is the same as the variadic
calling convention). However, directly calling objc_mstSend still relies
on implementation details of the Objective-C runtime which, whilst true,
is unnecessary, so instead use the higher-level NSInvocation, even if it
is a little verbose.
• Explicitly call completion block for all success cases to avoid burden of confusing conditions.
• Pass boolean success status to completion block. Forgot that in last refactoring.
Notable changes:
Notable changes (incomplete):
• Changed all projects minimum target to OS X 10.12
• All xib files and custom view source files have been modified to use auto layout, NSGridView, NSStackView, and other modern features wherever possible. Hacks such as specifying heights, offsets, etc. for multiple appearances spanning multiple operating systems are no longer needed because auto layout and related systems are solid back to our target.
• In response to system-wide changes made in macOS Big Sur the width of the Preferences window has been expanded to a minimum 670.
• Deprecated Cocoa APIs have been replaced with their modern equivalents.
• The System Profiler plugin has been modified to simplify the process of requesting model information from Apple. The previous class (TPISystemProfilerModelIDRequestController), now named TPISystemProfilerModelRequest, at one time used XML parser to retrieve value of a single element. This made maintainability difficult. It now uses a simple regular expression.
• Optional extensions (Blowfish Encryption, Caffeine, and Wiki Style Link Parser) had their versions bumped and repackaged into installer. Their xib files were modified to accommodate the new width of Preferences.
• The Blowfish Encryption extension has been updated to libressl 3.1.4.
• All code related to the never completed "Buddy List" dialog has been stripped. There is no interest in continuing development of it.
All code related to Growl is no longer shipped by default through the use of the TEXTUAL_BUILT_WITH_GROWL_SDK_ENABLED macro. This macro can be set to the value "1" to enable the code.
Growl.framework was built against the 10.8 SDK which is not compatible with a hardened runtime. I do not have the time or resources to research alternate solutions at this time, but hope another person may in my stead.
I do not know what I did at the time but switching to using -enumerateAttributesInRange:options:usingBlock: to perform truncation was an absolute mad idea because we need to be able to recalculate the segment range on the fly using the composed character length. This commit reverts to manually calculating segment ranges.
For enums, place case at end instead of in middle. For example: IRCClientConnectNormalMode turns into IRCClientConnectModeNormal
For constant strings, when appropriate, use an extensible string enum. Either one of those from Foundation (NSNotificationName, NSErrorDomain) or typedef our own.
The main text field now exposes -resetSpellingIgnores in its private header which resets its ignored words list to self.defaultSpellingIgnores.
self.defaultSpellingIgnores returns contents from StaticStore.plist.
Current ignores:
"deop" so it stops auto correcting to "/cs drop"
• Added TLOLocalization.swift which is a Swift implementation of the localization system. TXTLS() and its sister functions are bridged to this implementation.
• The TLOLanguagePreferences class no longer exists. This class was used only as a convenience to TXTLS() and its sister functions. I don't know of any and/or why a plugin may access these, so they were not deprecated.
• The TLOLanguagePreferences files have been renamed to TLOLocalization as the latter better suites its purpose.
• In cases where we know for sure that nullability warning is ignorable, cast to non-null.
• Added TXLocalizationNotNeeded() which inlines a string to represent it as localized even though it's not in reality.
• Nullability is now specified for some methods that can in fact return nil but were previously not annotated as such.
• IRCTextFormatterEffect is a brand new class which acts as a container for a single effect. Given an effect type and appropriate value, it is intelligent enough to properly parse the value into a string, assign a control character, and determine the number of bytes needed to append the effect to a string. It exposes two methods which can be used to append opening and closing to a mutable string.
• IRCTextFormatterEffects is a brand new class which acts as a container for all IRCTextFormatterEffect objects within a specific attributed string. It takes a dictionary of attributes as an input and spits out a new instance of self. Similar to IRCTextFormatterEffect, it exposes two methods which can be used to append opening and closing to a mutable string for all effects it contains.
• Almost the entire logic of the logic for truncating formatted text has been rewritten to be much more reliable and sensible. Constants have been changed to values that are much more appropriate for their purposes instead of just using numbers pulled out of thin air.
• Methods for formatting strings now takes a string channel name instead of IRCChannel so that even if the channel doesn't exist yet, we can still properly truncate.
• Methods for formatting strings have been renamed because I like the new names more. No other reason.