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.
With switch to Sparkle 2, some things had to change in the codebase.
For the sake of simplicity, the feed URL and update interval has been relocated to the Info.plist. Sparkle now supports a beta channel in one feed so that will be used instead of setting the feed URL on each launch. Not setting this manually each launch does mean that beta updates do not receive a shortened update check interval. But that is not a big deal. Beta updates are far apart these days.
Sparkle 2 does not have a singleton either. I wasn't sure if I wanted to create my own or bind it to the master controller. I ended up doing the latter as it is not something that will need to be accessed with great frequency. Only by the Preferences dialog and the menu controller.
I was unsure about leaving it in the public header because why do plugins need access to it? In the end I placed it there because they could have always just accessed the singleton if they wanted to abuse it. Not having to import private header when we need to access it internally cuts down on cost.
I should add for anyone backreading this commit this was not political change. They deleted my decade old accounts and channels to start over. It was personal. I did not take that kind.
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.
When WebKit2 first announced, there was no way for an
app to take an NSMenu, modify it, and return the result
when a context menu is presented.
WebKit1 had a delegate method for that named:
-webView:contextMenuItemsForElement:defaultMenuItems:
WebKit2 added this delegate method, in private, but it
was not available until the next update of macOS.
'Til then, we had to fake "Inspect Element" because we
did not have access to the default implementation that
is available through the delegate method.
Apple now flags the function names that were used to do that.
This will break "Inspect Element" on one version of macOS.
Which one I don't even recall.
But it is worth it to make the review process smoother.
Only one menu item can have a keyboard shortcut which means because "Delete Channel" and "Close Query" are competiting for the same, there must be a way to determine which wins. Previous solution was to archive the keyboard shortcut set and restore it. This proved to be prone to failure. New solution is much simpler. We simply unassign the submenu when the parent menu is hidden so that the only time the keyboard shortcut is in the main menu is when it's the one we want to use.
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.
• 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.
Many resources have been added to Textual with little thought for long term maintenance. This commit is an overdue overhaul of the entire project. The goals of this overhaul was to introduce as much consistency as possible to the project.
Some notable changes:
• Code signing identity file has moved to "Configurations/Build"
• All build configuration files, including entitlements, moved to "Configurations"
• Source code for the app has moved to "Sources/App"
• Shared source code has moved to "Sources/Shared"
• Source code for extensions have moved to "Sources/Plugins"
• The project file for the app has moved along with its source code. It's recommended to use the Textual.xcworkspace workspace file.
• Build scripts are no longer packaged within the project files.
• Folders are now used throughout most projects instead of groups.
• Removed a lot of redundant framework linking.
• The preference panel sample plugin has been modified to use standard Cocoa facilities instead of those that are project specific. e.g. NSUserDefaults and NSLog() instead of TPCPreferencesUserDefaults and LogToConsole()