Implemented moot delegate methods and changed NSToolbar item implementation use slightly to get rid of console warnings regarding deprecations and other stuff.
Extracted bulk of migration logic out of TPCResourceManager into its own class named TPCSandboxMigration.
Some logic of the migration remained in a private category of TPCResourceManager as it makes sense given the methods are related to resources / file access.
The entire migration system has been modified to be completely modular. Everything relies on the unified `installation` argument to perform migration on any number of containers.
The container for Standard Release was renamed to conform to Apple's standards. No more warnings. The migrator includes an entry for migrating beta users which will be removed before this goes into stable.
This is a work in progress to move Standard Release and Debug build schemes to sandboxed environment.
To accomplish this, the group identifier has changed to com.codeux.apps.textual-common so that it does not clash with the bundle identifier of the app. Because of this change, all contents from the previous group container has to be migrated. TPCResourceManager has been extended to accomplish this.
TPCResourceManager will automatically copy files to the new group container then prompt the user asking if they want to delete the old. File migration is tuned so that failure to copy one file does not stop the entire operation.
It will also migrate preference keys.
TPCResourceManager will also be setup to migrate Mac App Store installations at a later date using nearly the same logic patterns. That is not implemented yet.
- 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.
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.
All Mojave appearances have been renamed to "CommonModern" and Mojave and Big Sur inherits from this as the changes that will be made for Big Sur will be minimal.
All member list logic inside IRCChannel has been abstracted away into IRCChannelMemberList.
IRCChannelMemberListController, which is an array controller, is now bound to the list in the main window to act as the data source.
The controller is weakly linked in IRCChannelMemberList when the channel is selected. This allows IRCChannelMemberList to maintain the UI in addition to its internal list.
The content of the controller shares 1:1 mutable array to IRCChannelMemberList's internal list. This simplifies modifications to the UI as we know with certainty that the index of the member in the internal list will be that of the member in the UI.
The methods declared by IRCChannel still exists, as a proxy, to an instance of IRCChannelMemberList strong referenced by the -memberInfo property of the channel.
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.