51 Commits
Author SHA1 Message Date
Michael fb98cbbfd3 Add apps settings to notification authorization 2025-04-05 13:20:10 -04:00
Michael bb20beef52 Request authorization for sending notifications 2025-04-05 13:12:05 -04:00
Michael 7f1899f5cf Correctly respond to HTTP status code 429 in license engine 2025-02-04 18:19:59 -05:00
Michael 004d5fd19b License manager authorization code
This is to remain an implementation secret so wont be documented
2025-01-27 20:08:47 -05:00
Michael e4bc0a1d06 Update online resource locations 2025-01-22 07:59:18 -05:00
Michael 05a996ebf1 Better handle rate limiting errors from codeux.com 2025-01-15 17:19:16 -05:00
Michael 1b0dcd0626 Remove unnecessary payload type declaration 2025-01-15 16:48:51 -05:00
Michael edff285907 Modify URL used for license manager 2024-09-08 19:26:43 -04:00
Michael 8e4b679f14 Update TODOs 2024-08-14 18:35:19 -04:00
Michael ded4d55608 Transition notification controller to UserNotification.framework 2024-07-11 07:34:47 -04:00
Michael a4ddfabb30 The name of this method changed in framework 2024-07-10 10:20:33 -04:00
Michael e94594ebc7 Refactor logging system to completely ditch wrapping os_log 2024-07-09 04:28:53 -04:00
Michael 5079ea81f5 Change level of logging
Info does not persist to disk. We are using it places we need it to.
2024-07-05 18:25:53 -04:00
Michael 8004a33e9d Only copy license data if it doesn't exist 2024-07-05 10:41:04 -04:00
Michael 7b72382948 Add migration logic to TLOLicenseManager for sandbox 2024-07-04 21:37:13 -04:00
Michael 5a528071ad Modernize codebase
- 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.
2024-06-30 02:44:47 -04:00
Michael 8d28e428f5 Fix many, many typos
Import external libraries with similar fixes as well
2024-06-21 20:42:32 -04:00
Michael 8cf80d4279 TLOFileLogger refactoring
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.
2024-06-16 19:33:12 -04:00
Michael 8852a47dab Little typos 2024-06-16 14:31:26 -04:00
Michael 857318a3be Use let instead of var 2024-06-14 21:21:00 -04:00
Michael 6f98a0fc62 Use URLs in place of strings when working with NSWorkspace
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.
2024-06-14 20:29:09 -04:00
Michael baf7406ee3 Remove references to Growl
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.
2024-06-13 20:30:01 -04:00
Michael 215d11d6be Replace references to deprecated state control code 2024-06-13 19:40:13 -04:00
Michael 09414216fd Declare variables as blocks
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.
2024-06-06 18:08:40 -04:00
Michael be983f4bc9 Correct typo in function 2024-06-06 18:07:07 -04:00
Michael fb43f57e00 Modify license manager to return enum instead of boolean
Use reserved for a later time
2024-06-06 18:06:54 -04:00
Michael 2ac04ceaf2 Retire receipt library that is no longer used 2021-07-02 07:28:25 -04:00
Michael 6521747a36 Minor formatting for readability 2021-06-18 07:16:56 -04:00
Jessica Clarke 39546ee4d4 Use NSInvocation rather than raw objc_msgSend calls
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.
2021-03-29 06:10:36 +01:00
Michael 9ac3f5025b Modify license system
• 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.
2021-02-18 08:21:17 -05:00
Michael fbaafc5d03 Refactor TLOLicenseManagerDownloader
Using goto in this class was proving problematic. It has been refactored to use helper block and better if statements to better handle API responses.
2020-11-14 17:13:42 -05:00
Michael e3f8f5b2ae Remove dead code 2020-10-28 21:53:33 -04:00
Michael 7a17baf4b1 Update license information/copyright year
Dates within source files were changed to reflect the last time the file was modified.
2020-10-28 18:15:42 -04:00
Michael 45fea6d693 Modernize Textual
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.
2020-10-15 11:20:09 -04:00
Michael 6604473c54 Disable receipt validation until I have time to investigate root issue. 2020-10-13 23:27:45 -04:00
Michael 666c95b48c Add extremely in-depth termination logging 2020-07-23 14:12:04 -04:00
Michael 81a44bdc97 Stop shipping with Growl support
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.
2020-02-20 01:13:28 -05:00
Michael 1a8728a7a6 Fix text field truncation causing crash
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.
2020-02-14 03:53:28 -05:00
Michael 785bd8b371 Improve Swift compatibility 2019-06-06 04:33:22 -04:00
Michael f30b2a5eb0 Add TVCMainWindowSelectionChangedNotification and use it in a few places 2018-09-12 12:26:06 -04:00
Michael a3a97942a1 Add support for color digits 16 through 98
The colors are available through the color panel that can be accessed by clicking "Other…" in color menu
2018-07-23 06:54:17 -04:00
Michael beade7b612 Move to current best practices for enums and constant strings.
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.
2018-07-17 22:08:20 -04:00
Michael 9f40734d3b Modify spell checker for main text field
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"
2018-07-13 10:13:01 -04:00
Michael 87812dbc0a Refactor localization system
• 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.
2018-07-12 07:22:40 -04:00
Michael eead92306d Do not cast to void
These values are all discardable and we don't warnings for this.
2018-07-10 02:26:07 -04:00
Michael a73008bef9 Make static analzyer happier
• 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.
2018-07-10 02:12:47 -04:00
Michael 96efb30258 Rename variables to match other implementation 2018-07-09 21:27:32 -04:00
Michael 373461423d Refactor IRC text formatting
• 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.
2018-07-09 21:24:19 -04:00
Michael 798a0633fa Update frameworks 2018-07-06 14:31:18 -04:00
Michael a4f200082a Small code formatting change 2018-07-05 15:35:12 -04:00