mirror of
https://github.com/Codeux-Software/Textual.git
synced 2026-06-16 13:24:32 +00:00
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.
This commit is contained in:
Submodule Frameworks/Cocoa Extensions updated: 093c63fbc0...8f1d9801e5
@@ -114,35 +114,35 @@ NSString * const TXSystemAppearanceChangedNotification = @"TXSystemAppearanceCha
|
||||
+ (nullable NSString *)appearanceNameForType:(TXAppearanceType)type
|
||||
{
|
||||
switch (type) {
|
||||
case TXAppearanceMavericksAquaLightType:
|
||||
case TXAppearanceTypeMavericksAquaLight:
|
||||
{
|
||||
return @"MavericksLightAqua";
|
||||
}
|
||||
case TXAppearanceMavericksAquaDarkType:
|
||||
case TXAppearanceTypeMavericksAquaDark:
|
||||
{
|
||||
return @"MavericksDarkAqua";
|
||||
}
|
||||
case TXAppearanceMavericksGraphiteLightType:
|
||||
case TXAppearanceTypeMavericksGraphiteLight:
|
||||
{
|
||||
return @"MavericksLightGraphite";
|
||||
}
|
||||
case TXAppearanceMavericksGraphiteDarkType:
|
||||
case TXAppearanceTypeMavericksGraphiteDark:
|
||||
{
|
||||
return @"MavericksDarkGraphite";
|
||||
}
|
||||
case TXAppearanceYosemiteLightType:
|
||||
case TXAppearanceTypeYosemiteLight:
|
||||
{
|
||||
return @"YosemiteLight";
|
||||
}
|
||||
case TXAppearanceYosemiteDarkType:
|
||||
case TXAppearanceTypeYosemiteDark:
|
||||
{
|
||||
return @"YosemiteDark";
|
||||
}
|
||||
case TXAppearanceMojaveLightType:
|
||||
case TXAppearanceTypeMojaveLight:
|
||||
{
|
||||
return @"MojaveLight";
|
||||
}
|
||||
case TXAppearanceMojaveDarkType:
|
||||
case TXAppearanceTypeMojaveDark:
|
||||
{
|
||||
return @"MojaveDark";
|
||||
}
|
||||
@@ -201,11 +201,11 @@ NSString * const TXSystemAppearanceChangedNotification = @"TXSystemAppearanceCha
|
||||
BOOL isAppearanceDark = NO;
|
||||
BOOL isAppearanceModern = YES; // good default
|
||||
|
||||
TXPreferredAppearanceType preferredAppearance = [TPCPreferences appearance];
|
||||
TXPreferredAppearance preferredAppearance = [TPCPreferences appearance];
|
||||
|
||||
/* Determine user's preference */
|
||||
switch (preferredAppearance) {
|
||||
case TXPreferredAppearanceInheritedType:
|
||||
case TXPreferredAppearanceInherited:
|
||||
{
|
||||
if (onMojave)
|
||||
{
|
||||
@@ -217,7 +217,7 @@ NSString * const TXSystemAppearanceChangedNotification = @"TXSystemAppearanceCha
|
||||
|
||||
break;
|
||||
}
|
||||
case TXPreferredAppearanceDarkType:
|
||||
case TXPreferredAppearanceDark:
|
||||
{
|
||||
isAppearanceDark = YES;
|
||||
|
||||
@@ -235,9 +235,9 @@ NSString * const TXSystemAppearanceChangedNotification = @"TXSystemAppearanceCha
|
||||
if (onMojave)
|
||||
{
|
||||
if (isAppearanceDark) {
|
||||
appearanceType = TXAppearanceMojaveDarkType;
|
||||
appearanceType = TXAppearanceTypeMojaveDark;
|
||||
} else {
|
||||
appearanceType = TXAppearanceMojaveLightType;
|
||||
appearanceType = TXAppearanceTypeMojaveLight;
|
||||
} // isAppearanceDark
|
||||
|
||||
/* On Mojave, if the user doesn't select a specific appearance,
|
||||
@@ -247,16 +247,16 @@ NSString * const TXSystemAppearanceChangedNotification = @"TXSystemAppearanceCha
|
||||
visual effect views have correct inheritance as of Mojave
|
||||
which means they don't need to set the object on individual
|
||||
views, unlike earlier versions of macOS. */
|
||||
if (preferredAppearance != TXPreferredAppearanceInheritedType) {
|
||||
if (preferredAppearance != TXPreferredAppearanceInherited) {
|
||||
appKitAppearanceTarget = TXAppKitAppearanceTargetWindow;
|
||||
}
|
||||
}
|
||||
else if (onYosemite)
|
||||
{
|
||||
if (isAppearanceDark) {
|
||||
appearanceType = TXAppearanceYosemiteDarkType;
|
||||
appearanceType = TXAppearanceTypeYosemiteDark;
|
||||
} else {
|
||||
appearanceType = TXAppearanceYosemiteLightType;
|
||||
appearanceType = TXAppearanceTypeYosemiteLight;
|
||||
} // isAppearanceDark
|
||||
|
||||
/* On Yosemite through to High Sierra, we set the NSAppearance
|
||||
@@ -270,15 +270,15 @@ NSString * const TXSystemAppearanceChangedNotification = @"TXSystemAppearanceCha
|
||||
|
||||
if ([NSColor currentControlTint] == NSGraphiteControlTint) {
|
||||
if (isAppearanceDark) {
|
||||
appearanceType = TXAppearanceMavericksGraphiteDarkType;
|
||||
appearanceType = TXAppearanceTypeMavericksGraphiteDark;
|
||||
} else {
|
||||
appearanceType = TXAppearanceMavericksGraphiteLightType;
|
||||
appearanceType = TXAppearanceTypeMavericksGraphiteLight;
|
||||
} // isAppearanceDark
|
||||
} else {
|
||||
if (isAppearanceDark) {
|
||||
appearanceType = TXAppearanceMavericksAquaDarkType;
|
||||
appearanceType = TXAppearanceTypeMavericksAquaDark;
|
||||
} else {
|
||||
appearanceType = TXAppearanceMavericksAquaLightType;
|
||||
appearanceType = TXAppearanceTypeMavericksAquaLight;
|
||||
} // isAppearanceDark
|
||||
} // Graphite
|
||||
|
||||
|
||||
@@ -421,7 +421,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
{
|
||||
TXCommandWKeyAction keyAction = [TPCPreferences commandWKeyAction];
|
||||
|
||||
if (keyAction == TXCommandWKeyCloseWindowAction || mainWindow().keyWindow == NO) {
|
||||
if (keyAction == TXCommandWKeyActionCloseWindow || mainWindow().keyWindow == NO) {
|
||||
menuItem.title = TXTLS(@"BasicLanguage[1f6-bg]");
|
||||
|
||||
return YES;
|
||||
@@ -432,7 +432,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
switch (keyAction) {
|
||||
case TXCommandWKeyPartChannelAction:
|
||||
case TXCommandWKeyActionPartChannel:
|
||||
{
|
||||
if (c == nil) {
|
||||
menuItem.title = TXTLS(@"BasicLanguage[1f6-bg]");
|
||||
@@ -454,7 +454,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
break;
|
||||
}
|
||||
case TXCommandWKeyDisconnectAction:
|
||||
case TXCommandWKeyActionDisconnect:
|
||||
{
|
||||
menuItem.title = TXTLS(@"BasicLanguage[w3a-je]", u.networkNameAlt);
|
||||
|
||||
@@ -464,7 +464,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
break;
|
||||
}
|
||||
case TXCommandWKeyTerminateAction:
|
||||
case TXCommandWKeyActionTerminate:
|
||||
{
|
||||
menuItem.title = TXTLS(@"BasicLanguage[x97-ro]");
|
||||
|
||||
@@ -680,19 +680,19 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
case MTMMChannelListOfBanExceptions: // "List of Ban Exceptions"
|
||||
{
|
||||
menuItem.hidden = ([u.supportInfo isListSupported:IRCISupportInfoBanExceptionListType] == NO);
|
||||
menuItem.hidden = ([u.supportInfo isListSupported:IRCISupportInfoListTypeBanException] == NO);
|
||||
|
||||
return (u.isLoggedIn && c.isActive);
|
||||
}
|
||||
case MTMMChannelListOfInviteExceptions: // "List of Invite Exceptions"
|
||||
{
|
||||
menuItem.hidden = ([u.supportInfo isListSupported:IRCISupportInfoInviteExceptionListType] == NO);
|
||||
menuItem.hidden = ([u.supportInfo isListSupported:IRCISupportInfoListTypeInviteException] == NO);
|
||||
|
||||
return (u.isLoggedIn && c.isActive);
|
||||
}
|
||||
case MTMMChannelListOfQuiets: // "List of Quiets"
|
||||
{
|
||||
menuItem.hidden = ([u.supportInfo isListSupported:IRCISupportInfoQuietListType] == NO);
|
||||
menuItem.hidden = ([u.supportInfo isListSupported:IRCISupportInfoListTypeQuiet] == NO);
|
||||
|
||||
return (u.isLoggedIn && c.isActive);
|
||||
}
|
||||
@@ -918,9 +918,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
IRCUserRank userRanks = user.ranks;
|
||||
|
||||
BOOL UserHasModeO = ((userRanks & IRCUserNormalOperatorRank) == IRCUserNormalOperatorRank);
|
||||
BOOL UserHasModeO = ((userRanks & IRCUserRankNonermalOperator) == IRCUserRankNonermalOperator);
|
||||
BOOL UserHasModeH = NO;
|
||||
BOOL UserHasModeV = ((userRanks & IRCUserVoicedRank) == IRCUserVoicedRank);
|
||||
BOOL UserHasModeV = ((userRanks & IRCUserRankVoiced) == IRCUserRankVoiced);
|
||||
|
||||
_setHidden(MTUserControlsGiveOp, UserHasModeO);
|
||||
_setHidden(MTUserControlsGiveVoice, UserHasModeV);
|
||||
@@ -933,7 +933,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
_setHidden(MTUserControlsGiveHalfop, YES);
|
||||
_setHidden(MTUserControlsTakeHalfop, YES);
|
||||
} else {
|
||||
UserHasModeH = ((userRanks & IRCUserHalfOperatorRank) == IRCUserHalfOperatorRank);
|
||||
UserHasModeH = ((userRanks & IRCUserRankHalfOperator) == IRCUserRankHalfOperator);
|
||||
|
||||
_setHidden(MTUserControlsGiveHalfop, UserHasModeH);
|
||||
_setHidden(MTUserControlsTakeHalfop, (UserHasModeH == NO));
|
||||
@@ -1318,7 +1318,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NSString *resultString = nil;
|
||||
|
||||
TVCAlertResponse response =
|
||||
TVCAlertResponseButton response =
|
||||
[TDCInputPrompt promptWithMessage:TXTLS(@"Prompts[d2w-4o]")
|
||||
title:TXTLS(@"Prompts[akr-eh]")
|
||||
defaultButton:TXTLS(@"Prompts[q5h-xx]")
|
||||
@@ -1326,7 +1326,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
prefillString:self.currentSearchPhrase
|
||||
resultString:&resultString];
|
||||
|
||||
if (response == TVCAlertResponseFirstButton) {
|
||||
if (response == TVCAlertResponseButtonFirst) {
|
||||
promptCompletionBlock(resultString);
|
||||
}
|
||||
}
|
||||
@@ -1561,7 +1561,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
return;
|
||||
}
|
||||
|
||||
[u connect:IRCClientConnectNormalMode bypassProxy:YES];
|
||||
[u connect:IRCClientConnectModeNormal bypassProxy:YES];
|
||||
|
||||
[mainWindow() expandClient:u];
|
||||
}
|
||||
@@ -1612,7 +1612,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
sheet.window = mainWindow();
|
||||
|
||||
[sheet startWithSelection:TDCServerPropertiesSheetDefaultSelection context:nil];
|
||||
[sheet startWithSelection:TDCServerPropertiesSheetSelectionDefault context:nil];
|
||||
|
||||
[windowController() addWindowToWindowList:sheet];
|
||||
}
|
||||
@@ -1908,11 +1908,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
the address book instead of a specific ignore. */
|
||||
if (userIgnores.count == 1) {
|
||||
[self showServerPropertiesSheetForClient:u
|
||||
withSelection:TDCServerPropertiesSheetNewIgnoreEntrySelection
|
||||
withSelection:TDCServerPropertiesSheetSelectionNewIgnoreEntry
|
||||
context:userIgnores[0]];
|
||||
} else {
|
||||
[self showServerPropertiesSheetForClient:u
|
||||
withSelection:TDCServerPropertiesSheetAddressBookSelection
|
||||
withSelection:TDCServerPropertiesSheetSelectionAddressBook
|
||||
context:nil];
|
||||
}
|
||||
}
|
||||
@@ -1930,11 +1930,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
TXUserDoubleClickAction action = [TPCPreferences userDoubleClickOption];
|
||||
|
||||
if (action == TXUserDoubleClickWhoisAction) {
|
||||
if (action == TXUserDoubleClickActionWhois) {
|
||||
[self whoisSelectedMembers:sender];
|
||||
} else if (action == TXUserDoubleClickPrivateMessageAction) {
|
||||
} else if (action == TXUserDoubleClickActionPrivateMessage) {
|
||||
[self memberStartPrivateMessage:sender];
|
||||
} else if (action == TXUserDoubleClickInsertTextFieldAction) {
|
||||
} else if (action == TXUserDoubleClickActionInsertTextField) {
|
||||
[self memberInsertNameIntoTextField:sender];
|
||||
}
|
||||
}
|
||||
@@ -1943,11 +1943,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
{
|
||||
TXUserDoubleClickAction action = [TPCPreferences userDoubleClickOption];
|
||||
|
||||
if (action == TXUserDoubleClickWhoisAction) {
|
||||
if (action == TXUserDoubleClickActionWhois) {
|
||||
[self whoisSelectedMembers:sender];
|
||||
} else if (action == TXUserDoubleClickPrivateMessageAction) {
|
||||
} else if (action == TXUserDoubleClickActionPrivateMessage) {
|
||||
[self memberStartPrivateMessage:sender];
|
||||
} else if (action == TXUserDoubleClickInsertTextFieldAction) {
|
||||
} else if (action == TXUserDoubleClickActionInsertTextField) {
|
||||
[self memberInsertNameIntoTextField:sender];
|
||||
}
|
||||
}
|
||||
@@ -2331,7 +2331,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NSString *vhost = nil;
|
||||
|
||||
TVCAlertResponse response =
|
||||
TVCAlertResponseButton response =
|
||||
[TDCInputPrompt promptWithMessage:TXTLS(@"Prompts[2mx-jf]")
|
||||
title:TXTLS(@"Prompts[7gr-e4]")
|
||||
defaultButton:TXTLS(@"Prompts[c7s-dq]")
|
||||
@@ -2339,7 +2339,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
prefillString:nil
|
||||
resultString:&vhost];
|
||||
|
||||
if (response == TVCAlertResponseFirstButton) {
|
||||
if (response == TVCAlertResponseButtonFirst) {
|
||||
promptCompletionBlock(vhost);
|
||||
}
|
||||
}
|
||||
@@ -2680,7 +2680,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
{
|
||||
TXCommandWKeyAction keyAction = [TPCPreferences commandWKeyAction];
|
||||
|
||||
if (keyAction == TXCommandWKeyCloseWindowAction || mainWindow().keyWindow == NO) {
|
||||
if (keyAction == TXCommandWKeyActionCloseWindow || mainWindow().keyWindow == NO) {
|
||||
NSWindow *windowToClose = [NSApp keyWindow];
|
||||
|
||||
if (windowToClose == nil) {
|
||||
@@ -2702,7 +2702,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
switch (keyAction) {
|
||||
case TXCommandWKeyPartChannelAction:
|
||||
case TXCommandWKeyActionPartChannel:
|
||||
{
|
||||
if (c == nil) {
|
||||
return;
|
||||
@@ -2720,7 +2720,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
break;
|
||||
}
|
||||
case TXCommandWKeyDisconnectAction:
|
||||
case TXCommandWKeyActionDisconnect:
|
||||
{
|
||||
if (u.isConnecting == NO && u.isConnected == NO) {
|
||||
return;
|
||||
@@ -2730,7 +2730,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
break;
|
||||
}
|
||||
case TXCommandWKeyTerminateAction:
|
||||
case TXCommandWKeyActionTerminate:
|
||||
{
|
||||
[NSApp terminate:sender];
|
||||
|
||||
@@ -2934,37 +2934,37 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (void)resetMainWindowAppearance:(id)sender
|
||||
{
|
||||
[TPCPreferences setAppearance:TXPreferredAppearanceInheritedType];
|
||||
[TPCPreferences setAppearance:TXPreferredAppearanceInherited];
|
||||
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadAppearanceAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionAppearance];
|
||||
}
|
||||
|
||||
- (void)toggleMainWindowAppearance:(id)sender
|
||||
{
|
||||
TXPreferredAppearanceType appearance = [TPCPreferences appearance];
|
||||
TXPreferredAppearance appearance = [TPCPreferences appearance];
|
||||
|
||||
switch (appearance) {
|
||||
case TXPreferredAppearanceInheritedType:
|
||||
case TXPreferredAppearanceInherited:
|
||||
{
|
||||
TXAppearance *appAppearance = [TXSharedApplication sharedAppearance];
|
||||
|
||||
if (appAppearance.properties.isDarkAppearance == NO) {
|
||||
appearance = TXPreferredAppearanceDarkType;
|
||||
appearance = TXPreferredAppearanceDark;
|
||||
} else {
|
||||
appearance = TXPreferredAppearanceLightType;
|
||||
appearance = TXPreferredAppearanceLight;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case TXPreferredAppearanceLightType:
|
||||
case TXPreferredAppearanceLight:
|
||||
{
|
||||
appearance = TXPreferredAppearanceDarkType;
|
||||
appearance = TXPreferredAppearanceDark;
|
||||
|
||||
break;
|
||||
}
|
||||
case TXPreferredAppearanceDarkType:
|
||||
case TXPreferredAppearanceDark:
|
||||
{
|
||||
appearance = TXPreferredAppearanceLightType;
|
||||
appearance = TXPreferredAppearanceLight;
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -2972,7 +2972,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
[TPCPreferences setAppearance:appearance];
|
||||
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadAppearanceAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionAppearance];
|
||||
}
|
||||
|
||||
- (void)toggleServerListVisibility:(id)sender
|
||||
@@ -3065,7 +3065,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
{
|
||||
[TPCPreferences setDeveloperModeEnabled:([TPCPreferences developerModeEnabled] == NO)];
|
||||
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadIRCCommandCacheAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionIRCCommandCache];
|
||||
}
|
||||
|
||||
- (void)resetDoNotAskMePopupWarnings:(id)sender
|
||||
@@ -3465,7 +3465,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
[self showServerPropertiesSheetForClient:u
|
||||
withSelection:TDCServerPropertiesSheetAddressBookSelection
|
||||
withSelection:TDCServerPropertiesSheetSelectionAddressBook
|
||||
context:nil];
|
||||
}
|
||||
|
||||
@@ -3558,7 +3558,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#pragma mark -
|
||||
#pragma mark Server Properties Sheet
|
||||
|
||||
- (void)showServerPropertiesSheetForClient:(IRCClient *)client withSelection:(TDCServerPropertiesSheetNavigationSelection)selection context:(nullable id)context
|
||||
- (void)showServerPropertiesSheetForClient:(IRCClient *)client withSelection:(TDCServerPropertiesSheetSelection)selection context:(nullable id)context
|
||||
{
|
||||
NSParameterAssert(client != nil);
|
||||
|
||||
@@ -3584,7 +3584,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
[self showServerPropertiesSheetForClient:u
|
||||
withSelection:TDCServerPropertiesSheetDefaultSelection
|
||||
withSelection:TDCServerPropertiesSheetSelectionDefault
|
||||
context:nil];
|
||||
}
|
||||
|
||||
@@ -3869,20 +3869,20 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (void)showPreferencesWindow:(id)sender
|
||||
{
|
||||
[self showPreferencesWindowWithSelection:TDCPreferencesControllerDefaultNavigationSelection];
|
||||
[self showPreferencesWindowWithSelection:TDCPreferencesControllerSelectionDefault];
|
||||
}
|
||||
|
||||
- (void)showStylePreferences:(id)sender
|
||||
{
|
||||
[self showPreferencesWindowWithSelection:TDCPreferencesControllerStyleNavigationSelection];
|
||||
[self showPreferencesWindowWithSelection:TDCPreferencesControllerSelectionStyle];
|
||||
}
|
||||
|
||||
- (void)showHiddenPreferences:(id)sender
|
||||
{
|
||||
[self showPreferencesWindowWithSelection:TDCPreferencesControllerHiddenPreferencesNavigationSelection];
|
||||
[self showPreferencesWindowWithSelection:TDCPreferencesControllerSelectionHiddenPreferences];
|
||||
}
|
||||
|
||||
- (void)showPreferencesWindowWithSelection:(TDCPreferencesControllerNavigationSelection)selection
|
||||
- (void)showPreferencesWindowWithSelection:(TDCPreferencesControllerSelection)selection
|
||||
{
|
||||
TDCPreferencesController *openWindow = [windowController() windowFromWindowList:@"TDCPreferencesController"];
|
||||
|
||||
@@ -3904,8 +3904,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (void)preferencesDialogWillClose:(TDCPreferencesController *)sender
|
||||
{
|
||||
[TPCPreferences performReloadAction:(TPCPreferencesReloadHighlightKeywordsAction |
|
||||
TPCPreferencesReloadPreferencesChangedAction)];
|
||||
[TPCPreferences performReloadAction:(TPCPreferencesReloadActionHighlightKeywords |
|
||||
TPCPreferencesReloadActionPreferencesChanged)];
|
||||
|
||||
[windowController() removeWindowFromWindowList:sender];
|
||||
}
|
||||
|
||||
@@ -83,19 +83,19 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
NSString *imageName = nil;
|
||||
|
||||
switch (objectValue.availability) {
|
||||
case IRCAddressBookUserTrackingIsAvailalbeStatus:
|
||||
case IRCAddressBookUserTrackingStatusAvailalbe:
|
||||
{
|
||||
imageName = @"NSStatusAvailable";
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCAddressBookUserTrackingIsNotAvailalbeStatus:
|
||||
case IRCAddressBookUserTrackingStatusNotAvailalbe:
|
||||
{
|
||||
imageName = @"NSStatusUnavailable";
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCAddressBookUserTrackingIsAwayStatus:
|
||||
case IRCAddressBookUserTrackingStatusAway:
|
||||
{
|
||||
imageName = @"NSStatusPartiallyAvailable";
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, weak, readwrite) IBOutlet TVCBasicTableView *fileTransferTable;
|
||||
@property (nonatomic, strong) IBOutlet NSArrayController *fileTransfersController;
|
||||
@property (nonatomic, strong, nullable) TLOInternetAddressLookup *IPAddressRequest;
|
||||
@property (readonly) TDCFileTransferDialogNavigationSelectedTab navigationSelection;
|
||||
@property (readonly) TDCFileTransferDialogSelection navigationSelection;
|
||||
@property (nonatomic, strong) TLOTimer *maintenanceTimer;
|
||||
@property (nonatomic, copy, nullable) NSURL *downloadDestinationURLPrivate;
|
||||
|
||||
@@ -229,7 +229,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NSString *savePath = self.downloadDestinationURLPrivate.path;
|
||||
|
||||
if ([TPCPreferences fileTransferRequestReplyAction] == TXFileTransferRequestReplyAutomaticallyDownloadAction) {
|
||||
if ([TPCPreferences fileTransferRequestReplyAction] == TXFileTransferRequestReplyAutomaticallyDownload) {
|
||||
if (savePath == nil) {
|
||||
savePath = [TPCPathInfo userDownloads];
|
||||
}
|
||||
@@ -326,8 +326,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
for (TDCFileTransferDialogTransferController *fileTransfer in selectedFileTransfers) {
|
||||
TDCFileTransferDialogTransferStatus transferStatus = fileTransfer.transferStatus;
|
||||
|
||||
if (transferStatus == TDCFileTransferDialogTransferStoppedStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferRecoverableErrorStatus)
|
||||
if (transferStatus == TDCFileTransferDialogTransferStatusStopped ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusRecoverableError)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
@@ -340,15 +340,15 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
for (TDCFileTransferDialogTransferController *fileTransfer in selectedFileTransfers) {
|
||||
TDCFileTransferDialogTransferStatus transferStatus = fileTransfer.transferStatus;
|
||||
|
||||
if (transferStatus == TDCFileTransferDialogTransferConnectingStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferReceivingStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferIsListeningAsSenderStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferIsListeningAsReceiverStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferSendingStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferMappingListeningPortStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferWaitingForLocalIPAddressStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferWaitingForReceiverToAcceptStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferWaitingForResumeAcceptStatus)
|
||||
if (transferStatus == TDCFileTransferDialogTransferStatusConnecting ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusReceiving ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusIsListeningAsSender ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusIsListeningAsReceiver ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusSending ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusMappingListeningPort ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusWaitingForLocalIPAddress ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusWaitingForReceiverToAccept ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusWaitingForResumeAccept)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
@@ -369,7 +369,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
continue;
|
||||
}
|
||||
|
||||
if (transferStatus == TDCFileTransferDialogTransferCompleteStatus) {
|
||||
if (transferStatus == TDCFileTransferDialogTransferStatusComplete) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
@@ -385,7 +385,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
continue;
|
||||
}
|
||||
|
||||
if (transferStatus == TDCFileTransferDialogTransferCompleteStatus) {
|
||||
if (transferStatus == TDCFileTransferDialogTransferStatusComplete) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
@@ -418,8 +418,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
[self enumerateSelectedFileTransfers:^(TDCFileTransferDialogTransferController *fileTransfer, NSUInteger index, BOOL *stop) {
|
||||
TDCFileTransferDialogTransferStatus transferStatus = fileTransfer.transferStatus;
|
||||
|
||||
if (transferStatus != TDCFileTransferDialogTransferStoppedStatus &&
|
||||
transferStatus != TDCFileTransferDialogTransferRecoverableErrorStatus)
|
||||
if (transferStatus != TDCFileTransferDialogTransferStatusStopped &&
|
||||
transferStatus != TDCFileTransferDialogTransferStatusRecoverableError)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -571,7 +571,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (nullable NSString *)IPAddress
|
||||
{
|
||||
if ([TPCPreferences fileTransferIPAddressDetectionMethod] == TXFileTransferIPAddressManualDetectionMethod) {
|
||||
if ([TPCPreferences fileTransferIPAddressDetectionMethod] == TXFileTransferIPAddressMethodManual) {
|
||||
NSString *userAddress = [TPCPreferences fileTransferManuallyEnteredIPAddress];
|
||||
|
||||
if (userAddress.length == 0) {
|
||||
@@ -610,7 +610,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
self.IPAddress = address;
|
||||
|
||||
[self enumerateFileTransferSenders:^(TDCFileTransferDialogTransferController *fileTransfer, BOOL *stop) {
|
||||
if (fileTransfer.transferStatus != TDCFileTransferDialogTransferWaitingForLocalIPAddressStatus) {
|
||||
if (fileTransfer.transferStatus != TDCFileTransferDialogTransferStatusWaitingForLocalIPAddress) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -623,7 +623,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)internetAddressLookupFailed
|
||||
{
|
||||
[self enumerateFileTransferSenders:^(TDCFileTransferDialogTransferController *fileTransfer, BOOL *stop) {
|
||||
if (fileTransfer.transferStatus != TDCFileTransferDialogTransferWaitingForLocalIPAddressStatus) {
|
||||
if (fileTransfer.transferStatus != TDCFileTransferDialogTransferStatusWaitingForLocalIPAddress) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -636,20 +636,20 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#pragma mark -
|
||||
#pragma mark Navigation
|
||||
|
||||
- (TDCFileTransferDialogNavigationSelectedTab)navigationSelection
|
||||
- (TDCFileTransferDialogSelection)navigationSelection
|
||||
{
|
||||
return self.navigationControllerCell.selectedSegment;
|
||||
}
|
||||
|
||||
- (void)navigationSelectionDidChange:(id)sender
|
||||
{
|
||||
TDCFileTransferDialogNavigationSelectedTab selection = self.navigationSelection;
|
||||
TDCFileTransferDialogSelection selection = self.navigationSelection;
|
||||
|
||||
NSPredicate *filterPredicate = nil;
|
||||
|
||||
if (selection == TDCFileTransferDialogNavigationSendingSelectedTab) {
|
||||
if (selection == TDCFileTransferDialogSelectionSending) {
|
||||
filterPredicate = [NSPredicate predicateWithFormat:@"isSender == YES"];
|
||||
} else if (selection == TDCFileTransferDialogNavigationReceivingSelectedTab) {
|
||||
} else if (selection == TDCFileTransferDialogSelectionReceiving) {
|
||||
filterPredicate = [NSPredicate predicateWithFormat:@"isSender == NO"];
|
||||
}
|
||||
|
||||
@@ -675,10 +675,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
return [self fileTransfersMatchingCondition:^BOOL(TDCFileTransferDialogTransferController *fileTransfer) {
|
||||
TDCFileTransferDialogTransferStatus transferStatus = fileTransfer.transferStatus;
|
||||
|
||||
if (transferStatus != TDCFileTransferDialogTransferCompleteStatus &&
|
||||
transferStatus != TDCFileTransferDialogTransferStoppedStatus &&
|
||||
transferStatus != TDCFileTransferDialogTransferFatalErrorStatus &&
|
||||
transferStatus != TDCFileTransferDialogTransferRecoverableErrorStatus)
|
||||
if (transferStatus != TDCFileTransferDialogTransferStatusComplete &&
|
||||
transferStatus != TDCFileTransferDialogTransferStatusStopped &&
|
||||
transferStatus != TDCFileTransferDialogTransferStatusFatalError &&
|
||||
transferStatus != TDCFileTransferDialogTransferStatusRecoverableError)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
@@ -692,8 +692,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
return [self fileTransfersMatchingCondition:^BOOL(TDCFileTransferDialogTransferController *fileTransfer) {
|
||||
TDCFileTransferDialogTransferStatus transferStatus = fileTransfer.transferStatus;
|
||||
|
||||
if (transferStatus != TDCFileTransferDialogTransferReceivingStatus &&
|
||||
transferStatus != TDCFileTransferDialogTransferSendingStatus)
|
||||
if (transferStatus != TDCFileTransferDialogTransferStatusReceiving &&
|
||||
transferStatus != TDCFileTransferDialogTransferStatusSending)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
@@ -112,17 +112,17 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
{
|
||||
TDCFileTransferDialogTransferStatus transferStatus = self.transferStatus;
|
||||
|
||||
BOOL transferIsStopped = (transferStatus == TDCFileTransferDialogTransferCompleteStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferFatalErrorStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferRecoverableErrorStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferStoppedStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferIsListeningAsSenderStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferIsListeningAsReceiverStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferInitializingStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferMappingListeningPortStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferWaitingForLocalIPAddressStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferWaitingForReceiverToAcceptStatus ||
|
||||
transferStatus == TDCFileTransferDialogTransferWaitingForResumeAcceptStatus);
|
||||
BOOL transferIsStopped = (transferStatus == TDCFileTransferDialogTransferStatusComplete ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusFatalError ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusRecoverableError ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusStopped ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusIsListeningAsSender ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusIsListeningAsReceiver ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusInitializing ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusMappingListeningPort ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusWaitingForLocalIPAddress ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusWaitingForReceiverToAccept ||
|
||||
transferStatus == TDCFileTransferDialogTransferStatusWaitingForResumeAccept);
|
||||
|
||||
uint64_t processedFilesize = self.processedFilesize;
|
||||
|
||||
@@ -149,7 +149,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
if (transferIsStopped == NO) {
|
||||
if (transferStatus == TDCFileTransferDialogTransferConnectingStatus) {
|
||||
if (transferStatus == TDCFileTransferDialogTransferStatusConnecting) {
|
||||
self.progressIndicator.indeterminate = YES;
|
||||
|
||||
[self.progressIndicator startAnimation:nil];
|
||||
@@ -161,7 +161,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
switch (transferStatus) {
|
||||
case TDCFileTransferDialogTransferStoppedStatus:
|
||||
case TDCFileTransferDialogTransferStatusStopped:
|
||||
{
|
||||
if (self.isReceiving) {
|
||||
self.transferProgressTextField.stringValue = TXTLS(@"TDCFileTransferDialog[jvh-u7]", self.peerNickname);
|
||||
@@ -171,7 +171,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
break;
|
||||
}
|
||||
case TDCFileTransferDialogTransferMappingListeningPortStatus:
|
||||
case TDCFileTransferDialogTransferStatusMappingListeningPort:
|
||||
{
|
||||
if (self.isReceiving) {
|
||||
self.transferProgressTextField.stringValue = TXTLS(@"TDCFileTransferDialog[495-90]", self.peerNickname);
|
||||
@@ -181,7 +181,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
break;
|
||||
}
|
||||
case TDCFileTransferDialogTransferWaitingForLocalIPAddressStatus:
|
||||
case TDCFileTransferDialogTransferStatusWaitingForLocalIPAddress:
|
||||
{
|
||||
if (self.isReceiving) {
|
||||
self.transferProgressTextField.stringValue = TXTLS(@"TDCFileTransferDialog[6t1-mb]", self.peerNickname);
|
||||
@@ -191,7 +191,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
break;
|
||||
}
|
||||
case TDCFileTransferDialogTransferInitializingStatus:
|
||||
case TDCFileTransferDialogTransferStatusInitializing:
|
||||
{
|
||||
if (self.isReceiving) {
|
||||
self.transferProgressTextField.stringValue = TXTLS(@"TDCFileTransferDialog[42z-mg]", self.peerNickname);
|
||||
@@ -201,26 +201,26 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
break;
|
||||
}
|
||||
case TDCFileTransferDialogTransferIsListeningAsSenderStatus:
|
||||
case TDCFileTransferDialogTransferStatusIsListeningAsSender:
|
||||
{
|
||||
self.transferProgressTextField.stringValue = TXTLS(@"TDCFileTransferDialog[ca5-2v]", self.peerNickname);
|
||||
|
||||
break;
|
||||
}
|
||||
case TDCFileTransferDialogTransferIsListeningAsReceiverStatus:
|
||||
case TDCFileTransferDialogTransferStatusIsListeningAsReceiver:
|
||||
{
|
||||
self.transferProgressTextField.stringValue = TXTLS(@"TDCFileTransferDialog[pip-z6]", self.peerNickname);
|
||||
|
||||
break;
|
||||
}
|
||||
case TDCFileTransferDialogTransferFatalErrorStatus:
|
||||
case TDCFileTransferDialogTransferRecoverableErrorStatus:
|
||||
case TDCFileTransferDialogTransferStatusFatalError:
|
||||
case TDCFileTransferDialogTransferStatusRecoverableError:
|
||||
{
|
||||
self.transferProgressTextField.stringValue = self.errorMessageDescription;
|
||||
|
||||
break;
|
||||
}
|
||||
case TDCFileTransferDialogTransferCompleteStatus:
|
||||
case TDCFileTransferDialogTransferStatusComplete:
|
||||
{
|
||||
if (self.isReceiving) {
|
||||
self.transferProgressTextField.stringValue = TXTLS(@"TDCFileTransferDialog[6gu-za]", self.peerNickname);
|
||||
@@ -230,8 +230,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
break;
|
||||
}
|
||||
case TDCFileTransferDialogTransferSendingStatus:
|
||||
case TDCFileTransferDialogTransferReceivingStatus:
|
||||
case TDCFileTransferDialogTransferStatusSending:
|
||||
case TDCFileTransferDialogTransferStatusReceiving:
|
||||
{
|
||||
/* Format time remaining */
|
||||
NSTimeInterval timeRemaining = 0;
|
||||
@@ -274,19 +274,19 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
break;
|
||||
}
|
||||
case TDCFileTransferDialogTransferConnectingStatus:
|
||||
case TDCFileTransferDialogTransferStatusConnecting:
|
||||
{
|
||||
self.transferProgressTextField.stringValue = TXTLS(@"TDCFileTransferDialog[7nf-fr]", self.peerNickname);
|
||||
|
||||
break;
|
||||
}
|
||||
case TDCFileTransferDialogTransferWaitingForReceiverToAcceptStatus:
|
||||
case TDCFileTransferDialogTransferStatusWaitingForReceiverToAccept:
|
||||
{
|
||||
self.transferProgressTextField.stringValue = TXTLS(@"TDCFileTransferDialog[cku-24]", self.peerNickname);
|
||||
|
||||
break;
|
||||
}
|
||||
case TDCFileTransferDialogTransferWaitingForResumeAcceptStatus:
|
||||
case TDCFileTransferDialogTransferStatusWaitingForResumeAccept:
|
||||
{
|
||||
self.transferProgressTextField.stringValue = TXTLS(@"TDCFileTransferDialog[gxq-zu]", self.peerNickname);
|
||||
|
||||
|
||||
+46
-46
@@ -206,7 +206,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
{
|
||||
self.speedRecordsPrivate = [NSMutableArray array];
|
||||
|
||||
self.transferStatus = TDCFileTransferDialogTransferStoppedStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusStopped;
|
||||
|
||||
self.uniqueIdentifier = [NSString stringWithUUID];
|
||||
|
||||
@@ -257,9 +257,9 @@ ClassWithDesignatedInitializerInitMethod
|
||||
}
|
||||
|
||||
if (isFatalError) {
|
||||
self.transferStatus = TDCFileTransferDialogTransferFatalErrorStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusFatalError;
|
||||
} else {
|
||||
self.transferStatus = TDCFileTransferDialogTransferRecoverableErrorStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusRecoverableError;
|
||||
}
|
||||
|
||||
[self close];
|
||||
@@ -381,7 +381,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
[self createDispatchQueues];
|
||||
|
||||
self.transferStatus = TDCFileTransferDialogTransferConnectingStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusConnecting;
|
||||
|
||||
GCDAsyncSocket *connectionToRemoteServer =
|
||||
[[GCDAsyncSocket alloc] initWithDelegate:(id)self
|
||||
@@ -425,7 +425,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
[self createDispatchQueues];
|
||||
|
||||
self.transferStatus = TDCFileTransferDialogTransferInitializingStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusInitializing;
|
||||
|
||||
self.hostPort = [TPCPreferences fileTransferPortRangeStart];
|
||||
|
||||
@@ -469,7 +469,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
[RZNotificationCenter() addObserver:self selector:@selector(portMapperDidFinishWork:) name:XRPortMapperDidChangedNotification object:self.portMapping];
|
||||
|
||||
self.transferStatus = TDCFileTransferDialogTransferMappingListeningPortStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusMappingListeningPort;
|
||||
|
||||
if ([self.portMapping open] == NO) {
|
||||
[self portMapperDidFinishWork:nil];
|
||||
@@ -485,7 +485,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
- (void)portMapperDidFinishWork:(NSNotification *)aNotification
|
||||
{
|
||||
NSAssertReturn(self.transferStatus == TDCFileTransferDialogTransferMappingListeningPortStatus);
|
||||
NSAssertReturn(self.transferStatus == TDCFileTransferDialogTransferStatusMappingListeningPort);
|
||||
|
||||
if (self.portMapping.isMapped) {
|
||||
[self updateIPAddress];
|
||||
@@ -518,9 +518,9 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
LogToConsoleDebug("TDCFileTransferDialog cached IP address: %@", address);
|
||||
|
||||
TXFileTransferIPAddressDetectionMethod detectionMethod = [TPCPreferences fileTransferIPAddressDetectionMethod];
|
||||
TXFileTransferIPAddressMethodDetection detectionMethod = [TPCPreferences fileTransferIPAddressDetectionMethod];
|
||||
|
||||
BOOL manuallyDetect = (detectionMethod == TXFileTransferIPAddressManualDetectionMethod);
|
||||
BOOL manuallyDetect = (detectionMethod == TXFileTransferIPAddressMethodManual);
|
||||
|
||||
if (address == nil && manuallyDetect == NO) {
|
||||
NSString *publicAddress = self.portMapping.publicAddress;
|
||||
@@ -536,7 +536,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
/* Request address? */
|
||||
if (address == nil) {
|
||||
if (manuallyDetect || detectionMethod == TXFileTransferIPAddressRouterOnlyMethod) {
|
||||
if (manuallyDetect || detectionMethod == TXFileTransferIPAddressMethodRouterOnly) {
|
||||
LogToConsoleError("User has set IP address detection to be manual but have no address set");
|
||||
|
||||
[self noteIPAddressLookupFailed];
|
||||
@@ -545,7 +545,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
[self.transferDialog requestIPAddress];
|
||||
|
||||
self.transferStatus = TDCFileTransferDialogTransferWaitingForLocalIPAddressStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusWaitingForLocalIPAddress;
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -575,13 +575,13 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
if (self.isSender) {
|
||||
if (self.isReversed) {
|
||||
self.transferStatus = TDCFileTransferDialogTransferWaitingForReceiverToAcceptStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusWaitingForReceiverToAccept;
|
||||
} else {
|
||||
self.transferStatus = TDCFileTransferDialogTransferIsListeningAsSenderStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusIsListeningAsSender;
|
||||
}
|
||||
} else {
|
||||
if (self.isReversed) {
|
||||
self.transferStatus = TDCFileTransferDialogTransferIsListeningAsReceiverStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusIsListeningAsReceiver;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
@@ -692,7 +692,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
[self performSelectorInCommonModes:@selector(transferResumeRequestTimeout) withObject:nil afterDelay:_resumeAcceptTimeout];
|
||||
|
||||
self.transferStatus = TDCFileTransferDialogTransferWaitingForResumeAcceptStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusWaitingForResumeAccept;
|
||||
|
||||
if (self.isReversed) {
|
||||
[self.client sendFileResume:self.peerNickname port:0 filename:self.filename filesize:currentFilesize token:self.transferToken];
|
||||
@@ -740,14 +740,14 @@ ClassWithDesignatedInitializerInitMethod
|
||||
to IRC. If data is not being transferred then fail immediately. */
|
||||
TDCFileTransferDialogTransferStatus transferStatus = self.transferStatus;
|
||||
|
||||
if (transferStatus != TDCFileTransferDialogTransferConnectingStatus &&
|
||||
transferStatus != TDCFileTransferDialogTransferInitializingStatus &&
|
||||
transferStatus != TDCFileTransferDialogTransferIsListeningAsReceiverStatus &&
|
||||
transferStatus != TDCFileTransferDialogTransferIsListeningAsSenderStatus &&
|
||||
transferStatus != TDCFileTransferDialogTransferMappingListeningPortStatus &&
|
||||
transferStatus != TDCFileTransferDialogTransferWaitingForLocalIPAddressStatus &&
|
||||
transferStatus != TDCFileTransferDialogTransferWaitingForReceiverToAcceptStatus &&
|
||||
transferStatus != TDCFileTransferDialogTransferWaitingForResumeAcceptStatus)
|
||||
if (transferStatus != TDCFileTransferDialogTransferStatusConnecting &&
|
||||
transferStatus != TDCFileTransferDialogTransferStatusInitializing &&
|
||||
transferStatus != TDCFileTransferDialogTransferStatusIsListeningAsReceiver &&
|
||||
transferStatus != TDCFileTransferDialogTransferStatusIsListeningAsSender &&
|
||||
transferStatus != TDCFileTransferDialogTransferStatusMappingListeningPort &&
|
||||
transferStatus != TDCFileTransferDialogTransferStatusWaitingForLocalIPAddress &&
|
||||
transferStatus != TDCFileTransferDialogTransferStatusWaitingForReceiverToAccept &&
|
||||
transferStatus != TDCFileTransferDialogTransferStatusWaitingForResumeAccept)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -790,29 +790,29 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
[self closeFileHandle];
|
||||
|
||||
if (self.transferStatus != TDCFileTransferDialogTransferCompleteStatus &&
|
||||
self.transferStatus != TDCFileTransferDialogTransferFatalErrorStatus &&
|
||||
self.transferStatus != TDCFileTransferDialogTransferRecoverableErrorStatus)
|
||||
if (self.transferStatus != TDCFileTransferDialogTransferStatusComplete &&
|
||||
self.transferStatus != TDCFileTransferDialogTransferStatusFatalError &&
|
||||
self.transferStatus != TDCFileTransferDialogTransferStatusRecoverableError)
|
||||
{
|
||||
self.transferStatus = TDCFileTransferDialogTransferStoppedStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusStopped;
|
||||
}
|
||||
|
||||
if (postNotification) {
|
||||
if (self.transferStatus == TDCFileTransferDialogTransferFatalErrorStatus ||
|
||||
self.transferStatus == TDCFileTransferDialogTransferRecoverableErrorStatus)
|
||||
if (self.transferStatus == TDCFileTransferDialogTransferStatusFatalError ||
|
||||
self.transferStatus == TDCFileTransferDialogTransferStatusRecoverableError)
|
||||
{
|
||||
if (self.isSender) {
|
||||
[self.client notifyFileTransfer:TXNotificationFileTransferSendFailedType nickname:self.peerNickname filename:self.filename filesize:self.totalFilesize requestIdentifier:self.uniqueIdentifier];
|
||||
[self.client notifyFileTransfer:TXNotificationTypeFileTransferSendFailed nickname:self.peerNickname filename:self.filename filesize:self.totalFilesize requestIdentifier:self.uniqueIdentifier];
|
||||
} else {
|
||||
[self.client notifyFileTransfer:TXNotificationFileTransferReceiveFailedType nickname:self.peerNickname filename:self.filename filesize:self.totalFilesize requestIdentifier:self.uniqueIdentifier];
|
||||
[self.client notifyFileTransfer:TXNotificationTypeFileTransferReceiveFailed nickname:self.peerNickname filename:self.filename filesize:self.totalFilesize requestIdentifier:self.uniqueIdentifier];
|
||||
}
|
||||
}
|
||||
else if (self.transferStatus == TDCFileTransferDialogTransferCompleteStatus)
|
||||
else if (self.transferStatus == TDCFileTransferDialogTransferStatusComplete)
|
||||
{
|
||||
if (self.isSender) {
|
||||
[self.client notifyFileTransfer:TXNotificationFileTransferSendSuccessfulType nickname:self.peerNickname filename:self.filename filesize:self.totalFilesize requestIdentifier:self.uniqueIdentifier];
|
||||
[self.client notifyFileTransfer:TXNotificationTypeFileTransferSendSuccessful nickname:self.peerNickname filename:self.filename filesize:self.totalFilesize requestIdentifier:self.uniqueIdentifier];
|
||||
} else {
|
||||
[self.client notifyFileTransfer:TXNotificationFileTransferReceiveSuccessfulType nickname:self.peerNickname filename:self.filename filesize:self.totalFilesize requestIdentifier:self.uniqueIdentifier];
|
||||
[self.client notifyFileTransfer:TXNotificationTypeFileTransferReceiveSuccessful nickname:self.peerNickname filename:self.filename filesize:self.totalFilesize requestIdentifier:self.uniqueIdentifier];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -827,8 +827,8 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
- (void)onMaintenanceTimer
|
||||
{
|
||||
NSAssertReturn(self.transferStatus == TDCFileTransferDialogTransferReceivingStatus ||
|
||||
self.transferStatus == TDCFileTransferDialogTransferSendingStatus);
|
||||
NSAssertReturn(self.transferStatus == TDCFileTransferDialogTransferStatusReceiving ||
|
||||
self.transferStatus == TDCFileTransferDialogTransferStatusSending);
|
||||
|
||||
XRPerformBlockSynchronouslyOnQueue(self.serverDispatchQueue, ^{
|
||||
@synchronized(self.speedRecords) {
|
||||
@@ -937,9 +937,9 @@ ClassWithDesignatedInitializerInitMethod
|
||||
}
|
||||
|
||||
if (self.isReversed) {
|
||||
self.transferStatus = TDCFileTransferDialogTransferReceivingStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusReceiving;
|
||||
} else {
|
||||
self.transferStatus = TDCFileTransferDialogTransferSendingStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusSending;
|
||||
}
|
||||
|
||||
[self.transferDialog updateMaintenanceTimer];
|
||||
@@ -962,9 +962,9 @@ ClassWithDesignatedInitializerInitMethod
|
||||
}
|
||||
|
||||
if (self.isReversed == NO) {
|
||||
self.transferStatus = TDCFileTransferDialogTransferReceivingStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusReceiving;
|
||||
} else {
|
||||
self.transferStatus = TDCFileTransferDialogTransferSendingStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusSending;
|
||||
}
|
||||
|
||||
[self.transferDialog updateMaintenanceTimer];
|
||||
@@ -982,9 +982,9 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
- (void)socketDidDisconnect:(GCDAsyncSocket *)sock withError:(NSError *)error
|
||||
{
|
||||
if (self.transferStatus == TDCFileTransferDialogTransferCompleteStatus ||
|
||||
self.transferStatus == TDCFileTransferDialogTransferFatalErrorStatus ||
|
||||
self.transferStatus == TDCFileTransferDialogTransferRecoverableErrorStatus)
|
||||
if (self.transferStatus == TDCFileTransferDialogTransferStatusComplete ||
|
||||
self.transferStatus == TDCFileTransferDialogTransferStatusFatalError ||
|
||||
self.transferStatus == TDCFileTransferDialogTransferStatusRecoverableError)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1049,7 +1049,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
}
|
||||
|
||||
/* Update status and tear down transfer */
|
||||
self.transferStatus = TDCFileTransferDialogTransferCompleteStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusComplete;
|
||||
|
||||
[self close];
|
||||
}
|
||||
@@ -1081,7 +1081,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
}
|
||||
|
||||
/* Update status and tear down transfer */
|
||||
self.transferStatus = TDCFileTransferDialogTransferCompleteStatus;
|
||||
self.transferStatus = TDCFileTransferDialogTransferStatusComplete;
|
||||
|
||||
[self close];
|
||||
}
|
||||
@@ -1092,7 +1092,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.transferStatus != TDCFileTransferDialogTransferSendingStatus) {
|
||||
if (self.transferStatus != TDCFileTransferDialogTransferStatusSending) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -298,13 +298,13 @@ enum {
|
||||
suppressionKey:@"trial_is_expired_mas"
|
||||
suppressionText:nil
|
||||
completionBlock:^(TDCAlertResponse buttonClicked, BOOL suppressed, id underlyingAlert) {
|
||||
if (buttonClicked == TDCAlertResponseOtherButton) {
|
||||
if (buttonClicked == TDCAlertResponseOther) {
|
||||
return;
|
||||
}
|
||||
|
||||
[self show];
|
||||
|
||||
if (buttonClicked == TDCAlertResponseAlternateButton) {
|
||||
if (buttonClicked == TDCAlertResponseAlternate) {
|
||||
[self restoreTransactionsByClick];
|
||||
}
|
||||
}];
|
||||
@@ -323,13 +323,13 @@ enum {
|
||||
suppressionKey:@"trial_is_expired_mas"
|
||||
suppressionText:nil
|
||||
completionBlock:^(TDCAlertResponse buttonClicked, BOOL suppressed, id underlyingAlert) {
|
||||
if (buttonClicked == TDCAlertResponseOtherButton) {
|
||||
if (buttonClicked == TDCAlertResponseOther) {
|
||||
return;
|
||||
}
|
||||
|
||||
[self show];
|
||||
|
||||
if (buttonClicked == TDCAlertResponseAlternateButton) {
|
||||
if (buttonClicked == TDCAlertResponseAlternate) {
|
||||
[self restoreTransactionsByClick];
|
||||
}
|
||||
}];
|
||||
@@ -589,7 +589,7 @@ enum {
|
||||
[self addTrialToProductsTableContents];
|
||||
|
||||
[self.productsTableController addObject:
|
||||
[self productsTableEntryForProductIdentifier:TLOAppStoreIAPStandardEditionProductIdentifier]];
|
||||
[self productsTableEntryForProductIdentifier:TLOAppStoreIAPProductIdentifierStandardEdition]];
|
||||
|
||||
TDCInAppPurchaseProductsTableEntry *discountEntry = [self productsTableUpgradeEligibilityEntry];
|
||||
|
||||
@@ -605,7 +605,7 @@ enum {
|
||||
}
|
||||
|
||||
[self.productsTableController addObject:
|
||||
[self productsTableEntryForProductIdentifier:TLOAppStoreIAPFreeTrialProductIdentifier]];
|
||||
[self productsTableEntryForProductIdentifier:TLOAppStoreIAPProductIdentifierFreeTrial]];
|
||||
}
|
||||
|
||||
- (void)updateSelectedPane
|
||||
@@ -729,7 +729,7 @@ enum {
|
||||
LogToConsoleDebug("Eligibility changed to %lu", sender.eligibility);
|
||||
|
||||
if (sender.eligibility == TLOInAppPurchaseUpgradeEligibilityUnknown ||
|
||||
sender.eligibility == TLOInAppPurchaseUpgradeNotEligible)
|
||||
sender.eligibility == TLOInAppPurchaseUpgradeEligibilityNot)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -738,16 +738,16 @@ enum {
|
||||
|
||||
[self addTrialToProductsTableContents];
|
||||
|
||||
if (sender.eligibility == TLOInAppPurchaseUpgradeEligibleDiscount)
|
||||
if (sender.eligibility == TLOInAppPurchaseUpgradeEligibilityDiscount)
|
||||
{
|
||||
[self.productsTableController addObject:
|
||||
[self productsTableEntryForProductIdentifier:TLOAppStoreIAPUpgradeFromV6ProductIdentifier]];
|
||||
[self productsTableEntryForProductIdentifier:TLOAppStoreIAPProductIdentifierUpgradeFromV6]];
|
||||
}
|
||||
else if (sender.eligibility == TLOInAppPurchaseUpgradeEligibleFree ||
|
||||
sender.eligibility == TLOInAppPurchaseUpgradeAlreadyUpgraded)
|
||||
else if (sender.eligibility == TLOInAppPurchaseUpgradeEligibilityFree ||
|
||||
sender.eligibility == TLOInAppPurchaseUpgradeEligibilityAlreadyUpgraded)
|
||||
{
|
||||
[self.productsTableController addObject:
|
||||
[self productsTableEntryForProductIdentifier:TLOAppStoreIAPUpgradeFromV6FreeProductIdentifier]];
|
||||
[self productsTableEntryForProductIdentifier:TLOAppStoreIAPProductIdentifierUpgradeFromV6Free]];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -792,9 +792,9 @@ enum {
|
||||
|
||||
TDCInAppPurchaseProductsTableEntry *entryItem = self.productsTableController.arrangedObjects[row];
|
||||
|
||||
if (entryItem.entryType == TDCInAppPurchaseProductsTableEntryProductType) {
|
||||
if (entryItem.entryType == TDCInAppPurchaseProductsTableEntryTypeProduct) {
|
||||
newView = [tableView makeViewWithIdentifier:@"productType" owner:self];
|
||||
} else if (entryItem.entryType == TDCInAppPurchaseProductsTableEntryOtherType) {
|
||||
} else if (entryItem.entryType == TDCInAppPurchaseProductsTableEntryTypeOther) {
|
||||
newView = [tableView makeViewWithIdentifier:@"otherType" owner:self];
|
||||
}
|
||||
|
||||
@@ -858,8 +858,8 @@ enum {
|
||||
- (nullable TDCInAppPurchaseProductsTableEntry *)productsTableUpgradeEligibilityEntry
|
||||
{
|
||||
/* Do not offer upgrade if one of these two are disabled (missing) */
|
||||
if ([self.products containsKey:TLOAppStoreIAPUpgradeFromV6ProductIdentifier] == NO ||
|
||||
[self.products containsKey:TLOAppStoreIAPUpgradeFromV6FreeProductIdentifier] == NO)
|
||||
if ([self.products containsKey:TLOAppStoreIAPProductIdentifierUpgradeFromV6] == NO ||
|
||||
[self.products containsKey:TLOAppStoreIAPProductIdentifierUpgradeFromV6Free] == NO)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
@@ -867,7 +867,7 @@ enum {
|
||||
/* Create entry */
|
||||
TDCInAppPurchaseProductsTableEntry *tableEntry = [TDCInAppPurchaseProductsTableEntry new];
|
||||
|
||||
tableEntry.entryType = TDCInAppPurchaseProductsTableEntryOtherType;
|
||||
tableEntry.entryType = TDCInAppPurchaseProductsTableEntryTypeOther;
|
||||
|
||||
tableEntry.entryTitle = TXTLS(@"TDCInAppPurchaseDialog[gaw-8q]");
|
||||
tableEntry.entryDescription = TXTLS(@"TDCInAppPurchaseDialog[e1e-6i]");
|
||||
@@ -898,9 +898,9 @@ enum {
|
||||
tableEntry.action = @selector(payForProductsTableEntry:);
|
||||
|
||||
switch (productType) {
|
||||
case TLOAppStoreIAPFreeTrialProduct:
|
||||
case TLOAppStoreIAPProductFreeTrial:
|
||||
{
|
||||
tableEntry.entryType = TDCInAppPurchaseProductsTableEntryOtherType;
|
||||
tableEntry.entryType = TDCInAppPurchaseProductsTableEntryTypeOther;
|
||||
|
||||
tableEntry.entryTitle = TXTLS(@"TDCInAppPurchaseDialog[20h-oi]");
|
||||
tableEntry.entryDescription = TXTLS(@"TDCInAppPurchaseDialog[4ad-nr]");
|
||||
@@ -908,9 +908,9 @@ enum {
|
||||
|
||||
break;
|
||||
}
|
||||
case TLOAppStoreIAPStandardEditionProduct:
|
||||
case TLOAppStoreIAPProductStandardEdition:
|
||||
{
|
||||
tableEntry.entryType = TDCInAppPurchaseProductsTableEntryProductType;
|
||||
tableEntry.entryType = TDCInAppPurchaseProductsTableEntryTypeProduct;
|
||||
|
||||
tableEntry.entryTitle = TXTLS(@"TDCInAppPurchaseDialog[yrh-s6]");
|
||||
tableEntry.entryDescription = TXTLS(@"TDCInAppPurchaseDialog[2xq-43]");
|
||||
@@ -918,12 +918,12 @@ enum {
|
||||
|
||||
break;
|
||||
}
|
||||
case TLOAppStoreIAPUpgradeFromV6Product:
|
||||
case TLOAppStoreIAPUpgradeFromV6FreeProduct:
|
||||
case TLOAppStoreIAPProductUpgradeFromV6:
|
||||
case TLOAppStoreIAPProductUpgradeFromV6Free:
|
||||
{
|
||||
tableEntry.entryType = TDCInAppPurchaseProductsTableEntryProductType;
|
||||
tableEntry.entryType = TDCInAppPurchaseProductsTableEntryTypeProduct;
|
||||
|
||||
SKProduct *standardEdition = self.products[TLOAppStoreIAPStandardEditionProductIdentifier];
|
||||
SKProduct *standardEdition = self.products[TLOAppStoreIAPProductIdentifierStandardEdition];
|
||||
|
||||
if (standardEdition == nil) {
|
||||
NSAssert(NO, @"The 'Standard Edition' product is missing");
|
||||
@@ -931,13 +931,13 @@ enum {
|
||||
|
||||
tableEntry.productPriceDiscounted = standardEdition.price;
|
||||
|
||||
if (productType == TLOAppStoreIAPUpgradeFromV6Product)
|
||||
if (productType == TLOAppStoreIAPProductUpgradeFromV6)
|
||||
{
|
||||
tableEntry.entryTitle = TXTLS(@"TDCInAppPurchaseDialog[ako-hb]");
|
||||
tableEntry.entryDescription = TXTLS(@"TDCInAppPurchaseDialog[pnz-0z]");
|
||||
tableEntry.actionButtonTitle = TXTLS(@"TDCInAppPurchaseDialog[xdz-gd]");
|
||||
}
|
||||
else if (productType == TLOAppStoreIAPUpgradeFromV6FreeProduct)
|
||||
else if (productType == TLOAppStoreIAPProductUpgradeFromV6Free)
|
||||
{
|
||||
tableEntry.entryTitle = TXTLS(@"TDCInAppPurchaseDialog[7g1-nd]");
|
||||
tableEntry.entryDescription = TXTLS(@"TDCInAppPurchaseDialog[877-q1]");
|
||||
@@ -984,25 +984,25 @@ enum {
|
||||
NSString *productTitle = nil;
|
||||
|
||||
switch (productType) {
|
||||
case TLOAppStoreIAPFreeTrialProduct:
|
||||
case TLOAppStoreIAPProductFreeTrial:
|
||||
{
|
||||
productTitle = TXTLS(@"TDCInAppPurchaseDialog[20h-oi]");
|
||||
|
||||
break;
|
||||
}
|
||||
case TLOAppStoreIAPStandardEditionProduct:
|
||||
case TLOAppStoreIAPProductStandardEdition:
|
||||
{
|
||||
productTitle = TXTLS(@"TDCInAppPurchaseDialog[yrh-s6]");
|
||||
|
||||
break;
|
||||
}
|
||||
case TLOAppStoreIAPUpgradeFromV6Product:
|
||||
case TLOAppStoreIAPProductUpgradeFromV6:
|
||||
{
|
||||
productTitle = TXTLS(@"TDCInAppPurchaseDialog[ako-hb]");
|
||||
|
||||
break;
|
||||
}
|
||||
case TLOAppStoreIAPUpgradeFromV6FreeProduct:
|
||||
case TLOAppStoreIAPProductUpgradeFromV6Free:
|
||||
{
|
||||
productTitle = TXTLS(@"TDCInAppPurchaseDialog[7g1-nd]");
|
||||
|
||||
@@ -1218,7 +1218,7 @@ enum {
|
||||
alternateButton:TXTLS(@"TDCInAppPurchaseDialog[ywm-0b]")
|
||||
otherButton:nil
|
||||
completionBlock:^(TDCAlertResponse buttonClicked, BOOL suppressed, id underlyingAlert) {
|
||||
if (buttonClicked == TDCAlertResponseAlternateButton) {
|
||||
if (buttonClicked == TDCAlertResponseAlternate) {
|
||||
[self contactSupport];
|
||||
}
|
||||
|
||||
@@ -1326,10 +1326,10 @@ enum {
|
||||
NSSet *productIdentifiers =
|
||||
[NSSet setWithArray:
|
||||
@[
|
||||
TLOAppStoreIAPFreeTrialProductIdentifier,
|
||||
TLOAppStoreIAPStandardEditionProductIdentifier,
|
||||
TLOAppStoreIAPUpgradeFromV6ProductIdentifier,
|
||||
TLOAppStoreIAPUpgradeFromV6FreeProductIdentifier
|
||||
TLOAppStoreIAPProductIdentifierFreeTrial,
|
||||
TLOAppStoreIAPProductIdentifierStandardEdition,
|
||||
TLOAppStoreIAPProductIdentifierUpgradeFromV6,
|
||||
TLOAppStoreIAPProductIdentifierUpgradeFromV6Free
|
||||
]
|
||||
];
|
||||
|
||||
@@ -1373,7 +1373,7 @@ enum {
|
||||
alternateButton:TXTLS(@"TDCInAppPurchaseDialog[iot-5w]")
|
||||
otherButton:nil
|
||||
completionBlock:^(TDCAlertResponse buttonClicked, BOOL suppressed, id underlyingAlert) {
|
||||
if (buttonClicked == TDCAlertResponseAlternateButton) {
|
||||
if (buttonClicked == TDCAlertResponseAlternate) {
|
||||
[self contactSupport];
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -287,7 +287,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
alternateButton:TXTLS(@"TDCInAppPurchaseUpgradeEligibilitySheet[uyy-qm]")
|
||||
otherButton:nil
|
||||
completionBlock:^(TDCAlertResponse buttonClicked, BOOL suppressed, id underlyingAlert) {
|
||||
if (buttonClicked == TDCAlertResponseAlternateButton) {
|
||||
if (buttonClicked == TDCAlertResponseAlternate) {
|
||||
[self actionContactSupport:nil];
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
alternateButton:TXTLS(@"TDCInAppPurchaseUpgradeEligibilitySheet[on9-6e]")
|
||||
otherButton:nil
|
||||
completionBlock:^(TDCAlertResponse buttonClicked, BOOL suppressed, id underlyingAlert) {
|
||||
if (buttonClicked == TDCAlertResponseAlternateButton) {
|
||||
if (buttonClicked == TDCAlertResponseAlternate) {
|
||||
[self actionContactSupport:nil];
|
||||
}
|
||||
|
||||
@@ -439,10 +439,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/* Save eligibility */
|
||||
NSUInteger eligibility = [eligibilityObject unsignedIntegerValue];
|
||||
|
||||
if (eligibility != TLOInAppPurchaseUpgradeEligibleDiscount &&
|
||||
eligibility != TLOInAppPurchaseUpgradeEligibleFree &&
|
||||
eligibility != TLOInAppPurchaseUpgradeNotEligible &&
|
||||
eligibility != TLOInAppPurchaseUpgradeAlreadyUpgraded)
|
||||
if (eligibility != TLOInAppPurchaseUpgradeEligibilityDiscount &&
|
||||
eligibility != TLOInAppPurchaseUpgradeEligibilityFree &&
|
||||
eligibility != TLOInAppPurchaseUpgradeEligibilityNot &&
|
||||
eligibility != TLOInAppPurchaseUpgradeEligibilityAlreadyUpgraded)
|
||||
{
|
||||
NSString *errorMessage = TXTLS(@"TDCInAppPurchaseUpgradeEligibilitySheet[bdh-bw]", eligibility);
|
||||
|
||||
@@ -462,12 +462,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (void)_eligibilityDetermined
|
||||
{
|
||||
if (self.eligibility == TLOInAppPurchaseUpgradeEligibleDiscount) {
|
||||
if (self.eligibility == TLOInAppPurchaseUpgradeEligibilityDiscount) {
|
||||
self.sheet = self.sheetEligibleDiscount;
|
||||
} else if (self.eligibility == TLOInAppPurchaseUpgradeNotEligible) {
|
||||
} else if (self.eligibility == TLOInAppPurchaseUpgradeEligibilityNot) {
|
||||
self.sheet = self.sheetNotEligible;
|
||||
} else if (self.eligibility == TLOInAppPurchaseUpgradeEligibleFree ||
|
||||
self.eligibility == TLOInAppPurchaseUpgradeAlreadyUpgraded)
|
||||
} else if (self.eligibility == TLOInAppPurchaseUpgradeEligibilityFree ||
|
||||
self.eligibility == TLOInAppPurchaseUpgradeEligibilityAlreadyUpgraded)
|
||||
{
|
||||
self.sheet = self.sheetEligibleFree;
|
||||
}
|
||||
|
||||
@@ -580,9 +580,9 @@ NSString * const TDCLicenseManagerTrialExpiredNotification = @"TDCLicenseManager
|
||||
/* Do we have an eligibility that is acceptable? */
|
||||
NSUInteger eligibility = [RZUserDefaults() unsignedIntegerForKey:@"Textual 7 Upgrade -> Tv7 -> Eligibility"];
|
||||
|
||||
if (eligibility != TLOLicenseUpgradeEligibleDiscount &&
|
||||
eligibility != TLOLicenseUpgradeEligibleFree &&
|
||||
eligibility != TLOLicenseUpgradeAlreadyUpgraded)
|
||||
if (eligibility != TLOLicenseUpgradeEligibilityDiscount &&
|
||||
eligibility != TLOLicenseUpgradeEligibilityFree &&
|
||||
eligibility != TLOLicenseUpgradeEligibilityAlreadyUpgraded)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
+3
-3
@@ -95,14 +95,14 @@ ClassWithDesignatedInitializerInitMethod
|
||||
{
|
||||
NSTextField *sheetTitleTextField = nil;
|
||||
|
||||
if (self.eligibility == TLOLicenseUpgradeEligibleDiscount)
|
||||
if (self.eligibility == TLOLicenseUpgradeEligibilityDiscount)
|
||||
{
|
||||
self.sheet = self.sheetEligibleDiscount;
|
||||
|
||||
sheetTitleTextField = self.sheetEligibleDiscountTitleTextField;
|
||||
}
|
||||
else if (self.eligibility == TLOLicenseUpgradeEligibleFree ||
|
||||
self.eligibility == TLOLicenseUpgradeAlreadyUpgraded)
|
||||
else if (self.eligibility == TLOLicenseUpgradeEligibilityFree ||
|
||||
self.eligibility == TLOLicenseUpgradeEligibilityAlreadyUpgraded)
|
||||
{
|
||||
self.sheet = self.sheetEligibleFree;
|
||||
|
||||
|
||||
+9
-9
@@ -161,7 +161,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
alternateButton:TXTLS(@"TDCLicenseUpgradeEligibilitySheet[dn3-4r]")
|
||||
otherButton:nil
|
||||
completionBlock:^(TDCAlertResponse buttonClicked, BOOL suppressed, id underlyingAlert) {
|
||||
if (buttonClicked == TDCAlertResponseAlternateButton) {
|
||||
if (buttonClicked == TDCAlertResponseAlternate) {
|
||||
[self actionContactSupport:nil];
|
||||
}
|
||||
|
||||
@@ -272,10 +272,10 @@ ClassWithDesignatedInitializerInitMethod
|
||||
/* Save eligibility */
|
||||
NSUInteger eligibility = [eligibilityObject unsignedIntegerValue];
|
||||
|
||||
if (eligibility != TLOLicenseUpgradeEligibleDiscount &&
|
||||
eligibility != TLOLicenseUpgradeEligibleFree &&
|
||||
eligibility != TLOLicenseUpgradeNotEligible &&
|
||||
eligibility != TLOLicenseUpgradeAlreadyUpgraded)
|
||||
if (eligibility != TLOLicenseUpgradeEligibilityDiscount &&
|
||||
eligibility != TLOLicenseUpgradeEligibilityFree &&
|
||||
eligibility != TLOLicenseUpgradeEligibilityNot &&
|
||||
eligibility != TLOLicenseUpgradeEligibilityAlreadyUpgraded)
|
||||
{
|
||||
NSString *errorMessage = TXTLS(@"TDCLicenseUpgradeEligibilitySheet[5s6-sb]", eligibility);
|
||||
|
||||
@@ -295,12 +295,12 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
- (void)_eligibilityDetermined
|
||||
{
|
||||
if (self.eligibility == TLOLicenseUpgradeEligibleDiscount) {
|
||||
if (self.eligibility == TLOLicenseUpgradeEligibilityDiscount) {
|
||||
self.sheet = self.sheetEligibleDiscount;
|
||||
} else if (self.eligibility == TLOLicenseUpgradeNotEligible) {
|
||||
} else if (self.eligibility == TLOLicenseUpgradeEligibilityNot) {
|
||||
self.sheet = self.sheetNotEligible;
|
||||
} else if (self.eligibility == TLOLicenseUpgradeEligibleFree ||
|
||||
self.eligibility == TLOLicenseUpgradeAlreadyUpgraded)
|
||||
} else if (self.eligibility == TLOLicenseUpgradeEligibilityFree ||
|
||||
self.eligibility == TLOLicenseUpgradeEligibilityAlreadyUpgraded)
|
||||
{
|
||||
self.sheet = self.sheetEligibleFree;
|
||||
}
|
||||
|
||||
@@ -227,34 +227,34 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NSMutableArray *notifications = [NSMutableArray array];
|
||||
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationAddressBookMatchType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeAddressBookMatch]];
|
||||
[notifications addObject:@" "];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationConnectType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationDisconnectType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeConnect]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeDisconnect]];
|
||||
[notifications addObject:@" "];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationHighlightType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeHighlight]];
|
||||
[notifications addObject:@" "];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationInviteType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationKickType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeInvite]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeKick]];
|
||||
[notifications addObject:@" "];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationChannelMessageType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationChannelNoticeType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeChannelMessage]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeChannelNotice]];
|
||||
[notifications addObject:@" "];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationNewPrivateMessageType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationPrivateMessageType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationPrivateNoticeType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeNewPrivateMessage]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypePrivateMessage]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypePrivateNotice]];
|
||||
[notifications addObject:@" "];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationUserJoinedType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationUserPartedType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationUserDisconnectedType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeUserJoined]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeUserParted]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeUserDisconnected]];
|
||||
[notifications addObject:@" "];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationFileTransferReceiveRequestedType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeFileTransferReceiveRequested]];
|
||||
[notifications addObject:@" "];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationFileTransferSendSuccessfulType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationFileTransferReceiveSuccessfulType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeFileTransferSendSuccessful]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeFileTransferReceiveSuccessful]];
|
||||
[notifications addObject:@" "];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationFileTransferSendFailedType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationFileTransferReceiveFailedType]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeFileTransferSendFailed]];
|
||||
[notifications addObject:[TDCPreferencesNotificationConfiguration objectWithEventType:TXNotificationTypeFileTransferReceiveFailed]];
|
||||
|
||||
self.notificationController.notifications = notifications;
|
||||
|
||||
@@ -330,19 +330,19 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (void)show
|
||||
{
|
||||
[self show:TDCPreferencesControllerDefaultNavigationSelection];
|
||||
[self show:TDCPreferencesControllerSelectionDefault];
|
||||
}
|
||||
|
||||
- (void)show:(TDCPreferencesControllerNavigationSelection)selection
|
||||
- (void)show:(TDCPreferencesControllerSelection)selection
|
||||
{
|
||||
switch (selection) {
|
||||
case TDCPreferencesControllerStyleNavigationSelection:
|
||||
case TDCPreferencesControllerSelectionStyle:
|
||||
{
|
||||
[self _showPane:self.contentViewStyle selectedItem:_toolbarItemIndexStyle];
|
||||
|
||||
break;
|
||||
}
|
||||
case TDCPreferencesControllerHiddenPreferencesNavigationSelection:
|
||||
case TDCPreferencesControllerSelectionHiddenPreferences:
|
||||
{
|
||||
[self _showPane:self.contentViewHiddenPreferences selectedItem:_toolbarItemIndexAdvanced];
|
||||
|
||||
@@ -700,7 +700,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (BOOL)highlightCurrentNickname
|
||||
{
|
||||
if ([TPCPreferences highlightMatchingMethod] == TXNicknameHighlightRegularExpressionMatchType) {
|
||||
if ([TPCPreferences highlightMatchingMethod] == TXNicknameHighlightMatchTypeRegularExpression) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
@@ -1133,7 +1133,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
{
|
||||
[TPCPathInfo setTranscriptFolderURL:transcriptFolderURL];
|
||||
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadLogTranscriptsAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionLogTranscripts];
|
||||
|
||||
[self updateTranscriptFolder];
|
||||
}
|
||||
@@ -1325,7 +1325,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)onChangedCheckForBetaUpdates:(id)sender
|
||||
{
|
||||
#if TEXTUAL_BUILT_WITH_SPARKLE_ENABLED == 1
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadSparkleFrameworkFeedURLAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionSparkleFrameworkFeedURL];
|
||||
|
||||
if ([TPCPreferences receiveBetaUpdates]) {
|
||||
[menuController() checkForUpdates:nil];
|
||||
@@ -1344,7 +1344,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#if TEXTUAL_BUILT_WITH_ADVANCED_ENCRYPTION == 1
|
||||
- (void)offRecordMessagingPolicyChanged:(id)sender
|
||||
{
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadEncryptionPolicyAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionEncryptionPolicy];
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1353,7 +1353,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
[self willChangeValueForKey:@"highlightCurrentNickname"];
|
||||
[self didChangeValueForKey:@"highlightCurrentNickname"];
|
||||
|
||||
if ([TPCPreferences highlightMatchingMethod] == TXNicknameHighlightRegularExpressionMatchType) {
|
||||
if ([TPCPreferences highlightMatchingMethod] == TXNicknameHighlightMatchTypeRegularExpression) {
|
||||
self.highlightNicknameButton.enabled = NO;
|
||||
} else {
|
||||
self.highlightNicknameButton.enabled = YES;
|
||||
@@ -1499,17 +1499,17 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (void)onChangedInputHistoryScheme:(id)sender
|
||||
{
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadInputHistoryScopeAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionInputHistoryScope];
|
||||
}
|
||||
|
||||
- (void)onChangedAppearance:(id)sender
|
||||
{
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadAppearanceAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionAppearance];
|
||||
}
|
||||
|
||||
- (void)onChangedTheme:(id)sender
|
||||
{
|
||||
[TPCPreferences performReloadAction:(TPCPreferencesReloadStyleAction | TPCPreferencesReloadTextDirectionAction)];
|
||||
[TPCPreferences performReloadAction:(TPCPreferencesReloadActionStyle | TPCPreferencesReloadActionTextDirection)];
|
||||
}
|
||||
|
||||
- (void)onThemeWillReload:(NSNotification *)notification
|
||||
@@ -1530,12 +1530,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (void)onChangedChannelViewArrangement:(id)sender
|
||||
{
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadChannelViewArrangementAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionChannelViewArrangement];
|
||||
}
|
||||
|
||||
- (void)onChangedMainWindowSegmentedController:(id)sender
|
||||
{
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadTextFieldSegmentedControllerOriginAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionTextFieldSegmentedControllerOrigin];
|
||||
}
|
||||
|
||||
- (void)onChangedUserListModeColor:(id)sender
|
||||
@@ -1560,47 +1560,47 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/* -onResetUserListModeColorsToDefaults: passes nil sender */
|
||||
if (preferenceKey == nil) {
|
||||
[TPCPreferences performReloadAction:(TPCPreferencesReloadMemberListUserBadgesAction | TPCPreferencesReloadMemberListAction)];
|
||||
[TPCPreferences performReloadAction:(TPCPreferencesReloadActionMemberListUserBadges | TPCPreferencesReloadActionMemberList)];
|
||||
} else {
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadMemberListUserBadgesAction forKey:preferenceKey];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionMemberListUserBadges forKey:preferenceKey];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)onChangedMainInputTextViewFontSize:(id)sender
|
||||
{
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadTextFieldFontSizeAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionTextFieldFontSize];
|
||||
}
|
||||
|
||||
- (void)onFileTransferIPAddressDetectionMethodChanged:(id)sender
|
||||
{
|
||||
TXFileTransferIPAddressDetectionMethod detectionMethod = [TPCPreferences fileTransferIPAddressDetectionMethod];
|
||||
TXFileTransferIPAddressMethodDetection detectionMethod = [TPCPreferences fileTransferIPAddressDetectionMethod];
|
||||
|
||||
self.fileTransferManuallyEnteredIPAddressTextField.enabled = (detectionMethod == TXFileTransferIPAddressManualDetectionMethod);
|
||||
self.fileTransferManuallyEnteredIPAddressTextField.enabled = (detectionMethod == TXFileTransferIPAddressMethodManual);
|
||||
}
|
||||
|
||||
- (void)onChangedHighlightLogging:(id)sender
|
||||
{
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadHighlightLoggingAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionHighlightLogging];
|
||||
}
|
||||
|
||||
- (void)onChangedUserListModeSortOrder:(id)sender
|
||||
{
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadMemberListSortOrderAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionMemberListSortOrder];
|
||||
}
|
||||
|
||||
- (void)onChangedServerListUnreadBadgeColor:(id)sender
|
||||
{
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadServerListUnreadBadgesAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionServerListUnreadBadges];
|
||||
}
|
||||
|
||||
- (void)onChangedScrollbackSaveLimit:(id)sender
|
||||
{
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadScrollbackSaveLimitAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionScrollbackSaveLimit];
|
||||
}
|
||||
|
||||
- (void)onChangedScrollbackVisibleLimit:(id)sender
|
||||
{
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadScrollbackVisibleLimitAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionScrollbackVisibleLimit];
|
||||
}
|
||||
|
||||
- (void)onOpenPathToCloudFolder:(id)sender
|
||||
@@ -1657,7 +1657,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#if TEXTUAL_BUILT_WITH_ICLOUD_SUPPORT == 1
|
||||
- (void)onPurgeOfCloudDataRequestedCallback:(TDCAlertResponse)returnCode
|
||||
{
|
||||
if (returnCode != TDCAlertResponseDefaultButton) {
|
||||
if (returnCode != TDCAlertResponseDefault) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1691,11 +1691,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
{
|
||||
NSParameterAssert(originalAlert != nil);
|
||||
|
||||
if (returnCode == TDCAlertResponseAlternateButton) {
|
||||
if (returnCode == TDCAlertResponseAlternate) {
|
||||
[self openPathToTheme];
|
||||
}
|
||||
|
||||
if (returnCode == TDCAlertResponseDefaultButton) {
|
||||
if (returnCode == TDCAlertResponseDefault) {
|
||||
[originalAlert.window orderOut:nil];
|
||||
|
||||
BOOL copyingToCloud = NO;
|
||||
@@ -1707,9 +1707,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#endif
|
||||
|
||||
if (copyingToCloud) {
|
||||
[themeController() copyActiveThemeToDestinationLocation:TPCThemeControllerStorageCloudLocation reloadOnCopy:YES openOnCopy:YES];
|
||||
[themeController() copyActiveThemeToDestinationLocation:TPCThemeControllerStorageLocationCloud reloadOnCopy:YES openOnCopy:YES];
|
||||
} else {
|
||||
[themeController() copyActiveThemeToDestinationLocation:TPCThemeControllerStorageCustomLocation reloadOnCopy:YES openOnCopy:YES];
|
||||
[themeController() copyActiveThemeToDestinationLocation:TPCThemeControllerStorageLocationCustom reloadOnCopy:YES openOnCopy:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,13 +70,13 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
- (instancetype)initWithEntryType:(IRCAddressBookEntryType)entryType
|
||||
{
|
||||
NSParameterAssert(entryType == IRCAddressBookIgnoreEntryType ||
|
||||
entryType == IRCAddressBookUserTrackingEntryType);
|
||||
NSParameterAssert(entryType == IRCAddressBookEntryTypeIgnore ||
|
||||
entryType == IRCAddressBookEntryTypeUserTracking);
|
||||
|
||||
if ((self = [super init])) {
|
||||
if (entryType == IRCAddressBookIgnoreEntryType) {
|
||||
if (entryType == IRCAddressBookEntryTypeIgnore) {
|
||||
self.config = [IRCAddressBookEntryMutable newIgnoreEntry];
|
||||
} else if (entryType == IRCAddressBookUserTrackingEntryType) {
|
||||
} else if (entryType == IRCAddressBookEntryTypeUserTracking) {
|
||||
self.config = [IRCAddressBookEntryMutable newUserTrackingEntry];
|
||||
}
|
||||
|
||||
@@ -95,8 +95,8 @@ ClassWithDesignatedInitializerInitMethod
|
||||
- (instancetype)initWithConfig:(IRCAddressBookEntry *)config
|
||||
{
|
||||
NSParameterAssert(config != nil);
|
||||
NSParameterAssert(config.entryType == IRCAddressBookIgnoreEntryType ||
|
||||
config.entryType == IRCAddressBookUserTrackingEntryType);
|
||||
NSParameterAssert(config.entryType == IRCAddressBookEntryTypeIgnore ||
|
||||
config.entryType == IRCAddressBookEntryTypeUserTracking);
|
||||
|
||||
if ((self = [super init])) {
|
||||
self.config = [config mutableCopy];
|
||||
@@ -144,7 +144,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
- (void)loadConfig
|
||||
{
|
||||
if (self.entryType == IRCAddressBookIgnoreEntryType)
|
||||
if (self.entryType == IRCAddressBookEntryTypeIgnore)
|
||||
{
|
||||
self.ignoreEntryHostmaskTextField.stringValue = self.config.hostmask;
|
||||
|
||||
@@ -158,7 +158,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
self.ignorePublicMessageHighlightsCheck.state = self.config.ignorePublicMessageHighlights;
|
||||
self.ignorePublicMessagesCheck.state = self.config.ignorePublicMessages;
|
||||
}
|
||||
else if (self.entryType == IRCAddressBookUserTrackingEntryType)
|
||||
else if (self.entryType == IRCAddressBookEntryTypeUserTracking)
|
||||
{
|
||||
self.userTrackingEntryNicknameTextField.stringValue = self.config.hostmask;
|
||||
|
||||
@@ -168,13 +168,13 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
- (void)start
|
||||
{
|
||||
if (self.entryType == IRCAddressBookIgnoreEntryType)
|
||||
if (self.entryType == IRCAddressBookEntryTypeIgnore)
|
||||
{
|
||||
self.sheet = self.ignoreEntryView;
|
||||
|
||||
[self.sheet makeFirstResponder:self.ignoreEntryHostmaskTextField];
|
||||
}
|
||||
else if (self.entryType == IRCAddressBookUserTrackingEntryType)
|
||||
else if (self.entryType == IRCAddressBookEntryTypeUserTracking)
|
||||
{
|
||||
self.sheet = self.userTrackingEntryView;
|
||||
|
||||
@@ -190,7 +190,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.entryType == IRCAddressBookIgnoreEntryType)
|
||||
if (self.entryType == IRCAddressBookEntryTypeIgnore)
|
||||
{
|
||||
self.config.hostmask = self.ignoreEntryHostmaskTextField.value;
|
||||
|
||||
@@ -204,7 +204,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
self.config.ignorePublicMessageHighlights = (self.ignorePublicMessageHighlightsCheck.state == NSOnState);
|
||||
self.config.ignorePublicMessages = (self.ignorePublicMessagesCheck.state == NSOnState);
|
||||
}
|
||||
else if (self.entryType == IRCAddressBookUserTrackingEntryType)
|
||||
else if (self.entryType == IRCAddressBookEntryTypeUserTracking)
|
||||
{
|
||||
self.config.hostmask = self.userTrackingEntryNicknameTextField.value;
|
||||
|
||||
@@ -220,11 +220,11 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
- (BOOL)okOrError
|
||||
{
|
||||
if (self.entryType == IRCAddressBookIgnoreEntryType)
|
||||
if (self.entryType == IRCAddressBookEntryTypeIgnore)
|
||||
{
|
||||
return [self okOrErrorForTextField:self.ignoreEntryHostmaskTextField];
|
||||
}
|
||||
else if (self.entryType == IRCAddressBookUserTrackingEntryType)
|
||||
else if (self.entryType == IRCAddressBookEntryTypeUserTracking)
|
||||
{
|
||||
return [self okOrErrorForTextField:self.userTrackingEntryNicknameTextField];
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ NSString * const TDCAlertSuppressionPrefix = @"Text Input Prompt Suppression ->
|
||||
suppressionKey:suppressKey
|
||||
suppressionResponse:suppressionResponse];
|
||||
|
||||
return (response == TDCAlertResponseDefaultButton);
|
||||
return (response == TDCAlertResponseDefault);
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
@@ -310,7 +310,7 @@ NSString * const TDCAlertSuppressionPrefix = @"Text Input Prompt Suppression ->
|
||||
/* Exit if suppressed */
|
||||
if ([RZUserDefaults() boolForKey:suppressKey]) {
|
||||
if (completionBlock) {
|
||||
completionBlock(TDCAlertResponseDefaultButton, YES, nil);
|
||||
completionBlock(TDCAlertResponseDefault, YES, nil);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -344,7 +344,7 @@ NSString * const TDCAlertSuppressionPrefix = @"Text Input Prompt Suppression ->
|
||||
}
|
||||
|
||||
/* Pop alert */
|
||||
[alert showAlertWithCompletionBlock:^(TVCAlert *sender, TVCAlertResponse buttonClicked)
|
||||
[alert showAlertWithCompletionBlock:^(TVCAlert *sender, TVCAlertResponseButton buttonClicked)
|
||||
{
|
||||
[self _finalizeAlert:alert
|
||||
withResponse:[self _convertResponseFromTVCAlert:buttonClicked]
|
||||
@@ -478,7 +478,7 @@ NSString * const TDCAlertSuppressionPrefix = @"Text Input Prompt Suppression ->
|
||||
/* Exit if suppressed */
|
||||
if ([RZUserDefaults() boolForKey:suppressKey]) {
|
||||
if (completionBlock) {
|
||||
completionBlock(TDCAlertResponseDefaultButton, YES, nil);
|
||||
completionBlock(TDCAlertResponseDefault, YES, nil);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -612,33 +612,33 @@ NSString * const TDCAlertSuppressionPrefix = @"Text Input Prompt Suppression ->
|
||||
switch (response) {
|
||||
case NSAlertSecondButtonReturn:
|
||||
{
|
||||
return TDCAlertResponseAlternateButton;
|
||||
return TDCAlertResponseAlternate;
|
||||
}
|
||||
case NSAlertThirdButtonReturn:
|
||||
{
|
||||
return TDCAlertResponseOtherButton;
|
||||
return TDCAlertResponseOther;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return TDCAlertResponseDefaultButton;
|
||||
return TDCAlertResponseDefault;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+ (TDCAlertResponse)_convertResponseFromTVCAlert:(TVCAlertResponse)response
|
||||
+ (TDCAlertResponse)_convertResponseFromTVCAlert:(TVCAlertResponseButton)response
|
||||
{
|
||||
switch (response) {
|
||||
case TVCAlertResponseSecondButton:
|
||||
case TVCAlertResponseButtonSecond:
|
||||
{
|
||||
return TDCAlertResponseAlternateButton;
|
||||
return TDCAlertResponseAlternate;
|
||||
}
|
||||
case TVCAlertResponseThirdButton:
|
||||
case TVCAlertResponseButtonThird:
|
||||
{
|
||||
return TDCAlertResponseOtherButton;
|
||||
return TDCAlertResponseOther;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return TDCAlertResponseDefaultButton;
|
||||
return TDCAlertResponseDefault;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,13 +107,13 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
NSString *headerTitle = nil;
|
||||
|
||||
if (self.entryType == TDCChannelBanListSheetBanEntryType) {
|
||||
if (self.entryType == TDCChannelBanListSheetEntryTypeBan) {
|
||||
headerTitle = TXTLS(@"TDCChannelBanListSheet[rhc-ke]", self.channel.name);
|
||||
} else if (self.entryType == TDCChannelBanListSheetBanExceptionEntryType) {
|
||||
} else if (self.entryType == TDCChannelBanListSheetEntryTypeBanException) {
|
||||
headerTitle = TXTLS(@"TDCChannelBanListSheet[gbi-wn]", self.channel.name);
|
||||
} else if (self.entryType == TDCChannelBanListSheetInviteExceptionEntryType) {
|
||||
} else if (self.entryType == TDCChannelBanListSheetEntryTypeInviteException) {
|
||||
headerTitle = TXTLS(@"TDCChannelBanListSheet[ylc-6e]", self.channel.name);
|
||||
} else if (self.entryType == TDCChannelBanListSheetQuietEntryType) {
|
||||
} else if (self.entryType == TDCChannelBanListSheetEntryTypeQuiet) {
|
||||
headerTitle = TXTLS(@"TDCChannelBanListSheet[g4r-t6]", self.channel.name);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,11 +52,11 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TDCChannelPropertiesSheetNavigationSelection)
|
||||
typedef NS_ENUM(NSUInteger, TDCChannelPropertiesSheetSelection)
|
||||
{
|
||||
TDCChannelPropertiesSheetGeneralSelection = 0,
|
||||
TDCChannelPropertiesSheetDefaultsSelection = 1,
|
||||
TDCChannelPropertiesSheetNotificationsSelection = 2
|
||||
TDCChannelPropertiesSheetSelectionGeneral = 0,
|
||||
TDCChannelPropertiesSheetSelectionDefaults = 1,
|
||||
TDCChannelPropertiesSheetSelectionNotifications = 2
|
||||
};
|
||||
|
||||
@interface TDCChannelPropertiesSheet ()
|
||||
@@ -222,13 +222,13 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
|
||||
NSMutableArray *notifications = [NSMutableArray array];
|
||||
|
||||
[notifications addObject:[[TDCChannelPropertiesNotificationConfiguration alloc] initWithEventType:TXNotificationHighlightType inSheet:self]];
|
||||
[notifications addObject:[[TDCChannelPropertiesNotificationConfiguration alloc] initWithEventType:TXNotificationTypeHighlight inSheet:self]];
|
||||
[notifications addObject:@" "];
|
||||
[notifications addObject:[[TDCChannelPropertiesNotificationConfiguration alloc] initWithEventType:TXNotificationChannelMessageType inSheet:self]];
|
||||
[notifications addObject:[[TDCChannelPropertiesNotificationConfiguration alloc] initWithEventType:TXNotificationChannelNoticeType inSheet:self]];
|
||||
[notifications addObject:[[TDCChannelPropertiesNotificationConfiguration alloc] initWithEventType:TXNotificationTypeChannelMessage inSheet:self]];
|
||||
[notifications addObject:[[TDCChannelPropertiesNotificationConfiguration alloc] initWithEventType:TXNotificationTypeChannelNotice inSheet:self]];
|
||||
[notifications addObject:@" "];
|
||||
[notifications addObject:[[TDCChannelPropertiesNotificationConfiguration alloc] initWithEventType:TXNotificationUserJoinedType inSheet:self]];
|
||||
[notifications addObject:[[TDCChannelPropertiesNotificationConfiguration alloc] initWithEventType:TXNotificationUserPartedType inSheet:self]];
|
||||
[notifications addObject:[[TDCChannelPropertiesNotificationConfiguration alloc] initWithEventType:TXNotificationTypeUserJoined inSheet:self]];
|
||||
[notifications addObject:[[TDCChannelPropertiesNotificationConfiguration alloc] initWithEventType:TXNotificationTypeUserParted inSheet:self]];
|
||||
|
||||
self.notificationsController.notifications = notifications;
|
||||
|
||||
@@ -243,7 +243,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
- (void)updateNavigationEnabledState
|
||||
{
|
||||
[self.contentViewTabView setEnabled:(self.pushNotificationsCheck.state == NSOnState)
|
||||
forSegment:TDCChannelPropertiesSheetNotificationsSelection];
|
||||
forSegment:TDCChannelPropertiesSheetSelectionNotifications];
|
||||
}
|
||||
|
||||
- (void)loadConfig
|
||||
@@ -274,7 +274,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
[self _navigateToSelection:[sender indexOfSelectedItem]];
|
||||
}
|
||||
|
||||
- (void)navigateToSelection:(TDCChannelPropertiesSheetNavigationSelection)selection
|
||||
- (void)navigateToSelection:(TDCChannelPropertiesSheetSelection)selection
|
||||
{
|
||||
if (self.contentViewTabView.indexOfSelectedItem == selection) {
|
||||
return;
|
||||
@@ -285,7 +285,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
[self _navigateToSelection:selection];
|
||||
}
|
||||
|
||||
- (void)_navigateToSelection:(TDCChannelPropertiesSheetNavigationSelection)selection
|
||||
- (void)_navigateToSelection:(TDCChannelPropertiesSheetSelection)selection
|
||||
{
|
||||
[self selectPane:self.navigationTree[selection][0]];
|
||||
|
||||
@@ -307,7 +307,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
{
|
||||
[self startSheet];
|
||||
|
||||
[self _navigateToSelection:TDCChannelPropertiesSheetGeneralSelection];
|
||||
[self _navigateToSelection:TDCChannelPropertiesSheetSelectionGeneral];
|
||||
}
|
||||
|
||||
- (void)controlTextDidChange:(NSNotification *)aNotification
|
||||
@@ -378,7 +378,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
alternateButton:TXTLS(@"Prompts[99q-gg]")
|
||||
otherButton:nil
|
||||
completionBlock:^(TDCAlertResponse buttonClicked, BOOL suppressed, id underlyingAlert) {
|
||||
if (buttonClicked != TDCAlertResponseDefaultButton) {
|
||||
if (buttonClicked != TDCAlertResponseDefault) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -452,10 +452,10 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
|
||||
- (BOOL)okOrError
|
||||
{
|
||||
return [self okOrErrorForTextField:self.channelNameTextField inSelection:TDCChannelPropertiesSheetGeneralSelection];
|
||||
return [self okOrErrorForTextField:self.channelNameTextField inSelection:TDCChannelPropertiesSheetSelectionGeneral];
|
||||
}
|
||||
|
||||
- (BOOL)okOrErrorForTextField:(TVCValidatedTextField *)textField inSelection:(TDCChannelPropertiesSheetNavigationSelection)selection
|
||||
- (BOOL)okOrErrorForTextField:(TVCValidatedTextField *)textField inSelection:(TDCChannelPropertiesSheetSelection)selection
|
||||
{
|
||||
if (textField.valueIsValid) {
|
||||
return YES;
|
||||
|
||||
@@ -41,12 +41,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@implementation TDCInputPrompt
|
||||
|
||||
+ (TVCAlertResponse)promptWithMessage:(NSString *)bodyText
|
||||
title:(NSString *)titleText
|
||||
defaultButton:(NSString *)buttonDefault
|
||||
alternateButton:(nullable NSString *)buttonAlternate
|
||||
prefillString:(nullable NSString *)prefillString
|
||||
resultString:(NSString * _Nonnull * _Nonnull )resultString
|
||||
+ (TVCAlertResponseButton)promptWithMessage:(NSString *)bodyText
|
||||
title:(NSString *)titleText
|
||||
defaultButton:(NSString *)buttonDefault
|
||||
alternateButton:(nullable NSString *)buttonAlternate
|
||||
prefillString:(nullable NSString *)prefillString
|
||||
resultString:(NSString * _Nonnull * _Nonnull )resultString
|
||||
{
|
||||
NSParameterAssert(bodyText != nil);
|
||||
NSParameterAssert(titleText != nil);
|
||||
@@ -104,7 +104,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
alert.window.initialFirstResponder = textField;
|
||||
|
||||
/* Run modal */
|
||||
TVCAlertResponse response = [alert runModal];
|
||||
TVCAlertResponseButton response = [alert runModal];
|
||||
|
||||
/* Assign result */
|
||||
*resultString = textField.stringValue;
|
||||
|
||||
@@ -511,7 +511,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
[[TVCContentNavigationOutlineViewItem alloc] initWithLabel:TXTLS(_label_) identifier:0 view:nil firstResponder:nil children:(_children_)]
|
||||
|
||||
#define _childItem(_label_, _identifier_) \
|
||||
[[TVCContentNavigationOutlineViewItem alloc] initWithLabel:TXTLS(_label_) identifier:TDCServerPropertiesSheet ##_identifier_## Selection view:self.contentView ##_identifier_ firstResponder:nil]
|
||||
[[TVCContentNavigationOutlineViewItem alloc] initWithLabel:TXTLS(_label_) identifier:TDCServerPropertiesSheetSelection ##_identifier_ view:self.contentView ##_identifier_ firstResponder:nil]
|
||||
|
||||
NSArray *generalSectionChildren = @[
|
||||
_childItem(@"TDCServerPropertiesSheet[8zc-6y]", AddressBook),
|
||||
@@ -633,17 +633,17 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (void)start
|
||||
{
|
||||
[self startWithSelection:TDCServerPropertiesSheetDefaultSelection context:nil];
|
||||
[self startWithSelection:TDCServerPropertiesSheetSelectionDefault context:nil];
|
||||
}
|
||||
|
||||
- (void)startWithSelection:(TDCServerPropertiesSheetNavigationSelection)selection context:(nullable id)context
|
||||
- (void)startWithSelection:(TDCServerPropertiesSheetSelection)selection context:(nullable id)context
|
||||
{
|
||||
[self startSheet];
|
||||
|
||||
[self navigateToSelection:selection];
|
||||
|
||||
switch (selection) {
|
||||
case TDCServerPropertiesSheetNewIgnoreEntrySelection:
|
||||
case TDCServerPropertiesSheetSelectionNewIgnoreEntry:
|
||||
{
|
||||
if ([context isKindOfClass:[NSString class]]) {
|
||||
[self addIgnoreAddressBookEntryWithHostmask:context];
|
||||
@@ -660,12 +660,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
}
|
||||
|
||||
- (void)navigateToSelection:(TDCServerPropertiesSheetNavigationSelection)selection
|
||||
- (void)navigateToSelection:(TDCServerPropertiesSheetSelection)selection
|
||||
{
|
||||
if (selection == TDCServerPropertiesSheetDefaultSelection) {
|
||||
selection = TDCServerPropertiesSheetGeneralSelection;
|
||||
} else if (selection == TDCServerPropertiesSheetNewIgnoreEntrySelection) {
|
||||
selection = TDCServerPropertiesSheetAddressBookSelection;
|
||||
if (selection == TDCServerPropertiesSheetSelectionDefault) {
|
||||
selection = TDCServerPropertiesSheetSelectionGeneral;
|
||||
} else if (selection == TDCServerPropertiesSheetSelectionNewIgnoreEntry) {
|
||||
selection = TDCServerPropertiesSheetSelectionAddressBook;
|
||||
}
|
||||
|
||||
[self.navigationOutlineView navigateToItemWithIdentifier:selection];
|
||||
@@ -719,7 +719,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (BOOL)okOrError
|
||||
{
|
||||
TDCServerPropertiesSheetNavigationSelection selection = self.navigationOutlineView.selectedItem.identifier;
|
||||
TDCServerPropertiesSheetSelection selection = self.navigationOutlineView.selectedItem.identifier;
|
||||
|
||||
if ([self okOrErrorForSelection:selection] == NO) {
|
||||
return NO;
|
||||
@@ -731,10 +731,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
view, remove that from array, then enumerate the rest. */
|
||||
NSMutableArray *remainingSelections =
|
||||
[@[
|
||||
@(TDCServerPropertiesSheetGeneralSelection),
|
||||
@(TDCServerPropertiesSheetIdentitySelection),
|
||||
@(TDCServerPropertiesSheetDisconnectMessagesSelection),
|
||||
@(TDCServerPropertiesSheetProxyServerSelection),
|
||||
@(TDCServerPropertiesSheetSelectionGeneral),
|
||||
@(TDCServerPropertiesSheetSelectionIdentity),
|
||||
@(TDCServerPropertiesSheetSelectionDisconnectMessages),
|
||||
@(TDCServerPropertiesSheetSelectionProxyServer),
|
||||
] mutableCopy];
|
||||
|
||||
[remainingSelections removeObject:@(selection)];
|
||||
@@ -748,10 +748,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)okOrErrorForSelection:(TDCServerPropertiesSheetNavigationSelection)selection
|
||||
- (BOOL)okOrErrorForSelection:(TDCServerPropertiesSheetSelection)selection
|
||||
{
|
||||
switch (selection) {
|
||||
case TDCServerPropertiesSheetGeneralSelection:
|
||||
case TDCServerPropertiesSheetSelectionGeneral:
|
||||
{
|
||||
if ([self okOrErrorForTextField:self.connectionNameTextField inSelection:selection] == NO) {
|
||||
return NO;
|
||||
@@ -764,7 +764,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
break;
|
||||
}
|
||||
|
||||
case TDCServerPropertiesSheetIdentitySelection:
|
||||
case TDCServerPropertiesSheetSelectionIdentity:
|
||||
{
|
||||
if ([self okOrErrorForTextField:self.nicknameTextField inSelection:selection] == NO) {
|
||||
return NO;
|
||||
@@ -781,7 +781,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
break;
|
||||
}
|
||||
|
||||
case TDCServerPropertiesSheetDisconnectMessagesSelection:
|
||||
case TDCServerPropertiesSheetSelectionDisconnectMessages:
|
||||
{
|
||||
if ([self okOrErrorForTextField:self.normalLeavingCommentTextField inSelection:selection] == NO) {
|
||||
return NO;
|
||||
@@ -792,7 +792,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
break;
|
||||
}
|
||||
|
||||
case TDCServerPropertiesSheetProxyServerSelection:
|
||||
case TDCServerPropertiesSheetSelectionProxyServer:
|
||||
{
|
||||
if ([self okOrErrorForTextField:self.proxyAddressTextField inSelection:selection] == NO) {
|
||||
return NO;
|
||||
@@ -811,7 +811,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)okOrErrorForComboBox:(TVCValidatedComboBox *)comboBox inSelection:(TDCServerPropertiesSheetNavigationSelection)selection
|
||||
- (BOOL)okOrErrorForComboBox:(TVCValidatedComboBox *)comboBox inSelection:(TDCServerPropertiesSheetSelection)selection
|
||||
{
|
||||
if (comboBox.valueIsValid) {
|
||||
return YES;
|
||||
@@ -826,7 +826,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)okOrErrorForTextField:(TVCValidatedTextField *)textField inSelection:(TDCServerPropertiesSheetNavigationSelection)selection
|
||||
- (BOOL)okOrErrorForTextField:(TVCValidatedTextField *)textField inSelection:(TDCServerPropertiesSheetSelection)selection
|
||||
{
|
||||
if (textField.valueIsValid) {
|
||||
return YES;
|
||||
@@ -881,7 +881,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
alternateButton:TXTLS(@"Prompts[99q-gg]")
|
||||
otherButton:nil
|
||||
completionBlock:^(TDCAlertResponse buttonClicked, BOOL suppressed, id underlyingAlert) {
|
||||
if (buttonClicked != TDCAlertResponseDefaultButton) {
|
||||
if (buttonClicked != TDCAlertResponseDefault) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1484,7 +1484,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
alternateButton:TXTLS(@"Prompts[99q-gg]")
|
||||
otherButton:nil
|
||||
completionBlock:^(TDCAlertResponse buttonClicked, BOOL suppressed, id underlyingAlert) {
|
||||
if (buttonClicked == TDCAlertResponseAlternateButton) {
|
||||
if (buttonClicked == TDCAlertResponseAlternate) {
|
||||
self.requestRemovalFromCloudOnClose = NO;
|
||||
} else {
|
||||
self.requestRemovalFromCloudOnClose = YES;
|
||||
@@ -2021,7 +2021,7 @@ TEXTUAL_IGNORE_DEPRECATION_END
|
||||
|
||||
sheet = [[TDCAddressBookSheet alloc] initWithConfig:config];
|
||||
} else {
|
||||
sheet = [[TDCAddressBookSheet alloc] initWithEntryType:IRCAddressBookIgnoreEntryType];
|
||||
sheet = [[TDCAddressBookSheet alloc] initWithEntryType:IRCAddressBookEntryTypeIgnore];
|
||||
}
|
||||
|
||||
sheet.delegate = self;
|
||||
@@ -2036,7 +2036,7 @@ TEXTUAL_IGNORE_DEPRECATION_END
|
||||
- (void)addUserTrackingAddressBookEntry
|
||||
{
|
||||
TDCAddressBookSheet *sheet =
|
||||
[[TDCAddressBookSheet alloc] initWithEntryType:IRCAddressBookUserTrackingEntryType];
|
||||
[[TDCAddressBookSheet alloc] initWithEntryType:IRCAddressBookEntryTypeUserTracking];
|
||||
|
||||
sheet.delegate = self;
|
||||
|
||||
@@ -2208,7 +2208,7 @@ TEXTUAL_IGNORE_DEPRECATION_END
|
||||
}
|
||||
else if ([columnId isEqualToString:@"type"])
|
||||
{
|
||||
if (config.entryType == IRCAddressBookIgnoreEntryType) {
|
||||
if (config.entryType == IRCAddressBookEntryTypeIgnore) {
|
||||
return TXTLS(@"TDCServerPropertiesSheet[f7o-x4]");
|
||||
} else {
|
||||
return TXTLS(@"TDCServerPropertiesSheet[b0g-0x]");
|
||||
|
||||
@@ -38,22 +38,22 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, IRCAddressBookEntryType) {
|
||||
IRCAddressBookIgnoreEntryType = 0,
|
||||
IRCAddressBookUserTrackingEntryType,
|
||||
IRCAddressBookEntryTypeIgnore = 0,
|
||||
IRCAddressBookEntryTypeUserTracking,
|
||||
|
||||
/* Entry type used when multiple instances of IRCAddressBookEntry
|
||||
are combined into a single object which represents all. */
|
||||
IRCAddressBookMixedEntryType,
|
||||
IRCAddressBookEntryTypeMixed
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, IRCAddressBookUserTrackingStatus) {
|
||||
IRCAddressBookUserTrackingUnknownStatus = 0,
|
||||
IRCAddressBookUserTrackingSignedOffStatus,
|
||||
IRCAddressBookUserTrackingSignedOnStatus,
|
||||
IRCAddressBookUserTrackingIsAvailalbeStatus,
|
||||
IRCAddressBookUserTrackingIsNotAvailalbeStatus,
|
||||
IRCAddressBookUserTrackingIsAwayStatus,
|
||||
IRCAddressBookUserTrackingIsNotAwayStatus
|
||||
IRCAddressBookUserTrackingStatusUnknown = 0,
|
||||
IRCAddressBookUserTrackingStatusSignedOff,
|
||||
IRCAddressBookUserTrackingStatusSignedOn,
|
||||
IRCAddressBookUserTrackingStatusAvailalbe,
|
||||
IRCAddressBookUserTrackingStatusNotAvailalbe,
|
||||
IRCAddressBookUserTrackingStatusAway,
|
||||
IRCAddressBookUserTrackingStatusNotAway
|
||||
};
|
||||
|
||||
#pragma mark -
|
||||
@@ -77,7 +77,7 @@ typedef NS_ENUM(NSUInteger, IRCAddressBookUserTrackingStatus) {
|
||||
@property (readonly) BOOL ignoreMessagesContainingMatch;
|
||||
@property (readonly) BOOL trackUserActivity;
|
||||
|
||||
/* When IRCAddressBookMixedEntryType is mixed, this array holds
|
||||
/* When IRCAddressBookEntryTypeMixed is mixed, this array holds
|
||||
a reference to each entry that is mixed into the current object. */
|
||||
@property (readonly, copy, nullable) NSArray<IRCAddressBookEntry *> *parentEntries;
|
||||
|
||||
|
||||
@@ -41,12 +41,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class IRCClient;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCAddressBookUserTrackingStatusChangedNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCAddressBookUserTrackingStatusChangedNotification;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCAddressBookUserTrackingAddedTrackedUserNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCAddressBookUserTrackingAddedTrackedUserNotification;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCAddressBookUserTrackingRemovedTrackedUserNotification;
|
||||
TEXTUAL_EXTERN NSString * const IRCAddressBookUserTrackingRemovedAllTrackedUsersNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCAddressBookUserTrackingRemovedTrackedUserNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCAddressBookUserTrackingRemovedAllTrackedUsersNotification;
|
||||
|
||||
@interface IRCAddressBookUserTrackingContainer : NSObject
|
||||
@property (readonly, weak) IRCClient *client;
|
||||
|
||||
@@ -51,18 +51,18 @@ typedef NS_ENUM(NSUInteger, IRCChannelStatus) {
|
||||
IRCChannelStatusTerminated,
|
||||
};
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCChannelConfigurationWasUpdatedNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCChannelConfigurationWasUpdatedNotification;
|
||||
|
||||
@interface IRCChannel : IRCTreeItem
|
||||
@property (readonly, copy) IRCChannelConfig *config;
|
||||
@property (nonatomic, copy) NSString *name; // -setName: will do nothing if type != IRCChannelPrivateMessageType
|
||||
@property (nonatomic, copy) NSString *name; // -setName: will do nothing if type != IRCChannelTypePrivateMessage
|
||||
@property (nonatomic, copy, nullable) NSString *topic;
|
||||
@property (nonatomic, assign) BOOL autoJoin;
|
||||
@property (readonly) IRCChannelType type;
|
||||
@property (getter=isChannel, readonly) BOOL channel;
|
||||
@property (getter=isPrivateMessage, readonly) BOOL privateMessage;
|
||||
@property (getter=isPrivateMessageForZNCUser, readonly) BOOL privateMessageForZNCUser; // For example: *status, *nickserv, etc.
|
||||
@property (getter=isUtility, readonly) BOOL utility; // See IRCChannelUtilityType in IRCChannelConfig.h
|
||||
@property (getter=isUtility, readonly) BOOL utility; // See IRCChannelTypeUtility in IRCChannelConfig.h
|
||||
@property (readonly) IRCChannelStatus status;
|
||||
@property (readonly) BOOL errorOnLastJoinAttempt;
|
||||
@property (readonly) NSTimeInterval channelJoinTime;
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, IRCChannelType) {
|
||||
IRCChannelChannelType = 0,
|
||||
IRCChannelPrivateMessageType,
|
||||
IRCChannelUtilityType,
|
||||
IRCChannelTypeChannel = 0,
|
||||
IRCChannelTypePrivateMessage,
|
||||
IRCChannelTypeUtility,
|
||||
};
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@@ -41,13 +41,13 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@class IRCUser, IRCUserMutable;
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, IRCUserRank) {
|
||||
IRCUserNoRank = 1 << 0, // nothing
|
||||
IRCUserIRCopByModeRank = 1 << 1, // +y/+Y
|
||||
IRCUserChannelOwnerRank = 1 << 2, // +q
|
||||
IRCUserSuperOperatorRank = 1 << 3, // +a
|
||||
IRCUserNormalOperatorRank = 1 << 4, // +o
|
||||
IRCUserHalfOperatorRank = 1 << 5, // +h
|
||||
IRCUserVoicedRank = 1 << 6 // +v
|
||||
IRCUserRankNone = 1 << 0, // nothing
|
||||
IRCUserRankIRCopByMode = 1 << 1, // +y/+Y
|
||||
IRCUserRankChannelOwner = 1 << 2, // +q
|
||||
IRCUserRankSuperOperator = 1 << 3, // +a
|
||||
IRCUserRankNonermalOperator = 1 << 4, // +o
|
||||
IRCUserRankHalfOperator = 1 << 5, // +h
|
||||
IRCUserRankVoiced = 1 << 6 // +v
|
||||
};
|
||||
|
||||
#pragma mark -
|
||||
@@ -69,7 +69,7 @@ typedef NS_OPTIONS(NSUInteger, IRCUserRank) {
|
||||
@property (getter=isOp, readonly) BOOL op;
|
||||
@property (getter=isHalfOp, readonly) BOOL halfOp;
|
||||
|
||||
// -rank(s) returns IRCUserIRCopByModeRank if the +Y/+y modes defined
|
||||
// -rank(s) returns IRCUserRankIRCopByMode if the +Y/+y modes defined
|
||||
// by InspIRCd-2.0 for IRC operators are in use by this user. It does not
|
||||
// return this if the user is an IRC operator, but lacks these modes.
|
||||
// Use -isCop for the status of the user regardless of these modes.
|
||||
|
||||
@@ -49,24 +49,24 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@class IRCAddressBookEntry, IRCMessage, IRCServer, IRCUser;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, IRCClientConnectMode) {
|
||||
IRCClientConnectNormalMode = 0,
|
||||
IRCClientConnectRetryMode,
|
||||
IRCClientConnectReconnectMode,
|
||||
IRCClientConnectModeNormal = 0,
|
||||
IRCClientConnectModeRetry,
|
||||
IRCClientConnectModeReconnect,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, IRCClientDisconnectMode) {
|
||||
IRCClientDisconnectNormalMode = 0,
|
||||
IRCClientDisconnectComputerSleepMode,
|
||||
IRCClientDisconnectBadCertificateMode,
|
||||
IRCClientDisconnectReachabilityChangeMode,
|
||||
IRCClientDisconnectServerRedirectMode,
|
||||
IRCClientDisconnectModeNormal = 0,
|
||||
IRCClientDisconnectModeComputerSleep,
|
||||
IRCClientDisconnectModeBadCertificate,
|
||||
IRCClientDisconnectModeReachabilityChange,
|
||||
IRCClientDisconnectModeServerRedirect,
|
||||
|
||||
#if TEXTUAL_BUILT_FOR_APP_STORE_DISTRIBUTION == 1
|
||||
IRCClientDisconnectSoftwareTrialMode,
|
||||
IRCClientDisconnectModeSoftwareTrial,
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, ClientIRCv3SupportedCapabilities) {
|
||||
typedef NS_OPTIONS(NSUInteger, ClientIRCv3SupportedCapability) {
|
||||
ClientIRCv3SupportedCapabilityAwayNotify = 1 << 0, // YES if away-notify CAP supported
|
||||
ClientIRCv3SupportedCapabilityBatch = 1 << 1, // YES if batch CAP supported
|
||||
ClientIRCv3SupportedCapabilityEchoMessage = 1 << 2, // YES if echo-message CAP supported
|
||||
@@ -85,18 +85,18 @@ typedef NS_OPTIONS(NSUInteger, ClientIRCv3SupportedCapabilities) {
|
||||
ClientIRCv3SupportedCapabilityChangeHost = 1 << 15 // YES if the CHGHOST CAP supported
|
||||
};
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCClientConfigurationWasUpdatedNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCClientConfigurationWasUpdatedNotification;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCClientChannelListWasModifiedNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCClientChannelListWasModifiedNotification;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCClientWillConnectNotification;
|
||||
TEXTUAL_EXTERN NSString * const IRCClientDidConnectNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCClientWillConnectNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCClientDidConnectNotification;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCClientWillSendQuitNotification;
|
||||
TEXTUAL_EXTERN NSString * const IRCClientWillDisconnectNotification;
|
||||
TEXTUAL_EXTERN NSString * const IRCClientDidDisconnectNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCClientWillSendQuitNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCClientWillDisconnectNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCClientDidDisconnectNotification;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCClientUserNicknameChangedNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCClientUserNicknameChangedNotification;
|
||||
|
||||
@interface IRCClient : IRCTreeItem <IRCConnectionDelegate>
|
||||
@property (readonly, copy) IRCClientConfig *config;
|
||||
@@ -143,12 +143,12 @@ TEXTUAL_EXTERN NSString * const IRCClientUserNicknameChangedNotification;
|
||||
|
||||
- (void)cancelReconnect;
|
||||
|
||||
@property (readonly) ClientIRCv3SupportedCapabilities capacities;
|
||||
@property (readonly) ClientIRCv3SupportedCapability capacities;
|
||||
@property (readonly, copy) NSString *enabledCapacitiesStringValue;
|
||||
|
||||
- (BOOL)isCapabilitySupported:(NSString *)capabilityString;
|
||||
|
||||
- (BOOL)isCapabilityEnabled:(ClientIRCv3SupportedCapabilities)capability;
|
||||
- (BOOL)isCapabilityEnabled:(ClientIRCv3SupportedCapability)capability;
|
||||
|
||||
- (void)joinChannel:(IRCChannel *)channel;
|
||||
- (void)joinChannel:(IRCChannel *)channel password:(nullable NSString *)password;
|
||||
|
||||
@@ -39,34 +39,36 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, IRCTextFormatterEffectType) {
|
||||
IRCTextFormatterNoEffect = 0,
|
||||
IRCTextFormatterBoldEffect,
|
||||
IRCTextFormatterItalicEffect,
|
||||
IRCTextFormatterMonospaceEffect,
|
||||
IRCTextFormatterStrikethroughEffect,
|
||||
IRCTextFormatterUnderlineEffect,
|
||||
IRCTextFormatterForegroundColorEffect,
|
||||
IRCTextFormatterBackgroundColorEffect,
|
||||
IRCTextFormatterSpoilerEffect,
|
||||
IRCTextFormatterEffectNone = 0,
|
||||
IRCTextFormatterEffectBold,
|
||||
IRCTextFormatterEffectItalic,
|
||||
IRCTextFormatterEffectMonospace,
|
||||
IRCTextFormatterEffectStrikethrough,
|
||||
IRCTextFormatterEffectUnderline,
|
||||
IRCTextFormatterEffectForegroundColor,
|
||||
IRCTextFormatterEffectBackgroundColor,
|
||||
IRCTextFormatterEffectSpoiler,
|
||||
};
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCTextFormatterBoldAttributeName; // BOOL
|
||||
TEXTUAL_EXTERN NSString * const IRCTextFormatterItalicAttributeName; // BOOL
|
||||
TEXTUAL_EXTERN NSString * const IRCTextFormatterMonospaceAttributeName; // BOOL
|
||||
TEXTUAL_EXTERN NSString * const IRCTextFormatterStrikethroughAttributeName; // BOOL
|
||||
TEXTUAL_EXTERN NSString * const IRCTextFormatterUnderlineAttributeName; // BOOL
|
||||
TEXTUAL_EXTERN NSString * const IRCTextFormatterForegroundColorAttributeName; // NSNumber, 0-15 - or, NSColor
|
||||
TEXTUAL_EXTERN NSString * const IRCTextFormatterBackgroundColorAttributeName; // NSNumber, 0-15 - or, NSColor
|
||||
TEXTUAL_EXTERN NSString * const IRCTextFormatterSpoilerAttributeName; // BOOL
|
||||
typedef NSString *IRCTextFormatterAttributeName NS_EXTENSIBLE_STRING_ENUM;
|
||||
|
||||
#define IRCTextFormatterColorAsDigitEffectCharacter 0x03
|
||||
#define IRCTextFormatterColorAsHexEffectCharacter 0x04
|
||||
#define IRCTextFormatterBoldEffectCharacter 0x02
|
||||
#define IRCTextFormatterItalicEffectCharacter 0x1d
|
||||
#define IRCTextFormatterItalicEffectCharacterOld 0x16
|
||||
#define IRCTextFormatterMonospaceEffectCharacter 0x11
|
||||
#define IRCTextFormatterStrikethroughEffectCharacter 0x1e
|
||||
#define IRCTextFormatterUnderlineEffectCharacter 0x1F
|
||||
TEXTUAL_EXTERN IRCTextFormatterAttributeName const IRCTextFormatterBoldAttributeName; // BOOL
|
||||
TEXTUAL_EXTERN IRCTextFormatterAttributeName const IRCTextFormatterItalicAttributeName; // BOOL
|
||||
TEXTUAL_EXTERN IRCTextFormatterAttributeName const IRCTextFormatterMonospaceAttributeName; // BOOL
|
||||
TEXTUAL_EXTERN IRCTextFormatterAttributeName const IRCTextFormatterStrikethroughAttributeName; // BOOL
|
||||
TEXTUAL_EXTERN IRCTextFormatterAttributeName const IRCTextFormatterUnderlineAttributeName; // BOOL
|
||||
TEXTUAL_EXTERN IRCTextFormatterAttributeName const IRCTextFormatterForegroundColorAttributeName; // NSNumber, 0-15 - or, NSColor
|
||||
TEXTUAL_EXTERN IRCTextFormatterAttributeName const IRCTextFormatterBackgroundColorAttributeName; // NSNumber, 0-15 - or, NSColor
|
||||
TEXTUAL_EXTERN IRCTextFormatterAttributeName const IRCTextFormatterSpoilerAttributeName; // BOOL
|
||||
|
||||
#define IRCTextFormatterEffectColorAsDigitCharacter 0x03
|
||||
#define IRCTextFormatterEffectColorAsHexCharacter 0x04
|
||||
#define IRCTextFormatterEffectBoldCharacter 0x02
|
||||
#define IRCTextFormatterEffectItalicCharacter 0x1d
|
||||
#define IRCTextFormatterEffectItalicCharacterOld 0x16
|
||||
#define IRCTextFormatterEffectMonospaceCharacter 0x11
|
||||
#define IRCTextFormatterEffectStrikethroughCharacter 0x1e
|
||||
#define IRCTextFormatterEffectUnderlineCharacter 0x1F
|
||||
#define IRCTextFormatterTerminatingCharacter 0x0F
|
||||
|
||||
@class IRCTextFormatterEffects;
|
||||
|
||||
@@ -39,159 +39,159 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/* Local commands are client-local commands */
|
||||
typedef NS_ENUM(NSUInteger, IRCLocalCommand) {
|
||||
IRCLocalCommandAdchatIndex = 5001,
|
||||
IRCLocalCommandAmeIndex = 5002,
|
||||
IRCLocalCommandAmsgIndex = 5003,
|
||||
IRCLocalCommandAquoteIndex = 5095,
|
||||
IRCLocalCommandArawIndex = 5096,
|
||||
IRCLocalCommandAutojoinIndex = 5101,
|
||||
IRCLocalCommandAwayIndex = 5004,
|
||||
IRCLocalCommandBackIndex = 5105,
|
||||
IRCLocalCommandBanIndex = 5005,
|
||||
IRCLocalCommandCapIndex = 5006,
|
||||
IRCLocalCommandCapsIndex = 5007,
|
||||
IRCLocalCommandCcbadgeIndex = 5008,
|
||||
IRCLocalCommandChatopsIndex = 5009,
|
||||
IRCLocalCommandClearIndex = 5010,
|
||||
IRCLocalCommandClearallIndex = 5011,
|
||||
IRCLocalCommandCloseIndex = 5012,
|
||||
IRCLocalCommandConnIndex = 5013,
|
||||
IRCLocalCommandCtcpIndex = 5014,
|
||||
IRCLocalCommandCtcpreplyIndex = 5015,
|
||||
IRCLocalCommandCycleIndex = 5016,
|
||||
IRCLocalCommandDccIndex = 5017,
|
||||
IRCLocalCommandDebugIndex = 5018,
|
||||
IRCLocalCommandDefaultsIndex = 5092,
|
||||
IRCLocalCommandDehalfopIndex = 5019,
|
||||
IRCLocalCommandDeopIndex = 5020,
|
||||
IRCLocalCommandDevoiceIndex = 5021,
|
||||
IRCLocalCommandEchoIndex = 5022,
|
||||
IRCLocalCommandEmptycachesIndex = 5110,
|
||||
IRCLocalCommandFakerawdataIndex = 5087,
|
||||
IRCLocalCommandGetscriptsIndex = 5098,
|
||||
IRCLocalCommandGlineIndex = 5023,
|
||||
IRCLocalCommandGlobopsIndex = 5024,
|
||||
IRCLocalCommandGotoIndex = 5099,
|
||||
IRCLocalCommandGzlineIndex = 5025,
|
||||
IRCLocalCommandHalfopIndex = 5026,
|
||||
IRCLocalCommandHopIndex = 5027,
|
||||
IRCLocalCommandIcbadgeIndex = 5028,
|
||||
IRCLocalCommandIgnoreIndex = 5029,
|
||||
IRCLocalCommandInviteIndex = 5030,
|
||||
IRCLocalCommandIsonIndex = 5100,
|
||||
IRCLocalCommandJIndex = 5031,
|
||||
IRCLocalCommandJoinIndex = 5032,
|
||||
IRCLocalCommandJoinRandomIndex = 5109,
|
||||
IRCLocalCommandKbIndex = 5083,
|
||||
IRCLocalCommandKickIndex = 5033,
|
||||
IRCLocalCommandKickbanIndex = 5034,
|
||||
IRCLocalCommandKillIndex = 5035,
|
||||
IRCLocalCommandLagcheckIndex = 5084,
|
||||
IRCLocalCommandLeaveIndex = 5036,
|
||||
IRCLocalCommandListIndex = 5037,
|
||||
IRCLocalCommandLocopsIndex = 5039,
|
||||
IRCLocalCommandMIndex = 5040,
|
||||
IRCLocalCommandMeIndex = 5041,
|
||||
IRCLocalCommandModeIndex = 5042,
|
||||
IRCLocalCommandMonitorIndex = 5106,
|
||||
IRCLocalCommandMsgIndex = 5043,
|
||||
IRCLocalCommandMuteIndex = 5044,
|
||||
IRCLocalCommandMylagIndex = 5045,
|
||||
IRCLocalCommandMyversionIndex = 5046,
|
||||
IRCLocalCommandNachatIndex = 5047,
|
||||
IRCLocalCommandNamesIndex = 5094,
|
||||
IRCLocalCommandNickIndex = 5048,
|
||||
IRCLocalCommandNoticeIndex = 5050,
|
||||
IRCLocalCommandAdchat = 5001,
|
||||
IRCLocalCommandAme = 5002,
|
||||
IRCLocalCommandAmsg = 5003,
|
||||
IRCLocalCommandAquote = 5095,
|
||||
IRCLocalCommandAraw = 5096,
|
||||
IRCLocalCommandAutojoin = 5101,
|
||||
IRCLocalCommandAway = 5004,
|
||||
IRCLocalCommandBack = 5105,
|
||||
IRCLocalCommandBan = 5005,
|
||||
IRCLocalCommandCap = 5006,
|
||||
IRCLocalCommandCaps = 5007,
|
||||
IRCLocalCommandCcbadge = 5008,
|
||||
IRCLocalCommandChatops = 5009,
|
||||
IRCLocalCommandClear = 5010,
|
||||
IRCLocalCommandClearall = 5011,
|
||||
IRCLocalCommandClose = 5012,
|
||||
IRCLocalCommandConn = 5013,
|
||||
IRCLocalCommandCtcp = 5014,
|
||||
IRCLocalCommandCtcpreply = 5015,
|
||||
IRCLocalCommandCycle = 5016,
|
||||
IRCLocalCommandDcc = 5017,
|
||||
IRCLocalCommandDebug = 5018,
|
||||
IRCLocalCommandDefaults = 5092,
|
||||
IRCLocalCommandDehalfop = 5019,
|
||||
IRCLocalCommandDeop = 5020,
|
||||
IRCLocalCommandDevoice = 5021,
|
||||
IRCLocalCommandEcho = 5022,
|
||||
IRCLocalCommandEmptycaches = 5110,
|
||||
IRCLocalCommandFakerawdata = 5087,
|
||||
IRCLocalCommandGetscripts = 5098,
|
||||
IRCLocalCommandGline = 5023,
|
||||
IRCLocalCommandGlobops = 5024,
|
||||
IRCLocalCommandGoto = 5099,
|
||||
IRCLocalCommandGzline = 5025,
|
||||
IRCLocalCommandHalfop = 5026,
|
||||
IRCLocalCommandHop = 5027,
|
||||
IRCLocalCommandIcbadge = 5028,
|
||||
IRCLocalCommandIgnore = 5029,
|
||||
IRCLocalCommandInvite = 5030,
|
||||
IRCLocalCommandIson = 5100,
|
||||
IRCLocalCommandJ = 5031,
|
||||
IRCLocalCommandJoin = 5032,
|
||||
IRCLocalCommandJoinRandom = 5109,
|
||||
IRCLocalCommandKb = 5083,
|
||||
IRCLocalCommandKick = 5033,
|
||||
IRCLocalCommandKickban = 5034,
|
||||
IRCLocalCommandKill = 5035,
|
||||
IRCLocalCommandLagcheck = 5084,
|
||||
IRCLocalCommandLeave = 5036,
|
||||
IRCLocalCommandList = 5037,
|
||||
IRCLocalCommandLocops = 5039,
|
||||
IRCLocalCommandM = 5040,
|
||||
IRCLocalCommandMe = 5041,
|
||||
IRCLocalCommandMode = 5042,
|
||||
IRCLocalCommandMonitor = 5106,
|
||||
IRCLocalCommandMsg = 5043,
|
||||
IRCLocalCommandMute = 5044,
|
||||
IRCLocalCommandMylag = 5045,
|
||||
IRCLocalCommandMyversion = 5046,
|
||||
IRCLocalCommandNachat = 5047,
|
||||
IRCLocalCommandNames = 5094,
|
||||
IRCLocalCommandNick = 5048,
|
||||
IRCLocalCommandNotice = 5050,
|
||||
IRCLocalCommandNotifybubble = 5112,
|
||||
IRCLocalCommandNotifysound = 5113,
|
||||
IRCLocalCommandNotifyspeak = 5114,
|
||||
IRCLocalCommandOmsgIndex = 5051,
|
||||
IRCLocalCommandOnoticeIndex = 5052,
|
||||
IRCLocalCommandOpIndex = 5053,
|
||||
IRCLocalCommandPartIndex = 5054,
|
||||
IRCLocalCommandPassIndex = 5055,
|
||||
IRCLocalCommandQueryIndex = 5056,
|
||||
IRCLocalCommandQuietIndex = 5107,
|
||||
IRCLocalCommandQuitIndex = 5057,
|
||||
IRCLocalCommandQuoteIndex = 5058,
|
||||
IRCLocalCommandRawIndex = 5059,
|
||||
IRCLocalCommandRejoinIndex = 5060,
|
||||
IRCLocalCommandReloadICLIndex = 5115,
|
||||
IRCLocalCommandRemoveIndex = 5061,
|
||||
IRCLocalCommandServerIndex = 5062,
|
||||
IRCLocalCommandSetcolorIndex = 5103,
|
||||
IRCLocalCommandSetquerynameIndex = 5117,
|
||||
IRCLocalCommandShunIndex = 5063,
|
||||
IRCLocalCommandSmeIndex = 5064,
|
||||
IRCLocalCommandSmsgIndex = 5065,
|
||||
IRCLocalCommandSslcontextIndex = 5066,
|
||||
IRCLocalCommandTIndex = 5067,
|
||||
IRCLocalCommandTageIndex = 5093,
|
||||
IRCLocalCommandTempshunIndex = 5068,
|
||||
IRCLocalCommandTimerIndex = 5069,
|
||||
IRCLocalCommandTopicIndex = 5070,
|
||||
IRCLocalCommandUmeIndex = 5089,
|
||||
IRCLocalCommandUmodeIndex = 5071,
|
||||
IRCLocalCommandUmsgIndex = 5088,
|
||||
IRCLocalCommandUnbanIndex = 5072,
|
||||
IRCLocalCommandUnignoreIndex = 5073,
|
||||
IRCLocalCommandUnmuteIndex = 5075,
|
||||
IRCLocalCommandUnoticeIndex = 5090,
|
||||
IRCLocalCommandUnquietIndex = 5108,
|
||||
IRCLocalCommandVoiceIndex = 5076,
|
||||
IRCLocalCommandWallopsIndex = 5077,
|
||||
IRCLocalCommandWatchIndex = 5097,
|
||||
IRCLocalCommandWhoIndex = 5079,
|
||||
IRCLocalCommandWhoisIndex = 5080,
|
||||
IRCLocalCommandWhowasIndex = 5081,
|
||||
IRCLocalCommandZlineIndex = 5082
|
||||
IRCLocalCommandOmsg = 5051,
|
||||
IRCLocalCommandOnotice = 5052,
|
||||
IRCLocalCommandOp = 5053,
|
||||
IRCLocalCommandPart = 5054,
|
||||
IRCLocalCommandPass = 5055,
|
||||
IRCLocalCommandQuery = 5056,
|
||||
IRCLocalCommandQuiet = 5107,
|
||||
IRCLocalCommandQuit = 5057,
|
||||
IRCLocalCommandQuote = 5058,
|
||||
IRCLocalCommandRaw = 5059,
|
||||
IRCLocalCommandRejoin = 5060,
|
||||
IRCLocalCommandReloadICL = 5115,
|
||||
IRCLocalCommandRemove = 5061,
|
||||
IRCLocalCommandServer = 5062,
|
||||
IRCLocalCommandSetcolor = 5103,
|
||||
IRCLocalCommandSetqueryname = 5117,
|
||||
IRCLocalCommandShun = 5063,
|
||||
IRCLocalCommandSme = 5064,
|
||||
IRCLocalCommandSmsg = 5065,
|
||||
IRCLocalCommandSslcontext = 5066,
|
||||
IRCLocalCommandT = 5067,
|
||||
IRCLocalCommandTage = 5093,
|
||||
IRCLocalCommandTempshun = 5068,
|
||||
IRCLocalCommandTimer = 5069,
|
||||
IRCLocalCommandTopic = 5070,
|
||||
IRCLocalCommandUme = 5089,
|
||||
IRCLocalCommandUmode = 5071,
|
||||
IRCLocalCommandUmsg = 5088,
|
||||
IRCLocalCommandUnban = 5072,
|
||||
IRCLocalCommandUnignore = 5073,
|
||||
IRCLocalCommandUnmute = 5075,
|
||||
IRCLocalCommandUnotice = 5090,
|
||||
IRCLocalCommandUnquiet = 5108,
|
||||
IRCLocalCommandVoice = 5076,
|
||||
IRCLocalCommandWallops = 5077,
|
||||
IRCLocalCommandWatch = 5097,
|
||||
IRCLocalCommandWho = 5079,
|
||||
IRCLocalCommandWhois = 5080,
|
||||
IRCLocalCommandWhowas = 5081,
|
||||
IRCLocalCommandZline = 5082
|
||||
};
|
||||
|
||||
/* Remote commands are server-side commands */
|
||||
typedef NS_ENUM(NSUInteger, IRCRemoteCommand) {
|
||||
IRCRemoteCommandAdchatIndex = 1003,
|
||||
IRCRemoteCommandAuthenticateIndex = 1005,
|
||||
IRCRemoteCommandAwayIndex = 1050,
|
||||
IRCRemoteCommandBatchIndex = 1054,
|
||||
IRCRemoteCommandCapIndex = 1004,
|
||||
IRCRemoteCommandCertinfoIndex = 1055,
|
||||
IRCRemoteCommandChatopsIndex = 1006,
|
||||
IRCRemoteCommandChghostIndex = 1057,
|
||||
IRCRemoteCommandErrorIndex = 1016,
|
||||
IRCRemoteCommandGlineIndex = 1047,
|
||||
IRCRemoteCommandGlobopsIndex = 1017,
|
||||
IRCRemoteCommandGzlineIndex = 1048,
|
||||
IRCRemoteCommandInviteIndex = 1018,
|
||||
IRCRemoteCommandIsonIndex = 1019,
|
||||
IRCRemoteCommandJoinIndex = 1020,
|
||||
IRCRemoteCommandKickIndex = 1021,
|
||||
IRCRemoteCommandKillIndex = 1022,
|
||||
IRCRemoteCommandListIndex = 1023,
|
||||
IRCRemoteCommandLocopsIndex = 1024,
|
||||
IRCRemoteCommandModeIndex = 1026,
|
||||
IRCRemoteCommandMonitorIndex = 1056,
|
||||
IRCRemoteCommandNachatIndex = 1027,
|
||||
IRCRemoteCommandNamesIndex = 1028,
|
||||
IRCRemoteCommandNickIndex = 1029,
|
||||
IRCRemoteCommandNoticeIndex = 1030,
|
||||
IRCRemoteCommandPartIndex = 1031,
|
||||
IRCRemoteCommandPassIndex = 1032,
|
||||
IRCRemoteCommandPingIndex = 1033,
|
||||
IRCRemoteCommandPongIndex = 1034,
|
||||
IRCRemoteCommandPrivmsgIndex = 1035,
|
||||
IRCRemoteCommandPrivmsgActionIndex = 1002,
|
||||
IRCRemoteCommandQuitIndex = 1036,
|
||||
IRCRemoteCommandShunIndex = 1045,
|
||||
IRCRemoteCommandTempshunIndex = 1046,
|
||||
IRCRemoteCommandTimeIndex = 1012,
|
||||
IRCRemoteCommandTopicIndex = 1039,
|
||||
IRCRemoteCommandUserIndex = 1037,
|
||||
IRCRemoteCommandWallopsIndex = 1038,
|
||||
IRCRemoteCommandWatchIndex = 1053,
|
||||
IRCRemoteCommandWhoIndex = 1040,
|
||||
IRCRemoteCommandWhoisIndex = 1042,
|
||||
IRCRemoteCommandWhowasIndex = 1041,
|
||||
IRCRemoteCommandZlineIndex = 1049
|
||||
IRCRemoteCommandAdchat = 1003,
|
||||
IRCRemoteCommandAuthenticate = 1005,
|
||||
IRCRemoteCommandAway = 1050,
|
||||
IRCRemoteCommandBatch = 1054,
|
||||
IRCRemoteCommandCap = 1004,
|
||||
IRCRemoteCommandCertinfo = 1055,
|
||||
IRCRemoteCommandChatops = 1006,
|
||||
IRCRemoteCommandChghost = 1057,
|
||||
IRCRemoteCommandError = 1016,
|
||||
IRCRemoteCommandGline = 1047,
|
||||
IRCRemoteCommandGlobops = 1017,
|
||||
IRCRemoteCommandGzline = 1048,
|
||||
IRCRemoteCommandInvite = 1018,
|
||||
IRCRemoteCommandIson = 1019,
|
||||
IRCRemoteCommandJoin = 1020,
|
||||
IRCRemoteCommandKick = 1021,
|
||||
IRCRemoteCommandKill = 1022,
|
||||
IRCRemoteCommandList = 1023,
|
||||
IRCRemoteCommandLocops = 1024,
|
||||
IRCRemoteCommandMode = 1026,
|
||||
IRCRemoteCommandMonitor = 1056,
|
||||
IRCRemoteCommandNachat = 1027,
|
||||
IRCRemoteCommandNames = 1028,
|
||||
IRCRemoteCommandNick = 1029,
|
||||
IRCRemoteCommandNotice = 1030,
|
||||
IRCRemoteCommandPart = 1031,
|
||||
IRCRemoteCommandPass = 1032,
|
||||
IRCRemoteCommandPing = 1033,
|
||||
IRCRemoteCommandPong = 1034,
|
||||
IRCRemoteCommandPrivmsg = 1035,
|
||||
IRCRemoteCommandPrivmsgAction = 1002,
|
||||
IRCRemoteCommandQuit = 1036,
|
||||
IRCRemoteCommandShun = 1045,
|
||||
IRCRemoteCommandTempshun = 1046,
|
||||
IRCRemoteCommandTime = 1012,
|
||||
IRCRemoteCommandTopic = 1039,
|
||||
IRCRemoteCommandUser = 1037,
|
||||
IRCRemoteCommandWallops = 1038,
|
||||
IRCRemoteCommandWatch = 1053,
|
||||
IRCRemoteCommandWho = 1040,
|
||||
IRCRemoteCommandWhois = 1042,
|
||||
IRCRemoteCommandWhowas = 1041,
|
||||
IRCRemoteCommandZline = 1049
|
||||
};
|
||||
|
||||
/* Command index */
|
||||
@@ -210,161 +210,4 @@ TEXTUAL_EXTERN NSString * _Nullable IRCPublicCommandIndex(const char *indexKey)
|
||||
+ (nullable NSString *)syntaxForLocalCommand:(NSString *)command;
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Deprecated
|
||||
|
||||
typedef NS_ENUM(NSUInteger, IRCPublicCommand) {
|
||||
IRCPublicCommandAdchatIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandAdchatIndex instead") = IRCLocalCommandAdchatIndex,
|
||||
IRCPublicCommandAmeIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandAmeIndex instead") = IRCLocalCommandAmeIndex,
|
||||
IRCPublicCommandAmsgIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandAmsgIndex instead") = IRCLocalCommandAmsgIndex,
|
||||
IRCPublicCommandAquoteIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandAquoteIndex instead") = IRCLocalCommandAquoteIndex,
|
||||
IRCPublicCommandArawIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandArawIndex instead") = IRCLocalCommandArawIndex,
|
||||
IRCPublicCommandAutojoinIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandAutojoinIndex instead") = IRCLocalCommandAutojoinIndex,
|
||||
IRCPublicCommandAwayIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandAwayIndex instead") = IRCLocalCommandAwayIndex,
|
||||
IRCPublicCommandBackIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandBackIndex instead") = IRCLocalCommandBackIndex,
|
||||
IRCPublicCommandBanIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandBanIndex instead") = IRCLocalCommandBanIndex,
|
||||
IRCPublicCommandCapIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandCapIndex instead") = IRCLocalCommandCapIndex,
|
||||
IRCPublicCommandCapsIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandCapsIndex instead") = IRCLocalCommandCapsIndex,
|
||||
IRCPublicCommandCcbadgeIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandCcbadgeIndex instead") = IRCLocalCommandCcbadgeIndex,
|
||||
IRCPublicCommandChatopsIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandChatopsIndex instead") = IRCLocalCommandChatopsIndex,
|
||||
IRCPublicCommandClearIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandClearIndex instead") = IRCLocalCommandClearIndex,
|
||||
IRCPublicCommandClearallIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandClearallIndex instead") = IRCLocalCommandClearallIndex,
|
||||
IRCPublicCommandCloseIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandCloseIndex instead") = IRCLocalCommandCloseIndex,
|
||||
IRCPublicCommandConnIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandConnIndex instead") = IRCLocalCommandConnIndex,
|
||||
IRCPublicCommandCtcpIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandCtcpIndex instead") = IRCLocalCommandCtcpIndex,
|
||||
IRCPublicCommandCtcpreplyIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandCtcpreplyIndex instead") = IRCLocalCommandCtcpreplyIndex,
|
||||
IRCPublicCommandCycleIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandCycleIndex instead") = IRCLocalCommandCycleIndex,
|
||||
IRCPublicCommandDccIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandDccIndex instead") = IRCLocalCommandDccIndex,
|
||||
IRCPublicCommandDebugIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandDebugIndex instead") = IRCLocalCommandDebugIndex,
|
||||
IRCPublicCommandDefaultsIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandDefaultsIndex instead") = IRCLocalCommandDefaultsIndex,
|
||||
IRCPublicCommandDehalfopIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandDehalfopIndex instead") = IRCLocalCommandDehalfopIndex,
|
||||
IRCPublicCommandDeopIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandDeopIndex instead") = IRCLocalCommandDeopIndex,
|
||||
IRCPublicCommandDevoiceIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandDevoiceIndex instead") = IRCLocalCommandDevoiceIndex,
|
||||
IRCPublicCommandEchoIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandEchoIndex instead") = IRCLocalCommandEchoIndex,
|
||||
IRCPublicCommandEmptycachesIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandEmptycachesIndex instead") = IRCLocalCommandEmptycachesIndex,
|
||||
IRCPublicCommandFakerawdataIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandFakerawdataIndex instead") = IRCLocalCommandFakerawdataIndex,
|
||||
IRCPublicCommandGetscriptsIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandGetscriptsIndex instead") = IRCLocalCommandGetscriptsIndex,
|
||||
IRCPublicCommandGlineIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandGlineIndex instead") = IRCLocalCommandGlineIndex,
|
||||
IRCPublicCommandGlobopsIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandGlobopsIndex instead") = IRCLocalCommandGlobopsIndex,
|
||||
IRCPublicCommandGotoIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandGotoIndex instead") = IRCLocalCommandGotoIndex,
|
||||
IRCPublicCommandGzlineIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandGzlineIndex instead") = IRCLocalCommandGzlineIndex,
|
||||
IRCPublicCommandHalfopIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandHalfopIndex instead") = IRCLocalCommandHalfopIndex,
|
||||
IRCPublicCommandHopIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandHopIndex instead") = IRCLocalCommandHopIndex,
|
||||
IRCPublicCommandIcbadgeIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandIcbadgeIndex instead") = IRCLocalCommandIcbadgeIndex,
|
||||
IRCPublicCommandIgnoreIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandIgnoreIndex instead") = IRCLocalCommandIgnoreIndex,
|
||||
IRCPublicCommandInviteIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandInviteIndex instead") = IRCLocalCommandInviteIndex,
|
||||
IRCPublicCommandIsonIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandIsonIndex instead") = IRCLocalCommandIsonIndex,
|
||||
IRCPublicCommandJIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandJIndex instead") = IRCLocalCommandJIndex,
|
||||
IRCPublicCommandJoinIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandJoinIndex instead") = IRCLocalCommandJoinIndex,
|
||||
IRCPublicCommandJoinRandomIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandJoinRandomIndex instead") = IRCLocalCommandJoinRandomIndex,
|
||||
IRCPublicCommandKbIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandKbIndex instead") = IRCLocalCommandKbIndex,
|
||||
IRCPublicCommandKickIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandKickIndex instead") = IRCLocalCommandKickIndex,
|
||||
IRCPublicCommandKickbanIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandKickbanIndex instead") = IRCLocalCommandKickbanIndex,
|
||||
IRCPublicCommandKillIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandKillIndex instead") = IRCLocalCommandKillIndex,
|
||||
IRCPublicCommandLagcheckIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandLagcheckIndex instead") = IRCLocalCommandLagcheckIndex,
|
||||
IRCPublicCommandLeaveIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandLeaveIndex instead") = IRCLocalCommandLeaveIndex,
|
||||
IRCPublicCommandListIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandListIndex instead") = IRCLocalCommandListIndex,
|
||||
IRCPublicCommandLocopsIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandLocopsIndex instead") = IRCLocalCommandLocopsIndex,
|
||||
IRCPublicCommandMIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandMIndex instead") = IRCLocalCommandMIndex,
|
||||
IRCPublicCommandMeIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandMeIndex instead") = IRCLocalCommandMeIndex,
|
||||
IRCPublicCommandModeIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandModeIndex instead") = IRCLocalCommandModeIndex,
|
||||
IRCPublicCommandMonitorIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandMonitorIndex instead") = IRCLocalCommandMonitorIndex,
|
||||
IRCPublicCommandMsgIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandMsgIndex instead") = IRCLocalCommandMsgIndex,
|
||||
IRCPublicCommandMuteIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandMuteIndex instead") = IRCLocalCommandMuteIndex,
|
||||
IRCPublicCommandMylagIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandMylagIndex instead") = IRCLocalCommandMylagIndex,
|
||||
IRCPublicCommandMyversionIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandMyversionIndex instead") = IRCLocalCommandMyversionIndex,
|
||||
IRCPublicCommandNachatIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandNachatIndex instead") = IRCLocalCommandNachatIndex,
|
||||
IRCPublicCommandNamesIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandNamesIndex instead") = IRCLocalCommandNamesIndex,
|
||||
IRCPublicCommandNickIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandNickIndex instead") = IRCLocalCommandNickIndex,
|
||||
IRCPublicCommandNoticeIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandNoticeIndex instead") = IRCLocalCommandNoticeIndex,
|
||||
IRCPublicCommandNotifybubble TEXTUAL_DEPRECATED("Use IRCLocalCommandNotifybubble instead") = IRCLocalCommandNotifybubble,
|
||||
IRCPublicCommandNotifysound TEXTUAL_DEPRECATED("Use IRCLocalCommandNotifysound instead") = IRCLocalCommandNotifysound,
|
||||
IRCPublicCommandNotifyspeak TEXTUAL_DEPRECATED("Use IRCLocalCommandNotifyspeak instead") = IRCLocalCommandNotifyspeak,
|
||||
IRCPublicCommandOmsgIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandOmsgIndex instead") = IRCLocalCommandOmsgIndex,
|
||||
IRCPublicCommandOnoticeIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandOnoticeIndex instead") = IRCLocalCommandOnoticeIndex,
|
||||
IRCPublicCommandOpIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandOpIndex instead") = IRCLocalCommandOpIndex,
|
||||
IRCPublicCommandPartIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandPartIndex instead") = IRCLocalCommandPartIndex,
|
||||
IRCPublicCommandPassIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandPassIndex instead") = IRCLocalCommandPassIndex,
|
||||
IRCPublicCommandQueryIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandQueryIndex instead") = IRCLocalCommandQueryIndex,
|
||||
IRCPublicCommandQuietIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandQuietIndex instead") = IRCLocalCommandQuietIndex,
|
||||
IRCPublicCommandQuitIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandQuitIndex instead") = IRCLocalCommandQuitIndex,
|
||||
IRCPublicCommandQuoteIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandQuoteIndex instead") = IRCLocalCommandQuoteIndex,
|
||||
IRCPublicCommandRawIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandRawIndex instead") = IRCLocalCommandRawIndex,
|
||||
IRCPublicCommandRejoinIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandRejoinIndex instead") = IRCLocalCommandRejoinIndex,
|
||||
IRCPublicCommandReloadICLIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandReloadICLIndex instead") = IRCLocalCommandReloadICLIndex,
|
||||
IRCPublicCommandRemoveIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandRemoveIndex instead") = IRCLocalCommandRemoveIndex,
|
||||
IRCPublicCommandServerIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandServerIndex instead") = IRCLocalCommandServerIndex,
|
||||
IRCPublicCommandSetcolorIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandSetcolorIndex instead") = IRCLocalCommandSetcolorIndex,
|
||||
IRCPublicCommandSetquerynameIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandSetquerynameIndex instead") = IRCLocalCommandSetquerynameIndex,
|
||||
IRCPublicCommandShunIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandShunIndex instead") = IRCLocalCommandShunIndex,
|
||||
IRCPublicCommandSmeIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandSmeIndex instead") = IRCLocalCommandSmeIndex,
|
||||
IRCPublicCommandSmsgIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandSmsgIndex instead") = IRCLocalCommandSmsgIndex,
|
||||
IRCPublicCommandSslcontextIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandSslcontextIndex instead") = IRCLocalCommandSslcontextIndex,
|
||||
IRCPublicCommandTIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandTIndex instead") = IRCLocalCommandTIndex,
|
||||
IRCPublicCommandTageIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandTageIndex instead") = IRCLocalCommandTageIndex,
|
||||
IRCPublicCommandTempshunIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandTempshunIndex instead") = IRCLocalCommandTempshunIndex,
|
||||
IRCPublicCommandTimerIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandTimerIndex instead") = IRCLocalCommandTimerIndex,
|
||||
IRCPublicCommandTopicIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandTopicIndex instead") = IRCLocalCommandTopicIndex,
|
||||
IRCPublicCommandUmeIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandUmeIndex instead") = IRCLocalCommandUmeIndex,
|
||||
IRCPublicCommandUmodeIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandUmodeIndex instead") = IRCLocalCommandUmodeIndex,
|
||||
IRCPublicCommandUmsgIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandUmsgIndex instead") = IRCLocalCommandUmsgIndex,
|
||||
IRCPublicCommandUnbanIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandUnbanIndex instead") = IRCLocalCommandUnbanIndex,
|
||||
IRCPublicCommandUnignoreIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandUnignoreIndex instead") = IRCLocalCommandUnignoreIndex,
|
||||
IRCPublicCommandUnmuteIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandUnmuteIndex instead") = IRCLocalCommandUnmuteIndex,
|
||||
IRCPublicCommandUnoticeIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandUnoticeIndex instead") = IRCLocalCommandUnoticeIndex,
|
||||
IRCPublicCommandUnquietIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandUnquietIndex instead") = IRCLocalCommandUnquietIndex,
|
||||
IRCPublicCommandVoiceIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandVoiceIndex instead") = IRCLocalCommandVoiceIndex,
|
||||
IRCPublicCommandWallopsIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandWallopsIndex instead") = IRCLocalCommandWallopsIndex,
|
||||
IRCPublicCommandWatchIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandWatchIndex instead") = IRCLocalCommandWatchIndex,
|
||||
IRCPublicCommandWhoIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandWhoIndex instead") = IRCLocalCommandWhoIndex,
|
||||
IRCPublicCommandWhoisIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandWhoisIndex instead") = IRCLocalCommandWhoisIndex,
|
||||
IRCPublicCommandWhowasIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandWhowasIndex instead") = IRCLocalCommandWhowasIndex,
|
||||
IRCPublicCommandZlineIndex TEXTUAL_DEPRECATED("Use IRCLocalCommandZlineIndex instead") = IRCLocalCommandZlineIndex
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, IRCPrivateCommand) {
|
||||
IRCPrivateCommandAuthenticateIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandAuthenticateIndex instead") = IRCRemoteCommandAuthenticateIndex,
|
||||
IRCPrivateCommandAwayIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandAwayIndex instead") = IRCRemoteCommandAwayIndex,
|
||||
IRCPrivateCommandBatchIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandBatchIndex instead") = IRCRemoteCommandBatchIndex,
|
||||
IRCPrivateCommandCapIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandCapIndex instead") = IRCRemoteCommandCapIndex,
|
||||
IRCPrivateCommandCertinfoIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandCertinfoIndex instead") = IRCRemoteCommandCertinfoIndex,
|
||||
IRCPrivateCommandChatopsIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandChatopsIndex instead") = IRCRemoteCommandChatopsIndex,
|
||||
IRCPrivateCommandChghostIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandChghostIndex instead") = IRCRemoteCommandChghostIndex,
|
||||
IRCPrivateCommandErrorIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandErrorIndex instead") = IRCRemoteCommandErrorIndex,
|
||||
IRCPrivateCommandGlineIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandGlineIndex instead") = IRCRemoteCommandGlineIndex,
|
||||
IRCPrivateCommandGlobopsIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandGlobopsIndex instead") = IRCRemoteCommandGlobopsIndex,
|
||||
IRCPrivateCommandGzlineIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandGzlineIndex instead") = IRCRemoteCommandGzlineIndex,
|
||||
IRCPrivateCommandInviteIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandInviteIndex instead") = IRCRemoteCommandInviteIndex,
|
||||
IRCPrivateCommandIsonIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandIsonIndex instead") = IRCRemoteCommandIsonIndex,
|
||||
IRCPrivateCommandJoinIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandJoinIndex instead") = IRCRemoteCommandJoinIndex,
|
||||
IRCPrivateCommandKickIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandKickIndex instead") = IRCRemoteCommandKickIndex,
|
||||
IRCPrivateCommandKillIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandKillIndex instead") = IRCRemoteCommandKillIndex,
|
||||
IRCPrivateCommandListIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandListIndex instead") = IRCRemoteCommandListIndex,
|
||||
IRCPrivateCommandLocopsIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandLocopsIndex instead") = IRCRemoteCommandLocopsIndex,
|
||||
IRCPrivateCommandModeIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandModeIndex instead") = IRCRemoteCommandModeIndex,
|
||||
IRCPrivateCommandMonitorIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandMonitorIndex instead") = IRCRemoteCommandMonitorIndex,
|
||||
IRCPrivateCommandNachatIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandNachatIndex instead") = IRCRemoteCommandNachatIndex,
|
||||
IRCPrivateCommandNamesIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandNamesIndex instead") = IRCRemoteCommandNamesIndex,
|
||||
IRCPrivateCommandNickIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandNickIndex instead") = IRCRemoteCommandNickIndex,
|
||||
IRCPrivateCommandNoticeIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandNoticeIndex instead") = IRCRemoteCommandNoticeIndex,
|
||||
IRCPrivateCommandPartIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandPartIndex instead") = IRCRemoteCommandPartIndex,
|
||||
IRCPrivateCommandPassIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandPassIndex instead") = IRCRemoteCommandPassIndex,
|
||||
IRCPrivateCommandPingIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandPingIndex instead") = IRCRemoteCommandPingIndex,
|
||||
IRCPrivateCommandPongIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandPongIndex instead") = IRCRemoteCommandPongIndex,
|
||||
IRCPrivateCommandPrivmsgIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandPrivmsgIndex instead") = IRCRemoteCommandPrivmsgIndex,
|
||||
IRCPrivateCommandPrivmsgActionIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandPrivmsgActionIndex instead") = IRCRemoteCommandPrivmsgActionIndex,
|
||||
IRCPrivateCommandQuitIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandQuitIndex instead") = IRCRemoteCommandQuitIndex,
|
||||
IRCPrivateCommandShunIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandShunIndex instead") = IRCRemoteCommandShunIndex,
|
||||
IRCPrivateCommandTempshunIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandTempshunIndex instead") = IRCRemoteCommandTempshunIndex,
|
||||
IRCPrivateCommandTimeIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandTimeIndex instead") = IRCRemoteCommandTimeIndex,
|
||||
IRCPrivateCommandTopicIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandTopicIndex instead") = IRCRemoteCommandTopicIndex,
|
||||
IRCPrivateCommandUserIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandUserIndex instead") = IRCRemoteCommandUserIndex,
|
||||
IRCPrivateCommandWallopsIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandWallopsIndex instead") = IRCRemoteCommandWallopsIndex,
|
||||
IRCPrivateCommandWatchIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandWatchIndex instead") = IRCRemoteCommandWatchIndex,
|
||||
IRCPrivateCommandWhoIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandWhoIndex instead") = IRCRemoteCommandWhoIndex,
|
||||
IRCPrivateCommandWhoisIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandWhoisIndex instead") = IRCRemoteCommandWhoisIndex,
|
||||
IRCPrivateCommandWhowasIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandWhowasIndex instead") = IRCRemoteCommandWhowasIndex,
|
||||
IRCPrivateCommandZlineIndex TEXTUAL_DEPRECATED("Use IRCRemoteCommandZlineIndex instead") = IRCRemoteCommandZlineIndex
|
||||
};
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -42,10 +42,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, IRCISupportInfoListType)
|
||||
{
|
||||
IRCISupportInfoBanListType,
|
||||
IRCISupportInfoBanExceptionListType,
|
||||
IRCISupportInfoInviteExceptionListType,
|
||||
IRCISupportInfoQuietListType
|
||||
IRCISupportInfoListTypeBan,
|
||||
IRCISupportInfoListTypeBanException,
|
||||
IRCISupportInfoListTypeInviteException,
|
||||
IRCISupportInfoListTypeQuiet
|
||||
};
|
||||
|
||||
#define IRCISupportInfoHighestUserPrefixRank 100
|
||||
|
||||
@@ -42,12 +42,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCWorldClientListDefaultsKey;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCWorldClientListWasModifiedNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCWorldClientListWasModifiedNotification;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCWorldDateHasChangedNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCWorldDateHasChangedNotification;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const IRCWorldWillDestroyClientNotification;
|
||||
TEXTUAL_EXTERN NSString * const IRCWorldWillDestroyChannelNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCWorldWillDestroyClientNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const IRCWorldWillDestroyChannelNotification;
|
||||
|
||||
@interface IRCWorld : NSObject
|
||||
@property (readonly) NSUInteger messagesSent;
|
||||
|
||||
@@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/* If multiple address book entries exist for the same host,
|
||||
then we return all of them combined into a single instance.
|
||||
This object will have a blank hostmask and the entry type
|
||||
IRCAddressBookMixedEntryType. */
|
||||
IRCAddressBookEntryTypeMixed. */
|
||||
- (nullable IRCAddressBookEntry *)findAddressBookEntryForHostmask:(NSString *)hostmask;
|
||||
|
||||
- (NSArray<IRCAddressBookEntry *> *)findIgnoresForHostmask:(NSString *)hostmask;
|
||||
|
||||
@@ -92,8 +92,8 @@ enum {
|
||||
- (void)inputText:(id)string asCommand:(IRCRemoteCommand)command;
|
||||
- (void)inputText:(id)string asCommand:(IRCRemoteCommand)command destination:(IRCTreeItem *)destination;
|
||||
|
||||
- (void)enableCapability:(ClientIRCv3SupportedCapabilities)capability;
|
||||
- (void)disableCapability:(ClientIRCv3SupportedCapabilities)capability;
|
||||
- (void)enableCapability:(ClientIRCv3SupportedCapability)capability;
|
||||
- (void)disableCapability:(ClientIRCv3SupportedCapability)capability;
|
||||
|
||||
- (void)noteReachabilityChanged:(BOOL)reachable;
|
||||
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TDCBuddyListDialogNavigationSelectedTab) {
|
||||
TDCBuddyListDialogNavigationAllSelectedTab = 0,
|
||||
TDCBuddyListDialogNavigationOnlineSelectedTab = 1,
|
||||
TDCBuddyListDialogNavigationOfflineSelectedTab = 2
|
||||
typedef NS_ENUM(NSUInteger, TDCBuddyListDialogNavigationSelection) {
|
||||
TDCBuddyListDialogNavigationSelectionAll = 0,
|
||||
TDCBuddyListDialogNavigationSelectionOnline = 1,
|
||||
TDCBuddyListDialogNavigationSelectionOffline = 2
|
||||
};
|
||||
|
||||
@protocol TDCBuddyListDialogDelegate;
|
||||
|
||||
@@ -44,10 +44,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@class IRCChannel;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TDCChannelBanListSheetEntryType) {
|
||||
TDCChannelBanListSheetBanEntryType = IRCISupportInfoBanListType,
|
||||
TDCChannelBanListSheetBanExceptionEntryType = IRCISupportInfoBanExceptionListType,
|
||||
TDCChannelBanListSheetInviteExceptionEntryType = IRCISupportInfoInviteExceptionListType,
|
||||
TDCChannelBanListSheetQuietEntryType = IRCISupportInfoQuietListType
|
||||
TDCChannelBanListSheetEntryTypeBan = IRCISupportInfoListTypeBan,
|
||||
TDCChannelBanListSheetEntryTypeBanException = IRCISupportInfoListTypeBanException,
|
||||
TDCChannelBanListSheetEntryTypeInviteException = IRCISupportInfoListTypeInviteException,
|
||||
TDCChannelBanListSheetEntryTypeQuiet = IRCISupportInfoListTypeQuiet
|
||||
};
|
||||
|
||||
@interface TDCChannelBanListSheet : TDCSheetBase <TDCChannelPrototype>
|
||||
|
||||
@@ -43,26 +43,26 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@class IRCClient, TDCFileTransferDialogTransferController, TVCBasicTableView;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TDCFileTransferDialogTransferStatus) {
|
||||
TDCFileTransferDialogTransferCompleteStatus,
|
||||
TDCFileTransferDialogTransferConnectingStatus,
|
||||
TDCFileTransferDialogTransferFatalErrorStatus,
|
||||
TDCFileTransferDialogTransferInitializingStatus,
|
||||
TDCFileTransferDialogTransferIsListeningAsReceiverStatus,
|
||||
TDCFileTransferDialogTransferIsListeningAsSenderStatus,
|
||||
TDCFileTransferDialogTransferMappingListeningPortStatus,
|
||||
TDCFileTransferDialogTransferReceivingStatus,
|
||||
TDCFileTransferDialogTransferRecoverableErrorStatus,
|
||||
TDCFileTransferDialogTransferSendingStatus,
|
||||
TDCFileTransferDialogTransferStoppedStatus,
|
||||
TDCFileTransferDialogTransferWaitingForLocalIPAddressStatus,
|
||||
TDCFileTransferDialogTransferWaitingForReceiverToAcceptStatus,
|
||||
TDCFileTransferDialogTransferWaitingForResumeAcceptStatus
|
||||
TDCFileTransferDialogTransferStatusComplete,
|
||||
TDCFileTransferDialogTransferStatusConnecting,
|
||||
TDCFileTransferDialogTransferStatusFatalError,
|
||||
TDCFileTransferDialogTransferStatusInitializing,
|
||||
TDCFileTransferDialogTransferStatusIsListeningAsReceiver,
|
||||
TDCFileTransferDialogTransferStatusIsListeningAsSender,
|
||||
TDCFileTransferDialogTransferStatusMappingListeningPort,
|
||||
TDCFileTransferDialogTransferStatusReceiving,
|
||||
TDCFileTransferDialogTransferStatusRecoverableError,
|
||||
TDCFileTransferDialogTransferStatusSending,
|
||||
TDCFileTransferDialogTransferStatusStopped,
|
||||
TDCFileTransferDialogTransferStatusWaitingForLocalIPAddress,
|
||||
TDCFileTransferDialogTransferStatusWaitingForReceiverToAccept,
|
||||
TDCFileTransferDialogTransferStatusWaitingForResumeAccept
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TDCFileTransferDialogNavigationSelectedTab) {
|
||||
TDCFileTransferDialogNavigationAllSelectedTab = 0,
|
||||
TDCFileTransferDialogNavigationSendingSelectedTab = 1,
|
||||
TDCFileTransferDialogNavigationReceivingSelectedTab = 2
|
||||
typedef NS_ENUM(NSUInteger, TDCFileTransferDialogSelection) {
|
||||
TDCFileTransferDialogSelectionAll = 0,
|
||||
TDCFileTransferDialogSelectionSending = 1,
|
||||
TDCFileTransferDialogSelectionReceiving = 2
|
||||
};
|
||||
|
||||
@class TDCFileTransferDialogTransferController;
|
||||
|
||||
@@ -40,13 +40,13 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#if TEXTUAL_BUILT_FOR_APP_STORE_DISTRIBUTION == 1
|
||||
TEXTUAL_EXTERN NSString * const TDCInAppPurchaseDialogTransactionFinishedNotification;
|
||||
TEXTUAL_EXTERN NSString * const TDCInAppPurchaseDialogTransactionRestoredNotification; // unused
|
||||
TEXTUAL_EXTERN NSString * const TDCInAppPurchaseDialogWillReloadReceiptNotification;
|
||||
TEXTUAL_EXTERN NSString * const TDCInAppPurchaseDialogDidReloadReceiptNotification;
|
||||
TEXTUAL_EXTERN NSString * const TDCInAppPurchaseDialogFinishedLoadingNotification;
|
||||
TEXTUAL_EXTERN NSString * const TDCInAppPurchaseDialogFinishedLoadingDelayedByLackOfPurchaseNotification;
|
||||
TEXTUAL_EXTERN NSString * const TDCInAppPurchaseDialogTrialExpiredNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TDCInAppPurchaseDialogTransactionFinishedNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TDCInAppPurchaseDialogTransactionRestoredNotification; // unused
|
||||
TEXTUAL_EXTERN NSNotificationName const TDCInAppPurchaseDialogWillReloadReceiptNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TDCInAppPurchaseDialogDidReloadReceiptNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TDCInAppPurchaseDialogFinishedLoadingNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TDCInAppPurchaseDialogFinishedLoadingDelayedByLackOfPurchaseNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TDCInAppPurchaseDialogTrialExpiredNotification;
|
||||
|
||||
@interface TDCInAppPurchaseDialog : TDCWindowBase
|
||||
- (void)showTrialIsExpiredMessageInWindow:(NSWindow *)window;
|
||||
|
||||
@@ -40,8 +40,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#if TEXTUAL_BUILT_FOR_APP_STORE_DISTRIBUTION == 1
|
||||
typedef NS_ENUM(NSUInteger, TDCInAppPurchaseProductsTableEntryType)
|
||||
{
|
||||
TDCInAppPurchaseProductsTableEntryProductType,
|
||||
TDCInAppPurchaseProductsTableEntryOtherType
|
||||
TDCInAppPurchaseProductsTableEntryTypeProduct,
|
||||
TDCInAppPurchaseProductsTableEntryTypeOther
|
||||
};
|
||||
|
||||
@interface TDCInAppPurchaseProductsTableEntry : NSObject
|
||||
|
||||
+4
-4
@@ -42,10 +42,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#if TEXTUAL_BUILT_FOR_APP_STORE_DISTRIBUTION == 1
|
||||
typedef NS_ENUM(NSUInteger, TLOInAppPurchaseUpgradeEligibility) {
|
||||
TLOInAppPurchaseUpgradeEligibilityUnknown = LONG_MAX,
|
||||
TLOInAppPurchaseUpgradeNotEligible = 0,
|
||||
TLOInAppPurchaseUpgradeEligibleDiscount = 1,
|
||||
TLOInAppPurchaseUpgradeEligibleFree = 3,
|
||||
TLOInAppPurchaseUpgradeAlreadyUpgraded = 2,
|
||||
TLOInAppPurchaseUpgradeEligibilityNot = 0,
|
||||
TLOInAppPurchaseUpgradeEligibilityDiscount = 1,
|
||||
TLOInAppPurchaseUpgradeEligibilityFree = 3,
|
||||
TLOInAppPurchaseUpgradeEligibilityAlreadyUpgraded = 2,
|
||||
};
|
||||
|
||||
@protocol TDCInAppPurchaseUpgradeEligibilitySheetDelegate;
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#if TEXTUAL_BUILT_WITH_LICENSE_MANAGER == 1
|
||||
TEXTUAL_EXTERN NSString * const TDCLicenseManagerActivatedLicenseNotification;
|
||||
TEXTUAL_EXTERN NSString * const TDCLicenseManagerDeactivatedLicenseNotification;
|
||||
TEXTUAL_EXTERN NSString * const TDCLicenseManagerTrialExpiredNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TDCLicenseManagerActivatedLicenseNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TDCLicenseManagerDeactivatedLicenseNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TDCLicenseManagerTrialExpiredNotification;
|
||||
|
||||
@interface TDCLicenseManagerDialog : TDCWindowBase
|
||||
- (void)activateLicenseKey:(NSString *)licenseKey;
|
||||
|
||||
@@ -42,10 +42,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#if TEXTUAL_BUILT_WITH_LICENSE_MANAGER == 1
|
||||
typedef NS_ENUM(NSUInteger, TLOLicenseUpgradeEligibility) {
|
||||
TLOLicenseUpgradeEligibilityUnknown = LONG_MAX,
|
||||
TLOLicenseUpgradeNotEligible = 0,
|
||||
TLOLicenseUpgradeEligibleDiscount = 1,
|
||||
TLOLicenseUpgradeEligibleFree = 3,
|
||||
TLOLicenseUpgradeAlreadyUpgraded = 2,
|
||||
TLOLicenseUpgradeEligibilityNot = 0,
|
||||
TLOLicenseUpgradeEligibilityDiscount = 1,
|
||||
TLOLicenseUpgradeEligibilityFree = 3,
|
||||
TLOLicenseUpgradeEligibilityAlreadyUpgraded = 2,
|
||||
};
|
||||
|
||||
@protocol TDCLicenseUpgradeEligibilitySheetDelegate;
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TDCPreferencesControllerNavigationSelection) {
|
||||
TDCPreferencesControllerDefaultNavigationSelection = 0,
|
||||
TDCPreferencesControllerStyleNavigationSelection,
|
||||
TDCPreferencesControllerHiddenPreferencesNavigationSelection
|
||||
typedef NS_ENUM(NSUInteger, TDCPreferencesControllerSelection) {
|
||||
TDCPreferencesControllerSelectionDefault = 0,
|
||||
TDCPreferencesControllerSelectionStyle,
|
||||
TDCPreferencesControllerSelectionHiddenPreferences
|
||||
};
|
||||
|
||||
@protocol TDCPreferencesControllerDelegate;
|
||||
@@ -52,7 +52,7 @@ typedef NS_ENUM(NSUInteger, TDCPreferencesControllerNavigationSelection) {
|
||||
+ (void)showTorAnonymityNetworkInlineMediaWarning;
|
||||
+ (void)openProxySettingsInSystemPreferences;
|
||||
|
||||
- (void)show:(TDCPreferencesControllerNavigationSelection)selection;
|
||||
- (void)show:(TDCPreferencesControllerSelection)selection;
|
||||
@end
|
||||
|
||||
@protocol TDCPreferencesControllerDelegate <NSObject>
|
||||
|
||||
@@ -43,25 +43,25 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class IRCClient, IRCClientConfig;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TDCServerPropertiesSheetNavigationSelection) {
|
||||
TDCServerPropertiesSheetDefaultSelection = 0,
|
||||
typedef NS_ENUM(NSUInteger, TDCServerPropertiesSheetSelection) {
|
||||
TDCServerPropertiesSheetSelectionDefault = 0,
|
||||
|
||||
TDCServerPropertiesSheetAddressBookSelection = 1,
|
||||
TDCServerPropertiesSheetAutojoinSelection = 2,
|
||||
TDCServerPropertiesSheetConnectCommandsSelection = 3,
|
||||
TDCServerPropertiesSheetEncodingSelection = 4,
|
||||
TDCServerPropertiesSheetGeneralSelection = 5,
|
||||
TDCServerPropertiesSheetIdentitySelection = 6,
|
||||
TDCServerPropertiesSheetHighlightsSelection = 7,
|
||||
TDCServerPropertiesSheetDisconnectMessagesSelection = 8,
|
||||
TDCServerPropertiesSheetZncBouncerSelection = 10,
|
||||
TDCServerPropertiesSheetClientCertificateSelection = 12,
|
||||
TDCServerPropertiesSheetFloodControlSelection = 13,
|
||||
TDCServerPropertiesSheetNetworkSocketSelection = 14,
|
||||
TDCServerPropertiesSheetProxyServerSelection = 15,
|
||||
TDCServerPropertiesSheetRedundancySelection = 16,
|
||||
TDCServerPropertiesSheetSelectionAddressBook = 1,
|
||||
TDCServerPropertiesSheetSelectionAutojoin = 2,
|
||||
TDCServerPropertiesSheetSelectionConnectCommands = 3,
|
||||
TDCServerPropertiesSheetSelectionEncoding = 4,
|
||||
TDCServerPropertiesSheetSelectionGeneral = 5,
|
||||
TDCServerPropertiesSheetSelectionIdentity = 6,
|
||||
TDCServerPropertiesSheetSelectionHighlights = 7,
|
||||
TDCServerPropertiesSheetSelectionDisconnectMessages = 8,
|
||||
TDCServerPropertiesSheetSelectionZncBouncer = 10,
|
||||
TDCServerPropertiesSheetSelectionClientCertificate = 12,
|
||||
TDCServerPropertiesSheetSelectionFloodControl = 13,
|
||||
TDCServerPropertiesSheetSelectionNetworkSocket = 14,
|
||||
TDCServerPropertiesSheetSelectionProxyServer = 15,
|
||||
TDCServerPropertiesSheetSelectionRedundancy = 16,
|
||||
|
||||
TDCServerPropertiesSheetNewIgnoreEntrySelection = 200
|
||||
TDCServerPropertiesSheetSelectionNewIgnoreEntry = 200
|
||||
};
|
||||
|
||||
@protocol TDCServerPropertiesSheetDelegate;
|
||||
@@ -69,7 +69,7 @@ typedef NS_ENUM(NSUInteger, TDCServerPropertiesSheetNavigationSelection) {
|
||||
@interface TDCServerPropertiesSheet : TDCSheetBase <TDCClientPrototype>
|
||||
- (instancetype)initWithClient:(nullable IRCClient *)client NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
- (void)startWithSelection:(TDCServerPropertiesSheetNavigationSelection)selection context:(nullable id)context;
|
||||
- (void)startWithSelection:(TDCServerPropertiesSheetSelection)selection context:(nullable id)context;
|
||||
@end
|
||||
|
||||
@protocol TDCServerPropertiesSheetDelegate <NSObject>
|
||||
|
||||
@@ -39,25 +39,25 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class THOPluginOutputSuppressionRule;
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, THOPluginItemSupportedFeatures) {
|
||||
THOPluginItemSupportsDidReceiveCommandEvent = 1 << 1,
|
||||
THOPluginItemSupportsDidReceivePlainTextMessageEvent = 1 << 2,
|
||||
// THOPluginItemSupportsInlineMediaManipulation = 1 << 3,
|
||||
THOPluginItemSupportsNewMessagePostedEvent = 1 << 4,
|
||||
THOPluginItemSupportsOutputSuppressionRules = 1 << 5,
|
||||
THOPluginItemSupportsPreferencePane = 1 << 6,
|
||||
THOPluginItemSupportsServerInputDataInterception = 1 << 7,
|
||||
THOPluginItemSupportsSubscribedServerInputCommands = 1 << 8,
|
||||
THOPluginItemSupportsSubscribedUserInputCommands = 1 << 9,
|
||||
THOPluginItemSupportsUserInputDataInterception = 1 << 10,
|
||||
THOPluginItemSupportsWebViewJavaScriptPayloads = 1 << 11,
|
||||
THOPluginItemSupportsWillRenderMessageEvent = 1 << 12,
|
||||
typedef NS_OPTIONS(NSUInteger, THOPluginItemSupportedFeature) {
|
||||
THOPluginItemSupportedFeatureDidReceiveCommandEvent = 1 << 1,
|
||||
THOPluginItemSupportedFeatureDidReceivePlainTextMessageEvent = 1 << 2,
|
||||
// THOPluginItemSupportedFeatureInlineMediaManipulation = 1 << 3,
|
||||
THOPluginItemSupportedFeatureNewMessagePostedEvent = 1 << 4,
|
||||
THOPluginItemSupportedFeatureOutputSuppressionRules = 1 << 5,
|
||||
THOPluginItemSupportedFeaturePreferencePane = 1 << 6,
|
||||
THOPluginItemSupportedFeatureServerInputDataInterception = 1 << 7,
|
||||
THOPluginItemSupportedFeatureSubscribedServerInputCommands = 1 << 8,
|
||||
THOPluginItemSupportedFeatureSubscribedUserInputCommands = 1 << 9,
|
||||
THOPluginItemSupportedFeatureUserInputDataInterception = 1 << 10,
|
||||
THOPluginItemSupportedFeatureWebViewJavaScriptPayloads = 1 << 11,
|
||||
THOPluginItemSupportedFeatureWillRenderMessageEvent = 1 << 12,
|
||||
};
|
||||
|
||||
@interface THOPluginItem : NSObject
|
||||
@property (readonly, nullable) NSBundle *bundle;
|
||||
@property (readonly, nullable) id primaryClass;
|
||||
@property (readonly, assign) THOPluginItemSupportedFeatures supportedFeatures;
|
||||
@property (readonly, assign) THOPluginItemSupportedFeature supportedFeatures;
|
||||
@property (readonly, copy, nullable) NSArray<NSString *> *supportedServerInputCommands;
|
||||
@property (readonly, copy, nullable) NSArray<NSString *> *supportedUserInputCommands;
|
||||
@property (readonly, copy, nullable) NSArray<THOPluginOutputSuppressionRule *> *outputSuppressionRules;
|
||||
@@ -67,7 +67,7 @@ typedef NS_OPTIONS(NSUInteger, THOPluginItemSupportedFeatures) {
|
||||
- (BOOL)loadBundle:(NSBundle *)bundle;
|
||||
- (void)unloadBundle;
|
||||
|
||||
- (BOOL)supportsFeature:(THOPluginItemSupportedFeatures)feature;
|
||||
- (BOOL)supportsFeature:(THOPluginItemSupportedFeature)feature;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class THOPluginOutputSuppressionRule;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const THOPluginManagerFinishedLoadingPluginsNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const THOPluginManagerFinishedLoadingPluginsNotification;
|
||||
|
||||
@interface THOPluginManager : NSObject
|
||||
- (void)loadPlugins;
|
||||
@@ -62,7 +62,7 @@ TEXTUAL_EXTERN NSString * const THOPluginManagerFinishedLoadingPluginsNotificati
|
||||
@property (readonly, copy) NSArray<THOPluginOutputSuppressionRule *> *pluginOutputSuppressionRules;
|
||||
|
||||
/* Returns YES if at least one loaded plugin supports the feature */
|
||||
- (BOOL)supportsFeature:(THOPluginItemSupportedFeatures)feature;
|
||||
- (BOOL)supportsFeature:(THOPluginItemSupportedFeature)feature;
|
||||
|
||||
- (void)findHandlerForOutgoingCommand:(NSString *)command
|
||||
path:(NSString * _Nullable * _Nullable)path
|
||||
|
||||
@@ -42,17 +42,19 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TLOAppStoreIAPProduct)
|
||||
{
|
||||
TLOAppStoreIAPUnknownProduct,
|
||||
TLOAppStoreIAPFreeTrialProduct,
|
||||
TLOAppStoreIAPStandardEditionProduct,
|
||||
TLOAppStoreIAPUpgradeFromV6Product,
|
||||
TLOAppStoreIAPUpgradeFromV6FreeProduct
|
||||
TLOAppStoreIAPProductUnknown,
|
||||
TLOAppStoreIAPProductFreeTrial,
|
||||
TLOAppStoreIAPProductStandardEdition,
|
||||
TLOAppStoreIAPProductUpgradeFromV6,
|
||||
TLOAppStoreIAPProductUpgradeFromV6Free
|
||||
};
|
||||
|
||||
TEXTUAL_EXTERN NSString * const TLOAppStoreIAPFreeTrialProductIdentifier;
|
||||
TEXTUAL_EXTERN NSString * const TLOAppStoreIAPStandardEditionProductIdentifier;
|
||||
TEXTUAL_EXTERN NSString * const TLOAppStoreIAPUpgradeFromV6ProductIdentifier;
|
||||
TEXTUAL_EXTERN NSString * const TLOAppStoreIAPUpgradeFromV6FreeProductIdentifier;
|
||||
typedef NSString *TLOAppStoreIAPProductIdentifier NS_EXTENSIBLE_STRING_ENUM;
|
||||
|
||||
TEXTUAL_EXTERN TLOAppStoreIAPProductIdentifier const TLOAppStoreIAPProductIdentifierFreeTrial;
|
||||
TEXTUAL_EXTERN TLOAppStoreIAPProductIdentifier const TLOAppStoreIAPProductIdentifierStandardEdition;
|
||||
TEXTUAL_EXTERN TLOAppStoreIAPProductIdentifier const TLOAppStoreIAPProductIdentifierUpgradeFromV6;
|
||||
TEXTUAL_EXTERN TLOAppStoreIAPProductIdentifier const TLOAppStoreIAPProductIdentifierUpgradeFromV6Free;
|
||||
|
||||
TEXTUAL_EXTERN BOOL TLOAppStoreLoadReceipt(void);
|
||||
TEXTUAL_EXTERN BOOL TLOAppStoreReceiptLoaded(void);
|
||||
@@ -67,7 +69,7 @@ TEXTUAL_EXTERN NSTimeInterval TLOAppStoreTimeReaminingInTrial(void);
|
||||
TEXTUAL_EXTERN NSUInteger TLOAppStoreNumberOfPurchasedProducts(void);
|
||||
TEXTUAL_EXTERN NSArray<NSString *> *TLOAppStorePurchasedProducts(void);
|
||||
|
||||
TEXTUAL_EXTERN TLOAppStoreIAPProduct TLOAppStoreProductFromProductIdentifier(NSString *productIdentifier);
|
||||
TEXTUAL_EXTERN TLOAppStoreIAPProduct TLOAppStoreProductFromProductIdentifier(TLOAppStoreIAPProductIdentifier productIdentifier);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
#endif
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TLOLicenseManagerDownloaderRequestType) {
|
||||
TLOLicenseManagerDownloaderRequestActivationType,
|
||||
TLOLicenseManagerDownloaderRequestMigrateAppStoreType,
|
||||
TLOLicenseManagerDownloaderRequestSendLostLicenseType,
|
||||
TLOLicenseManagerDownloaderRequestLicenseUpgradeEligibilityType,
|
||||
TLOLicenseManagerDownloaderRequestReceiptUpgradeEligibilityType
|
||||
TLOLicenseManagerDownloaderRequestTypeActivation,
|
||||
TLOLicenseManagerDownloaderRequestTypeMigrateAppStore,
|
||||
TLOLicenseManagerDownloaderRequestTypeSendLostLicense,
|
||||
TLOLicenseManagerDownloaderRequestTypeLicenseUpgradeEligibility,
|
||||
TLOLicenseManagerDownloaderRequestTypeReceiptUpgradeEligibility
|
||||
};
|
||||
|
||||
TEXTUAL_EXTERN NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeSuccess;
|
||||
|
||||
@@ -38,13 +38,15 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#if TEXTUAL_BUILT_WITH_LICENSE_MANAGER == 1
|
||||
TEXTUAL_EXTERN NSString * const TLOLicenseManagerLicenseDictionaryLicenseCreationDateKey;
|
||||
TEXTUAL_EXTERN NSString * const TLOLicenseManagerLicenseDictionaryLicenseGenerationKey;
|
||||
TEXTUAL_EXTERN NSString * const TLOLicenseManagerLicenseDictionaryLicenseKeyKey;
|
||||
TEXTUAL_EXTERN NSString * const TLOLicenseManagerLicenseDictionaryLicenseProductNameKey;
|
||||
TEXTUAL_EXTERN NSString * const TLOLicenseManagerLicenseDictionaryLicenseOwnerContactAddressKey;
|
||||
TEXTUAL_EXTERN NSString * const TLOLicenseManagerLicenseDictionaryLicenseOwnerNameKey;
|
||||
TEXTUAL_EXTERN NSString * const TLOLicenseManagerLicenseDictionaryLicenseSignatureKey;
|
||||
typedef NSString *TLOLicenseManagerLicenseDictionaryKey NS_EXTENSIBLE_STRING_ENUM;
|
||||
|
||||
TEXTUAL_EXTERN TLOLicenseManagerLicenseDictionaryKey const TLOLicenseManagerLicenseDictionaryKeyCreationDate;
|
||||
TEXTUAL_EXTERN TLOLicenseManagerLicenseDictionaryKey const TLOLicenseManagerLicenseDictionaryKeyGeneration;
|
||||
TEXTUAL_EXTERN TLOLicenseManagerLicenseDictionaryKey const TLOLicenseManagerLicenseDictionaryKeyLicenseKey;
|
||||
TEXTUAL_EXTERN TLOLicenseManagerLicenseDictionaryKey const TLOLicenseManagerLicenseDictionaryKeyProductName;
|
||||
TEXTUAL_EXTERN TLOLicenseManagerLicenseDictionaryKey const TLOLicenseManagerLicenseDictionaryKeyOwnerContactAddress;
|
||||
TEXTUAL_EXTERN TLOLicenseManagerLicenseDictionaryKey const TLOLicenseManagerLicenseDictionaryKeyOwnerName;
|
||||
TEXTUAL_EXTERN TLOLicenseManagerLicenseDictionaryKey const TLOLicenseManagerLicenseDictionaryKeySignature;
|
||||
|
||||
TEXTUAL_EXTERN NSUInteger const TLOLicenseManagerCurrentLicenseGeneration;
|
||||
|
||||
|
||||
@@ -39,13 +39,15 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
TEXTUAL_EXTERN NSString * const TXDefaultAlertSoundPreferenceValue;
|
||||
TEXTUAL_EXTERN NSString * const TXNoAlertSoundPreferenceValue;
|
||||
typedef NSString *TLONotificationAlertSound NS_EXTENSIBLE_STRING_ENUM;
|
||||
|
||||
TEXTUAL_EXTERN TLONotificationAlertSound const TXDefaultAlertSoundPreferenceValue;
|
||||
TEXTUAL_EXTERN TLONotificationAlertSound const TXNoAlertSoundPreferenceValue;
|
||||
|
||||
@interface TLONotificationConfiguration : NSObject
|
||||
@property (readonly) TXNotificationType eventType;
|
||||
@property (readonly, copy) NSString *displayName;
|
||||
@property (nonatomic, copy, nullable) NSString *alertSound;
|
||||
@property (nonatomic, copy, nullable) TLONotificationAlertSound alertSound;
|
||||
@property (nonatomic, assign) NSUInteger speakEvent;
|
||||
@property (nonatomic, assign) NSUInteger pushNotification;
|
||||
@property (nonatomic, assign) NSUInteger disabledWhileAway;
|
||||
|
||||
@@ -66,7 +66,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+ (void)setHighlightCurrentNickname:(BOOL)highlightCurrentNickname;
|
||||
|
||||
+ (void)setAppearance:(TXPreferredAppearanceType)appearance;
|
||||
+ (void)setAppearance:(TXPreferredAppearance)appearance;
|
||||
|
||||
+ (void)setThemeName:(NSString *)value;
|
||||
+ (void)setThemeNameWithExistenceCheck:(NSString *)value;
|
||||
|
||||
@@ -50,10 +50,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@class TXMenuControllerMainWindowProxy;
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, TVCMainWindowShiftSelectionFlags) {
|
||||
TVCMainWindowShiftSelectionMaintainGroupingFlag = 1 << 0,
|
||||
TVCMainWindowShiftSelectionPerformDeselectFlag = 1 << 1, // deselect previous selection
|
||||
TVCMainWindowShiftSelectionPerformDeselectChildrenFlag = 1 << 2, // deselect previous selection + children (if group item)
|
||||
// TVCMainWindowShiftSelectionPerformDeselectAllFlag = 1 << 2 // deselect all
|
||||
TVCMainWindowShiftSelectionFlagMaintainGrouping = 1 << 0,
|
||||
TVCMainWindowShiftSelectionFlagPerformDeselect = 1 << 1, // deselect previous selection
|
||||
TVCMainWindowShiftSelectionFlagPerformDeselectChildren = 1 << 2, // deselect previous selection + children (if group item)
|
||||
// TVCMainWindowShiftSelectionFlagPerformDeselectAll = 1 << 2 // deselect all
|
||||
};
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, TVCMainWindowMouseLocation) {
|
||||
|
||||
@@ -65,7 +65,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)memberSendDroppedFiles:(NSArray<NSString *> *)files row:(NSUInteger)row;
|
||||
- (void)memberSendDroppedFilesToSelectedChannel:(NSArray<NSString *> *)files; // Only works if -selectedChannel is a private message
|
||||
|
||||
- (void)showServerPropertiesSheetForClient:(IRCClient *)client withSelection:(TDCServerPropertiesSheetNavigationSelection)selection context:(nullable id)context;
|
||||
- (void)showServerPropertiesSheetForClient:(IRCClient *)client withSelection:(TDCServerPropertiesSheetSelection)selection context:(nullable id)context;
|
||||
|
||||
#if TEXTUAL_BUILT_WITH_LICENSE_MANAGER == 1
|
||||
- (void)manageLicense:(id)sender activateLicenseKeyWithURL:(NSURL *)licenseKeyURL;
|
||||
|
||||
@@ -42,9 +42,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
TEXTUAL_EXTERN NSString * const TDCAlertSuppressionPrefix;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TDCAlertResponse) {
|
||||
TDCAlertResponseDefaultButton = 1000,
|
||||
TDCAlertResponseAlternateButton = 1001,
|
||||
TDCAlertResponseOtherButton = 1002
|
||||
TDCAlertResponseDefault = 1000,
|
||||
TDCAlertResponseAlternate = 1001,
|
||||
TDCAlertResponseOther = 1002
|
||||
};
|
||||
|
||||
typedef void (^TDCAlertCompletionBlock)(TDCAlertResponse buttonClicked, BOOL suppressed, id _Nullable underlyingAlert);
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface TDCInputPrompt : TDCAlert
|
||||
+ (TVCAlertResponse)promptWithMessage:(NSString *)bodyText
|
||||
+ (TVCAlertResponseButton)promptWithMessage:(NSString *)bodyText
|
||||
title:(NSString *)titleText
|
||||
defaultButton:(NSString *)buttonDefault
|
||||
alternateButton:(nullable NSString *)buttonAlternate
|
||||
|
||||
@@ -127,8 +127,8 @@ extern NSString * const THOPluginProtocolCompatibilityMinimumVersion;
|
||||
* @param textDestination The channel that the message is destined for
|
||||
* @param lineType The line type of the message
|
||||
*
|
||||
* Possible values: `TVCLogLinePrivateMessageType`, `TVCLogLineActionType`,
|
||||
* `TVCLogLineNoticeType`
|
||||
* Possible values: `TVCLogLineTypePrivateMessage`, `TVCLogLineTypeAction`,
|
||||
* `TVCLogLineTypeNotice`
|
||||
* @param client The client the message was received on
|
||||
* @param receivedAt The date & time of the message. Depending on whether a custom
|
||||
* value was specified using the server-time IRCv3 capability, this `NSDate`
|
||||
|
||||
@@ -41,25 +41,25 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@class IRCChannel;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TXNotificationType) {
|
||||
TXNotificationHighlightType = 1000,
|
||||
TXNotificationNewPrivateMessageType = 1001,
|
||||
TXNotificationChannelMessageType = 1002,
|
||||
TXNotificationChannelNoticeType = 1003,
|
||||
TXNotificationPrivateMessageType = 1004,
|
||||
TXNotificationPrivateNoticeType = 1005,
|
||||
TXNotificationKickType = 1006,
|
||||
TXNotificationInviteType = 1007,
|
||||
TXNotificationConnectType = 1008,
|
||||
TXNotificationDisconnectType = 1009,
|
||||
TXNotificationAddressBookMatchType = 1010,
|
||||
TXNotificationFileTransferSendSuccessfulType = 1011,
|
||||
TXNotificationFileTransferReceiveSuccessfulType = 1012,
|
||||
TXNotificationFileTransferSendFailedType = 1013,
|
||||
TXNotificationFileTransferReceiveFailedType = 1014,
|
||||
TXNotificationFileTransferReceiveRequestedType = 1015,
|
||||
TXNotificationUserJoinedType = 1016,
|
||||
TXNotificationUserPartedType = 1017,
|
||||
TXNotificationUserDisconnectedType = 1018
|
||||
TXNotificationTypeHighlight = 1000,
|
||||
TXNotificationTypeNewPrivateMessage = 1001,
|
||||
TXNotificationTypeChannelMessage = 1002,
|
||||
TXNotificationTypeChannelNotice = 1003,
|
||||
TXNotificationTypePrivateMessage = 1004,
|
||||
TXNotificationTypePrivateNotice = 1005,
|
||||
TXNotificationTypeKick = 1006,
|
||||
TXNotificationTypeInvite = 1007,
|
||||
TXNotificationTypeConnect = 1008,
|
||||
TXNotificationTypeDisconnect = 1009,
|
||||
TXNotificationTypeAddressBookMatch = 1010,
|
||||
TXNotificationTypeFileTransferSendSuccessful = 1011,
|
||||
TXNotificationTypeFileTransferReceiveSuccessful = 1012,
|
||||
TXNotificationTypeFileTransferSendFailed = 1013,
|
||||
TXNotificationTypeFileTransferReceiveFailed = 1014,
|
||||
TXNotificationTypeFileTransferReceiveRequested = 1015,
|
||||
TXNotificationTypeUserJoined = 1016,
|
||||
TXNotificationTypeUserParted = 1017,
|
||||
TXNotificationTypeUserDisconnected = 1018
|
||||
};
|
||||
|
||||
@interface TLOGrowlController : NSObject
|
||||
|
||||
@@ -43,8 +43,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
TEXTUAL_EXTERN NSString * const TPCPreferencesCloudSyncServicesEnabledDefaultsKey;
|
||||
TEXTUAL_EXTERN NSString * const TPCPreferencesCloudSyncServicesLimitedToServersDefaultsKey;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const TPCPreferencesCloudSyncDidChangeThemeFontNotification;
|
||||
TEXTUAL_EXTERN NSString * const TPCPreferencesCloudSyncDidChangeThemeNameNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TPCPreferencesCloudSyncDidChangeThemeFontNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TPCPreferencesCloudSyncDidChangeThemeNameNotification;
|
||||
|
||||
@interface TPCPreferences (TPCPreferencesCloudSync)
|
||||
+ (BOOL)syncPreferencesToTheCloud;
|
||||
|
||||
@@ -51,74 +51,73 @@ TEXTUAL_EXTERN NSString * const TPCPreferencesThemeFontNameMissingLocallyDefault
|
||||
TEXTUAL_EXTERN NSUInteger const TPCPreferencesDictionaryVersion;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TXNicknameHighlightMatchType) {
|
||||
TXNicknameHighlightPartialMatchType = 0,
|
||||
TXNicknameHighlightExactMatchType,
|
||||
TXNicknameHighlightRegularExpressionMatchType,
|
||||
TXNicknameHighlightMatchTypePartial = 0,
|
||||
TXNicknameHighlightMatchTypeExact,
|
||||
TXNicknameHighlightMatchTypeRegularExpression,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TXTabKeyAction) {
|
||||
TXTabKeyNicknameCompleteAction = 0,
|
||||
TXTabKeyUnreadChannelAction,
|
||||
TXTabKeyNoneTypeAction = 100,
|
||||
TXTabKeyActionNicknameComplete = 0,
|
||||
TXTabKeyActionUnreadChannel,
|
||||
TXTabKeyActionNone = 100,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TXUserDoubleClickAction) {
|
||||
TXUserDoubleClickWhoisAction = 100,
|
||||
TXUserDoubleClickPrivateMessageAction = 200,
|
||||
TXUserDoubleClickInsertTextFieldAction = 300,
|
||||
TXUserDoubleClickActionWhois = 100,
|
||||
TXUserDoubleClickActionPrivateMessage = 200,
|
||||
TXUserDoubleClickActionInsertTextField = 300,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TXNoticeSendLocationType) {
|
||||
TXNoticeSendServerConsoleType = 0,
|
||||
TXNoticeSendSelectedChannelType = 1,
|
||||
TXNoticeSendToQueryDestinationType = 2,
|
||||
typedef NS_ENUM(NSUInteger, TXNoticeSendLocation) {
|
||||
TXNoticeSendLocationServerConsole = 0,
|
||||
TXNoticeSendLocationSelectedChannel = 1,
|
||||
TXNoticeSendLocationQuery = 2,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TXCommandWKeyAction) {
|
||||
TXCommandWKeyCloseWindowAction = 0,
|
||||
TXCommandWKeyPartChannelAction = 1,
|
||||
TXCommandWKeyDisconnectAction = 2,
|
||||
TXCommandWKeyTerminateAction = 3,
|
||||
TXCommandWKeyActionCloseWindow = 0,
|
||||
TXCommandWKeyActionPartChannel = 1,
|
||||
TXCommandWKeyActionDisconnect = 2,
|
||||
TXCommandWKeyActionTerminate = 3,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TXHostmaskBanFormat) {
|
||||
TXHostmaskBanWHNINFormat = 0, // With Hostmask, No Username/Nickname
|
||||
TXHostmaskBanWHAINNFormat = 1, // With Hostmask and Username, No Nickname
|
||||
TXHostmaskBanWHANNIFormat = 2, // With Hostmask and Nickname, No Username
|
||||
TXHostmaskBanExactFormat = 3, // Exact Match
|
||||
TXHostmaskBanFormatWHNIN = 0, // With Hostmask, No Username/Nickname
|
||||
TXHostmaskBanFormatWHAINN = 1, // With Hostmask and Username, No Nickname
|
||||
TXHostmaskBanFormatWHANNI = 2, // With Hostmask and Nickname, No Username
|
||||
TXHostmaskBanFormatExact = 3, // Exact Match
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TVCMainWindowTextViewFontSize) {
|
||||
TVCMainWindowTextViewFontNormalSize = 1,
|
||||
TVCMainWindowTextViewFontLargeSize = 2,
|
||||
TVCMainWindowTextViewFontExtraLargeSize = 3,
|
||||
TVCMainWindowTextViewFontHumongousSize = 4,
|
||||
TVCMainWindowTextViewFontSizeNormal = 1,
|
||||
TVCMainWindowTextViewFontSizeLarge = 2,
|
||||
TVCMainWindowTextViewFontSizeExtraLarge = 3,
|
||||
TVCMainWindowTextViewFontSizeHumongous = 4,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TXFileTransferRequestReplyAction) {
|
||||
TXFileTransferRequestReplyIgnoreAction = 1,
|
||||
TXFileTransferRequestReplyOpenDialogAction = 2,
|
||||
TXFileTransferRequestReplyAutomaticallyDownloadAction = 3,
|
||||
typedef NS_ENUM(NSUInteger, TXFileTransferRequestReply) {
|
||||
TXFileTransferRequestReplyIgnore = 1,
|
||||
TXFileTransferRequestReplyOpenDialog = 2,
|
||||
TXFileTransferRequestReplyAutomaticallyDownload = 3,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TXFileTransferIPAddressDetectionMethod) {
|
||||
typedef NS_ENUM(NSUInteger, TXFileTransferIPAddressMethodDetection) {
|
||||
/* integers are out of order to preserve existing preferences */
|
||||
TXFileTransferIPAddressRouterOnlyMethod = 3,
|
||||
TXFileTransferIPAddressRouterAndFirstPartyMethod = 1,
|
||||
TXFileTransferIPAddressRouterAndThirdPartyMethod = 4,
|
||||
TXFileTransferIPAddressManualDetectionMethod = 2,
|
||||
TXFileTransferIPAddressMethodRouterOnly NS_SWIFT_NAME(routerOnly) = 3,
|
||||
TXFileTransferIPAddressMethodRouterAndFirstParty NS_SWIFT_NAME(routerAndFirstParty) = 1,
|
||||
TXFileTransferIPAddressMethodRouterAndThirdParty NS_SWIFT_NAME(routerAndThirdParty) = 4,
|
||||
TXFileTransferIPAddressMethodManual NS_SWIFT_NAME(manual) = 2,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TXChannelViewArrangement) {
|
||||
TXChannelViewArrangedHorizontally = 0,
|
||||
TXChannelViewArrangedVertically = 1
|
||||
TXChannelViewArrangedHorizontally NS_SWIFT_NAME(horizontal) = 0,
|
||||
TXChannelViewArrangedVertically NS_SWIFT_NAME(vertical) = 1
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TXPreferredAppearanceType)
|
||||
{
|
||||
TXPreferredAppearanceInheritedType = 0,
|
||||
TXPreferredAppearanceLightType = 1,
|
||||
TXPreferredAppearanceDarkType = 2
|
||||
typedef NS_ENUM(NSUInteger, TXPreferredAppearance) {
|
||||
TXPreferredAppearanceInherited = 0,
|
||||
TXPreferredAppearanceLight = 1,
|
||||
TXPreferredAppearanceDark = 2
|
||||
};
|
||||
|
||||
@interface TPCPreferences (TPCPreferencesLocal)
|
||||
@@ -179,7 +178,7 @@ typedef NS_ENUM(NSUInteger, TXPreferredAppearanceType)
|
||||
+ (BOOL)memberListUpdatesUserInfoPopoverOnScroll;
|
||||
+ (BOOL)memberListDisplayNoModeSymbol;
|
||||
|
||||
+ (TXNoticeSendLocationType)locationToSendNotices;
|
||||
+ (TXNoticeSendLocation)locationToSendNotices;
|
||||
|
||||
+ (BOOL)disableNicknameColorHashing;
|
||||
|
||||
@@ -204,7 +203,7 @@ typedef NS_ENUM(NSUInteger, TXPreferredAppearanceType)
|
||||
+ (NSUInteger)trackUserAwayStatusMaximumChannelSize;
|
||||
|
||||
+ (BOOL)invertSidebarColors TEXTUAL_DEPRECATED("Use -appearance instead");
|
||||
+ (TXPreferredAppearanceType)appearance;
|
||||
+ (TXPreferredAppearance)appearance;
|
||||
|
||||
+ (BOOL)disableSidebarTranslucency;
|
||||
+ (BOOL)hideMainWindowSegmentedController;
|
||||
@@ -293,8 +292,8 @@ typedef NS_ENUM(NSUInteger, TXPreferredAppearanceType)
|
||||
+ (BOOL)fileTransferRequestsAreReversed;
|
||||
+ (BOOL)fileTransfersPreventIdleSystemSleep;
|
||||
|
||||
+ (TXFileTransferRequestReplyAction)fileTransferRequestReplyAction;
|
||||
+ (TXFileTransferIPAddressDetectionMethod)fileTransferIPAddressDetectionMethod;
|
||||
+ (TXFileTransferRequestReply)fileTransferRequestReplyAction;
|
||||
+ (TXFileTransferIPAddressMethodDetection)fileTransferIPAddressDetectionMethod;
|
||||
|
||||
+ (uint16_t)fileTransferPortRangeStart;
|
||||
+ (uint16_t)fileTransferPortRangeEnd;
|
||||
|
||||
@@ -39,43 +39,43 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TPCPreferencesReloadActionMask) {
|
||||
TPCPreferencesReloadAppearanceAction = 1 << 0,
|
||||
TPCPreferencesReloadChannelViewArrangementAction = 1 << 1,
|
||||
TPCPreferencesReloadDockIconBadgesAction = 1 << 2,
|
||||
TPCPreferencesReloadHighlightKeywordsAction = 1 << 3,
|
||||
TPCPreferencesReloadHighlightLoggingAction = 1 << 4,
|
||||
TPCPreferencesReloadIRCCommandCacheAction = 1 << 5,
|
||||
TPCPreferencesReloadInputHistoryScopeAction = 1 << 6,
|
||||
TPCPreferencesReloadLogTranscriptsAction = 1 << 7,
|
||||
TPCPreferencesReloadMainWindowTransparencyLevelAction = 1 << 8,
|
||||
TPCPreferencesReloadMemberListAction = 1 << 9,
|
||||
TPCPreferencesReloadMemberListSortOrderAction = 1 << 10,
|
||||
TPCPreferencesReloadMemberListUserBadgesAction = 1 << 11,
|
||||
TPCPreferencesReloadPreferencesChangedAction = 1 << 12,
|
||||
TPCPreferencesReloadScrollbackSaveLimitAction = 1 << 13,
|
||||
TPCPreferencesReloadScrollbackVisibleLimitAction = 1 << 14,
|
||||
TPCPreferencesReloadServerListAction = 1 << 15,
|
||||
TPCPreferencesReloadServerListUnreadBadgesAction = 1 << 16,
|
||||
TPCPreferencesReloadStyleAction = 1 << 17,
|
||||
// TPCPreferencesReloadStyleWithTableViewsAction = 1 << 18,
|
||||
TPCPreferencesReloadTextDirectionAction = 1 << 19,
|
||||
TPCPreferencesReloadTextFieldFontSizeAction = 1 << 20,
|
||||
TPCPreferencesReloadTextFieldSegmentedControllerOriginAction = 1 << 21,
|
||||
typedef NS_OPTIONS(NSUInteger, TPCPreferencesReloadAction) {
|
||||
TPCPreferencesReloadActionAppearance = 1 << 0,
|
||||
TPCPreferencesReloadActionChannelViewArrangement = 1 << 1,
|
||||
TPCPreferencesReloadActionDockIconBadges = 1 << 2,
|
||||
TPCPreferencesReloadActionHighlightKeywords = 1 << 3,
|
||||
TPCPreferencesReloadActionHighlightLogging = 1 << 4,
|
||||
TPCPreferencesReloadActionIRCCommandCache = 1 << 5,
|
||||
TPCPreferencesReloadActionInputHistoryScope = 1 << 6,
|
||||
TPCPreferencesReloadActionLogTranscripts = 1 << 7,
|
||||
TPCPreferencesReloadActionMainWindowTransparencyLevel = 1 << 8,
|
||||
TPCPreferencesReloadActionMemberList = 1 << 9,
|
||||
TPCPreferencesReloadActionMemberListSortOrder = 1 << 10,
|
||||
TPCPreferencesReloadActionMemberListUserBadges = 1 << 11,
|
||||
TPCPreferencesReloadActionPreferencesChanged = 1 << 12,
|
||||
TPCPreferencesReloadActionScrollbackSaveLimit = 1 << 13,
|
||||
TPCPreferencesReloadActionScrollbackVisibleLimit = 1 << 14,
|
||||
TPCPreferencesReloadActionServerList = 1 << 15,
|
||||
TPCPreferencesReloadActionServerListUnreadBadges = 1 << 16,
|
||||
TPCPreferencesReloadActionStyle = 1 << 17,
|
||||
// TPCPreferencesReloadActionStyleWithTableViews = 1 << 18,
|
||||
TPCPreferencesReloadActionTextDirection = 1 << 19,
|
||||
TPCPreferencesReloadActionTextFieldFontSize = 1 << 20,
|
||||
TPCPreferencesReloadActionTextFieldSegmentedControllerOrigin = 1 << 21,
|
||||
|
||||
#if TEXTUAL_BUILT_WITH_ADVANCED_ENCRYPTION == 1
|
||||
TPCPreferencesReloadEncryptionPolicyAction = 1 << 22,
|
||||
TPCPreferencesReloadActionEncryptionPolicy = 1 << 22,
|
||||
#endif
|
||||
|
||||
#if TEXTUAL_BUILT_WITH_SPARKLE_ENABLED == 1
|
||||
TPCPreferencesReloadSparkleFrameworkFeedURLAction = 1 << 23,
|
||||
TPCPreferencesReloadActionSparkleFrameworkFeedURL = 1 << 23,
|
||||
#endif
|
||||
};
|
||||
|
||||
@interface TPCPreferences (TPCPreferencesReload)
|
||||
+ (void)performReloadActionForKeys:(NSArray<NSString *> *)keys;
|
||||
+ (void)performReloadAction:(TPCPreferencesReloadActionMask)reloadAction;
|
||||
+ (void)performReloadAction:(TPCPreferencesReloadActionMask)reloadAction forKey:(nullable NSString *)key; // key is only used for context
|
||||
+ (void)performReloadAction:(TPCPreferencesReloadAction)reloadAction;
|
||||
+ (void)performReloadAction:(TPCPreferencesReloadAction)reloadAction forKey:(nullable NSString *)key; // key is only used for context
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -49,13 +49,13 @@ TEXTUAL_EXTERN NSString * const TPCThemeControllerCustomThemeNameCompletePrefix;
|
||||
TEXTUAL_EXTERN NSString * const TPCThemeControllerBundledThemeNameBasicPrefix;
|
||||
TEXTUAL_EXTERN NSString * const TPCThemeControllerBundledThemeNameCompletePrefix;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const TPCThemeControllerThemeListDidChangeNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TPCThemeControllerThemeListDidChangeNotification;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TPCThemeControllerStorageLocation) {
|
||||
TPCThemeControllerStorageUnknownLocation = 0,
|
||||
TPCThemeControllerStorageBundleLocation,
|
||||
TPCThemeControllerStorageCustomLocation,
|
||||
TPCThemeControllerStorageCloudLocation
|
||||
TPCThemeControllerStorageLocationUnknown = 0,
|
||||
TPCThemeControllerStorageLocationBundle,
|
||||
TPCThemeControllerStorageLocationCustom,
|
||||
TPCThemeControllerStorageLocationCloud
|
||||
};
|
||||
|
||||
/* Theme is not loaded until main window is woken which means
|
||||
|
||||
@@ -47,8 +47,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#define TPCThemeSettingsLatestTemplateEngineVersion 3
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TPCThemeSettingsNicknameColorStyle) {
|
||||
TPCThemeSettingsNicknameColorHashHueDarkStyle,
|
||||
TPCThemeSettingsNicknameColorHashHueLightStyle
|
||||
TPCThemeSettingsNicknameColorStyleHashHueDark,
|
||||
TPCThemeSettingsNicknameColorStyleHashHueLight
|
||||
};
|
||||
|
||||
@class GRMustacheTemplate;
|
||||
|
||||
@@ -40,15 +40,15 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/* TVCAlert acts as a non-blocking substitute to NSAlert
|
||||
which can be used to show messages that aren't important. */
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TVCAlertResponse) {
|
||||
TVCAlertResponseFirstButton = 1000,
|
||||
TVCAlertResponseSecondButton = 1001,
|
||||
TVCAlertResponseThirdButton = 1002
|
||||
typedef NS_ENUM(NSUInteger, TVCAlertResponseButton) {
|
||||
TVCAlertResponseButtonFirst = 1000,
|
||||
TVCAlertResponseButtonSecond = 1001,
|
||||
TVCAlertResponseButtonThird = 1002
|
||||
};
|
||||
|
||||
@class TVCAlert;
|
||||
|
||||
typedef void (^TVCAlertCompletionBlock)(TVCAlert *sender, TVCAlertResponse buttonClicked);
|
||||
typedef void (^TVCAlertCompletionBlock)(TVCAlert *sender, TVCAlertResponseButton buttonClicked);
|
||||
|
||||
@interface TVCAlert : NSObject
|
||||
/* All properties are immutable once alert is visible */
|
||||
@@ -75,7 +75,7 @@ typedef void (^TVCAlertCompletionBlock)(TVCAlert *sender, TVCAlertResponse butto
|
||||
- (void)showAlertInWindow:(NSWindow *)window;
|
||||
- (void)showAlertInWindow:(NSWindow *)window withCompletionBlock:(nullable TVCAlertCompletionBlock)completionBlock;
|
||||
|
||||
- (TVCAlertResponse)runModal;
|
||||
- (TVCAlertResponseButton)runModal;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@class IRCClient, IRCChannel;
|
||||
@class TVCLogLine, TVCLogView, TVCMainWindow;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const TVCLogControllerViewFinishedLoadingNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TVCLogControllerViewFinishedLoadingNotification;
|
||||
|
||||
@interface TVCLogController : NSObject
|
||||
@property (readonly) TVCLogView *backingView;
|
||||
|
||||
@@ -49,33 +49,33 @@ TEXTUAL_EXTERN NSString * const TVCLogLineSpecialNoticeMessageFormat;
|
||||
TEXTUAL_EXTERN NSString * const TVCLogLineDefaultCommandValue;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TVCLogLineType) {
|
||||
TVCLogLineUndefinedType = 0,
|
||||
TVCLogLineActionType,
|
||||
TVCLogLineActionNoHighlightType,
|
||||
TVCLogLineCTCPType,
|
||||
TVCLogLineCTCPQueryType,
|
||||
TVCLogLineCTCPReplyType,
|
||||
TVCLogLineDCCFileTransferType,
|
||||
TVCLogLineDebugType,
|
||||
TVCLogLineInviteType,
|
||||
TVCLogLineJoinType,
|
||||
TVCLogLineKickType,
|
||||
TVCLogLineKillType,
|
||||
TVCLogLineModeType,
|
||||
TVCLogLineNickType,
|
||||
TVCLogLineNoticeType,
|
||||
TVCLogLineOffTheRecordEncryptionStatusType,
|
||||
TVCLogLinePartType,
|
||||
TVCLogLinePrivateMessageType,
|
||||
TVCLogLinePrivateMessageNoHighlightType,
|
||||
TVCLogLineQuitType,
|
||||
TVCLogLineTopicType,
|
||||
TVCLogLineWebsiteType,
|
||||
TVCLogLineTypeUndefined = 0,
|
||||
TVCLogLineTypeAction,
|
||||
TVCLogLineTypeActionNoHighlight,
|
||||
TVCLogLineTypeCTCP,
|
||||
TVCLogLineTypeCTCPQuery,
|
||||
TVCLogLineTypeCTCPReply,
|
||||
TVCLogLineTypeDCCFileTransfer,
|
||||
TVCLogLineTypeDebug,
|
||||
TVCLogLineTypeInvite,
|
||||
TVCLogLineTypeJoin,
|
||||
TVCLogLineTypeKick,
|
||||
TVCLogLineTypeKill,
|
||||
TVCLogLineTypeMode,
|
||||
TVCLogLineTypeNick,
|
||||
TVCLogLineTypeNotice,
|
||||
TVCLogLineTypeOffTheRecordEncryptionStatus,
|
||||
TVCLogLineTypePart,
|
||||
TVCLogLineTypePrivateMessage,
|
||||
TVCLogLineTypePrivateMessageNoHighlight,
|
||||
TVCLogLineTypeQuit,
|
||||
TVCLogLineTypeTopic,
|
||||
TVCLogLineTypeWebsite,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TVCLogLineMemberType) {
|
||||
TVCLogLineMemberNormalType = 0,
|
||||
TVCLogLineMemberLocalUserType,
|
||||
TVCLogLineMemberTypeNormal = 0,
|
||||
TVCLogLineMemberTypeLocalUser,
|
||||
};
|
||||
|
||||
#define IRCCommandFromLineType(t) [TVCLogLine stringForLineType:t]
|
||||
|
||||
@@ -41,27 +41,30 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@class GRMustacheTemplate;
|
||||
@class TVCLogController;
|
||||
|
||||
typedef NSString *TVCLogRendererConfigurationAttribute NS_STRING_ENUM;
|
||||
typedef NSString *TVCLogRendererResultsAttribute NS_STRING_ENUM;
|
||||
|
||||
/* Properties to configure the renderer and provide additional
|
||||
context so that it can provide the best possible results. */
|
||||
/* These properties do not apply to attributed strings */
|
||||
TEXTUAL_EXTERN NSString * const TVCLogRendererConfigurationRenderLinksAttribute; // BOOL
|
||||
TEXTUAL_EXTERN NSString * const TVCLogRendererConfigurationLineTypeAttribute; // TVCLogLineType
|
||||
TEXTUAL_EXTERN NSString * const TVCLogRendererConfigurationMemberTypeAttribute; // TVCLogMemberType
|
||||
TEXTUAL_EXTERN NSString * const TVCLogRendererConfigurationHighlightKeywordsAttribute; // NSArray<NSString *>
|
||||
TEXTUAL_EXTERN NSString * const TVCLogRendererConfigurationExcludedKeywordsAttribute; // NSArray<NSString *>
|
||||
TEXTUAL_EXTERN NSString * const TVCLogRendererConfigurationDoNotEscapeBodyAttribute; // BOOL
|
||||
TEXTUAL_EXTERN TVCLogRendererConfigurationAttribute const TVCLogRendererConfigurationRenderLinksAttribute; // BOOL
|
||||
TEXTUAL_EXTERN TVCLogRendererConfigurationAttribute const TVCLogRendererConfigurationLineTypeAttribute; // TVCLogLineType
|
||||
TEXTUAL_EXTERN TVCLogRendererConfigurationAttribute const TVCLogRendererConfigurationMemberTypeAttribute; // TVCLogMemberType
|
||||
TEXTUAL_EXTERN TVCLogRendererConfigurationAttribute const TVCLogRendererConfigurationHighlightKeywordsAttribute; // NSArray<NSString *>
|
||||
TEXTUAL_EXTERN TVCLogRendererConfigurationAttribute const TVCLogRendererConfigurationExcludedKeywordsAttribute; // NSArray<NSString *>
|
||||
TEXTUAL_EXTERN TVCLogRendererConfigurationAttribute const TVCLogRendererConfigurationDoNotEscapeBodyAttribute; // BOOL
|
||||
|
||||
/* These properties apply to attributed strings */
|
||||
TEXTUAL_EXTERN NSString * const TVCLogRendererConfigurationAttributedStringPreferredFontAttribute; // NSFont
|
||||
TEXTUAL_EXTERN NSString * const TVCLogRendererConfigurationAttributedStringPreferredFontColorAttribute; // NSColor
|
||||
TEXTUAL_EXTERN TVCLogRendererConfigurationAttribute const TVCLogRendererConfigurationAttributedStringPreferredFontAttribute; // NSFont
|
||||
TEXTUAL_EXTERN TVCLogRendererConfigurationAttribute const TVCLogRendererConfigurationAttributedStringPreferredFontColorAttribute; // NSColor
|
||||
|
||||
/* Properties that are returned in the outputDictionary of a render */
|
||||
/* The output dictionary is not guaranteed to contain any key. */
|
||||
TEXTUAL_EXTERN NSString * const TVCLogRendererResultsListOfLinksInBodyAttribute; // NSArray<AHHyperlinkScannerResult *>
|
||||
TEXTUAL_EXTERN NSString * const TVCLogRendererResultsListOfLinksMappedInBodyAttribute; // NSDictionary<NSString *, NSString *>
|
||||
TEXTUAL_EXTERN NSString * const TVCLogRendererResultsKeywordMatchFoundAttribute; // BOOL
|
||||
TEXTUAL_EXTERN NSString * const TVCLogRendererResultsListOfUsersFoundAttribute; // NSSet<IRCChannelUser *>
|
||||
TEXTUAL_EXTERN NSString * const TVCLogRendererResultsOriginalBodyWithoutEffectsAttribute; // NSString
|
||||
TEXTUAL_EXTERN TVCLogRendererResultsAttribute const TVCLogRendererResultsListOfLinksInBodyAttribute; // NSArray<AHHyperlinkScannerResult *>
|
||||
TEXTUAL_EXTERN TVCLogRendererResultsAttribute const TVCLogRendererResultsListOfLinksMappedInBodyAttribute; // NSDictionary<NSString *, NSString *>
|
||||
TEXTUAL_EXTERN TVCLogRendererResultsAttribute const TVCLogRendererResultsKeywordMatchFoundAttribute; // BOOL
|
||||
TEXTUAL_EXTERN TVCLogRendererResultsAttribute const TVCLogRendererResultsListOfUsersFoundAttribute; // NSSet<IRCChannelUser *>
|
||||
TEXTUAL_EXTERN TVCLogRendererResultsAttribute const TVCLogRendererResultsOriginalBodyWithoutEffectsAttribute; // NSString
|
||||
|
||||
@interface TVCLogRenderer : NSObject
|
||||
+ (NSString *)escapeHTML:(NSString *)html;
|
||||
@@ -75,12 +78,12 @@ TEXTUAL_EXTERN NSString * const TVCLogRendererResultsOriginalBodyWithoutEffectsA
|
||||
+ (nullable NSString *)renderTemplate:(GRMustacheTemplate *)template;
|
||||
+ (nullable NSString *)renderTemplate:(GRMustacheTemplate *)template attributes:(nullable NSDictionary<NSString *, id> *)templateTokens;
|
||||
|
||||
+ (NSAttributedString *)renderBodyAsAttributedString:(NSString *)body withAttributes:(NSDictionary<NSString *, id> *)inputDictionary;
|
||||
+ (NSAttributedString *)renderBodyAsAttributedString:(NSString *)body withAttributes:(NSDictionary<TVCLogRendererConfigurationAttribute, id> *)inputDictionary;
|
||||
|
||||
+ (NSString *)renderBody:(NSString *)body
|
||||
forViewController:(TVCLogController *)viewController
|
||||
withAttributes:(NSDictionary<NSString *, id> *)inputDictionary
|
||||
resultInfo:(NSDictionary<NSString *, id> * _Nullable * _Nullable)outputDictionary;
|
||||
withAttributes:(NSDictionary<TVCLogRendererConfigurationAttribute, id> *)inputDictionary
|
||||
resultInfo:(NSDictionary<TVCLogRendererResultsAttribute, id> * _Nullable * _Nullable)outputDictionary;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -47,22 +47,22 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@class TVCLogController;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TVCServerListNavigationMovementType) {
|
||||
TVCServerListNavigationMovementAllType = 0, // Move to next item
|
||||
TVCServerListNavigationMovementActiveType, // Move to next active item
|
||||
TVCServerListNavigationMovementUnreadType, // Move to next unread item
|
||||
TVCServerListNavigationMovementTypeAll = 0, // Move to next item
|
||||
TVCServerListNavigationMovementTypeActive, // Move to next active item
|
||||
TVCServerListNavigationMovementTypeUnread, // Move to next unread item
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TVCServerListNavigationSelectionType) {
|
||||
TVCServerListNavigationSelectionAnyType = 0, // Move to next item
|
||||
TVCServerListNavigationSelectionChannelType, // Move to next channel item
|
||||
TVCServerListNavigationSelectionServerType, // Move to next server item
|
||||
TVCServerListNavigationSelectionTypeAny = 0, // Move to next item
|
||||
TVCServerListNavigationSelectionTypeChannel, // Move to next channel item
|
||||
TVCServerListNavigationSelectionTypeServer, // Move to next server item
|
||||
};
|
||||
|
||||
TEXTUAL_EXTERN NSString * const TVCMainWindowAppearanceChangedNotification;
|
||||
TEXTUAL_EXTERN NSString * const TVCMainWindowRedrawSubviewsNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TVCMainWindowAppearanceChangedNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TVCMainWindowRedrawSubviewsNotification;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const TVCMainWindowWillReloadThemeNotification;
|
||||
TEXTUAL_EXTERN NSString * const TVCMainWindowDidReloadThemeNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TVCMainWindowWillReloadThemeNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TVCMainWindowDidReloadThemeNotification;
|
||||
|
||||
TEXTUAL_EXTERN NSString * const TVCServerListDragType;
|
||||
|
||||
|
||||
@@ -41,10 +41,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TVCTextViewCaretLocation)
|
||||
{
|
||||
TVCTextViewCaretInOnlyLine, // There isn't more than one line
|
||||
TVCTextViewCaretInFirstLine,
|
||||
TVCTextViewCaretInMiddle,
|
||||
TVCTextViewCaretInLastLine,
|
||||
TVCTextViewCaretLocationOnlyLine, // There isn't more than one line
|
||||
TVCTextViewCaretLocationFirstLine,
|
||||
TVCTextViewCaretLocationMiddle,
|
||||
TVCTextViewCaretLocationLastLine,
|
||||
};
|
||||
|
||||
@interface TVCTextViewWithIRCFormatter : NSTextView <NSTextDelegate, TLOKeyEventHandlerPrototype>
|
||||
|
||||
@@ -39,14 +39,14 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, TXAppearanceType)
|
||||
{
|
||||
TXAppearanceMavericksAquaLightType,
|
||||
TXAppearanceMavericksAquaDarkType,
|
||||
TXAppearanceMavericksGraphiteLightType,
|
||||
TXAppearanceMavericksGraphiteDarkType,
|
||||
TXAppearanceYosemiteLightType,
|
||||
TXAppearanceYosemiteDarkType,
|
||||
TXAppearanceMojaveLightType,
|
||||
TXAppearanceMojaveDarkType,
|
||||
TXAppearanceTypeMavericksAquaLight,
|
||||
TXAppearanceTypeMavericksAquaDark,
|
||||
TXAppearanceTypeMavericksGraphiteLight,
|
||||
TXAppearanceTypeMavericksGraphiteDark,
|
||||
TXAppearanceTypeYosemiteLight,
|
||||
TXAppearanceTypeYosemiteDark,
|
||||
TXAppearanceTypeMojaveLight,
|
||||
TXAppearanceTypeMojaveDark,
|
||||
};
|
||||
|
||||
/* TXAppKitAppearanceTarget defines which items the NSAppearance
|
||||
@@ -95,8 +95,8 @@ typedef NS_ENUM(NSUInteger, TXAppKitAppearanceTarget)
|
||||
@property (readonly, strong) TXAppearancePropertyCollection *properties;
|
||||
@end
|
||||
|
||||
TEXTUAL_EXTERN NSString * const TXApplicationAppearanceChangedNotification;
|
||||
TEXTUAL_EXTERN NSString * const TXSystemAppearanceChangedNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TXApplicationAppearanceChangedNotification;
|
||||
TEXTUAL_EXTERN NSNotificationName const TXSystemAppearanceChangedNotification;
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#define themeSettings() [themeController() customSettings]
|
||||
|
||||
TEXTUAL_EXTERN NSString * const TXErrorDomain;
|
||||
TEXTUAL_EXTERN NSErrorDomain const TXErrorDomain;
|
||||
|
||||
@interface TXSharedApplication : NSObject
|
||||
+ (TXAppearance *)sharedAppearance;
|
||||
|
||||
@@ -376,18 +376,18 @@ NSStringEncoding const TXDefaultFallbackStringEncoding = NSISOLatin1StringEncodi
|
||||
UniChar character = inputBuffer[i];
|
||||
|
||||
switch (character) {
|
||||
case IRCTextFormatterBoldEffectCharacter:
|
||||
case IRCTextFormatterItalicEffectCharacter:
|
||||
case IRCTextFormatterItalicEffectCharacterOld:
|
||||
case IRCTextFormatterMonospaceEffectCharacter:
|
||||
case IRCTextFormatterStrikethroughEffectCharacter:
|
||||
case IRCTextFormatterUnderlineEffectCharacter:
|
||||
case IRCTextFormatterEffectBoldCharacter:
|
||||
case IRCTextFormatterEffectItalicCharacter:
|
||||
case IRCTextFormatterEffectItalicCharacterOld:
|
||||
case IRCTextFormatterEffectMonospaceCharacter:
|
||||
case IRCTextFormatterEffectStrikethroughCharacter:
|
||||
case IRCTextFormatterEffectUnderlineCharacter:
|
||||
case IRCTextFormatterTerminatingCharacter:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterColorAsDigitEffectCharacter:
|
||||
case IRCTextFormatterColorAsHexEffectCharacter:
|
||||
case IRCTextFormatterEffectColorAsDigitCharacter:
|
||||
case IRCTextFormatterEffectColorAsHexCharacter:
|
||||
{
|
||||
// One is subtracted because the for loop will increment by one for us
|
||||
i += ([self colorComponentsOfCharacter:character startingAt:i foregroundColor:NULL backgroundColor:NULL] - 1);
|
||||
@@ -408,9 +408,9 @@ NSStringEncoding const TXDefaultFallbackStringEncoding = NSISOLatin1StringEncodi
|
||||
|
||||
- (NSUInteger)colorComponentsOfCharacter:(UniChar)character startingAt:(NSUInteger)rangeStart foregroundColor:(id _Nullable * _Nullable)foregroundColor backgroundColor:(id _Nullable * _Nullable)backgroundColor
|
||||
{
|
||||
if (character == IRCTextFormatterColorAsDigitEffectCharacter) {
|
||||
if (character == IRCTextFormatterEffectColorAsDigitCharacter) {
|
||||
return [self colorAsDigitStartingAt:rangeStart foregroundColor:foregroundColor backgroundColor:backgroundColor];
|
||||
} else if (character == IRCTextFormatterColorAsHexEffectCharacter) {
|
||||
} else if (character == IRCTextFormatterEffectColorAsHexCharacter) {
|
||||
return [self colorAsHexStartingAt:rangeStart foregroundColor:foregroundColor backgroundColor:backgroundColor];
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ NSString * const THOPluginProtocolCompatibilityMinimumVersion = @"6.0.0";
|
||||
|
||||
for (THOPluginItem *plugin in sharedPluginManager().loadedPlugins)
|
||||
{
|
||||
if ([plugin supportsFeature:THOPluginItemSupportsDidReceiveCommandEvent] == NO) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportedFeatureDidReceiveCommandEvent] == NO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ NSString * const THOPluginProtocolCompatibilityMinimumVersion = @"6.0.0";
|
||||
|
||||
for (THOPluginItem *plugin in sharedPluginManager().loadedPlugins)
|
||||
{
|
||||
if ([plugin supportsFeature:THOPluginItemSupportsDidReceivePlainTextMessageEvent] == NO) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportedFeatureDidReceivePlainTextMessageEvent] == NO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ NSString * const THOPluginProtocolCompatibilityMinimumVersion = @"6.0.0";
|
||||
|
||||
for (THOPluginItem *plugin in sharedPluginManager().loadedPlugins)
|
||||
{
|
||||
if ([plugin supportsFeature:THOPluginItemSupportsServerInputDataInterception] == NO) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportedFeatureServerInputDataInterception] == NO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ NSString * const THOPluginProtocolCompatibilityMinimumVersion = @"6.0.0";
|
||||
|
||||
for (THOPluginItem *plugin in sharedPluginManager().loadedPlugins)
|
||||
{
|
||||
if ([plugin supportsFeature:THOPluginItemSupportsUserInputDataInterception] == NO) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportedFeatureUserInputDataInterception] == NO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ NSString * const THOPluginProtocolCompatibilityMinimumVersion = @"6.0.0";
|
||||
|
||||
for (THOPluginItem *plugin in sharedPluginManager().loadedPlugins)
|
||||
{
|
||||
if ([plugin supportsFeature:THOPluginItemSupportsWillRenderMessageEvent] == NO) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportedFeatureWillRenderMessageEvent] == NO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ NSString * const THOPluginProtocolCompatibilityMinimumVersion = @"6.0.0";
|
||||
|
||||
for (THOPluginItem *plugin in sharedPluginManager().loadedPlugins)
|
||||
{
|
||||
if ([plugin supportsFeature:THOPluginItemSupportsSubscribedUserInputCommands] == NO) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportedFeatureSubscribedUserInputCommands] == NO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ NSString * const THOPluginProtocolCompatibilityMinimumVersion = @"6.0.0";
|
||||
XRPerformBlockAsynchronouslyOnQueue([self dispatchQueue], ^{
|
||||
for (THOPluginItem *plugin in sharedPluginManager().loadedPlugins)
|
||||
{
|
||||
if ([plugin supportsFeature:THOPluginItemSupportsWebViewJavaScriptPayloads] == NO) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportedFeatureWebViewJavaScriptPayloads] == NO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ NSString * const THOPluginProtocolCompatibilityMinimumVersion = @"6.0.0";
|
||||
|
||||
for (THOPluginItem *plugin in sharedPluginManager().loadedPlugins)
|
||||
{
|
||||
if ([plugin supportsFeature:THOPluginItemSupportsSubscribedServerInputCommands] == NO) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportedFeatureSubscribedServerInputCommands] == NO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ NSString * const THOPluginProtocolCompatibilityMinimumVersion = @"6.0.0";
|
||||
XRPerformBlockAsynchronouslyOnQueue([self dispatchQueue], ^{
|
||||
for (THOPluginItem *plugin in sharedPluginManager().loadedPlugins)
|
||||
{
|
||||
if ([plugin supportsFeature:THOPluginItemSupportsNewMessagePostedEvent] == NO) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportedFeatureNewMessagePostedEvent] == NO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface THOPluginItem ()
|
||||
@property (nonatomic, strong, readwrite, nullable) NSBundle *bundle;
|
||||
@property (nonatomic, strong, readwrite, nullable) id primaryClass;
|
||||
@property (nonatomic, assign, readwrite) THOPluginItemSupportedFeatures supportedFeatures;
|
||||
@property (nonatomic, assign, readwrite) THOPluginItemSupportedFeature supportedFeatures;
|
||||
@property (nonatomic, copy, readwrite, nullable) NSArray<NSString *> *supportedUserInputCommands;
|
||||
@property (nonatomic, copy, readwrite, nullable) NSArray<NSString *> *supportedServerInputCommands;
|
||||
@property (nonatomic, copy, readwrite, nullable) NSArray<THOPluginOutputSuppressionRule *> *outputSuppressionRules;
|
||||
@@ -74,7 +74,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
/* Build list of supported features */
|
||||
THOPluginItemSupportedFeatures supportedFeatures = 0;
|
||||
THOPluginItemSupportedFeature supportedFeatures = 0;
|
||||
|
||||
/* Process server output suppression rules */
|
||||
if ([primaryClass respondsToSelector:@selector(pluginOutputSuppressionRules)])
|
||||
@@ -94,7 +94,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
self.outputSuppressionRules = sharedRules;
|
||||
|
||||
supportedFeatures |= THOPluginItemSupportsOutputSuppressionRules;
|
||||
supportedFeatures |= THOPluginItemSupportedFeatureOutputSuppressionRules;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
self.pluginPreferencesPaneMenuItemTitle = itemTitle;
|
||||
self.pluginPreferencesPaneView = itemView;
|
||||
|
||||
supportedFeatures |= THOPluginItemSupportsPreferencePane;
|
||||
supportedFeatures |= THOPluginItemSupportedFeaturePreferencePane;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
self.supportedUserInputCommands = supportedCommands;
|
||||
|
||||
supportedFeatures |= THOPluginItemSupportsSubscribedUserInputCommands;
|
||||
supportedFeatures |= THOPluginItemSupportedFeatureSubscribedUserInputCommands;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
self.supportedServerInputCommands = supportedCommands;
|
||||
|
||||
supportedFeatures |= THOPluginItemSupportsSubscribedServerInputCommands;
|
||||
supportedFeatures |= THOPluginItemSupportedFeatureSubscribedServerInputCommands;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,32 +164,32 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/* Renderer events */
|
||||
if ([primaryClass respondsToSelector:@selector(didPostNewMessage:forViewController:)]) {
|
||||
supportedFeatures |= THOPluginItemSupportsNewMessagePostedEvent;
|
||||
supportedFeatures |= THOPluginItemSupportedFeatureNewMessagePostedEvent;
|
||||
}
|
||||
|
||||
if ([primaryClass respondsToSelector:@selector(willRenderMessage:forViewController:lineType:memberType:)]) {
|
||||
supportedFeatures |= THOPluginItemSupportsWillRenderMessageEvent;
|
||||
supportedFeatures |= THOPluginItemSupportedFeatureWillRenderMessageEvent;
|
||||
}
|
||||
|
||||
if ([primaryClass respondsToSelector:@selector(didReceiveJavaScriptPayload:fromViewController:)]) {
|
||||
supportedFeatures |= THOPluginItemSupportsWebViewJavaScriptPayloads;
|
||||
supportedFeatures |= THOPluginItemSupportedFeatureWebViewJavaScriptPayloads;
|
||||
}
|
||||
|
||||
/* Data interception */
|
||||
if ([primaryClass respondsToSelector:@selector(interceptServerInput:for:)]) {
|
||||
supportedFeatures |= THOPluginItemSupportsServerInputDataInterception;
|
||||
supportedFeatures |= THOPluginItemSupportedFeatureServerInputDataInterception;
|
||||
}
|
||||
|
||||
if ([primaryClass respondsToSelector:@selector(interceptUserInput:command:)]) {
|
||||
supportedFeatures |= THOPluginItemSupportsUserInputDataInterception;
|
||||
supportedFeatures |= THOPluginItemSupportedFeatureUserInputDataInterception;
|
||||
}
|
||||
|
||||
if ([primaryClass respondsToSelector:@selector(receivedText:authoredBy:destinedFor:asLineType:onClient:receivedAt:wasEncrypted:)]) {
|
||||
supportedFeatures |= THOPluginItemSupportsDidReceivePlainTextMessageEvent;
|
||||
supportedFeatures |= THOPluginItemSupportedFeatureDidReceivePlainTextMessageEvent;
|
||||
}
|
||||
|
||||
if ([primaryClass respondsToSelector:@selector(receivedCommand:withText:authoredBy:destinedFor:onClient:receivedAt:referenceMessage:)]) {
|
||||
supportedFeatures |= THOPluginItemSupportsDidReceiveCommandEvent;
|
||||
supportedFeatures |= THOPluginItemSupportedFeatureDidReceiveCommandEvent;
|
||||
}
|
||||
|
||||
/* Deprecated and removed */
|
||||
@@ -228,7 +228,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
self.bundle = nil;
|
||||
}
|
||||
|
||||
- (BOOL)supportsFeature:(THOPluginItemSupportedFeatures)feature
|
||||
- (BOOL)supportsFeature:(THOPluginItemSupportedFeature)feature
|
||||
{
|
||||
return ((self->_supportedFeatures & feature) == feature);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ NSString * const THOPluginManagerFinishedLoadingPluginsNotification = @"THOPlugi
|
||||
@interface THOPluginManager ()
|
||||
@property (nonatomic, assign, readwrite) BOOL pluginsLoaded;
|
||||
@property (nonatomic, copy, readwrite) NSArray<THOPluginItem *> *loadedPlugins;
|
||||
@property (nonatomic, assign) THOPluginItemSupportedFeatures supportedFeatures;
|
||||
@property (nonatomic, assign) THOPluginItemSupportedFeature supportedFeatures;
|
||||
@end
|
||||
|
||||
@implementation THOPluginManager
|
||||
@@ -395,7 +395,7 @@ NSString * const THOPluginManagerFinishedLoadingPluginsNotification = @"THOPlugi
|
||||
suppressionKey:suppressionKey
|
||||
suppressionText:nil
|
||||
completionBlock:^(TDCAlertResponse buttonClicked, BOOL suppressed, id _Nullable underlyingAlert) {
|
||||
if (buttonClicked != TDCAlertResponseAlternateButton) {
|
||||
if (buttonClicked != TDCAlertResponseAlternate) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -528,23 +528,23 @@ NSString * const THOPluginManagerFinishedLoadingPluginsNotification = @"THOPlugi
|
||||
self->_supportedFeatures |= (_feature); \
|
||||
}
|
||||
|
||||
_ef(THOPluginItemSupportsDidReceiveCommandEvent)
|
||||
_ef(THOPluginItemSupportsDidReceivePlainTextMessageEvent)
|
||||
// _ef(THOPluginItemSupportsInlineMediaManipulation)
|
||||
_ef(THOPluginItemSupportsNewMessagePostedEvent)
|
||||
_ef(THOPluginItemSupportsOutputSuppressionRules)
|
||||
_ef(THOPluginItemSupportsPreferencePane)
|
||||
_ef(THOPluginItemSupportsServerInputDataInterception)
|
||||
_ef(THOPluginItemSupportsSubscribedServerInputCommands)
|
||||
_ef(THOPluginItemSupportsSubscribedUserInputCommands)
|
||||
_ef(THOPluginItemSupportsUserInputDataInterception)
|
||||
_ef(THOPluginItemSupportsWebViewJavaScriptPayloads)
|
||||
_ef(THOPluginItemSupportsWillRenderMessageEvent)
|
||||
_ef(THOPluginItemSupportedFeatureDidReceiveCommandEvent)
|
||||
_ef(THOPluginItemSupportedFeatureDidReceivePlainTextMessageEvent)
|
||||
// _ef(THOPluginItemSupportedFeatureInlineMediaManipulation)
|
||||
_ef(THOPluginItemSupportedFeatureNewMessagePostedEvent)
|
||||
_ef(THOPluginItemSupportedFeatureOutputSuppressionRules)
|
||||
_ef(THOPluginItemSupportedFeaturePreferencePane)
|
||||
_ef(THOPluginItemSupportedFeatureServerInputDataInterception)
|
||||
_ef(THOPluginItemSupportedFeatureSubscribedServerInputCommands)
|
||||
_ef(THOPluginItemSupportedFeatureSubscribedUserInputCommands)
|
||||
_ef(THOPluginItemSupportedFeatureUserInputDataInterception)
|
||||
_ef(THOPluginItemSupportedFeatureWebViewJavaScriptPayloads)
|
||||
_ef(THOPluginItemSupportedFeatureWillRenderMessageEvent)
|
||||
|
||||
#undef _ef
|
||||
}
|
||||
|
||||
- (BOOL)supportsFeature:(THOPluginItemSupportedFeatures)feature
|
||||
- (BOOL)supportsFeature:(THOPluginItemSupportedFeature)feature
|
||||
{
|
||||
return ((self->_supportedFeatures & feature) == feature);
|
||||
}
|
||||
@@ -559,7 +559,7 @@ NSString * const THOPluginManagerFinishedLoadingPluginsNotification = @"THOPlugi
|
||||
NSMutableArray<THOPluginOutputSuppressionRule *> *allRules = [NSMutableArray array];
|
||||
|
||||
for (THOPluginItem *plugin in self.loadedPlugins) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportsOutputSuppressionRules] == NO) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportedFeatureOutputSuppressionRules] == NO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -586,7 +586,7 @@ NSString * const THOPluginManagerFinishedLoadingPluginsNotification = @"THOPlugi
|
||||
NSMutableArray<NSString *> *allCommands = [NSMutableArray array];
|
||||
|
||||
for (THOPluginItem *plugin in self.loadedPlugins) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportsSubscribedUserInputCommands] == NO) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportedFeatureSubscribedUserInputCommands] == NO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -615,7 +615,7 @@ NSString * const THOPluginManagerFinishedLoadingPluginsNotification = @"THOPlugi
|
||||
NSMutableArray<NSString *> *allCommands = [NSMutableArray array];
|
||||
|
||||
for (THOPluginItem *plugin in self.loadedPlugins) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportsSubscribedServerInputCommands] == NO) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportedFeatureSubscribedServerInputCommands] == NO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -644,7 +644,7 @@ NSString * const THOPluginManagerFinishedLoadingPluginsNotification = @"THOPlugi
|
||||
NSMutableArray<THOPluginItem *> *allExtensions = [NSMutableArray array];
|
||||
|
||||
for (THOPluginItem *plugin in self.loadedPlugins) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportsPreferencePane] == NO) {
|
||||
if ([plugin supportsFeature:THOPluginItemSupportedFeaturePreferencePane] == NO) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
ObjectIsAlreadyInitializedAssert
|
||||
|
||||
self->_defaults = @{
|
||||
@"entryType" : @(IRCAddressBookIgnoreEntryType),
|
||||
@"entryType" : @(IRCAddressBookEntryTypeIgnore),
|
||||
@"ignoreClientToClientProtocol" : @(NO),
|
||||
@"ignoreFileTransferRequests" : @(NO),
|
||||
@"ignoreGeneralEventMessages" : @(NO),
|
||||
@@ -85,7 +85,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NSDictionary *dic = @{
|
||||
@"hostmask" : hostmask,
|
||||
@"entryType" : @(IRCAddressBookIgnoreEntryType),
|
||||
@"entryType" : @(IRCAddressBookEntryTypeIgnore),
|
||||
@"ignoreClientToClientProtocol" : @(YES),
|
||||
@"ignoreFileTransferRequests" : @(YES),
|
||||
@"ignoreGeneralEventMessages" : @(YES),
|
||||
@@ -105,7 +105,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
+ (instancetype)newUserTrackingEntry
|
||||
{
|
||||
NSDictionary *dic = @{
|
||||
@"entryType" : @(IRCAddressBookUserTrackingEntryType),
|
||||
@"entryType" : @(IRCAddressBookEntryTypeUserTracking),
|
||||
@"trackUserActivity" : @(YES)
|
||||
};
|
||||
|
||||
@@ -172,8 +172,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
|
||||
IRCAddressBookEntryType entryType = self->_entryType;
|
||||
|
||||
if (entryType == IRCAddressBookIgnoreEntryType ||
|
||||
entryType == IRCAddressBookMixedEntryType)
|
||||
if (entryType == IRCAddressBookEntryTypeIgnore ||
|
||||
entryType == IRCAddressBookEntryTypeMixed)
|
||||
{
|
||||
/* Load the newest set of keys */
|
||||
[dic assignBoolTo:&self->_ignoreClientToClientProtocol forKey:@"ignoreClientToClientProtocol"];
|
||||
@@ -196,8 +196,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
[dic assignBoolTo:&self->_ignorePublicMessages forKey:@"ignorePublicMsg"];
|
||||
}
|
||||
|
||||
if (entryType == IRCAddressBookUserTrackingEntryType ||
|
||||
entryType == IRCAddressBookMixedEntryType)
|
||||
if (entryType == IRCAddressBookEntryTypeUserTracking ||
|
||||
entryType == IRCAddressBookEntryTypeMixed)
|
||||
{
|
||||
/* Load the newest set of keys */
|
||||
[dic assignBoolTo:&self->_trackUserActivity forKey:@"trackUserActivity"];
|
||||
@@ -221,7 +221,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
{
|
||||
NSString *hostmask = self.hostmask;
|
||||
|
||||
if (self.entryType == IRCAddressBookIgnoreEntryType)
|
||||
if (self.entryType == IRCAddressBookEntryTypeIgnore)
|
||||
{
|
||||
hostmask = [hostmask stringByReplacingOccurrencesOfString:@"\\" withString:@"\\\\"];
|
||||
hostmask = [hostmask stringByReplacingOccurrencesOfString:@"{" withString:@"\\{"];
|
||||
@@ -235,7 +235,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
hostmask = [hostmask stringByReplacingOccurrencesOfString:@"~" withString:@"\\~"];
|
||||
hostmask = [hostmask stringByReplacingOccurrencesOfString:@"*" withString:@"(.*?)"];
|
||||
}
|
||||
else if (self.entryType == IRCAddressBookUserTrackingEntryType)
|
||||
else if (self.entryType == IRCAddressBookEntryTypeUserTracking)
|
||||
{
|
||||
hostmask = [NSString stringWithFormat:@"^%@!(.*?)@(.*?)$", hostmask];
|
||||
}
|
||||
@@ -249,7 +249,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
|
||||
- (void)rebuildTrackingNickname
|
||||
{
|
||||
if (self.entryType != IRCAddressBookUserTrackingEntryType) {
|
||||
if (self.entryType != IRCAddressBookEntryTypeUserTracking) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -276,8 +276,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
|
||||
IRCAddressBookEntryType entryType = self.entryType;
|
||||
|
||||
if (entryType == IRCAddressBookIgnoreEntryType ||
|
||||
entryType == IRCAddressBookMixedEntryType)
|
||||
if (entryType == IRCAddressBookEntryTypeIgnore ||
|
||||
entryType == IRCAddressBookEntryTypeMixed)
|
||||
{
|
||||
[dic setBool:self.ignoreClientToClientProtocol forKey:@"ignoreClientToClientProtocol"];
|
||||
[dic setBool:self.ignoreFileTransferRequests forKey:@"ignoreFileTransferRequests"];
|
||||
@@ -290,8 +290,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
[dic setBool:self.ignorePublicMessages forKey:@"ignorePublicMessages"];
|
||||
}
|
||||
|
||||
if (entryType == IRCAddressBookUserTrackingEntryType ||
|
||||
entryType == IRCAddressBookMixedEntryType)
|
||||
if (entryType == IRCAddressBookEntryTypeUserTracking ||
|
||||
entryType == IRCAddressBookEntryTypeMixed)
|
||||
{
|
||||
[dic setBool:self.trackUserActivity forKey:@"trackUserActivity"];
|
||||
}
|
||||
|
||||
@@ -89,16 +89,16 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
{
|
||||
IRCAddressBookEntry *match = [self findAddressBookEntryForHostmask:hostmask];
|
||||
|
||||
if (match && match.entryType == IRCAddressBookIgnoreEntryType) {
|
||||
if (match && match.entryType == IRCAddressBookEntryTypeIgnore) {
|
||||
return @[match];
|
||||
}
|
||||
|
||||
if (match && match.entryType == IRCAddressBookMixedEntryType) {
|
||||
if (match && match.entryType == IRCAddressBookEntryTypeMixed) {
|
||||
NSArray *parentEntries = match.parentEntries;
|
||||
|
||||
return
|
||||
[parentEntries filteredArrayUsingPredicate:
|
||||
[NSPredicate predicateWithFormat:@"entryType == %d", IRCAddressBookIgnoreEntryType]];
|
||||
[NSPredicate predicateWithFormat:@"entryType == %d", IRCAddressBookEntryTypeIgnore]];
|
||||
}
|
||||
|
||||
return @[];
|
||||
@@ -153,7 +153,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
if (matchedEntries) {
|
||||
IRCAddressBookEntryMutable *mixedEntry = [IRCAddressBookEntryMutable new];
|
||||
|
||||
mixedEntry.entryType = IRCAddressBookMixedEntryType;
|
||||
mixedEntry.entryType = IRCAddressBookEntryTypeMixed;
|
||||
|
||||
mixedEntry.parentEntries = matchedEntries;
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ NSString * const IRCAddressBookUserTrackingRemovedAllTrackedUsersNotification =
|
||||
NSString *trackingNickname = [self.trackedUsersInt keyIgnoringCase:nickname];
|
||||
|
||||
if (trackingNickname == nil) {
|
||||
return IRCAddressBookUserTrackingUnknownStatus;
|
||||
return IRCAddressBookUserTrackingStatusUnknown;
|
||||
}
|
||||
|
||||
return [self _statusOfUser:nickname];
|
||||
@@ -163,9 +163,9 @@ NSString * const IRCAddressBookUserTrackingRemovedAllTrackedUsersNotification =
|
||||
BOOL ison = self.trackedUsersInt[nickname].boolValue;
|
||||
|
||||
if (ison) {
|
||||
return IRCAddressBookUserTrackingIsAvailalbeStatus;
|
||||
return IRCAddressBookUserTrackingStatusAvailalbe;
|
||||
} else {
|
||||
return IRCAddressBookUserTrackingIsNotAvailalbeStatus;
|
||||
return IRCAddressBookUserTrackingStatusNotAvailalbe;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ NSString * const IRCAddressBookUserTrackingRemovedAllTrackedUsersNotification =
|
||||
NSString *trackingNickname = addressBookEntry.trackingNickname;
|
||||
|
||||
if (trackingNickname == nil) {
|
||||
return IRCAddressBookUserTrackingUnknownStatus;
|
||||
return IRCAddressBookUserTrackingStatusUnknown;
|
||||
}
|
||||
|
||||
return [self statusOfUser:trackingNickname];
|
||||
@@ -194,15 +194,15 @@ NSString * const IRCAddressBookUserTrackingRemovedAllTrackedUsersNotification =
|
||||
{
|
||||
NSParameterAssert(nickname != nil);
|
||||
|
||||
if (newStatus == IRCAddressBookUserTrackingUnknownStatus) {
|
||||
if (newStatus == IRCAddressBookUserTrackingStatusUnknown) {
|
||||
return;
|
||||
}
|
||||
|
||||
@synchronized (self.trackedUsersInt) {
|
||||
NSString *trackingNickname = [self.trackedUsersInt keyIgnoringCase:nickname];
|
||||
|
||||
if (newStatus == IRCAddressBookUserTrackingIsAvailalbeStatus ||
|
||||
newStatus == IRCAddressBookUserTrackingSignedOnStatus)
|
||||
if (newStatus == IRCAddressBookUserTrackingStatusAvailalbe ||
|
||||
newStatus == IRCAddressBookUserTrackingStatusSignedOn)
|
||||
{
|
||||
if (trackingNickname == nil) {
|
||||
trackingNickname = nickname;
|
||||
@@ -210,8 +210,8 @@ NSString * const IRCAddressBookUserTrackingRemovedAllTrackedUsersNotification =
|
||||
|
||||
self.trackedUsersInt[trackingNickname] = @(YES);
|
||||
}
|
||||
else if (newStatus == IRCAddressBookUserTrackingIsNotAvailalbeStatus ||
|
||||
newStatus == IRCAddressBookUserTrackingSignedOffStatus)
|
||||
else if (newStatus == IRCAddressBookUserTrackingStatusNotAvailalbe ||
|
||||
newStatus == IRCAddressBookUserTrackingStatusSignedOff)
|
||||
{
|
||||
if (trackingNickname == nil) {
|
||||
return;
|
||||
@@ -219,8 +219,8 @@ NSString * const IRCAddressBookUserTrackingRemovedAllTrackedUsersNotification =
|
||||
|
||||
self.trackedUsersInt[trackingNickname] = @(NO);
|
||||
}
|
||||
else if (newStatus == IRCAddressBookUserTrackingIsNotAwayStatus ||
|
||||
newStatus == IRCAddressBookUserTrackingIsAwayStatus)
|
||||
else if (newStatus == IRCAddressBookUserTrackingStatusNotAway ||
|
||||
newStatus == IRCAddressBookUserTrackingStatusAway)
|
||||
{
|
||||
if (trackingNickname == nil) {
|
||||
return;
|
||||
|
||||
Executable → Regular
+7
-7
@@ -209,17 +209,17 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
|
||||
- (BOOL)isChannel
|
||||
{
|
||||
return (self.config.type == IRCChannelChannelType);
|
||||
return (self.config.type == IRCChannelTypeChannel);
|
||||
}
|
||||
|
||||
- (BOOL)isPrivateMessage
|
||||
{
|
||||
return (self.config.type == IRCChannelPrivateMessageType);
|
||||
return (self.config.type == IRCChannelTypePrivateMessage);
|
||||
}
|
||||
|
||||
- (BOOL)isUtility
|
||||
{
|
||||
return (self.config.type == IRCChannelUtilityType);
|
||||
return (self.config.type == IRCChannelTypeUtility);
|
||||
}
|
||||
|
||||
- (BOOL)isPrivateMessageForZNCUser
|
||||
@@ -241,15 +241,15 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
- (NSString *)channelTypeString
|
||||
{
|
||||
switch (self.config.type) {
|
||||
case IRCChannelChannelType:
|
||||
case IRCChannelTypeChannel:
|
||||
{
|
||||
return @"channel";
|
||||
}
|
||||
case IRCChannelPrivateMessageType:
|
||||
case IRCChannelTypePrivateMessage:
|
||||
{
|
||||
return @"query";
|
||||
}
|
||||
case IRCChannelUtilityType:
|
||||
case IRCChannelTypeUtility:
|
||||
{
|
||||
return @"utility";
|
||||
}
|
||||
@@ -738,7 +738,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
|
||||
- (void)addMember:(IRCChannelUser *)member
|
||||
{
|
||||
/* checkForDuplicates defaults to NO because to avoid extra work */
|
||||
/* checkForDuplicates defaults to NO to avoid extra work */
|
||||
|
||||
[self addMember:member checkForDuplicates:NO];
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
self->_defaults = @{
|
||||
@"autoJoin" : @(YES),
|
||||
@"channelType" : @(IRCChannelChannelType),
|
||||
@"channelType" : @(IRCChannelTypeChannel),
|
||||
@"ignoreGeneralEventMessages" : @(NO),
|
||||
@"ignoreHighlights" : @(NO),
|
||||
@"inlineMediaEnabled" : @(NO),
|
||||
@@ -160,7 +160,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
|
||||
[defaultsMutable assignUnsignedIntegerTo:&self->_type forKey:@"channelType"];
|
||||
|
||||
if (self->_type != IRCChannelChannelType) {
|
||||
if (self->_type != IRCChannelTypeChannel) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
[dic setBool:self.pushNotifications forKey:@"pushNotifications"];
|
||||
[dic setBool:self.showTreeBadgeCount forKey:@"showTreeBadgeCount"];
|
||||
|
||||
if (self.type == IRCChannelChannelType) {
|
||||
if (self.type == IRCChannelTypeChannel) {
|
||||
[dic maybeSetObject:self.defaultModes forKey:@"defaultMode"];
|
||||
[dic maybeSetObject:self.defaultTopic forKey:@"defaultTopic"];
|
||||
[dic maybeSetObject:self.notifications forKey:@"notifications"];
|
||||
|
||||
@@ -268,10 +268,10 @@ ClassWithDesignatedInitializerInitMethod
|
||||
/* Using some random value in place of mode if there is none
|
||||
is easier than creating a mutable array with four if statements. */
|
||||
return @[
|
||||
/* ban */ (([supportInfo modeSymbolForList:IRCISupportInfoBanListType]) ?: @"not supported: b"),
|
||||
/* ban exception */ (([supportInfo modeSymbolForList:IRCISupportInfoBanExceptionListType]) ?: @"not supported: e"),
|
||||
/* invite exception */ (([supportInfo modeSymbolForList:IRCISupportInfoInviteExceptionListType]) ?: @"not supported: I"),
|
||||
/* quiet */ (([supportInfo modeSymbolForList:IRCISupportInfoQuietListType]) ?: @"not supported: q")
|
||||
/* ban */ (([supportInfo modeSymbolForList:IRCISupportInfoListTypeBan]) ?: @"not supported: b"),
|
||||
/* ban exception */ (([supportInfo modeSymbolForList:IRCISupportInfoListTypeBanException]) ?: @"not supported: e"),
|
||||
/* invite exception */ (([supportInfo modeSymbolForList:IRCISupportInfoListTypeInviteException]) ?: @"not supported: I"),
|
||||
/* quiet */ (([supportInfo modeSymbolForList:IRCISupportInfoListTypeQuiet]) ?: @"not supported: q")
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Executable → Regular
+431
-431
File diff suppressed because it is too large
Load Diff
@@ -392,7 +392,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
for (NSDictionary<NSString *, id> *e in channelListIn) {
|
||||
IRCChannelConfig *c = [[IRCChannelConfig alloc] initWithDictionary:e];
|
||||
|
||||
if (c.type == IRCChannelPrivateMessageType) {
|
||||
if (c.type == IRCChannelTypePrivateMessage) {
|
||||
if (ignorePrivateMessages == NO) {
|
||||
[channelListOut addObject:c];
|
||||
}
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, IRCClientRequestedCommandsHiddenState)
|
||||
typedef NS_ENUM(NSUInteger, IRCClientRequestedCommandVisibility)
|
||||
{
|
||||
IRCClientRequestedCommandsUnknownHiddenState = 0,
|
||||
IRCClientRequestedCommandsIsHiddenState,
|
||||
IRCClientRequestedCommandsIsNotHiddenState
|
||||
IRCClientRequestedCommandVisibilityUnknown = 0,
|
||||
IRCClientRequestedCommandVisibilityHidden,
|
||||
IRCClientRequestedCommandVisibilityVisible
|
||||
};
|
||||
|
||||
@interface IRCClientRequestedCommand : NSObject
|
||||
@@ -155,18 +155,18 @@ typedef NS_ENUM(NSUInteger, IRCClientRequestedCommandsHiddenState)
|
||||
}
|
||||
}
|
||||
|
||||
- (IRCClientRequestedCommandsHiddenState)commandHiddenState:(IRCRemoteCommand)command
|
||||
- (IRCClientRequestedCommandVisibility)commandHiddenState:(IRCRemoteCommand)command
|
||||
{
|
||||
IRCClientRequestedCommand *commandObject = [self findCommand:command];
|
||||
|
||||
if (commandObject == nil) {
|
||||
return IRCClientRequestedCommandsUnknownHiddenState;
|
||||
return IRCClientRequestedCommandVisibilityUnknown;
|
||||
}
|
||||
|
||||
if (commandObject.hiddenResponse == NO) {
|
||||
return IRCClientRequestedCommandsIsNotHiddenState;
|
||||
return IRCClientRequestedCommandVisibilityVisible;
|
||||
} else {
|
||||
return IRCClientRequestedCommandsIsHiddenState;
|
||||
return IRCClientRequestedCommandVisibilityHidden;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,142 +178,142 @@ typedef NS_ENUM(NSUInteger, IRCClientRequestedCommandsHiddenState)
|
||||
|
||||
- (BOOL)inVisibleIsonRequest
|
||||
{
|
||||
return ([self commandHiddenState:IRCRemoteCommandIsonIndex] == IRCClientRequestedCommandsIsNotHiddenState);
|
||||
return ([self commandHiddenState:IRCRemoteCommandIson] == IRCClientRequestedCommandVisibilityVisible);
|
||||
}
|
||||
|
||||
- (void)recordIsonRequestOpened
|
||||
{
|
||||
[self addCommand:IRCRemoteCommandIsonIndex hiddenResponse:YES];
|
||||
[self addCommand:IRCRemoteCommandIson hiddenResponse:YES];
|
||||
}
|
||||
|
||||
- (void)recordIsonRequestOpenedAsVisible
|
||||
{
|
||||
[self addCommand:IRCRemoteCommandIsonIndex hiddenResponse:NO];
|
||||
[self addCommand:IRCRemoteCommandIson hiddenResponse:NO];
|
||||
}
|
||||
|
||||
- (void)recordIsonRequestClosed
|
||||
{
|
||||
[self removeCommand:IRCRemoteCommandIsonIndex];
|
||||
[self removeCommand:IRCRemoteCommandIson];
|
||||
}
|
||||
|
||||
#if 0
|
||||
- (BOOL)inVisibleMonitorRequest
|
||||
{
|
||||
return ([self commandHiddenState:IRCRemoteCommandMonitorIndex] == IRCClientRequestedCommandsIsNotHiddenState);
|
||||
return ([self commandHiddenState:IRCRemoteCommandMonitor] == IRCClientRequestedCommandVisibilityVisible);
|
||||
}
|
||||
|
||||
- (void)recordMonitorRequestOpened
|
||||
{
|
||||
[self addCommand:IRCRemoteCommandMonitorIndex hiddenResponse:YES];
|
||||
[self addCommand:IRCRemoteCommandMonitor hiddenResponse:YES];
|
||||
}
|
||||
|
||||
- (void)recordMonitorRequestOpenedWithCount:(NSUInteger)count
|
||||
{
|
||||
NSParameterAssert(count > 0);
|
||||
|
||||
[self addCommand:IRCRemoteCommandMonitorIndex withCount:count hiddenResponse:YES];
|
||||
[self addCommand:IRCRemoteCommandMonitor withCount:count hiddenResponse:YES];
|
||||
}
|
||||
|
||||
- (void)recordMonitorRequestOpenedAsVisibleWithCount:(NSUInteger)count
|
||||
{
|
||||
NSParameterAssert(count > 0);
|
||||
|
||||
[self addCommand:IRCRemoteCommandMonitorIndex withCount:count hiddenResponse:NO];
|
||||
[self addCommand:IRCRemoteCommandMonitor withCount:count hiddenResponse:NO];
|
||||
}
|
||||
|
||||
- (void)recordMonitorRequestOpenedAsVisible
|
||||
{
|
||||
[self addCommand:IRCRemoteCommandMonitorIndex hiddenResponse:NO];
|
||||
[self addCommand:IRCRemoteCommandMonitor hiddenResponse:NO];
|
||||
}
|
||||
|
||||
- (void)recordMonitorRequestClosedOne
|
||||
{
|
||||
[self decrementCommandCount:IRCRemoteCommandMonitorIndex];
|
||||
[self decrementCommandCount:IRCRemoteCommandMonitor];
|
||||
}
|
||||
|
||||
- (void)recordMonitorRequestClosed
|
||||
{
|
||||
[self removeCommand:IRCRemoteCommandMonitorIndex];
|
||||
[self removeCommand:IRCRemoteCommandMonitor];
|
||||
}
|
||||
|
||||
- (BOOL)inVisibleNamesRequest
|
||||
{
|
||||
return ([self commandHiddenState:IRCRemoteCommandNamesIndex] == IRCClientRequestedCommandsIsNotHiddenState);
|
||||
return ([self commandHiddenState:IRCRemoteCommandNames] == IRCClientRequestedCommandVisibilityVisible);
|
||||
}
|
||||
|
||||
- (void)recordNamesRequestOpened
|
||||
{
|
||||
[self addCommand:IRCRemoteCommandNamesIndex hiddenResponse:YES];
|
||||
[self addCommand:IRCRemoteCommandNames hiddenResponse:YES];
|
||||
}
|
||||
|
||||
- (void)recordNamesRequestOpenedAsVisible
|
||||
{
|
||||
[self addCommand:IRCRemoteCommandNamesIndex hiddenResponse:NO];
|
||||
[self addCommand:IRCRemoteCommandNames hiddenResponse:NO];
|
||||
}
|
||||
|
||||
- (void)recordNamesRequestClosed
|
||||
{
|
||||
[self removeCommand:IRCRemoteCommandNamesIndex];
|
||||
[self removeCommand:IRCRemoteCommandNames];
|
||||
}
|
||||
|
||||
- (BOOL)inVisibleWatchRequest
|
||||
{
|
||||
return ([self commandHiddenState:IRCRemoteCommandWatchIndex] == IRCClientRequestedCommandsIsNotHiddenState);
|
||||
return ([self commandHiddenState:IRCRemoteCommandWatch] == IRCClientRequestedCommandVisibilityVisible);
|
||||
}
|
||||
|
||||
- (void)recordWatchRequestOpened
|
||||
{
|
||||
[self addCommand:IRCRemoteCommandWatchIndex hiddenResponse:YES];
|
||||
[self addCommand:IRCRemoteCommandWatch hiddenResponse:YES];
|
||||
}
|
||||
|
||||
- (void)recordWatchRequestOpenedWithCount:(NSUInteger)count
|
||||
{
|
||||
NSParameterAssert(count > 0);
|
||||
|
||||
[self addCommand:IRCRemoteCommandWatchIndex withCount:count hiddenResponse:YES];
|
||||
[self addCommand:IRCRemoteCommandWatch withCount:count hiddenResponse:YES];
|
||||
}
|
||||
|
||||
- (void)recordWatchRequestOpenedAsVisibleWithCount:(NSUInteger)count
|
||||
{
|
||||
NSParameterAssert(count > 0);
|
||||
|
||||
[self addCommand:IRCRemoteCommandWatchIndex withCount:count hiddenResponse:NO];
|
||||
[self addCommand:IRCRemoteCommandWatch withCount:count hiddenResponse:NO];
|
||||
}
|
||||
|
||||
- (void)recordWatchRequestOpenedAsVisible
|
||||
{
|
||||
[self addCommand:IRCRemoteCommandWatchIndex hiddenResponse:NO];
|
||||
[self addCommand:IRCRemoteCommandWatch hiddenResponse:NO];
|
||||
}
|
||||
|
||||
- (void)recordWatchRequestClosedOne
|
||||
{
|
||||
[self decrementCommandCount:IRCRemoteCommandWatchIndex];
|
||||
[self decrementCommandCount:IRCRemoteCommandWatch];
|
||||
}
|
||||
|
||||
- (void)recordWatchRequestClosed
|
||||
{
|
||||
[self removeCommand:IRCRemoteCommandWatchIndex];
|
||||
[self removeCommand:IRCRemoteCommandWatch];
|
||||
}
|
||||
#endif
|
||||
|
||||
- (BOOL)inVisibleWhoRequest
|
||||
{
|
||||
return ([self commandHiddenState:IRCRemoteCommandWhoIndex] == IRCClientRequestedCommandsIsNotHiddenState);
|
||||
return ([self commandHiddenState:IRCRemoteCommandWho] == IRCClientRequestedCommandVisibilityVisible);
|
||||
}
|
||||
|
||||
- (void)recordWhoRequestOpened
|
||||
{
|
||||
[self addCommand:IRCRemoteCommandWhoIndex hiddenResponse:YES];
|
||||
[self addCommand:IRCRemoteCommandWho hiddenResponse:YES];
|
||||
}
|
||||
|
||||
- (void)recordWhoRequestOpenedAsVisible
|
||||
{
|
||||
[self addCommand:IRCRemoteCommandWhoIndex hiddenResponse:NO];
|
||||
[self addCommand:IRCRemoteCommandWho hiddenResponse:NO];
|
||||
}
|
||||
|
||||
- (void)recordWhoRequestClosed
|
||||
{
|
||||
[self removeCommand:IRCRemoteCommandWhoIndex];
|
||||
[self removeCommand:IRCRemoteCommandWho];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -103,7 +103,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NSString *messageBody = nil;
|
||||
|
||||
if (logLine.lineType == TVCLogLineActionType) {
|
||||
if (logLine.lineType == TVCLogLineTypeAction) {
|
||||
/* Actions are presented in the format "• <nickname>: <message" in the Highlight List. */
|
||||
nicknameBody = logLine.nickname;
|
||||
|
||||
|
||||
@@ -600,19 +600,19 @@ ClassWithDesignatedInitializerInitMethod
|
||||
- (nullable NSString *)modeSymbolForList:(IRCISupportInfoListType)listType
|
||||
{
|
||||
switch (listType) {
|
||||
case IRCISupportInfoBanListType:
|
||||
case IRCISupportInfoListTypeBan:
|
||||
{
|
||||
return @"b";
|
||||
}
|
||||
case IRCISupportInfoBanExceptionListType:
|
||||
case IRCISupportInfoListTypeBanException:
|
||||
{
|
||||
return self.banExceptionModeSymbol;
|
||||
}
|
||||
case IRCISupportInfoInviteExceptionListType:
|
||||
case IRCISupportInfoListTypeInviteException:
|
||||
{
|
||||
return self.inviteExceptionModeSymbol;
|
||||
}
|
||||
case IRCISupportInfoQuietListType:
|
||||
case IRCISupportInfoListTypeQuiet:
|
||||
{
|
||||
/* +q is used by some servers as the user mode for channel owner.
|
||||
If this mode is a user mode, then hide the menu item. */
|
||||
|
||||
Executable → Regular
+5
-5
@@ -266,7 +266,7 @@ NSString * const IRCWorldWillDestroyChannelNotification = @"IRCWorldWillDestroyC
|
||||
}
|
||||
|
||||
#define _isAutoConnecting (afterWakeUp == NO && u.config.autoConnect)
|
||||
#define _isWakingFromSleep (afterWakeUp && u.config.autoSleepModeDisconnect && u.disconnectType == IRCClientDisconnectComputerSleepMode)
|
||||
#define _isWakingFromSleep (afterWakeUp && u.config.autoSleepModeDisconnect && u.disconnectType == IRCClientDisconnectModeComputerSleep)
|
||||
|
||||
for (IRCClient *u in self.clientList) {
|
||||
if (_isWakingFromSleep == NO && _isAutoConnecting == NO) {
|
||||
@@ -293,7 +293,7 @@ NSString * const IRCWorldWillDestroyChannelNotification = @"IRCWorldWillDestroyC
|
||||
continue;
|
||||
}
|
||||
|
||||
u.disconnectType = IRCClientDisconnectComputerSleepMode;
|
||||
u.disconnectType = IRCClientDisconnectModeComputerSleep;
|
||||
|
||||
[u quit];
|
||||
}
|
||||
@@ -601,15 +601,15 @@ NSString * const IRCWorldWillDestroyChannelNotification = @"IRCWorldWillDestroyC
|
||||
|
||||
- (IRCChannel *)createPrivateMessage:(NSString *)nickname onClient:(IRCClient *)client
|
||||
{
|
||||
return [self createPrivateMessage:nickname onClient:client asType:IRCChannelPrivateMessageType];
|
||||
return [self createPrivateMessage:nickname onClient:client asType:IRCChannelTypePrivateMessage];
|
||||
}
|
||||
|
||||
- (IRCChannel *)createPrivateMessage:(NSString *)nickname onClient:(IRCClient *)client asType:(IRCChannelType)type
|
||||
{
|
||||
NSParameterAssert(nickname != nil);
|
||||
NSParameterAssert(client != nil);
|
||||
NSParameterAssert(type == IRCChannelPrivateMessageType ||
|
||||
type == IRCChannelUtilityType);
|
||||
NSParameterAssert(type == IRCChannelTypePrivateMessage ||
|
||||
type == IRCChannelTypeUtility);
|
||||
|
||||
IRCChannelConfigMutable *config = [IRCChannelConfigMutable new];
|
||||
|
||||
|
||||
@@ -149,27 +149,27 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
|
||||
- (BOOL)q
|
||||
{
|
||||
return ((self.ranks & IRCUserChannelOwnerRank) == IRCUserChannelOwnerRank);
|
||||
return ((self.ranks & IRCUserRankChannelOwner) == IRCUserRankChannelOwner);
|
||||
}
|
||||
|
||||
- (BOOL)a
|
||||
{
|
||||
return ((self.ranks & IRCUserSuperOperatorRank) == IRCUserSuperOperatorRank);
|
||||
return ((self.ranks & IRCUserRankSuperOperator) == IRCUserRankSuperOperator);
|
||||
}
|
||||
|
||||
- (BOOL)o
|
||||
{
|
||||
return ((self.ranks & IRCUserNormalOperatorRank) == IRCUserNormalOperatorRank);
|
||||
return ((self.ranks & IRCUserRankNonermalOperator) == IRCUserRankNonermalOperator);
|
||||
}
|
||||
|
||||
- (BOOL)h
|
||||
{
|
||||
return ((self.ranks & IRCUserHalfOperatorRank) == IRCUserHalfOperatorRank);
|
||||
return ((self.ranks & IRCUserRankHalfOperator) == IRCUserRankHalfOperator);
|
||||
}
|
||||
|
||||
- (BOOL)v
|
||||
{
|
||||
return ((self.ranks & IRCUserVoicedRank) == IRCUserVoicedRank);
|
||||
return ((self.ranks & IRCUserRankVoiced) == IRCUserRankVoiced);
|
||||
}
|
||||
|
||||
- (IRCUserRank)rank
|
||||
@@ -190,13 +190,13 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
|
||||
IRCUserRank rank = [self rankForModeSymbol:mode];
|
||||
|
||||
if (rank != IRCUserNoRank) {
|
||||
if (rank != IRCUserRankNone) {
|
||||
ranks |= rank;
|
||||
}
|
||||
}
|
||||
|
||||
if (ranks == 0) {
|
||||
ranks |= IRCUserNoRank;
|
||||
ranks |= IRCUserRankNone;
|
||||
}
|
||||
|
||||
return ranks;
|
||||
@@ -205,29 +205,29 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
- (IRCUserRank)rankForModeSymbol:(nullable NSString *)modeSymbol
|
||||
{
|
||||
if (modeSymbol == nil) {
|
||||
return IRCUserNoRank;
|
||||
return IRCUserRankNone;
|
||||
}
|
||||
|
||||
if ([modeSymbol isEqualToString:@"y"] ||
|
||||
[modeSymbol isEqualToString:@"Y"])
|
||||
{
|
||||
return IRCUserIRCopByModeRank;
|
||||
return IRCUserRankIRCopByMode;
|
||||
}
|
||||
else if ([modeSymbol isEqualToString:@"q"] ||
|
||||
[modeSymbol isEqualToString:@"O"])
|
||||
{
|
||||
return IRCUserChannelOwnerRank;
|
||||
return IRCUserRankChannelOwner;
|
||||
} else if ([modeSymbol isEqualToString:@"a"]) {
|
||||
return IRCUserSuperOperatorRank;
|
||||
return IRCUserRankSuperOperator;
|
||||
} else if ([modeSymbol isEqualToString:@"o"]) {
|
||||
return IRCUserNormalOperatorRank;
|
||||
return IRCUserRankNonermalOperator;
|
||||
} else if ([modeSymbol isEqualToString:@"h"]) {
|
||||
return IRCUserHalfOperatorRank;
|
||||
return IRCUserRankHalfOperator;
|
||||
} else if ([modeSymbol isEqualToString:@"v"]) {
|
||||
return IRCUserVoicedRank;
|
||||
return IRCUserRankVoiced;
|
||||
}
|
||||
|
||||
return IRCUserNoRank;
|
||||
return IRCUserRankNone;
|
||||
}
|
||||
|
||||
- (double)totalWeight
|
||||
|
||||
@@ -172,19 +172,19 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END
|
||||
}
|
||||
|
||||
switch ([TPCPreferences banFormat]) {
|
||||
case TXHostmaskBanWHNINFormat:
|
||||
case TXHostmaskBanFormatWHNIN:
|
||||
{
|
||||
return [NSString stringWithFormat:@"*!*@%@", address];
|
||||
}
|
||||
case TXHostmaskBanWHAINNFormat:
|
||||
case TXHostmaskBanFormatWHAINN:
|
||||
{
|
||||
return [NSString stringWithFormat:@"*!%@@%@", username, address];
|
||||
}
|
||||
case TXHostmaskBanWHANNIFormat:
|
||||
case TXHostmaskBanFormatWHANNI:
|
||||
{
|
||||
return [NSString stringWithFormat:@"%@!*%@", nickname, address];
|
||||
}
|
||||
case TXHostmaskBanExactFormat:
|
||||
case TXHostmaskBanFormatExact:
|
||||
{
|
||||
return [NSString stringWithFormat:@"%@!%@@%@", nickname, username, address];
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
{
|
||||
NSParameterAssert(stringHash != nil);
|
||||
|
||||
BOOL onLightBackground = (colorStyle == TPCThemeSettingsNicknameColorHashHueLightStyle);
|
||||
BOOL onLightBackground = (colorStyle == TPCThemeSettingsNicknameColorStyleHashHueLight);
|
||||
|
||||
unsigned int stringHash32 = stringHash.intValue;
|
||||
|
||||
|
||||
Executable → Regular
+56
-56
@@ -89,7 +89,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
return [self initWithEffect:IRCTextFormatterNoEffect withValue:nil];
|
||||
return [self initWithEffect:IRCTextFormatterEffectNone withValue:nil];
|
||||
}
|
||||
|
||||
- (nullable instancetype)initWithEffect:(IRCTextFormatterEffectType)type
|
||||
@@ -115,62 +115,62 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
NSString *valueOut = nil;
|
||||
|
||||
switch (type) {
|
||||
case IRCTextFormatterNoEffect:
|
||||
case IRCTextFormatterEffectNone:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterBoldEffect:
|
||||
case IRCTextFormatterEffectBold:
|
||||
{
|
||||
controlCharacter = IRCTextFormatterBoldEffectCharacter;
|
||||
controlCharacter = IRCTextFormatterEffectBoldCharacter;
|
||||
|
||||
valueLength = 2; // opening and closing
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterItalicEffect:
|
||||
case IRCTextFormatterEffectItalic:
|
||||
{
|
||||
controlCharacter = IRCTextFormatterItalicEffectCharacter;
|
||||
controlCharacter = IRCTextFormatterEffectItalicCharacter;
|
||||
|
||||
valueLength = 2; // opening and closing
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterMonospaceEffect:
|
||||
case IRCTextFormatterEffectMonospace:
|
||||
{
|
||||
controlCharacter = IRCTextFormatterMonospaceEffectCharacter;
|
||||
controlCharacter = IRCTextFormatterEffectMonospaceCharacter;
|
||||
|
||||
valueLength = 2; // opening and closing
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterStrikethroughEffect:
|
||||
case IRCTextFormatterEffectStrikethrough:
|
||||
{
|
||||
controlCharacter = IRCTextFormatterStrikethroughEffectCharacter;
|
||||
controlCharacter = IRCTextFormatterEffectStrikethroughCharacter;
|
||||
|
||||
valueLength = 2; // opening and closing
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterUnderlineEffect:
|
||||
case IRCTextFormatterEffectUnderline:
|
||||
{
|
||||
controlCharacter = IRCTextFormatterUnderlineEffectCharacter;
|
||||
controlCharacter = IRCTextFormatterEffectUnderlineCharacter;
|
||||
|
||||
valueLength = 2; // opening and closing
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterForegroundColorEffect:
|
||||
case IRCTextFormatterBackgroundColorEffect:
|
||||
case IRCTextFormatterEffectForegroundColor:
|
||||
case IRCTextFormatterEffectBackgroundColor:
|
||||
{
|
||||
if ([value isKindOfClass:[NSColor class]])
|
||||
{
|
||||
controlCharacter = IRCTextFormatterColorAsHexEffectCharacter;
|
||||
controlCharacter = IRCTextFormatterEffectColorAsHexCharacter;
|
||||
|
||||
valueOut = [[value hexadecimalValue] substringFromIndex:1]; // Remove leading #
|
||||
}
|
||||
else if ([value isKindOfClass:[NSNumber class]])
|
||||
{
|
||||
controlCharacter = IRCTextFormatterColorAsDigitEffectCharacter;
|
||||
controlCharacter = IRCTextFormatterEffectColorAsDigitCharacter;
|
||||
|
||||
valueOut = [value integerStringValueWithLeadingZero];
|
||||
}
|
||||
@@ -179,7 +179,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
return nil;
|
||||
}
|
||||
|
||||
if (type == IRCTextFormatterForegroundColorEffect) {
|
||||
if (type == IRCTextFormatterEffectForegroundColor) {
|
||||
valueLength = (valueOut.length + 2); // opening and closing
|
||||
} else {
|
||||
valueLength = (valueOut.length + 1); // leading comma
|
||||
@@ -215,7 +215,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
NSString *value = self.value;
|
||||
|
||||
if (type == IRCTextFormatterBackgroundColorEffect) {
|
||||
if (type == IRCTextFormatterEffectBackgroundColor) {
|
||||
[string appendFormat:@",%@", value];
|
||||
|
||||
return;
|
||||
@@ -234,7 +234,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
{
|
||||
NSParameterAssert(string != nil);
|
||||
|
||||
if (self.type == IRCTextFormatterBackgroundColorEffect) {
|
||||
if (self.type == IRCTextFormatterEffectBackgroundColor) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -272,8 +272,8 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
NSMutableArray *effects = [NSMutableArray arrayWithCapacity:7];
|
||||
|
||||
IRCTextFormatterEffect *foregroundColor = [IRCTextFormatterEffect effectWithType:IRCTextFormatterForegroundColorEffect withValue:attributes[IRCTextFormatterForegroundColorAttributeName]];
|
||||
IRCTextFormatterEffect *backgroundColor = [IRCTextFormatterEffect effectWithType:IRCTextFormatterBackgroundColorEffect withValue:attributes[IRCTextFormatterBackgroundColorAttributeName]];
|
||||
IRCTextFormatterEffect *foregroundColor = [IRCTextFormatterEffect effectWithType:IRCTextFormatterEffectForegroundColor withValue:attributes[IRCTextFormatterForegroundColorAttributeName]];
|
||||
IRCTextFormatterEffect *backgroundColor = [IRCTextFormatterEffect effectWithType:IRCTextFormatterEffectBackgroundColor withValue:attributes[IRCTextFormatterBackgroundColorAttributeName]];
|
||||
|
||||
if (foregroundColor) {
|
||||
[effects addObject:foregroundColor];
|
||||
@@ -299,7 +299,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
BOOL textIsUnderlined = [attributes boolForKey:IRCTextFormatterUnderlineAttributeName];
|
||||
|
||||
if (textIsBold) {
|
||||
IRCTextFormatterEffect *effect = [IRCTextFormatterEffect effectWithType:IRCTextFormatterBoldEffect];
|
||||
IRCTextFormatterEffect *effect = [IRCTextFormatterEffect effectWithType:IRCTextFormatterEffectBold];
|
||||
|
||||
[effects addObject:effect];
|
||||
|
||||
@@ -307,7 +307,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
}
|
||||
|
||||
if (textIsItalicized) {
|
||||
IRCTextFormatterEffect *effect = [IRCTextFormatterEffect effectWithType:IRCTextFormatterItalicEffect];
|
||||
IRCTextFormatterEffect *effect = [IRCTextFormatterEffect effectWithType:IRCTextFormatterEffectItalic];
|
||||
|
||||
[effects addObject:effect];
|
||||
|
||||
@@ -315,7 +315,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
}
|
||||
|
||||
if (textIsMonospace) {
|
||||
IRCTextFormatterEffect *effect = [IRCTextFormatterEffect effectWithType:IRCTextFormatterMonospaceEffect];
|
||||
IRCTextFormatterEffect *effect = [IRCTextFormatterEffect effectWithType:IRCTextFormatterEffectMonospace];
|
||||
|
||||
[effects addObject:effect];
|
||||
|
||||
@@ -323,7 +323,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
}
|
||||
|
||||
if (textIsStruckthrough) {
|
||||
IRCTextFormatterEffect *effect = [IRCTextFormatterEffect effectWithType:IRCTextFormatterStrikethroughEffect];
|
||||
IRCTextFormatterEffect *effect = [IRCTextFormatterEffect effectWithType:IRCTextFormatterEffectStrikethrough];
|
||||
|
||||
[effects addObject:effect];
|
||||
|
||||
@@ -331,7 +331,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
}
|
||||
|
||||
if (textIsUnderlined) {
|
||||
IRCTextFormatterEffect *effect = [IRCTextFormatterEffect effectWithType:IRCTextFormatterUnderlineEffect];
|
||||
IRCTextFormatterEffect *effect = [IRCTextFormatterEffect effectWithType:IRCTextFormatterEffectUnderline];
|
||||
|
||||
[effects addObject:effect];
|
||||
|
||||
@@ -415,11 +415,11 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
}
|
||||
|
||||
/* Add length of command */
|
||||
if (lineType == TVCLogLinePrivateMessageType || lineType == TVCLogLinePrivateMessageNoHighlightType) {
|
||||
if (lineType == TVCLogLineTypePrivateMessage || lineType == TVCLogLineTypePrivateMessageNoHighlight) {
|
||||
minimumLength += _textTruncationPRIVMSGCommandConstant;
|
||||
} else if (lineType == TVCLogLineActionType || lineType == TVCLogLineActionNoHighlightType) {
|
||||
} else if (lineType == TVCLogLineTypeAction || lineType == TVCLogLineTypeActionNoHighlight) {
|
||||
minimumLength += _textTruncationACTIONCommandConstant;
|
||||
} else if (lineType == TVCLogLineNoticeType) {
|
||||
} else if (lineType == TVCLogLineTypeNotice) {
|
||||
minimumLength += _textTruncationNOTICECommandConstant;
|
||||
} else {
|
||||
NSAssert(NO, @"Line type not supported");
|
||||
@@ -649,11 +649,11 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
usingBlock:^(NSDictionary *attributes, NSRange effectiveRange, BOOL *stop)
|
||||
{
|
||||
switch (effect) {
|
||||
case IRCTextFormatterNoEffect:
|
||||
case IRCTextFormatterEffectNone:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterBoldEffect:
|
||||
case IRCTextFormatterEffectBold:
|
||||
{
|
||||
if ([attributes boolForKey:IRCTextFormatterBoldAttributeName] == NO) {
|
||||
return;
|
||||
@@ -665,7 +665,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterItalicEffect:
|
||||
case IRCTextFormatterEffectItalic:
|
||||
{
|
||||
if ([attributes boolForKey:IRCTextFormatterItalicAttributeName] == NO) {
|
||||
return;
|
||||
@@ -677,7 +677,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterMonospaceEffect:
|
||||
case IRCTextFormatterEffectMonospace:
|
||||
{
|
||||
if ([attributes boolForKey:IRCTextFormatterMonospaceAttributeName] == NO) {
|
||||
return;
|
||||
@@ -689,7 +689,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterUnderlineEffect:
|
||||
case IRCTextFormatterEffectUnderline:
|
||||
{
|
||||
if ([attributes boolForKey:IRCTextFormatterUnderlineAttributeName] == NO) {
|
||||
return;
|
||||
@@ -701,7 +701,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterStrikethroughEffect:
|
||||
case IRCTextFormatterEffectStrikethrough:
|
||||
{
|
||||
if ([attributes boolForKey:IRCTextFormatterStrikethroughAttributeName] == NO) {
|
||||
return;
|
||||
@@ -713,7 +713,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterForegroundColorEffect:
|
||||
case IRCTextFormatterEffectForegroundColor:
|
||||
{
|
||||
id foregroundColor = attributes[IRCTextFormatterForegroundColorAttributeName];
|
||||
|
||||
@@ -740,7 +740,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterBackgroundColorEffect:
|
||||
case IRCTextFormatterEffectBackgroundColor:
|
||||
{
|
||||
id backgroundColor = attributes[IRCTextFormatterBackgroundColorAttributeName];
|
||||
|
||||
@@ -767,7 +767,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterSpoilerEffect:
|
||||
case IRCTextFormatterEffectSpoiler:
|
||||
{
|
||||
if ([attributes boolForKey:IRCTextFormatterSpoilerAttributeName] == NO) {
|
||||
return;
|
||||
@@ -803,11 +803,11 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
NSFont *baseFont = attributes[NSFontAttributeName];
|
||||
|
||||
switch (effect) {
|
||||
case IRCTextFormatterNoEffect:
|
||||
case IRCTextFormatterEffectNone:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterBoldEffect:
|
||||
case IRCTextFormatterEffectBold:
|
||||
{
|
||||
if ([baseFont fontTraitSet:NSBoldFontMask] == NO) {
|
||||
baseFont = [RZFontManager() convertFont:baseFont toHaveTrait:NSBoldFontMask];
|
||||
@@ -821,7 +821,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterItalicEffect:
|
||||
case IRCTextFormatterEffectItalic:
|
||||
{
|
||||
if ([baseFont fontTraitSet:NSItalicFontMask] == NO) {
|
||||
baseFont = [RZFontManager() convertFont:baseFont toHaveTrait:NSItalicFontMask];
|
||||
@@ -835,7 +835,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterMonospaceEffect:
|
||||
case IRCTextFormatterEffectMonospace:
|
||||
{
|
||||
baseFont = [RZFontManager() convertFont:baseFont toFamily:@"Menlo"];
|
||||
|
||||
@@ -845,7 +845,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterUnderlineEffect:
|
||||
case IRCTextFormatterEffectUnderline:
|
||||
{
|
||||
[self addAttribute:IRCTextFormatterUnderlineAttributeName value:@(YES) range:effectiveRange];
|
||||
|
||||
@@ -853,7 +853,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterStrikethroughEffect:
|
||||
case IRCTextFormatterEffectStrikethrough:
|
||||
{
|
||||
[self addAttribute:IRCTextFormatterStrikethroughAttributeName value:@(YES) range:effectiveRange];
|
||||
|
||||
@@ -861,7 +861,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterForegroundColorEffect:
|
||||
case IRCTextFormatterEffectForegroundColor:
|
||||
{
|
||||
if (value == nil) {
|
||||
break;
|
||||
@@ -886,7 +886,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterBackgroundColorEffect:
|
||||
case IRCTextFormatterEffectBackgroundColor:
|
||||
{
|
||||
if (value == nil) {
|
||||
break;
|
||||
@@ -911,7 +911,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterSpoilerEffect:
|
||||
case IRCTextFormatterEffectSpoiler:
|
||||
{
|
||||
[self addAttribute:IRCTextFormatterSpoilerAttributeName value:value range:effectiveRange];
|
||||
|
||||
@@ -935,11 +935,11 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
}
|
||||
|
||||
switch (effect) {
|
||||
case IRCTextFormatterNoEffect:
|
||||
case IRCTextFormatterEffectNone:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterBoldEffect:
|
||||
case IRCTextFormatterEffectBold:
|
||||
{
|
||||
if ([baseFont fontTraitSet:NSBoldFontMask]) {
|
||||
baseFont = [RZFontManager() convertFont:baseFont toNotHaveTrait:NSBoldFontMask];
|
||||
@@ -953,7 +953,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterItalicEffect:
|
||||
case IRCTextFormatterEffectItalic:
|
||||
{
|
||||
if ([baseFont fontTraitSet:NSItalicFontMask]) {
|
||||
baseFont = [RZFontManager() convertFont:baseFont toNotHaveTrait:NSItalicFontMask];
|
||||
@@ -967,7 +967,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterMonospaceEffect:
|
||||
case IRCTextFormatterEffectMonospace:
|
||||
{
|
||||
[self removeAttribute:NSFontAttributeName range:effectiveRange];
|
||||
|
||||
@@ -975,7 +975,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterUnderlineEffect:
|
||||
case IRCTextFormatterEffectUnderline:
|
||||
{
|
||||
[self removeAttribute:NSUnderlineStyleAttributeName range:effectiveRange];
|
||||
|
||||
@@ -983,7 +983,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterStrikethroughEffect:
|
||||
case IRCTextFormatterEffectStrikethrough:
|
||||
{
|
||||
[self removeAttribute:NSStrikethroughStyleAttributeName range:effectiveRange];
|
||||
|
||||
@@ -991,7 +991,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterForegroundColorEffect:
|
||||
case IRCTextFormatterEffectForegroundColor:
|
||||
{
|
||||
[self removeAttribute:NSBackgroundColorAttributeName range:effectiveRange];
|
||||
|
||||
@@ -999,7 +999,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterBackgroundColorEffect:
|
||||
case IRCTextFormatterEffectBackgroundColor:
|
||||
{
|
||||
[self removeAttribute:NSBackgroundColorAttributeName range:effectiveRange];
|
||||
|
||||
@@ -1007,7 +1007,7 @@ NSString * const IRCTextFormatterSpoilerAttributeName = @"IRCTextFormatterSpoile
|
||||
|
||||
break;
|
||||
}
|
||||
case IRCTextFormatterSpoilerEffect:
|
||||
case IRCTextFormatterEffectSpoiler:
|
||||
{
|
||||
[self removeAttribute:IRCTextFormatterSpoilerAttributeName range:effectiveRange];
|
||||
|
||||
|
||||
@@ -46,10 +46,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#pragma mark -
|
||||
#pragma mark Private Implementation
|
||||
|
||||
NSString * const TLOAppStoreIAPFreeTrialProductIdentifier = @"com.codeux.iap.textual_free_trial";
|
||||
NSString * const TLOAppStoreIAPStandardEditionProductIdentifier = @"com.codeux.iap.textual_standard_edition";
|
||||
NSString * const TLOAppStoreIAPUpgradeFromV6ProductIdentifier = @"com.codeux.iap.textual_upgrade_v6";
|
||||
NSString * const TLOAppStoreIAPUpgradeFromV6FreeProductIdentifier = @"com.codeux.iap.textual_upgrade_v6_free";
|
||||
NSString * const TLOAppStoreIAPProductIdentifierFreeTrial = @"com.codeux.iap.textual_free_trial";
|
||||
NSString * const TLOAppStoreIAPProductIdentifierStandardEdition = @"com.codeux.iap.textual_standard_edition";
|
||||
NSString * const TLOAppStoreIAPProductIdentifierUpgradeFromV6 = @"com.codeux.iap.textual_upgrade_v6";
|
||||
NSString * const TLOAppStoreIAPProductIdentifierUpgradeFromV6Free = @"com.codeux.iap.textual_upgrade_v6_free";
|
||||
|
||||
NSInteger const TLOAppStoreTrialModeMaximumLifespan = (-2592000); // 30 days in seconds
|
||||
|
||||
@@ -163,17 +163,17 @@ TLOAppStoreIAPProduct TLOAppStoreProductFromProductIdentifier(NSString *productI
|
||||
{
|
||||
NSCParameterAssert(productIdentifier != nil);
|
||||
|
||||
if ([productIdentifier isEqualToString:TLOAppStoreIAPFreeTrialProductIdentifier]) {
|
||||
return TLOAppStoreIAPFreeTrialProduct;
|
||||
} else if ([productIdentifier isEqualToString:TLOAppStoreIAPStandardEditionProductIdentifier]) {
|
||||
return TLOAppStoreIAPStandardEditionProduct;
|
||||
} else if ([productIdentifier isEqualToString:TLOAppStoreIAPUpgradeFromV6ProductIdentifier]) {
|
||||
return TLOAppStoreIAPUpgradeFromV6Product;
|
||||
} else if ([productIdentifier isEqualToString:TLOAppStoreIAPUpgradeFromV6FreeProductIdentifier]) {
|
||||
return TLOAppStoreIAPUpgradeFromV6FreeProduct;
|
||||
if ([productIdentifier isEqualToString:TLOAppStoreIAPProductIdentifierFreeTrial]) {
|
||||
return TLOAppStoreIAPProductFreeTrial;
|
||||
} else if ([productIdentifier isEqualToString:TLOAppStoreIAPProductIdentifierStandardEdition]) {
|
||||
return TLOAppStoreIAPProductStandardEdition;
|
||||
} else if ([productIdentifier isEqualToString:TLOAppStoreIAPProductIdentifierUpgradeFromV6]) {
|
||||
return TLOAppStoreIAPProductUpgradeFromV6;
|
||||
} else if ([productIdentifier isEqualToString:TLOAppStoreIAPProductIdentifierUpgradeFromV6Free]) {
|
||||
return TLOAppStoreIAPProductUpgradeFromV6Free;
|
||||
}
|
||||
|
||||
return TLOAppStoreIAPUnknownProduct;
|
||||
return TLOAppStoreIAPProductUnknown;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
@@ -184,9 +184,9 @@ BOOL TLOAppStoreTextualIsRegistered(void)
|
||||
BOOL purchased =
|
||||
TLOAppStoreIsOneProductPurchased(
|
||||
@[
|
||||
TLOAppStoreIAPStandardEditionProductIdentifier,
|
||||
TLOAppStoreIAPUpgradeFromV6ProductIdentifier,
|
||||
TLOAppStoreIAPUpgradeFromV6FreeProductIdentifier
|
||||
TLOAppStoreIAPProductIdentifierStandardEdition,
|
||||
TLOAppStoreIAPProductIdentifierUpgradeFromV6,
|
||||
TLOAppStoreIAPProductIdentifierUpgradeFromV6Free
|
||||
]
|
||||
);
|
||||
|
||||
@@ -196,7 +196,7 @@ BOOL TLOAppStoreTextualIsRegistered(void)
|
||||
BOOL TLOAppStoreIsTrialPurchased(void)
|
||||
{
|
||||
BOOL purchased =
|
||||
TLOAppStoreIsProductPurchased(TLOAppStoreIAPFreeTrialProductIdentifier);
|
||||
TLOAppStoreIsProductPurchased(TLOAppStoreIAPProductIdentifierFreeTrial);
|
||||
|
||||
return purchased;
|
||||
}
|
||||
@@ -214,7 +214,7 @@ BOOL TLOAppStoreIsTrialExpired(void)
|
||||
|
||||
NSTimeInterval TLOAppStoreTimeReaminingInTrial(void)
|
||||
{
|
||||
ARLInAppPurchaseContents *purchaseDetails = TLOAppStorePurchasedProductDetails(TLOAppStoreIAPFreeTrialProductIdentifier);
|
||||
ARLInAppPurchaseContents *purchaseDetails = TLOAppStorePurchasedProductDetails(TLOAppStoreIAPProductIdentifierFreeTrial);
|
||||
|
||||
if (purchaseDetails == nil) {
|
||||
return 0;
|
||||
|
||||
@@ -101,14 +101,14 @@ NSURL * _Nullable TLOLicenseManagerLicenseFilePath(void);
|
||||
NSNumberFormatter *TLOLicenseManagerStringValueNumberFormatter(void);
|
||||
NSString *TLOLicenseManagerStringValueForObject(id object);
|
||||
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryLicenseCreationDateKey = @"licenseCreationDate";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryLicenseGenerationKey = @"licenseGeneration";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryLicenseKeyKey = @"licenseKey";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryLicenseProductNameKey = @"licenseProductName";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryLicenseOwnerContactAddressKey = @"licenseOwnerContactAddress";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryLicenseOwnerNameKey = @"licenseOwnerName";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryLicenseSignatureKey = @"licenseSignature";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryLicenseSignatureGenerationKey = @"licenseSignatureGeneration";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryKeyCreationDate = @"licenseCreationDate";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryKeyGeneration = @"licenseGeneration";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryKeyLicenseKey = @"licenseKey";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryKeyProductName = @"licenseProductName";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryKeyOwnerContactAddress = @"licenseOwnerContactAddress";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryKeyOwnerName = @"licenseOwnerName";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryKeySignature = @"licenseSignature";
|
||||
NSString * const TLOLicenseManagerLicenseDictionaryKeySignatureGeneration = @"licenseSignatureGeneration";
|
||||
#endif
|
||||
|
||||
#pragma mark -
|
||||
@@ -388,7 +388,7 @@ BOOL TLOLicenseManagerVerifyLicenseSignatureWithDictionary(NSDictionary<NSString
|
||||
}
|
||||
|
||||
/* Retrieve license signature information */
|
||||
NSData *licenseSignature = licenseDictionary[TLOLicenseManagerLicenseDictionaryLicenseSignatureKey];
|
||||
NSData *licenseSignature = licenseDictionary[TLOLicenseManagerLicenseDictionaryKeySignature];
|
||||
|
||||
if (licenseSignature == nil) {
|
||||
LogToConsoleError("Missing license signature in license dictionary");
|
||||
@@ -397,7 +397,7 @@ BOOL TLOLicenseManagerVerifyLicenseSignatureWithDictionary(NSDictionary<NSString
|
||||
}
|
||||
|
||||
/* Retrieve license generation */
|
||||
NSUInteger licenseGeneration = [licenseDictionary unsignedIntegerForKey:TLOLicenseManagerLicenseDictionaryLicenseGenerationKey];
|
||||
NSUInteger licenseGeneration = [licenseDictionary unsignedIntegerForKey:TLOLicenseManagerLicenseDictionaryKeyGeneration];
|
||||
|
||||
if (licenseGeneration != TLOLicenseManagerCurrentLicenseGeneration) {
|
||||
LogToConsoleError("Mismatched license generation in license dictionary");
|
||||
@@ -411,8 +411,8 @@ BOOL TLOLicenseManagerVerifyLicenseSignatureWithDictionary(NSDictionary<NSString
|
||||
the license dictinoary signature because thats used for comparison. */
|
||||
NSMutableDictionary *licenseDictionaryToCombine = [licenseDictionary mutableCopy];
|
||||
|
||||
[licenseDictionaryToCombine removeObjectForKey:TLOLicenseManagerLicenseDictionaryLicenseSignatureKey];
|
||||
[licenseDictionaryToCombine removeObjectForKey:TLOLicenseManagerLicenseDictionaryLicenseSignatureGenerationKey];
|
||||
[licenseDictionaryToCombine removeObjectForKey:TLOLicenseManagerLicenseDictionaryKeySignature];
|
||||
[licenseDictionaryToCombine removeObjectForKey:TLOLicenseManagerLicenseDictionaryKeySignatureGeneration];
|
||||
|
||||
NSString *combinedLicenseDataString = TLOLicenseManagerStringValueForObject(licenseDictionaryToCombine);
|
||||
|
||||
@@ -726,7 +726,7 @@ NSString * _Nullable TLOLicenseManagerLicenseOwnerName(void)
|
||||
return nil;
|
||||
}
|
||||
|
||||
return licenseDictionary[TLOLicenseManagerLicenseDictionaryLicenseOwnerNameKey];
|
||||
return licenseDictionary[TLOLicenseManagerLicenseDictionaryKeyOwnerName];
|
||||
}
|
||||
|
||||
NSString * _Nullable TLOLicenseManagerLicenseOwnerContactAddress(void)
|
||||
@@ -737,7 +737,7 @@ NSString * _Nullable TLOLicenseManagerLicenseOwnerContactAddress(void)
|
||||
return nil;
|
||||
}
|
||||
|
||||
return licenseDictionary[TLOLicenseManagerLicenseDictionaryLicenseOwnerContactAddressKey];
|
||||
return licenseDictionary[TLOLicenseManagerLicenseDictionaryKeyOwnerContactAddress];
|
||||
}
|
||||
|
||||
NSString * _Nullable TLOLicenseManagerLicenseKey(void)
|
||||
@@ -748,7 +748,7 @@ NSString * _Nullable TLOLicenseManagerLicenseKey(void)
|
||||
return nil;
|
||||
}
|
||||
|
||||
return licenseDictionary[TLOLicenseManagerLicenseDictionaryLicenseKeyKey];
|
||||
return licenseDictionary[TLOLicenseManagerLicenseDictionaryKeyLicenseKey];
|
||||
}
|
||||
|
||||
NSUInteger TLOLicenseManagerLicenseGeneration(void)
|
||||
@@ -759,7 +759,7 @@ NSUInteger TLOLicenseManagerLicenseGeneration(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return [licenseDictionary unsignedIntegerForKey:TLOLicenseManagerLicenseDictionaryLicenseGenerationKey];
|
||||
return [licenseDictionary unsignedIntegerForKey:TLOLicenseManagerLicenseDictionaryKeyGeneration];
|
||||
}
|
||||
|
||||
NSString * _Nullable TLOLicenseManagerLicenseCreationDate(void)
|
||||
@@ -770,7 +770,7 @@ NSString * _Nullable TLOLicenseManagerLicenseCreationDate(void)
|
||||
return nil;
|
||||
}
|
||||
|
||||
return licenseDictionary[TLOLicenseManagerLicenseDictionaryLicenseCreationDateKey];
|
||||
return licenseDictionary[TLOLicenseManagerLicenseDictionaryKeyCreationDate];
|
||||
}
|
||||
|
||||
NSString * _Nullable TLOLicenseManagerLicenseCreationDateFormatted(void)
|
||||
|
||||
+30
-30
@@ -98,7 +98,7 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
|
||||
NSDictionary *contextInfo = @{@"licenseKey" : licenseKey};
|
||||
|
||||
[self setupNewActionWithRequestType:TLOLicenseManagerDownloaderRequestActivationType
|
||||
[self setupNewActionWithRequestType:TLOLicenseManagerDownloaderRequestTypeActivation
|
||||
context:contextInfo];
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
|
||||
NSDictionary *contextInfo = @{@"licenseKey" : licenseKey};
|
||||
|
||||
[self setupNewActionWithRequestType:TLOLicenseManagerDownloaderRequestLicenseUpgradeEligibilityType
|
||||
[self setupNewActionWithRequestType:TLOLicenseManagerDownloaderRequestTypeLicenseUpgradeEligibility
|
||||
context:contextInfo];
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
@"licenseOwnerMacAddress" : macAddress
|
||||
};
|
||||
|
||||
[self setupNewActionWithRequestType:TLOLicenseManagerDownloaderRequestReceiptUpgradeEligibilityType
|
||||
[self setupNewActionWithRequestType:TLOLicenseManagerDownloaderRequestTypeReceiptUpgradeEligibility
|
||||
context:contextInfo];
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
|
||||
NSDictionary *contextInfo = @{@"licenseOwnerContactAddress" : contactAddress};
|
||||
|
||||
[self setupNewActionWithRequestType:TLOLicenseManagerDownloaderRequestSendLostLicenseType
|
||||
[self setupNewActionWithRequestType:TLOLicenseManagerDownloaderRequestTypeSendLostLicense
|
||||
context:contextInfo];
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
@"licenseOwnerMacAddress" : macAddress
|
||||
};
|
||||
|
||||
[self setupNewActionWithRequestType:TLOLicenseManagerDownloaderRequestMigrateAppStoreType
|
||||
[self setupNewActionWithRequestType:TLOLicenseManagerDownloaderRequestTypeMigrateAppStore
|
||||
context:contextInfo];
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
if (requestHttpStatusCode == TLOLicenseManagerDownloaderRequestHTTPStatusSuccess)
|
||||
{
|
||||
/* Process successful results */
|
||||
if (requestType == TLOLicenseManagerDownloaderRequestActivationType && statusCode == TLOLicenseManagerDownloaderRequestStatusCodeSuccess)
|
||||
if (requestType == TLOLicenseManagerDownloaderRequestTypeActivation && statusCode == TLOLicenseManagerDownloaderRequestStatusCodeSuccess)
|
||||
{
|
||||
if (statusContext == nil || [statusContext isKindOfClass:[NSData class]] == NO) {
|
||||
LogToConsoleError("'Status Context' is nil or not of kind 'NSData'");
|
||||
@@ -291,7 +291,7 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
alternateButton:nil];
|
||||
}
|
||||
}
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestSendLostLicenseType && statusCode == TLOLicenseManagerDownloaderRequestStatusCodeSuccess)
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestTypeSendLostLicense && statusCode == TLOLicenseManagerDownloaderRequestStatusCodeSuccess)
|
||||
{
|
||||
if (statusContext == nil || [statusContext isKindOfClass:[NSDictionary class]] == NO) {
|
||||
LogToConsoleError("'Status Context' is nil or not of kind 'NSDictionary'");
|
||||
@@ -320,7 +320,7 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
alternateButton:nil];
|
||||
}
|
||||
}
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestMigrateAppStoreType && statusCode == TLOLicenseManagerDownloaderRequestStatusCodeSuccess)
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestTypeMigrateAppStore && statusCode == TLOLicenseManagerDownloaderRequestStatusCodeSuccess)
|
||||
{
|
||||
if (statusContext == nil || [statusContext isKindOfClass:[NSDictionary class]] == NO) {
|
||||
LogToConsoleError("'Status Context' is nil or not of kind 'NSDictionary'");
|
||||
@@ -349,7 +349,7 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
alternateButton:nil];
|
||||
}
|
||||
}
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestLicenseUpgradeEligibilityType && statusCode == TLOLicenseManagerDownloaderRequestStatusCodeSuccess)
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestTypeLicenseUpgradeEligibility && statusCode == TLOLicenseManagerDownloaderRequestStatusCodeSuccess)
|
||||
{
|
||||
if (statusContext == nil || [statusContext isKindOfClass:[NSDictionary class]] == NO) {
|
||||
LogToConsoleError("'Status Context' is nil or not of kind 'NSDictionary'");
|
||||
@@ -361,7 +361,7 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
(void)self.actionBlock(statusCode, statusContext);
|
||||
}
|
||||
}
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestReceiptUpgradeEligibilityType && statusCode == TLOLicenseManagerDownloaderRequestStatusCodeSuccess)
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestTypeReceiptUpgradeEligibility && statusCode == TLOLicenseManagerDownloaderRequestStatusCodeSuccess)
|
||||
{
|
||||
if (statusContext == nil || [statusContext isKindOfClass:[NSDictionary class]] == NO) {
|
||||
LogToConsoleError("'Status Context' is nil or not of kind 'NSDictionary'");
|
||||
@@ -387,14 +387,14 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
}
|
||||
|
||||
/* Errors related to license activation. */
|
||||
if (requestType == TLOLicenseManagerDownloaderRequestActivationType && statusCode == 6500000)
|
||||
if (requestType == TLOLicenseManagerDownloaderRequestTypeActivation && statusCode == 6500000)
|
||||
{
|
||||
[TDCAlert modalAlertWithMessage:TXTLS(@"TLOLicenseManager[wc7-mn]")
|
||||
title:TXTLS(@"TLOLicenseManager[fg6-gf]")
|
||||
defaultButton:TXTLS(@"Prompts[c7s-dq]")
|
||||
alternateButton:nil];
|
||||
}
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestActivationType && statusCode == 6500001)
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestTypeActivation && statusCode == 6500001)
|
||||
{
|
||||
if (statusContext == nil || [statusContext isKindOfClass:[NSDictionary class]] == NO) {
|
||||
LogToConsoleError("'Status Context' kind is not of 'NSDictionary'");
|
||||
@@ -419,7 +419,7 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
[self contactSupport];
|
||||
}
|
||||
}
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestActivationType && statusCode == 6500002)
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestTypeActivation && statusCode == 6500002)
|
||||
{
|
||||
if (statusContext == nil || [statusContext isKindOfClass:[NSDictionary class]] == NO) {
|
||||
LogToConsoleError("'Status Context' kind is not of 'NSDictionary'");
|
||||
@@ -444,14 +444,14 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
}
|
||||
|
||||
/* Errors related to lost license recovery. */
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestSendLostLicenseType && statusCode == 6400000)
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestTypeSendLostLicense && statusCode == 6400000)
|
||||
{
|
||||
[TDCAlert modalAlertWithMessage:TXTLS(@"TLOLicenseManager[dio-y9]")
|
||||
title:TXTLS(@"TLOLicenseManager[ocm-03]")
|
||||
defaultButton:TXTLS(@"Prompts[c7s-dq]")
|
||||
alternateButton:nil];
|
||||
}
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestSendLostLicenseType && statusCode == 6400001)
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestTypeSendLostLicense && statusCode == 6400001)
|
||||
{
|
||||
if (statusContext == nil || [statusContext isKindOfClass:[NSDictionary class]] == NO) {
|
||||
LogToConsoleError("'Status Context' kind is not of 'NSDictionary'");
|
||||
@@ -474,14 +474,14 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
}
|
||||
|
||||
/* Error messages related to Mac App Store migration. */
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestMigrateAppStoreType && statusCode == 6600002)
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestTypeMigrateAppStore && statusCode == 6600002)
|
||||
{
|
||||
[TDCAlert modalAlertWithMessage:TXTLS(@"TLOLicenseManager[bu4-zk]")
|
||||
title:TXTLS(@"TLOLicenseManager[ztd-5y]")
|
||||
defaultButton:TXTLS(@"Prompts[c7s-dq]")
|
||||
alternateButton:nil];
|
||||
}
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestMigrateAppStoreType && statusCode == 6600003)
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestTypeMigrateAppStore && statusCode == 6600003)
|
||||
{
|
||||
/* We do not present a custom dialog for this error, but we still log
|
||||
the contents of the context to the console to help diagnose issues. */
|
||||
@@ -506,21 +506,21 @@ NSUInteger const TLOLicenseManagerDownloaderRequestStatusCodeTryAgainLater = 200
|
||||
defaultButton:TXTLS(@"Prompts[c7s-dq]")
|
||||
alternateButton:nil];
|
||||
}
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestMigrateAppStoreType && statusCode == 6600004)
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestTypeMigrateAppStore && statusCode == 6600004)
|
||||
{
|
||||
[TDCAlert modalAlertWithMessage:TXTLS(@"TLOLicenseManager[36y-49]")
|
||||
title:TXTLS(@"TLOLicenseManager[enb-hw]")
|
||||
defaultButton:TXTLS(@"Prompts[c7s-dq]")
|
||||
alternateButton:nil];
|
||||
}
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestMigrateAppStoreType && statusCode == 6600006)
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestTypeMigrateAppStore && statusCode == 6600006)
|
||||
{
|
||||
[TDCAlert modalAlertWithMessage:TXTLS(@"TLOLicenseManager[do9-8x]")
|
||||
title:TXTLS(@"TLOLicenseManager[f49-rk]")
|
||||
defaultButton:TXTLS(@"Prompts[c7s-dq]")
|
||||
alternateButton:nil];
|
||||
}
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestMigrateAppStoreType && statusCode == 6600007)
|
||||
else if (requestType == TLOLicenseManagerDownloaderRequestTypeMigrateAppStore && statusCode == 6600007)
|
||||
{
|
||||
[TDCAlert modalAlertWithMessage:TXTLS(@"TLOLicenseManager[4n2-ps]")
|
||||
title:TXTLS(@"TLOLicenseManager[t28-j9]")
|
||||
@@ -574,15 +574,15 @@ perform_return:
|
||||
{
|
||||
NSString *requestURLString = nil;
|
||||
|
||||
if (self.requestType == TLOLicenseManagerDownloaderRequestActivationType) {
|
||||
if (self.requestType == TLOLicenseManagerDownloaderRequestTypeActivation) {
|
||||
requestURLString = TLOLicenseManagerDownloaderLicenseAPIActivationURL;
|
||||
} else if (self.requestType == TLOLicenseManagerDownloaderRequestSendLostLicenseType) {
|
||||
} else if (self.requestType == TLOLicenseManagerDownloaderRequestTypeSendLostLicense) {
|
||||
requestURLString = TLOLicenseManagerDownloaderLicenseAPISendLostLicenseURL;
|
||||
} else if (self.requestType == TLOLicenseManagerDownloaderRequestMigrateAppStoreType) {
|
||||
} else if (self.requestType == TLOLicenseManagerDownloaderRequestTypeMigrateAppStore) {
|
||||
requestURLString = TLOLicenseManagerDownloaderLicenseAPIMigrateAppStoreURL;
|
||||
} else if (self.requestType == TLOLicenseManagerDownloaderRequestLicenseUpgradeEligibilityType) {
|
||||
} else if (self.requestType == TLOLicenseManagerDownloaderRequestTypeLicenseUpgradeEligibility) {
|
||||
requestURLString = TLOLicenseManagerDownloaderLicenseAPILicenseUpgradeEligibilityURL;
|
||||
} else if (self.requestType == TLOLicenseManagerDownloaderRequestReceiptUpgradeEligibilityType) {
|
||||
} else if (self.requestType == TLOLicenseManagerDownloaderRequestTypeReceiptUpgradeEligibility) {
|
||||
requestURLString = TLOLicenseManagerDownloaderLicenseAPIReceiptUpgradeEligibilityURL;
|
||||
}
|
||||
|
||||
@@ -612,21 +612,21 @@ perform_return:
|
||||
|
||||
NSString *requestBodyString = nil;
|
||||
|
||||
if (self.requestType == TLOLicenseManagerDownloaderRequestActivationType)
|
||||
if (self.requestType == TLOLicenseManagerDownloaderRequestTypeActivation)
|
||||
{
|
||||
NSString *encodedContextInfo = [self encodedRequestContextValue:@"licenseKey"];
|
||||
|
||||
requestBodyString = [NSString stringWithFormat:@"licenseKey=%@&lang=%@&version=%@",
|
||||
encodedContextInfo, currentUserLanguage, applicationVersion];
|
||||
}
|
||||
else if (self.requestType == TLOLicenseManagerDownloaderRequestSendLostLicenseType)
|
||||
else if (self.requestType == TLOLicenseManagerDownloaderRequestTypeSendLostLicense)
|
||||
{
|
||||
NSString *encodedContextInfo = [self encodedRequestContextValue:@"licenseOwnerContactAddress"];
|
||||
|
||||
requestBodyString = [NSString stringWithFormat:@"licenseOwnerContactAddress=%@&lang=%@&version=%@",
|
||||
encodedContextInfo, currentUserLanguage, applicationVersion];
|
||||
}
|
||||
else if (self.requestType == TLOLicenseManagerDownloaderRequestMigrateAppStoreType)
|
||||
else if (self.requestType == TLOLicenseManagerDownloaderRequestTypeMigrateAppStore)
|
||||
{
|
||||
NSString *receiptData = [self encodedRequestContextValue:@"receiptData"];
|
||||
NSString *licenseOwnerName = [self encodedRequestContextValue:@"licenseOwnerName"];
|
||||
@@ -637,14 +637,14 @@ perform_return:
|
||||
[NSString stringWithFormat:@"receiptData=%@&licenseOwnerMacAddress=%@&licenseOwnerContactAddress=%@&licenseOwnerName=%@&lang=%@&version=%@",
|
||||
receiptData, licenseOwnerMacAddress, licenseOwnerContactAddress, licenseOwnerName, currentUserLanguage, applicationVersion];
|
||||
}
|
||||
else if (self.requestType == TLOLicenseManagerDownloaderRequestLicenseUpgradeEligibilityType)
|
||||
else if (self.requestType == TLOLicenseManagerDownloaderRequestTypeLicenseUpgradeEligibility)
|
||||
{
|
||||
NSString *encodedContextInfo = [self encodedRequestContextValue:@"licenseKey"];
|
||||
|
||||
requestBodyString = [NSString stringWithFormat:@"licenseKey=%@&lang=%@&outputFormat=plist&version=%@",
|
||||
encodedContextInfo, currentUserLanguage, applicationVersion];
|
||||
}
|
||||
else if (self.requestType == TLOLicenseManagerDownloaderRequestReceiptUpgradeEligibilityType)
|
||||
else if (self.requestType == TLOLicenseManagerDownloaderRequestTypeReceiptUpgradeEligibility)
|
||||
{
|
||||
NSString *receiptData = [self encodedRequestContextValue:@"receiptData"];
|
||||
NSString *licenseOwnerMacAddress = [self encodedRequestContextValue:@"licenseOwnerMacAddress"];
|
||||
|
||||
@@ -522,7 +522,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
[client print:message
|
||||
by:nil
|
||||
inChannel:channel
|
||||
asType:TVCLogLineOffTheRecordEncryptionStatusType
|
||||
asType:TVCLogLineTypeOffTheRecordEncryptionStatus
|
||||
command:TVCLogLineDefaultCommandValue
|
||||
escapeMessage:escapeMessage];
|
||||
}
|
||||
|
||||
@@ -91,25 +91,25 @@ NSString * const TXNotificationHighlightLogStandardMessageFormat = @"%@ %@";
|
||||
#define _df(key, num) case (key): { return TXTLS((num)); }
|
||||
|
||||
switch (event) {
|
||||
_df(TXNotificationAddressBookMatchType, @"Notifications[kx3-xk]")
|
||||
_df(TXNotificationChannelMessageType, @"Notifications[qnz-k4]")
|
||||
_df(TXNotificationChannelNoticeType, @"Notifications[vuq-jp]")
|
||||
_df(TXNotificationConnectType, @"Notifications[4lr-ej]")
|
||||
_df(TXNotificationDisconnectType, @"Notifications[wjv-yb]")
|
||||
_df(TXNotificationInviteType, @"Notifications[eiu-8q]")
|
||||
_df(TXNotificationKickType, @"Notifications[2nk-lg]")
|
||||
_df(TXNotificationNewPrivateMessageType, @"Notifications[5yi-gu]")
|
||||
_df(TXNotificationPrivateMessageType, @"Notifications[00b-nx]")
|
||||
_df(TXNotificationPrivateNoticeType, @"Notifications[nhz-io]")
|
||||
_df(TXNotificationHighlightType, @"Notifications[cs4-x9]")
|
||||
_df(TXNotificationFileTransferSendSuccessfulType, @"Notifications[0x2-3h]")
|
||||
_df(TXNotificationFileTransferReceiveSuccessfulType, @"Notifications[qle-7v]")
|
||||
_df(TXNotificationFileTransferSendFailedType, @"Notifications[sc0-1n]")
|
||||
_df(TXNotificationFileTransferReceiveFailedType, @"Notifications[we9-1b]")
|
||||
_df(TXNotificationFileTransferReceiveRequestedType, @"Notifications[st5-0n]")
|
||||
_df(TXNotificationUserJoinedType, @"Notifications[25q-af]")
|
||||
_df(TXNotificationUserPartedType, @"Notifications[k3s-by]")
|
||||
_df(TXNotificationUserDisconnectedType, @"Notifications[0fo-bt]")
|
||||
_df(TXNotificationTypeAddressBookMatch, @"Notifications[kx3-xk]")
|
||||
_df(TXNotificationTypeChannelMessage, @"Notifications[qnz-k4]")
|
||||
_df(TXNotificationTypeChannelNotice, @"Notifications[vuq-jp]")
|
||||
_df(TXNotificationTypeConnect, @"Notifications[4lr-ej]")
|
||||
_df(TXNotificationTypeDisconnect, @"Notifications[wjv-yb]")
|
||||
_df(TXNotificationTypeInvite, @"Notifications[eiu-8q]")
|
||||
_df(TXNotificationTypeKick, @"Notifications[2nk-lg]")
|
||||
_df(TXNotificationTypeNewPrivateMessage, @"Notifications[5yi-gu]")
|
||||
_df(TXNotificationTypePrivateMessage, @"Notifications[00b-nx]")
|
||||
_df(TXNotificationTypePrivateNotice, @"Notifications[nhz-io]")
|
||||
_df(TXNotificationTypeHighlight, @"Notifications[cs4-x9]")
|
||||
_df(TXNotificationTypeFileTransferSendSuccessful, @"Notifications[0x2-3h]")
|
||||
_df(TXNotificationTypeFileTransferReceiveSuccessful, @"Notifications[qle-7v]")
|
||||
_df(TXNotificationTypeFileTransferSendFailed, @"Notifications[sc0-1n]")
|
||||
_df(TXNotificationTypeFileTransferReceiveFailed, @"Notifications[we9-1b]")
|
||||
_df(TXNotificationTypeFileTransferReceiveRequested, @"Notifications[st5-0n]")
|
||||
_df(TXNotificationTypeUserJoined, @"Notifications[25q-af]")
|
||||
_df(TXNotificationTypeUserParted, @"Notifications[k3s-by]")
|
||||
_df(TXNotificationTypeUserDisconnected, @"Notifications[0fo-bt]")
|
||||
}
|
||||
|
||||
#undef _df
|
||||
@@ -122,7 +122,7 @@ NSString * const TXNotificationHighlightLogStandardMessageFormat = @"%@ %@";
|
||||
NSUInteger eventPriority = 0;
|
||||
|
||||
switch (eventType) {
|
||||
case TXNotificationHighlightType:
|
||||
case TXNotificationTypeHighlight:
|
||||
{
|
||||
eventPriority = 1;
|
||||
|
||||
@@ -130,7 +130,7 @@ NSString * const TXNotificationHighlightLogStandardMessageFormat = @"%@ %@";
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationNewPrivateMessageType:
|
||||
case TXNotificationTypeNewPrivateMessage:
|
||||
{
|
||||
eventPriority = 1;
|
||||
|
||||
@@ -138,43 +138,43 @@ NSString * const TXNotificationHighlightLogStandardMessageFormat = @"%@ %@";
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationChannelMessageType:
|
||||
case TXNotificationTypeChannelMessage:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[ep5-de]", eventTitle);
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationChannelNoticeType:
|
||||
case TXNotificationTypeChannelNotice:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[chi-km]", eventTitle);
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationPrivateMessageType:
|
||||
case TXNotificationTypePrivateMessage:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[69i-dy]");
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationPrivateNoticeType:
|
||||
case TXNotificationTypePrivateNotice:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[7hn-dg]");
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationKickType:
|
||||
case TXNotificationTypeKick:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[u30-ia]", eventTitle);
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationInviteType:
|
||||
case TXNotificationTypeInvite:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[g4s-cq]", eventTitle);
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationConnectType:
|
||||
case TXNotificationTypeConnect:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[mo1-vn]", eventTitle);
|
||||
|
||||
@@ -182,7 +182,7 @@ NSString * const TXNotificationHighlightLogStandardMessageFormat = @"%@ %@";
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationDisconnectType:
|
||||
case TXNotificationTypeDisconnect:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[7xe-ig]", eventTitle);
|
||||
|
||||
@@ -190,55 +190,55 @@ NSString * const TXNotificationHighlightLogStandardMessageFormat = @"%@ %@";
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationAddressBookMatchType:
|
||||
case TXNotificationTypeAddressBookMatch:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[niq-32]");
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationFileTransferSendSuccessfulType:
|
||||
case TXNotificationTypeFileTransferSendSuccessful:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[l5y-sx]", eventTitle);
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationFileTransferReceiveSuccessfulType:
|
||||
case TXNotificationTypeFileTransferReceiveSuccessful:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[hc9-7n]", eventTitle);
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationFileTransferSendFailedType:
|
||||
case TXNotificationTypeFileTransferSendFailed:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[het-vh]", eventTitle);
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationFileTransferReceiveFailedType:
|
||||
case TXNotificationTypeFileTransferReceiveFailed:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[hm4-ze]", eventTitle);
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationFileTransferReceiveRequestedType:
|
||||
case TXNotificationTypeFileTransferReceiveRequested:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[nqz-7v]", eventTitle);
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationUserJoinedType:
|
||||
case TXNotificationTypeUserJoined:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[keq-ts]", eventTitle);
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationUserPartedType:
|
||||
case TXNotificationTypeUserParted:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[im4-p0]", eventTitle);
|
||||
|
||||
break;
|
||||
}
|
||||
case TXNotificationUserDisconnectedType:
|
||||
case TXNotificationTypeUserDisconnected:
|
||||
{
|
||||
eventTitle = TXTLS(@"Notifications[20x-32]", eventTitle);
|
||||
|
||||
@@ -258,7 +258,7 @@ NSString * const TXNotificationHighlightLogStandardMessageFormat = @"%@ %@";
|
||||
notification.title = eventTitle;
|
||||
notification.userInfo = eventContext;
|
||||
|
||||
if (eventType == TXNotificationFileTransferReceiveRequestedType) {
|
||||
if (eventType == TXNotificationTypeFileTransferReceiveRequested) {
|
||||
/* sshhhh... you didn't see nothing. */
|
||||
[notification setValue:@(YES) forKey:@"_showsButtons"];
|
||||
|
||||
@@ -266,8 +266,8 @@ NSString * const TXNotificationHighlightLogStandardMessageFormat = @"%@ %@";
|
||||
}
|
||||
|
||||
/* These are the only event types we want to support for now */
|
||||
if (eventType == TXNotificationNewPrivateMessageType ||
|
||||
eventType == TXNotificationPrivateMessageType)
|
||||
if (eventType == TXNotificationTypeNewPrivateMessage ||
|
||||
eventType == TXNotificationTypePrivateMessage)
|
||||
{
|
||||
notification.hasReplyButton = YES;
|
||||
|
||||
@@ -438,7 +438,7 @@ NSString * const TXNotificationHighlightLogStandardMessageFormat = @"%@ %@";
|
||||
return;
|
||||
}
|
||||
|
||||
if (alertType != TXNotificationFileTransferReceiveRequestedType) {
|
||||
if (alertType != TXNotificationTypeFileTransferReceiveRequested) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -452,7 +452,7 @@ NSString * const TXNotificationHighlightLogStandardMessageFormat = @"%@ %@";
|
||||
|
||||
TDCFileTransferDialogTransferStatus transferStatus = fileTransfer.transferStatus;
|
||||
|
||||
if (transferStatus != TDCFileTransferDialogTransferStoppedStatus) {
|
||||
if (transferStatus != TDCFileTransferDialogTransferStatusStopped) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ ClassWithDesignatedInitializerInitMethod
|
||||
|
||||
- (NSString *)addressSourceURL
|
||||
{
|
||||
if ([TPCPreferences fileTransferIPAddressDetectionMethod] == TXFileTransferIPAddressRouterAndThirdPartyMethod) {
|
||||
if ([TPCPreferences fileTransferIPAddressDetectionMethod] == TXFileTransferIPAddressMethodRouterAndThirdParty) {
|
||||
return [self thirdPartySourceURL];
|
||||
}
|
||||
|
||||
|
||||
@@ -47,9 +47,9 @@ public class LinkParser: NSObject
|
||||
@objc
|
||||
public static let bannedLineTypes =
|
||||
[
|
||||
TVCLogLine.string(for: .modeType),
|
||||
TVCLogLine.string(for: .joinType),
|
||||
TVCLogLine.string(for: .nickType),
|
||||
TVCLogLine.string(for: .inviteType)
|
||||
TVCLogLine.string(for: .mode),
|
||||
TVCLogLine.string(for: .join),
|
||||
TVCLogLine.string(for: .nick),
|
||||
TVCLogLine.string(for: .invite)
|
||||
].compactMap { $0 }
|
||||
}
|
||||
|
||||
@@ -231,11 +231,11 @@ NSString * const TLOPopupPromptSuppressionPrefix = @"Text Input Prompt Suppressi
|
||||
+ (TLOPopupPromptReturnType)_convertResponseFromTDCAlert:(TDCAlertResponse)response
|
||||
{
|
||||
switch (response) {
|
||||
case TDCAlertResponseAlternateButton:
|
||||
case TDCAlertResponseAlternate:
|
||||
{
|
||||
return TLOPopupPromptReturnSecondaryType;
|
||||
}
|
||||
case TDCAlertResponseOtherButton:
|
||||
case TDCAlertResponseOther:
|
||||
{
|
||||
return TLOPopupPromptReturnOtherType;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+ (void)importPreflight:(TDCAlertResponse)buttonPressed
|
||||
{
|
||||
if (buttonPressed != TDCAlertResponseDefaultButton) {
|
||||
if (buttonPressed != TDCAlertResponseDefault) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+ (void)exportPreflight:(TDCAlertResponse)buttonPressed
|
||||
{
|
||||
if (buttonPressed != TDCAlertResponseDefaultButton) {
|
||||
if (buttonPressed != TDCAlertResponseDefault) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -456,9 +456,9 @@ NSUInteger const TPCPreferencesDictionaryVersion = 602;
|
||||
return (TXUserDoubleClickAction)[RZUserDefaults() unsignedIntegerForKey:@"UserListDoubleClickAction"];
|
||||
}
|
||||
|
||||
+ (TXNoticeSendLocationType)locationToSendNotices
|
||||
+ (TXNoticeSendLocation)locationToSendNotices
|
||||
{
|
||||
return (TXNoticeSendLocationType)[RZUserDefaults() unsignedIntegerForKey:@"DestinationOfNonserverNotices"];
|
||||
return (TXNoticeSendLocation)[RZUserDefaults() unsignedIntegerForKey:@"DestinationOfNonserverNotices"];
|
||||
}
|
||||
|
||||
+ (TXCommandWKeyAction)commandWKeyAction
|
||||
@@ -540,14 +540,14 @@ NSUInteger const TPCPreferencesDictionaryVersion = 602;
|
||||
#pragma mark -
|
||||
#pragma mark Theme
|
||||
|
||||
+ (void)setAppearance:(TXPreferredAppearanceType)appearance
|
||||
+ (void)setAppearance:(TXPreferredAppearance)appearance
|
||||
{
|
||||
[RZUserDefaults() setUnsignedInteger:appearance forKey:@"Appearance"];
|
||||
}
|
||||
|
||||
+ (TXPreferredAppearanceType)appearance
|
||||
+ (TXPreferredAppearance)appearance
|
||||
{
|
||||
return (TXPreferredAppearanceType)[RZUserDefaults() unsignedIntegerForKey:@"Appearance"];
|
||||
return (TXPreferredAppearance)[RZUserDefaults() unsignedIntegerForKey:@"Appearance"];
|
||||
}
|
||||
|
||||
+ (BOOL)invertSidebarColors
|
||||
@@ -759,12 +759,12 @@ NSUInteger const TPCPreferencesDictionaryVersion = 602;
|
||||
#pragma mark -
|
||||
#pragma mark File Transfers
|
||||
|
||||
+ (TXFileTransferRequestReplyAction)fileTransferRequestReplyAction
|
||||
+ (TXFileTransferRequestReply)fileTransferRequestReplyAction
|
||||
{
|
||||
return [RZUserDefaults() unsignedIntegerForKey:@"File Transfers -> File Transfer Request Reply Action"];
|
||||
}
|
||||
|
||||
+ (TXFileTransferIPAddressDetectionMethod)fileTransferIPAddressDetectionMethod
|
||||
+ (TXFileTransferIPAddressMethodDetection)fileTransferIPAddressDetectionMethod
|
||||
{
|
||||
return [RZUserDefaults() unsignedIntegerForKey:@"File Transfers -> File Transfer IP Address Detection Method"];
|
||||
}
|
||||
@@ -854,25 +854,25 @@ NSUInteger const TPCPreferencesDictionaryVersion = 602;
|
||||
switch (event) {
|
||||
#define _dv(key, value) case (key): { returnValue = (value); break; }
|
||||
|
||||
_dv(TXNotificationAddressBookMatchType, @"NotificationType -> Address Book Match -> ")
|
||||
_dv(TXNotificationChannelMessageType, @"NotificationType -> Public Message -> ")
|
||||
_dv(TXNotificationChannelNoticeType, @"NotificationType -> Public Notice -> ")
|
||||
_dv(TXNotificationConnectType, @"NotificationType -> Connected -> ")
|
||||
_dv(TXNotificationDisconnectType, @"NotificationType -> Disconnected -> ")
|
||||
_dv(TXNotificationHighlightType, @"NotificationType -> Highlight -> ")
|
||||
_dv(TXNotificationInviteType, @"NotificationType -> Channel Invitation -> ")
|
||||
_dv(TXNotificationKickType, @"NotificationType -> Kicked from Channel -> ")
|
||||
_dv(TXNotificationNewPrivateMessageType, @"NotificationType -> Private Message (New) -> ")
|
||||
_dv(TXNotificationPrivateMessageType, @"NotificationType -> Private Message -> ")
|
||||
_dv(TXNotificationPrivateNoticeType, @"NotificationType -> Private Notice -> ")
|
||||
_dv(TXNotificationFileTransferSendSuccessfulType, @"NotificationType -> Successful File Transfer (Sending) -> ")
|
||||
_dv(TXNotificationFileTransferReceiveSuccessfulType, @"NotificationType -> Successful File Transfer (Receiving) -> ")
|
||||
_dv(TXNotificationFileTransferSendFailedType, @"NotificationType -> Failed File Transfer (Sending) -> ")
|
||||
_dv(TXNotificationFileTransferReceiveFailedType, @"NotificationType -> Failed File Transfer (Receiving) -> ")
|
||||
_dv(TXNotificationFileTransferReceiveRequestedType, @"NotificationType -> File Transfer Request -> ")
|
||||
_dv(TXNotificationUserJoinedType, @"NotificationType -> User Joined -> ")
|
||||
_dv(TXNotificationUserPartedType, @"NotificationType -> User Parted -> ")
|
||||
_dv(TXNotificationUserDisconnectedType, @"NotificationType -> User Disconnected -> ")
|
||||
_dv(TXNotificationTypeAddressBookMatch, @"NotificationType -> Address Book Match -> ")
|
||||
_dv(TXNotificationTypeChannelMessage, @"NotificationType -> Public Message -> ")
|
||||
_dv(TXNotificationTypeChannelNotice, @"NotificationType -> Public Notice -> ")
|
||||
_dv(TXNotificationTypeConnect, @"NotificationType -> Connected -> ")
|
||||
_dv(TXNotificationTypeDisconnect, @"NotificationType -> Disconnected -> ")
|
||||
_dv(TXNotificationTypeHighlight, @"NotificationType -> Highlight -> ")
|
||||
_dv(TXNotificationTypeInvite, @"NotificationType -> Channel Invitation -> ")
|
||||
_dv(TXNotificationTypeKick, @"NotificationType -> Kicked from Channel -> ")
|
||||
_dv(TXNotificationTypeNewPrivateMessage, @"NotificationType -> Private Message (New) -> ")
|
||||
_dv(TXNotificationTypePrivateMessage, @"NotificationType -> Private Message -> ")
|
||||
_dv(TXNotificationTypePrivateNotice, @"NotificationType -> Private Notice -> ")
|
||||
_dv(TXNotificationTypeFileTransferSendSuccessful, @"NotificationType -> Successful File Transfer (Sending) -> ")
|
||||
_dv(TXNotificationTypeFileTransferReceiveSuccessful, @"NotificationType -> Successful File Transfer (Receiving) -> ")
|
||||
_dv(TXNotificationTypeFileTransferSendFailed, @"NotificationType -> Failed File Transfer (Sending) -> ")
|
||||
_dv(TXNotificationTypeFileTransferReceiveFailed, @"NotificationType -> Failed File Transfer (Receiving) -> ")
|
||||
_dv(TXNotificationTypeFileTransferReceiveRequested, @"NotificationType -> File Transfer Request -> ")
|
||||
_dv(TXNotificationTypeUserJoined, @"NotificationType -> User Joined -> ")
|
||||
_dv(TXNotificationTypeUserParted, @"NotificationType -> User Parted -> ")
|
||||
_dv(TXNotificationTypeUserDisconnected, @"NotificationType -> User Disconnected -> ")
|
||||
|
||||
#undef _dv
|
||||
}
|
||||
@@ -1028,28 +1028,28 @@ NSUInteger const TPCPreferencesDictionaryVersion = 602;
|
||||
|
||||
+ (BOOL)channelMessageSpeakChannelName
|
||||
{
|
||||
NSString *eventKey = [self keyForEvent:TXNotificationChannelMessageType category:@"Speak Channel Name"];
|
||||
NSString *eventKey = [self keyForEvent:TXNotificationTypeChannelMessage category:@"Speak Channel Name"];
|
||||
|
||||
return [RZUserDefaults() boolForKey:eventKey];
|
||||
}
|
||||
|
||||
+ (void)setChannelMessageSpeakChannelName:(BOOL)channelMessageSpeakChannelName
|
||||
{
|
||||
NSString *eventKey = [self keyForEvent:TXNotificationChannelMessageType category:@"Speak Channel Name"];
|
||||
NSString *eventKey = [self keyForEvent:TXNotificationTypeChannelMessage category:@"Speak Channel Name"];
|
||||
|
||||
[RZUserDefaults() setBool:channelMessageSpeakChannelName forKey:eventKey];
|
||||
}
|
||||
|
||||
+ (BOOL)channelMessageSpeakNickname
|
||||
{
|
||||
NSString *eventKey = [self keyForEvent:TXNotificationChannelMessageType category:@"Speak Nickname"];
|
||||
NSString *eventKey = [self keyForEvent:TXNotificationTypeChannelMessage category:@"Speak Nickname"];
|
||||
|
||||
return [RZUserDefaults() boolForKey:eventKey];
|
||||
}
|
||||
|
||||
+ (void)setChannelMessageSpeakNickname:(BOOL)channelMessageSpeakNickname
|
||||
{
|
||||
NSString *eventKey = [self keyForEvent:TXNotificationChannelMessageType category:@"Speak Nickname"];
|
||||
NSString *eventKey = [self keyForEvent:TXNotificationTypeChannelMessage category:@"Speak Nickname"];
|
||||
|
||||
[RZUserDefaults() setBool:channelMessageSpeakNickname forKey:eventKey];
|
||||
}
|
||||
@@ -1236,7 +1236,7 @@ TEXTUAL_IGNORE_DEPRECATION_BEGIN
|
||||
TEXTUAL_IGNORE_DEPRECATION_END
|
||||
|
||||
if (invertSidebarColors) {
|
||||
[self setAppearance:TXPreferredAppearanceDarkType];
|
||||
[self setAppearance:TXPreferredAppearanceDark];
|
||||
}
|
||||
|
||||
[RZUserDefaults() setBool:YES forKey:_defaultsKey];
|
||||
|
||||
@@ -81,12 +81,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#if TEXTUAL_BUILT_FOR_APP_STORE_DISTRIBUTION == 1
|
||||
+ (void)onInAppPurchaseTrialExpired:(NSNotification *)notification
|
||||
{
|
||||
[self performReloadAction:TPCPreferencesReloadLogTranscriptsAction];
|
||||
[self performReloadAction:TPCPreferencesReloadActionLogTranscripts];
|
||||
}
|
||||
|
||||
+ (void)onInAppPurchaseTransactionFinished:(NSNotification *)notification
|
||||
{
|
||||
[self performReloadAction:TPCPreferencesReloadLogTranscriptsAction];
|
||||
[self performReloadAction:TPCPreferencesReloadActionLogTranscripts];
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -101,7 +101,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
{
|
||||
NSParameterAssert(keys != nil);
|
||||
|
||||
TPCPreferencesReloadActionMask reloadAction = 0;
|
||||
TPCPreferencesReloadAction reloadAction = 0;
|
||||
|
||||
/* Style specific reloads... */
|
||||
if ([keys containsObject:@"AutomaticallyFilterUnicodeTextSpam"] ||
|
||||
@@ -119,61 +119,61 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
[keys containsObject:TPCPreferencesThemeFontSizeDefaultsKey] ||
|
||||
[keys containsObject:TPCPreferencesThemeNameDefaultsKey])
|
||||
{
|
||||
reloadAction |= TPCPreferencesReloadStyleAction;
|
||||
reloadAction |= TPCPreferencesReloadActionStyle;
|
||||
}
|
||||
|
||||
/* Highlight lists */
|
||||
if ([keys containsObject:@"Highlight List -> Excluded Matches"] ||
|
||||
[keys containsObject:@"Highlight List -> Primary Matches"])
|
||||
{
|
||||
reloadAction |= TPCPreferencesReloadHighlightKeywordsAction;
|
||||
reloadAction |= TPCPreferencesReloadActionHighlightKeywords;
|
||||
}
|
||||
|
||||
/* Highlight logging */
|
||||
if ([keys containsObject:@"LogHighlights"]) {
|
||||
reloadAction |= TPCPreferencesReloadHighlightLoggingAction;
|
||||
reloadAction |= TPCPreferencesReloadActionHighlightLogging;
|
||||
}
|
||||
|
||||
/* Text direction: right-to-left, left-to-right */
|
||||
if ([keys containsObject:@"RightToLeftTextFormatting"]) {
|
||||
reloadAction |= TPCPreferencesReloadTextDirectionAction;
|
||||
reloadAction |= TPCPreferencesReloadActionTextDirection;
|
||||
}
|
||||
|
||||
/* Text field font size */
|
||||
if ([keys containsObject:@"Main Input Text Field -> Font Size"]) {
|
||||
reloadAction |= TPCPreferencesReloadTextFieldFontSizeAction;
|
||||
reloadAction |= TPCPreferencesReloadActionTextFieldFontSize;
|
||||
}
|
||||
|
||||
/* Input history scope */
|
||||
if ([keys containsObject:@"SaveInputHistoryPerSelection"]) {
|
||||
reloadAction |= TPCPreferencesReloadInputHistoryScopeAction;
|
||||
reloadAction |= TPCPreferencesReloadActionInputHistoryScope;
|
||||
}
|
||||
|
||||
/* Main window segmented controller */
|
||||
if ([keys containsObject:@"DisableMainWindowSegmentedController"]) {
|
||||
reloadAction |= TPCPreferencesReloadTextFieldSegmentedControllerOriginAction;
|
||||
reloadAction |= TPCPreferencesReloadActionTextFieldSegmentedControllerOrigin;
|
||||
}
|
||||
|
||||
/* Main window alpha level */
|
||||
if ([keys containsObject:@"MainWindowTransparencyLevel"]) {
|
||||
reloadAction |= TPCPreferencesReloadMainWindowTransparencyLevelAction;
|
||||
reloadAction |= TPCPreferencesReloadActionMainWindowTransparencyLevel;
|
||||
}
|
||||
|
||||
/* Dock icon */
|
||||
if ([keys containsObject:@"DisplayDockBadges"] ||
|
||||
[keys containsObject:@"DisplayPublicMessageCountInDockBadge"])
|
||||
{
|
||||
reloadAction |= TPCPreferencesReloadDockIconBadgesAction;
|
||||
reloadAction |= TPCPreferencesReloadActionDockIconBadges;
|
||||
}
|
||||
|
||||
/* Main window appearance */
|
||||
if ([keys containsObject:@"Appearance"]) {
|
||||
reloadAction |= TPCPreferencesReloadAppearanceAction;
|
||||
reloadAction |= TPCPreferencesReloadActionAppearance;
|
||||
}
|
||||
|
||||
/* Member list sort order */
|
||||
if ([keys containsObject:@"MemberListSortFavorsServerStaff"]) {
|
||||
reloadAction |= TPCPreferencesReloadMemberListSortOrderAction;
|
||||
reloadAction |= TPCPreferencesReloadActionMemberListSortOrder;
|
||||
}
|
||||
|
||||
/* Member list user badge colors */
|
||||
@@ -186,39 +186,39 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
[keys containsObject:@"User List Mode Badge Colors -> +v"] ||
|
||||
[keys containsObject:@"User List Mode Badge Colors -> no mode"])
|
||||
{
|
||||
reloadAction |= TPCPreferencesReloadMemberListAction;
|
||||
reloadAction |= TPCPreferencesReloadMemberListUserBadgesAction;
|
||||
reloadAction |= TPCPreferencesReloadActionMemberList;
|
||||
reloadAction |= TPCPreferencesReloadActionMemberListUserBadges;
|
||||
}
|
||||
|
||||
/* Server list unread count badge colors */
|
||||
if ([keys containsObject:@"Server List Unread Message Count Badge Colors -> Highlight"]) {
|
||||
reloadAction |= TPCPreferencesReloadServerListUnreadBadgesAction;
|
||||
reloadAction |= TPCPreferencesReloadActionServerListUnreadBadges;
|
||||
}
|
||||
|
||||
/* Sparkle framework update feed URL */
|
||||
#if TEXTUAL_BUILT_WITH_SPARKLE_ENABLED == 1
|
||||
if ([keys containsObject:@"ReceiveBetaUpdates"]) {
|
||||
reloadAction |= TPCPreferencesReloadSparkleFrameworkFeedURLAction;
|
||||
reloadAction |= TPCPreferencesReloadActionSparkleFrameworkFeedURL;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Developer mode */
|
||||
if ([keys containsObject:@"TextualDeveloperEnvironment"]) {
|
||||
reloadAction |= TPCPreferencesReloadIRCCommandCacheAction;
|
||||
reloadAction |= TPCPreferencesReloadActionIRCCommandCache;
|
||||
}
|
||||
|
||||
/* Scrollback limit */
|
||||
if ([keys containsObject:@"ScrollbackMaximumSavedLineCount"]) {
|
||||
reloadAction |= TPCPreferencesReloadScrollbackSaveLimitAction;
|
||||
reloadAction |= TPCPreferencesReloadActionScrollbackSaveLimit;
|
||||
}
|
||||
|
||||
if ([keys containsObject:@"ScrollbackMaximumVisibleLineCount"]) {
|
||||
reloadAction |= TPCPreferencesReloadScrollbackVisibleLimitAction;
|
||||
reloadAction |= TPCPreferencesReloadActionScrollbackVisibleLimit;
|
||||
}
|
||||
|
||||
/* Channel view arrangement */
|
||||
if ([keys containsObject:@"ChannelViewArrangement"]) {
|
||||
reloadAction |= TPCPreferencesReloadChannelViewArrangementAction;
|
||||
reloadAction |= TPCPreferencesReloadActionChannelViewArrangement;
|
||||
}
|
||||
|
||||
/* Encryption policy */
|
||||
@@ -227,26 +227,26 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
[keys containsObject:@"Off-the-Record Messaging -> Automatically Enable Service"] ||
|
||||
[keys containsObject:@"Off-the-Record Messaging -> Require Encryption"])
|
||||
{
|
||||
reloadAction |= TPCPreferencesReloadEncryptionPolicyAction;
|
||||
reloadAction |= TPCPreferencesReloadActionEncryptionPolicy;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* After this is all complete; we call -preferencesChanged just to take
|
||||
care of everything else that does not need specific reloads. */
|
||||
reloadAction |= TPCPreferencesReloadPreferencesChangedAction;
|
||||
reloadAction |= TPCPreferencesReloadActionPreferencesChanged;
|
||||
|
||||
[self performReloadAction:reloadAction];
|
||||
}
|
||||
|
||||
+ (void)performReloadAction:(TPCPreferencesReloadActionMask)reloadAction
|
||||
+ (void)performReloadAction:(TPCPreferencesReloadAction)reloadAction
|
||||
{
|
||||
[self performReloadAction:reloadAction forKey:nil];
|
||||
}
|
||||
|
||||
+ (void)performReloadAction:(TPCPreferencesReloadActionMask)reloadAction forKey:(nullable NSString *)key
|
||||
+ (void)performReloadAction:(TPCPreferencesReloadAction)reloadAction forKey:(nullable NSString *)key
|
||||
{
|
||||
/* Update dock icon */
|
||||
if ((reloadAction & TPCPreferencesReloadDockIconBadgesAction) == TPCPreferencesReloadDockIconBadgesAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionDockIconBadges) == TPCPreferencesReloadActionDockIconBadges) {
|
||||
[TVCDockIcon updateDockIcon];
|
||||
}
|
||||
|
||||
@@ -257,7 +257,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
BOOL didReloadUserInterface = NO;
|
||||
|
||||
/* Member list appearance */
|
||||
if ((reloadAction & TPCPreferencesReloadMemberListUserBadgesAction) == TPCPreferencesReloadMemberListUserBadgesAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionMemberListUserBadges) == TPCPreferencesReloadActionMemberListUserBadges) {
|
||||
/* We invalidate this early because a separate action may
|
||||
which is attached to our mask may reload the drawings for
|
||||
us so until we know if that happened, we wait. */
|
||||
@@ -266,7 +266,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
and we have a key for context, then be more efficient by only updating
|
||||
drawings related to this preference. The member list automatically
|
||||
invalidates its caches when passing a recognized key. */
|
||||
if (reloadAction == TPCPreferencesReloadMemberListUserBadgesAction && key != nil) {
|
||||
if (reloadAction == TPCPreferencesReloadActionMemberListUserBadges && key != nil) {
|
||||
[mainWindowMemberList() refreshDrawingForChangesToPreference:key];
|
||||
} else {
|
||||
[mainWindowMemberList().userInterfaceObjects invalidateUserMarkBadgeCaches];
|
||||
@@ -274,25 +274,25 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
/* Window appearance */
|
||||
if ((reloadAction & TPCPreferencesReloadAppearanceAction) == TPCPreferencesReloadAppearanceAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionAppearance) == TPCPreferencesReloadActionAppearance) {
|
||||
[[TXSharedApplication sharedAppearance] updateAppearance];
|
||||
|
||||
didReloadUserInterface = YES;
|
||||
}
|
||||
|
||||
/* Active style */
|
||||
if ((reloadAction & TPCPreferencesReloadStyleAction) == TPCPreferencesReloadStyleAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionStyle) == TPCPreferencesReloadActionStyle) {
|
||||
[mainWindow() reloadTheme];
|
||||
|
||||
didReloadActiveStyle = YES;
|
||||
}
|
||||
|
||||
/* Server list */
|
||||
if ((reloadAction & TPCPreferencesReloadServerListAction) == TPCPreferencesReloadServerListAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionServerList) == TPCPreferencesReloadActionServerList) {
|
||||
if (didReloadUserInterface == NO) {
|
||||
[mainWindowServerList() applicationAppearanceChanged];
|
||||
}
|
||||
} else if ((reloadAction & TPCPreferencesReloadServerListUnreadBadgesAction) == TPCPreferencesReloadServerListUnreadBadgesAction) {
|
||||
} else if ((reloadAction & TPCPreferencesReloadActionServerListUnreadBadges) == TPCPreferencesReloadActionServerListUnreadBadges) {
|
||||
if (didReloadUserInterface == NO) {
|
||||
/* The color used for unread badges on Yosemite also apply to the text color
|
||||
so we must reload all drawings instead of only the badges themselves. */
|
||||
@@ -305,7 +305,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
/* Member list appearance */
|
||||
if ((reloadAction & TPCPreferencesReloadMemberListAction) == TPCPreferencesReloadMemberListAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionMemberList) == TPCPreferencesReloadActionMemberList) {
|
||||
if (didReloadUserInterface == NO) {
|
||||
[mainWindowMemberList() applicationAppearanceChanged];
|
||||
}
|
||||
@@ -314,7 +314,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/* Member list sort order */
|
||||
BOOL didReloadMemberListSortOrder = NO;
|
||||
|
||||
if ((reloadAction & TPCPreferencesReloadMemberListSortOrderAction) == TPCPreferencesReloadMemberListSortOrderAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionMemberListSortOrder) == TPCPreferencesReloadActionMemberListSortOrder) {
|
||||
for (IRCClient *u in worldController().clientList) {
|
||||
for (IRCChannel *c in u.channelList) {
|
||||
[c reloadDataForTableViewBySortingMembers];
|
||||
@@ -325,7 +325,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
/* Member list appearance */
|
||||
if ((reloadAction & TPCPreferencesReloadMemberListAction) == TPCPreferencesReloadMemberListAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionMemberList) == TPCPreferencesReloadActionMemberList) {
|
||||
/* Sort order will redraw these for us */
|
||||
if (didReloadMemberListSortOrder == NO) {
|
||||
[mainWindowMemberList() refreshAllDrawings];
|
||||
@@ -333,22 +333,22 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
/* Main window segmented controller */
|
||||
if ((reloadAction & TPCPreferencesReloadTextFieldSegmentedControllerOriginAction) == TPCPreferencesReloadTextFieldSegmentedControllerOriginAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionTextFieldSegmentedControllerOrigin) == TPCPreferencesReloadActionTextFieldSegmentedControllerOrigin) {
|
||||
[mainWindowTextField() reloadOriginPointsAndRecalculateSize];
|
||||
}
|
||||
|
||||
/* Main window alpha level */
|
||||
if ((reloadAction & TPCPreferencesReloadMainWindowTransparencyLevelAction) == TPCPreferencesReloadMainWindowTransparencyLevelAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionMainWindowTransparencyLevel) == TPCPreferencesReloadActionMainWindowTransparencyLevel) {
|
||||
[mainWindow() updateAlphaValueToReflectPreferences];
|
||||
}
|
||||
|
||||
/* Highlight keywords */
|
||||
if ((reloadAction & TPCPreferencesReloadHighlightKeywordsAction) == TPCPreferencesReloadHighlightKeywordsAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionHighlightKeywords) == TPCPreferencesReloadActionHighlightKeywords) {
|
||||
[self cleanUpHighlightKeywords];
|
||||
}
|
||||
|
||||
/* Highlight logging */
|
||||
if ((reloadAction & TPCPreferencesReloadHighlightLoggingAction) == TPCPreferencesReloadHighlightLoggingAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionHighlightLogging) == TPCPreferencesReloadActionHighlightLogging) {
|
||||
if ([self logHighlights] == NO) {
|
||||
for (IRCClient *u in worldController().clientList) {
|
||||
[u clearCachedHighlights];
|
||||
@@ -357,7 +357,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
/* Text direction: right-to-left, left-to-right */
|
||||
if ((reloadAction & TPCPreferencesReloadTextDirectionAction) == TPCPreferencesReloadTextDirectionAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionTextDirection) == TPCPreferencesReloadActionTextDirection) {
|
||||
[mainWindowTextField() updateTextDirection];
|
||||
|
||||
if (didReloadActiveStyle == NO) {
|
||||
@@ -366,29 +366,29 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
/* Text field font size */
|
||||
if ((reloadAction & TPCPreferencesReloadTextFieldFontSizeAction) == TPCPreferencesReloadTextFieldFontSizeAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionTextFieldFontSize) == TPCPreferencesReloadActionTextFieldFontSize) {
|
||||
[mainWindowTextField() updateTextBasedOnPreferredFontSize];
|
||||
}
|
||||
|
||||
/* Input history scope */
|
||||
if ((reloadAction & TPCPreferencesReloadInputHistoryScopeAction) == TPCPreferencesReloadInputHistoryScopeAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionInputHistoryScope) == TPCPreferencesReloadActionInputHistoryScope) {
|
||||
[mainWindow().inputHistoryManager noteInputHistoryObjectScopeDidChange];
|
||||
}
|
||||
|
||||
/* Sparkle framework update feed URL */
|
||||
#if TEXTUAL_BUILT_WITH_SPARKLE_ENABLED == 1
|
||||
if ((reloadAction & TPCPreferencesReloadSparkleFrameworkFeedURLAction) == TPCPreferencesReloadSparkleFrameworkFeedURLAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionSparkleFrameworkFeedURL) == TPCPreferencesReloadActionSparkleFrameworkFeedURL) {
|
||||
[masterController() prepareThirdPartyServiceSparkleFramework];
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Command index cache */
|
||||
if ((reloadAction & TPCPreferencesReloadIRCCommandCacheAction) == TPCPreferencesReloadIRCCommandCacheAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionIRCCommandCache) == TPCPreferencesReloadActionIRCCommandCache) {
|
||||
[IRCCommandIndex invalidateCaches];
|
||||
}
|
||||
|
||||
/* Transcript folder URL */
|
||||
if ((reloadAction & TPCPreferencesReloadLogTranscriptsAction) == TPCPreferencesReloadLogTranscriptsAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionLogTranscripts) == TPCPreferencesReloadActionLogTranscripts) {
|
||||
for (IRCClient *u in worldController().clientList) {
|
||||
[u reopenLogFileIfNeeded];
|
||||
|
||||
@@ -399,11 +399,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
/* Scrollback limit */
|
||||
if ((reloadAction & TPCPreferencesReloadScrollbackSaveLimitAction) == TPCPreferencesReloadScrollbackSaveLimitAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionScrollbackSaveLimit) == TPCPreferencesReloadActionScrollbackSaveLimit) {
|
||||
[TVCLogControllerHistoricLogSharedInstance() resetMaximumLineCount];
|
||||
}
|
||||
|
||||
if ((reloadAction & TPCPreferencesReloadScrollbackVisibleLimitAction) == TPCPreferencesReloadScrollbackSaveLimitAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionScrollbackVisibleLimit) == TPCPreferencesReloadActionScrollbackSaveLimit) {
|
||||
for (IRCClient *u in worldController().clientList) {
|
||||
[u.viewController changeScrollbackLimit];
|
||||
|
||||
@@ -414,13 +414,13 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
}
|
||||
|
||||
/* Channel view arrangement */
|
||||
if ((reloadAction & TPCPreferencesReloadChannelViewArrangementAction) == TPCPreferencesReloadChannelViewArrangementAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionChannelViewArrangement) == TPCPreferencesReloadActionChannelViewArrangement) {
|
||||
[mainWindow() updateChannelViewArrangement];
|
||||
}
|
||||
|
||||
/* Encryption policy */
|
||||
#if TEXTUAL_BUILT_WITH_ADVANCED_ENCRYPTION == 1
|
||||
if ((reloadAction & TPCPreferencesReloadEncryptionPolicyAction) == TPCPreferencesReloadEncryptionPolicyAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionEncryptionPolicy) == TPCPreferencesReloadActionEncryptionPolicy) {
|
||||
[sharedEncryptionManager() updatePolicy];
|
||||
|
||||
/* Maybe remove title bar accessory view if encryption is disabled. */
|
||||
@@ -429,7 +429,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
#endif
|
||||
|
||||
/* World controller preferences changed call */
|
||||
if ((reloadAction & TPCPreferencesReloadPreferencesChangedAction) == TPCPreferencesReloadPreferencesChangedAction) {
|
||||
if ((reloadAction & TPCPreferencesReloadActionPreferencesChanged) == TPCPreferencesReloadActionPreferencesChanged) {
|
||||
[worldController() preferencesChanged];
|
||||
|
||||
[mainWindow() preferencesChanged];
|
||||
|
||||
Executable → Regular
+36
-36
@@ -213,7 +213,7 @@ NSString * const TPCThemeControllerThemeListDidChangeNotification = @"TPCThemeC
|
||||
{
|
||||
|
||||
#if TEXTUAL_BUILT_WITH_ICLOUD_SUPPORT == 1
|
||||
fileLocation = TPCThemeControllerStorageCloudLocation;
|
||||
fileLocation = TPCThemeControllerStorageLocationCloud;
|
||||
|
||||
filePath = [[TPCPathInfo cloudCustomThemes] stringByAppendingPathComponent:fileName];
|
||||
#endif
|
||||
@@ -221,13 +221,13 @@ NSString * const TPCThemeControllerThemeListDidChangeNotification = @"TPCThemeC
|
||||
}
|
||||
else if ([fileSource isEqualToString:TPCThemeControllerCustomThemeNameBasicPrefix])
|
||||
{
|
||||
fileLocation = TPCThemeControllerStorageCustomLocation;
|
||||
fileLocation = TPCThemeControllerStorageLocationCustom;
|
||||
|
||||
filePath = [[TPCPathInfo customThemes] stringByAppendingPathComponent:fileName];
|
||||
}
|
||||
else
|
||||
{
|
||||
fileLocation = TPCThemeControllerStorageBundleLocation;
|
||||
fileLocation = TPCThemeControllerStorageLocationBundle;
|
||||
|
||||
filePath = [[TPCPathInfo bundledThemes] stringByAppendingPathComponent:fileName];
|
||||
}
|
||||
@@ -264,11 +264,11 @@ NSString * const TPCThemeControllerThemeListDidChangeNotification = @"TPCThemeC
|
||||
/* Try to find a theme by the stored name */
|
||||
NSString *themeName = [TPCPreferences themeName];
|
||||
|
||||
TPCThemeControllerStorageLocation storageLocation = TPCThemeControllerStorageUnknownLocation;
|
||||
TPCThemeControllerStorageLocation storageLocation = TPCThemeControllerStorageLocationUnknown;
|
||||
|
||||
NSString *themePath = [self.class pathOfThemeWithName:themeName storageLocation:&storageLocation];
|
||||
|
||||
NSAssert1((storageLocation != TPCThemeControllerStorageUnknownLocation),
|
||||
NSAssert1((storageLocation != TPCThemeControllerStorageLocationUnknown),
|
||||
@"Missing style resource files: %@", themeName);
|
||||
|
||||
self.baseURL = [NSURL fileURLWithPath:themePath isDirectory:YES];
|
||||
@@ -354,7 +354,7 @@ NSString * const TPCThemeControllerThemeListDidChangeNotification = @"TPCThemeC
|
||||
suppressionKey:suppressionKey
|
||||
suppressionText:nil
|
||||
completionBlock:^(TDCAlertResponse buttonClicked, BOOL suppressed, id underlyingAlert) {
|
||||
if (buttonClicked != TDCAlertResponseDefaultButton) {
|
||||
if (buttonClicked != TDCAlertResponseDefault) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -384,13 +384,13 @@ NSString * const TPCThemeControllerThemeListDidChangeNotification = @"TPCThemeC
|
||||
suppressionKey:suppressionKey
|
||||
suppressionText:nil
|
||||
completionBlock:^(TDCAlertResponse buttonClicked, BOOL suppressed, id underlyingAlert) {
|
||||
if (buttonClicked == TDCAlertResponseDefaultButton) {
|
||||
if (buttonClicked == TDCAlertResponseDefault) {
|
||||
return;
|
||||
}
|
||||
|
||||
[TPCPreferences setAppearance:TXPreferredAppearanceDarkType];
|
||||
[TPCPreferences setAppearance:TXPreferredAppearanceDark];
|
||||
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadAppearanceAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionAppearance];
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ NSString * const TPCThemeControllerThemeListDidChangeNotification = @"TPCThemeC
|
||||
if ([self resetPreferencesForActiveTheme]) {
|
||||
LogToConsoleInfo("Reloading theme because it failed validation");
|
||||
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadStyleAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionStyle];
|
||||
|
||||
return YES;
|
||||
} else {
|
||||
@@ -489,7 +489,7 @@ NSString * const TPCThemeControllerThemeListDidChangeNotification = @"TPCThemeC
|
||||
a cloud variant of it exists and if it does, prefer that over the custom. */
|
||||
|
||||
#if TEXTUAL_BUILT_WITH_ICLOUD_SUPPORT == 1
|
||||
NSString *cloudTheme = [self.class buildFilename:themeName forStorageLocation:TPCThemeControllerStorageCloudLocation];
|
||||
NSString *cloudTheme = [self.class buildFilename:themeName forStorageLocation:TPCThemeControllerStorageLocationCloud];
|
||||
|
||||
if ([self.class themeExists:cloudTheme]) {
|
||||
/* If the theme exists in the cloud, then we go to that. */
|
||||
@@ -503,7 +503,7 @@ NSString * const TPCThemeControllerThemeListDidChangeNotification = @"TPCThemeC
|
||||
|
||||
/* If there is no cloud theme, then we continue validation. */
|
||||
if ([self.class themeExists:validatedTheme] == NO) {
|
||||
NSString *bundledTheme = [self.class buildFilename:themeName forStorageLocation:TPCThemeControllerStorageBundleLocation];
|
||||
NSString *bundledTheme = [self.class buildFilename:themeName forStorageLocation:TPCThemeControllerStorageLocationBundle];
|
||||
|
||||
if ([self.class themeExists:bundledTheme]) {
|
||||
/* Use a bundled theme with the same name if available. */
|
||||
@@ -532,9 +532,9 @@ NSString * const TPCThemeControllerThemeListDidChangeNotification = @"TPCThemeC
|
||||
if ([self.class themeExists:validatedTheme] == NO) {
|
||||
/* If the current theme stored in the cloud is not valid, then we try to revert
|
||||
to a custom one or a bundled one depending which one is available. */
|
||||
NSString *customTheme = [self.class buildFilename:themeName forStorageLocation:TPCThemeControllerStorageCustomLocation];
|
||||
NSString *customTheme = [self.class buildFilename:themeName forStorageLocation:TPCThemeControllerStorageLocationCustom];
|
||||
|
||||
NSString *bundledTheme = [self.class buildFilename:themeName forStorageLocation:TPCThemeControllerStorageBundleLocation];
|
||||
NSString *bundledTheme = [self.class buildFilename:themeName forStorageLocation:TPCThemeControllerStorageLocationBundle];
|
||||
|
||||
if ([self.class themeExists:customTheme]) {
|
||||
/* Use a custom theme with the same name if available. */
|
||||
@@ -566,24 +566,24 @@ NSString * const TPCThemeControllerThemeListDidChangeNotification = @"TPCThemeC
|
||||
|
||||
- (BOOL)isBundledTheme
|
||||
{
|
||||
return (self.storageLocation == TPCThemeControllerStorageBundleLocation);
|
||||
return (self.storageLocation == TPCThemeControllerStorageLocationBundle);
|
||||
}
|
||||
|
||||
+ (nullable NSString *)buildFilename:(NSString *)name forStorageLocation:(TPCThemeControllerStorageLocation)storageLocation
|
||||
{
|
||||
NSParameterAssert(name != nil);
|
||||
NSParameterAssert(storageLocation != TPCThemeControllerStorageUnknownLocation);
|
||||
NSParameterAssert(storageLocation != TPCThemeControllerStorageLocationUnknown);
|
||||
|
||||
switch (storageLocation) {
|
||||
case TPCThemeControllerStorageBundleLocation:
|
||||
case TPCThemeControllerStorageLocationBundle:
|
||||
{
|
||||
return [TPCThemeControllerBundledThemeNameCompletePrefix stringByAppendingString:name];
|
||||
}
|
||||
case TPCThemeControllerStorageCustomLocation:
|
||||
case TPCThemeControllerStorageLocationCustom:
|
||||
{
|
||||
return [TPCThemeControllerCustomThemeNameCompletePrefix stringByAppendingString:name];
|
||||
}
|
||||
case TPCThemeControllerStorageCloudLocation:
|
||||
case TPCThemeControllerStorageLocationCloud:
|
||||
{
|
||||
return [TPCThemeControllerCloudThemeNameCompletePrefix stringByAppendingString:name];
|
||||
}
|
||||
@@ -599,15 +599,15 @@ NSString * const TPCThemeControllerThemeListDidChangeNotification = @"TPCThemeC
|
||||
+ (nullable NSString *)descriptionForStorageLocation:(TPCThemeControllerStorageLocation)storageLocation
|
||||
{
|
||||
switch (storageLocation) {
|
||||
case TPCThemeControllerStorageBundleLocation:
|
||||
case TPCThemeControllerStorageLocationBundle:
|
||||
{
|
||||
return TXTLS(@"BasicLanguage[7lm-bq]");
|
||||
}
|
||||
case TPCThemeControllerStorageCustomLocation:
|
||||
case TPCThemeControllerStorageLocationCustom:
|
||||
{
|
||||
return TXTLS(@"BasicLanguage[bm2-4p]");
|
||||
}
|
||||
case TPCThemeControllerStorageCloudLocation:
|
||||
case TPCThemeControllerStorageLocationCloud:
|
||||
{
|
||||
return TXTLS(@"BasicLanguage[aqy-6c]");
|
||||
}
|
||||
@@ -657,13 +657,13 @@ NSString * const TPCThemeControllerThemeListDidChangeNotification = @"TPCThemeC
|
||||
NSParameterAssert(themeName != nil);
|
||||
|
||||
if ([themeName hasPrefix:TPCThemeControllerCloudThemeNameCompletePrefix]) {
|
||||
return TPCThemeControllerStorageCloudLocation;
|
||||
return TPCThemeControllerStorageLocationCloud;
|
||||
} else if ([themeName hasPrefix:TPCThemeControllerCustomThemeNameCompletePrefix]) {
|
||||
return TPCThemeControllerStorageCustomLocation;
|
||||
return TPCThemeControllerStorageLocationCustom;
|
||||
} else if ([themeName hasPrefix:TPCThemeControllerBundledThemeNameCompletePrefix]) {
|
||||
return TPCThemeControllerStorageBundleLocation;
|
||||
return TPCThemeControllerStorageLocationBundle;
|
||||
} else {
|
||||
return TPCThemeControllerStorageUnknownLocation;
|
||||
return TPCThemeControllerStorageLocationUnknown;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -697,11 +697,11 @@ NSString * const TPCThemeControllerThemeListDidChangeNotification = @"TPCThemeC
|
||||
|
||||
NSMutableDictionary<NSNumber *, NSArray<NSString *> *> *themesMappedByLocation = [NSMutableDictionary dictionary];
|
||||
|
||||
themesMappedByLocation[@(TPCThemeControllerStorageBundleLocation)] = checkPath([TPCPathInfo bundledThemes]);
|
||||
themesMappedByLocation[@(TPCThemeControllerStorageCustomLocation)] = checkPath([TPCPathInfo customThemes]);
|
||||
themesMappedByLocation[@(TPCThemeControllerStorageLocationBundle)] = checkPath([TPCPathInfo bundledThemes]);
|
||||
themesMappedByLocation[@(TPCThemeControllerStorageLocationCustom)] = checkPath([TPCPathInfo customThemes]);
|
||||
|
||||
#if TEXTUAL_BUILT_WITH_ICLOUD_SUPPORT == 1
|
||||
[themesMappedByLocation setObject:checkPath([TPCPathInfo cloudCustomThemes]) forKey:@(TPCThemeControllerStorageCloudLocation)];
|
||||
[themesMappedByLocation setObject:checkPath([TPCPathInfo cloudCustomThemes]) forKey:@(TPCThemeControllerStorageLocationCloud)];
|
||||
#endif
|
||||
|
||||
/* Next translate result into a dictionary whoes key is the name of the
|
||||
@@ -833,7 +833,7 @@ void activeThemePathMonitorCallback(ConstFSEventStreamRef streamRef,
|
||||
else if (activeThemeContentsWereModified)
|
||||
{
|
||||
if ([TPCPreferences automaticallyReloadCustomThemesWhenTheyChange]) {
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadStyleAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionStyle];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -916,7 +916,7 @@ void activeThemePathMonitorCallback(ConstFSEventStreamRef streamRef,
|
||||
return;
|
||||
}
|
||||
|
||||
if (TPCThemeControllerStorageBundleLocation == destinationLocation) {
|
||||
if (TPCThemeControllerStorageLocationBundle == destinationLocation) {
|
||||
LogToConsoleError("Tried to copy active theme to the application itself");
|
||||
|
||||
return;
|
||||
@@ -985,7 +985,7 @@ void activeThemePathMonitorCallback(ConstFSEventStreamRef streamRef,
|
||||
return;
|
||||
|
||||
#if TEXTUAL_BUILT_WITH_ICLOUD_SUPPORT == 1
|
||||
if (self.destinationLocation == TPCThemeControllerStorageCloudLocation)
|
||||
if (self.destinationLocation == TPCThemeControllerStorageLocationCloud)
|
||||
{
|
||||
/* When copying to iCloud, we copy the style to a temporary folder then
|
||||
have OS X handle the transfer of said folder to iCloud on our behalf. */
|
||||
@@ -1054,19 +1054,19 @@ void activeThemePathMonitorCallback(ConstFSEventStreamRef streamRef,
|
||||
{
|
||||
NSString *destinationPath = nil;
|
||||
|
||||
if (self.destinationLocation == TPCThemeControllerStorageCustomLocation)
|
||||
if (self.destinationLocation == TPCThemeControllerStorageLocationCustom)
|
||||
{
|
||||
destinationPath = [TPCPathInfo customThemes];
|
||||
|
||||
#if TEXTUAL_BUILT_WITH_ICLOUD_SUPPORT == 1
|
||||
}
|
||||
else if (self.destinationLocation == TPCThemeControllerStorageCloudLocation)
|
||||
else if (self.destinationLocation == TPCThemeControllerStorageLocationCloud)
|
||||
{
|
||||
/* If the destination was set for the cloud, but the cloud is not available,
|
||||
then we update our destinationLocation property so that the theme controller
|
||||
actually will know where to look for the new theme. */
|
||||
if (sharedCloudManager().ubiquitousContainerIsAvailable == NO) {
|
||||
self.destinationLocation = TPCThemeControllerStorageCustomLocation;
|
||||
self.destinationLocation = TPCThemeControllerStorageLocationCustom;
|
||||
|
||||
destinationPath = [TPCPathInfo customThemes];
|
||||
} else {
|
||||
@@ -1118,7 +1118,7 @@ void activeThemePathMonitorCallback(ConstFSEventStreamRef streamRef,
|
||||
|
||||
[TPCPreferences setThemeName:newThemeName];
|
||||
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadStyleAction];
|
||||
[TPCPreferences performReloadAction:TPCPreferencesReloadActionStyle];
|
||||
}
|
||||
|
||||
/* Close progress indicator */
|
||||
|
||||
@@ -403,14 +403,14 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
id nicknameColorStyle = styleSettings[@"Nickname Color Style"];
|
||||
|
||||
if ([nicknameColorStyle isEqual:@"HSL-light"]) {
|
||||
self.nicknameColorStyle = TPCThemeSettingsNicknameColorHashHueLightStyle;
|
||||
self.nicknameColorStyle = TPCThemeSettingsNicknameColorStyleHashHueLight;
|
||||
} else if ([nicknameColorStyle isEqual:@"HSL-dark"]) {
|
||||
self.nicknameColorStyle = TPCThemeSettingsNicknameColorHashHueDarkStyle;
|
||||
self.nicknameColorStyle = TPCThemeSettingsNicknameColorStyleHashHueDark;
|
||||
} else {
|
||||
if (self.underlyingWindowColorIsDark == NO) {
|
||||
self.nicknameColorStyle = TPCThemeSettingsNicknameColorHashHueLightStyle;
|
||||
self.nicknameColorStyle = TPCThemeSettingsNicknameColorStyleHashHueLight;
|
||||
} else {
|
||||
self.nicknameColorStyle = TPCThemeSettingsNicknameColorHashHueDarkStyle;
|
||||
self.nicknameColorStyle = TPCThemeSettingsNicknameColorStyleHashHueDark;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user