From beade7b612e2c7e2a1dfda4809ccf1798d8b5a4e Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 17 Jul 2018 22:08:20 -0400 Subject: [PATCH] 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. --- Frameworks/Cocoa Extensions | 2 +- .../App/Classes/Controllers/TXAppearance.m | 40 +- .../Classes/Controllers/TXMenuController.m | 98 +- .../Buddy List/TDCBuddyListDialogTable.m | 6 +- .../File Transfers/TDCFileTransferDialog.m | 60 +- .../TDCFileTransferDialogTableCell.m | 52 +- .../TDCFileTransferDialogTransferController.m | 92 +- .../App Store/TDCInAppPurchaseDialog.m | 74 +- .../TDCInAppPurchaseUpgradeEligibilitySheet.m | 20 +- .../Standalone/TDCLicenseManagerDialog.m | 6 +- .../TDCLicenseUpgradeActivateSheet.m | 6 +- .../TDCLicenseUpgradeEligibilitySheet.m | 18 +- .../Preferences/TDCPreferencesController.m | 96 +- .../App/Classes/Dialogs/TDCAddressBookSheet.m | 28 +- Sources/App/Classes/Dialogs/TDCAlert.m | 26 +- .../Classes/Dialogs/TDCChannelBanListSheet.m | 8 +- .../Dialogs/TDCChannelPropertiesSheet.m | 32 +- Sources/App/Classes/Dialogs/TDCInputPrompt.m | 14 +- .../Dialogs/TDCServerPropertiesSheet.m | 52 +- Sources/App/Classes/Headers/IRCAddressBook.h | 22 +- .../Headers/IRCAddressBookUserTracking.h | 8 +- Sources/App/Classes/Headers/IRCChannel.h | 6 +- .../App/Classes/Headers/IRCChannelConfig.h | 6 +- Sources/App/Classes/Headers/IRCChannelUser.h | 16 +- Sources/App/Classes/Headers/IRCClient.h | 40 +- Sources/App/Classes/Headers/IRCColorFormat.h | 52 +- Sources/App/Classes/Headers/IRCCommandIndex.h | 449 +++------ Sources/App/Classes/Headers/IRCISupportInfo.h | 8 +- Sources/App/Classes/Headers/IRCWorld.h | 8 +- .../Private/IRCAddressBookMatchCachePrivate.h | 2 +- .../Headers/Private/IRCClientPrivate.h | 4 +- .../Private/TDCBuddyListDialogPrivate.h | 8 +- .../Private/TDCChannelBanListSheetPrivate.h | 8 +- .../Private/TDCFileTransferDialogPrivate.h | 36 +- .../Private/TDCInAppPurchaseDialogPrivate.h | 14 +- ...TDCInAppPurchaseProductTableEntryPrivate.h | 4 +- ...ppPurchaseUpgradeEligibilitySheetPrivate.h | 8 +- .../Private/TDCLicenseManagerDialogPrivate.h | 6 +- ...TDCLicenseUpgradeEligibilitySheetPrivate.h | 8 +- .../Private/TDCPreferencesControllerPrivate.h | 10 +- .../Private/TDCServerPropertiesSheetPrivate.h | 36 +- .../Headers/Private/THOPluginItemPrivate.h | 30 +- .../Headers/Private/THOPluginManagerPrivate.h | 4 +- .../Private/TLOAppStoreManagerPrivate.h | 22 +- .../TLOLicenseManagerDownloaderPrivate.h | 10 +- .../Private/TLOLicenseManagerPrivate.h | 16 +- .../TLONotificationConfigurationPrivate.h | 8 +- .../Private/TPCPreferencesLocalPrivate.h | 2 +- .../Headers/Private/TVCMainWindowPrivate.h | 8 +- .../Headers/Private/TXMenuControllerPrivate.h | 2 +- Sources/App/Classes/Headers/TDCAlert.h | 6 +- Sources/App/Classes/Headers/TDCInputPrompt.h | 2 +- .../App/Classes/Headers/THOPluginProtocol.h | 4 +- .../App/Classes/Headers/TLOGrowlController.h | 38 +- .../TPCPreferencesCloudSyncExtension.h | 4 +- .../App/Classes/Headers/TPCPreferencesLocal.h | 89 +- .../Classes/Headers/TPCPreferencesReload.h | 54 +- .../App/Classes/Headers/TPCThemeController.h | 10 +- .../App/Classes/Headers/TPCThemeSettings.h | 4 +- Sources/App/Classes/Headers/TVCAlert.h | 12 +- .../App/Classes/Headers/TVCLogController.h | 2 +- Sources/App/Classes/Headers/TVCLogLine.h | 48 +- Sources/App/Classes/Headers/TVCLogRenderer.h | 35 +- Sources/App/Classes/Headers/TVCMainWindow.h | 20 +- .../Headers/TVCTextViewWithIRCFormatter.h | 8 +- Sources/App/Classes/Headers/TXAppearance.h | 20 +- .../App/Classes/Headers/TXSharedApplication.h | 2 +- .../Cocoa (Objective-C)/NSStringHelper.m | 20 +- .../Plugin Architecture/THOPluginDispatcher.m | 18 +- .../Plugin Architecture/THOPluginItem.m | 28 +- .../Plugin Architecture/THOPluginManager.m | 38 +- Sources/App/Classes/IRC/IRCAddressBook.m | 28 +- .../Classes/IRC/IRCAddressBookMatchCache.m | 8 +- .../Classes/IRC/IRCAddressBookUserTracking.m | 22 +- Sources/App/Classes/IRC/IRCChannel.m | 14 +- Sources/App/Classes/IRC/IRCChannelConfig.m | 6 +- Sources/App/Classes/IRC/IRCChannelMode.m | 8 +- Sources/App/Classes/IRC/IRCClient.m | 862 +++++++++--------- Sources/App/Classes/IRC/IRCClientConfig.m | 2 +- .../Classes/IRC/IRCClientRequestedCommands.m | 68 +- .../App/Classes/IRC/IRCHighlightLogEntry.m | 2 +- Sources/App/Classes/IRC/IRCISupportInfo.m | 8 +- Sources/App/Classes/IRC/IRCWorld.m | 10 +- .../App/Classes/IRC/Users/IRCChannelUser.m | 30 +- Sources/App/Classes/IRC/Users/IRCUser.m | 8 +- .../IRCUserNicknameColorStyleGenerator.m | 2 +- .../Library/Color Formatting/IRCColorFormat.m | 112 +-- .../App Store/TLOAppStoreManager.m | 36 +- .../Standalone/TLOLicenseManager.m | 34 +- .../Standalone/TLOLicenseManagerDownloader.m | 60 +- .../Classes/Library/TLOEncryptionManager.m | 2 +- .../App/Classes/Library/TLOGrowlController.m | 86 +- .../Library/TLOInternetAddressLookup.m | 2 +- .../App/Classes/Library/TLOLinkParser.swift | 8 +- Sources/App/Classes/Library/TLOPopupPrompts.m | 4 +- .../Preferences/TPCPreferencesImportExport.m | 4 +- .../Classes/Preferences/TPCPreferencesLocal.m | 62 +- .../Preferences/TPCPreferencesReload.m | 102 +-- .../Preferences/Themes/TPCThemeController.m | 72 +- .../Preferences/Themes/TPCThemeSettings.m | 8 +- .../iCloud/TPCPreferencesCloudSyncExtension.m | 4 +- .../Views/Channel View/TVCLogController.m | 14 +- .../Classes/Views/Channel View/TVCLogLine.m | 68 +- .../Views/Channel View/TVCLogRenderer.m | 46 +- .../Channel View/TVCLogScriptEventSink.m | 6 +- Sources/App/Classes/Views/Errors/TVCAlert.m | 4 +- .../Input Text Field/TVCTextFormatterMenu.m | 70 +- .../TVCTextViewWithIRCFormatter.m | 10 +- .../Classes/Views/Main Window/TVCMainWindow.m | 86 +- .../Views/Main Window/TVCMainWindowTextView.m | 4 +- .../TVCMainWindowTextViewAppearance.m | 8 +- .../Server List/TVCServerListAppearance.m | 40 +- Sources/App/Classes/Views/TVCAppearance.m | 16 +- .../Classes/Views/User List/TVCMemberList.m | 16 +- .../Views/User List/TVCMemberListCell.m | 32 +- .../Plugins/Brag Spam/Classes/TPIBragSpam.m | 18 +- .../Chat Filter/Classes/TPI_ChatFilter.h | 34 +- .../Chat Filter/Classes/TPI_ChatFilter.m | 40 +- .../Classes/TPI_ChatFilterEditFilterSheet.h | 16 +- .../Classes/TPI_ChatFilterEditFilterSheet.m | 74 +- .../Chat Filter/Classes/TPI_ChatFilterLogic.m | 36 +- .../Classes/TPISmileyConverter.m | 4 +- Sources/Shared/Headers/IRCConnectionErrors.h | 2 +- .../Headers/TPCPreferencesUserDefaults.h | 2 +- .../Classes/HLSHistoricLogProcessMain.m | 12 +- .../Headers/Private/ICLProcessPCHPrivate.h | 2 +- .../Modules/Twitch Live/ICMTwitchLive.m | 26 +- 127 files changed, 2133 insertions(+), 2280 deletions(-) mode change 100755 => 100644 Sources/App/Classes/IRC/IRCChannel.m mode change 100755 => 100644 Sources/App/Classes/IRC/IRCClient.m mode change 100755 => 100644 Sources/App/Classes/IRC/IRCWorld.m mode change 100755 => 100644 Sources/App/Classes/Library/Color Formatting/IRCColorFormat.m mode change 100755 => 100644 Sources/App/Classes/Preferences/Themes/TPCThemeController.m mode change 100755 => 100644 Sources/App/Classes/Views/Channel View/TVCLogController.m mode change 100755 => 100644 Sources/App/Classes/Views/Channel View/TVCLogRenderer.m mode change 100755 => 100644 Sources/App/Classes/Views/Main Window/TVCMainWindow.m diff --git a/Frameworks/Cocoa Extensions b/Frameworks/Cocoa Extensions index 093c63fbc..8f1d9801e 160000 --- a/Frameworks/Cocoa Extensions +++ b/Frameworks/Cocoa Extensions @@ -1 +1 @@ -Subproject commit 093c63fbc03d2da11e1146e1c7086619929fad6e +Subproject commit 8f1d9801e50602e2a95562dec24ea9408c8ea3d8 diff --git a/Sources/App/Classes/Controllers/TXAppearance.m b/Sources/App/Classes/Controllers/TXAppearance.m index 2a61c98bd..adf1bcf1b 100644 --- a/Sources/App/Classes/Controllers/TXAppearance.m +++ b/Sources/App/Classes/Controllers/TXAppearance.m @@ -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 diff --git a/Sources/App/Classes/Controllers/TXMenuController.m b/Sources/App/Classes/Controllers/TXMenuController.m index 386f87134..5a20c725a 100755 --- a/Sources/App/Classes/Controllers/TXMenuController.m +++ b/Sources/App/Classes/Controllers/TXMenuController.m @@ -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]; } diff --git a/Sources/App/Classes/Dialogs/Buddy List/TDCBuddyListDialogTable.m b/Sources/App/Classes/Dialogs/Buddy List/TDCBuddyListDialogTable.m index 689ea7d26..4e09d412d 100644 --- a/Sources/App/Classes/Dialogs/Buddy List/TDCBuddyListDialogTable.m +++ b/Sources/App/Classes/Dialogs/Buddy List/TDCBuddyListDialogTable.m @@ -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"; diff --git a/Sources/App/Classes/Dialogs/File Transfers/TDCFileTransferDialog.m b/Sources/App/Classes/Dialogs/File Transfers/TDCFileTransferDialog.m index faf5bfac5..03980b2fb 100755 --- a/Sources/App/Classes/Dialogs/File Transfers/TDCFileTransferDialog.m +++ b/Sources/App/Classes/Dialogs/File Transfers/TDCFileTransferDialog.m @@ -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; } diff --git a/Sources/App/Classes/Dialogs/File Transfers/TDCFileTransferDialogTableCell.m b/Sources/App/Classes/Dialogs/File Transfers/TDCFileTransferDialogTableCell.m index 6c60c3eea..847192a10 100755 --- a/Sources/App/Classes/Dialogs/File Transfers/TDCFileTransferDialogTableCell.m +++ b/Sources/App/Classes/Dialogs/File Transfers/TDCFileTransferDialogTableCell.m @@ -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); diff --git a/Sources/App/Classes/Dialogs/File Transfers/TDCFileTransferDialogTransferController.m b/Sources/App/Classes/Dialogs/File Transfers/TDCFileTransferDialogTransferController.m index d80a96b22..226fa89b4 100755 --- a/Sources/App/Classes/Dialogs/File Transfers/TDCFileTransferDialogTransferController.m +++ b/Sources/App/Classes/Dialogs/File Transfers/TDCFileTransferDialogTransferController.m @@ -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; } diff --git a/Sources/App/Classes/Dialogs/License Manager/App Store/TDCInAppPurchaseDialog.m b/Sources/App/Classes/Dialogs/License Manager/App Store/TDCInAppPurchaseDialog.m index 7b85a00fc..93da1a70e 100644 --- a/Sources/App/Classes/Dialogs/License Manager/App Store/TDCInAppPurchaseDialog.m +++ b/Sources/App/Classes/Dialogs/License Manager/App Store/TDCInAppPurchaseDialog.m @@ -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]; } diff --git a/Sources/App/Classes/Dialogs/License Manager/App Store/TDCInAppPurchaseUpgradeEligibilitySheet.m b/Sources/App/Classes/Dialogs/License Manager/App Store/TDCInAppPurchaseUpgradeEligibilitySheet.m index 59ad2b4a7..8fa1c106e 100644 --- a/Sources/App/Classes/Dialogs/License Manager/App Store/TDCInAppPurchaseUpgradeEligibilitySheet.m +++ b/Sources/App/Classes/Dialogs/License Manager/App Store/TDCInAppPurchaseUpgradeEligibilitySheet.m @@ -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; } diff --git a/Sources/App/Classes/Dialogs/License Manager/Standalone/TDCLicenseManagerDialog.m b/Sources/App/Classes/Dialogs/License Manager/Standalone/TDCLicenseManagerDialog.m index a25212517..da6f06ac9 100644 --- a/Sources/App/Classes/Dialogs/License Manager/Standalone/TDCLicenseManagerDialog.m +++ b/Sources/App/Classes/Dialogs/License Manager/Standalone/TDCLicenseManagerDialog.m @@ -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; } diff --git a/Sources/App/Classes/Dialogs/License Manager/Standalone/TDCLicenseUpgradeActivateSheet.m b/Sources/App/Classes/Dialogs/License Manager/Standalone/TDCLicenseUpgradeActivateSheet.m index da7c09068..b55c1a75e 100644 --- a/Sources/App/Classes/Dialogs/License Manager/Standalone/TDCLicenseUpgradeActivateSheet.m +++ b/Sources/App/Classes/Dialogs/License Manager/Standalone/TDCLicenseUpgradeActivateSheet.m @@ -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; diff --git a/Sources/App/Classes/Dialogs/License Manager/Standalone/TDCLicenseUpgradeEligibilitySheet.m b/Sources/App/Classes/Dialogs/License Manager/Standalone/TDCLicenseUpgradeEligibilitySheet.m index 40f4e8abe..3543183b8 100644 --- a/Sources/App/Classes/Dialogs/License Manager/Standalone/TDCLicenseUpgradeEligibilitySheet.m +++ b/Sources/App/Classes/Dialogs/License Manager/Standalone/TDCLicenseUpgradeEligibilitySheet.m @@ -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; } diff --git a/Sources/App/Classes/Dialogs/Preferences/TDCPreferencesController.m b/Sources/App/Classes/Dialogs/Preferences/TDCPreferencesController.m index 4f12b4876..105dba5a2 100644 --- a/Sources/App/Classes/Dialogs/Preferences/TDCPreferencesController.m +++ b/Sources/App/Classes/Dialogs/Preferences/TDCPreferencesController.m @@ -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]; } } } diff --git a/Sources/App/Classes/Dialogs/TDCAddressBookSheet.m b/Sources/App/Classes/Dialogs/TDCAddressBookSheet.m index ed6dd43b1..9b5390f6a 100755 --- a/Sources/App/Classes/Dialogs/TDCAddressBookSheet.m +++ b/Sources/App/Classes/Dialogs/TDCAddressBookSheet.m @@ -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]; } diff --git a/Sources/App/Classes/Dialogs/TDCAlert.m b/Sources/App/Classes/Dialogs/TDCAlert.m index dbb6aa832..ad1a478ca 100755 --- a/Sources/App/Classes/Dialogs/TDCAlert.m +++ b/Sources/App/Classes/Dialogs/TDCAlert.m @@ -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; } } } diff --git a/Sources/App/Classes/Dialogs/TDCChannelBanListSheet.m b/Sources/App/Classes/Dialogs/TDCChannelBanListSheet.m index 0d894e999..0a1e75db7 100755 --- a/Sources/App/Classes/Dialogs/TDCChannelBanListSheet.m +++ b/Sources/App/Classes/Dialogs/TDCChannelBanListSheet.m @@ -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); } diff --git a/Sources/App/Classes/Dialogs/TDCChannelPropertiesSheet.m b/Sources/App/Classes/Dialogs/TDCChannelPropertiesSheet.m index 81d024a0d..1a970baa5 100755 --- a/Sources/App/Classes/Dialogs/TDCChannelPropertiesSheet.m +++ b/Sources/App/Classes/Dialogs/TDCChannelPropertiesSheet.m @@ -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; diff --git a/Sources/App/Classes/Dialogs/TDCInputPrompt.m b/Sources/App/Classes/Dialogs/TDCInputPrompt.m index e62c5c722..4cc15efc0 100755 --- a/Sources/App/Classes/Dialogs/TDCInputPrompt.m +++ b/Sources/App/Classes/Dialogs/TDCInputPrompt.m @@ -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; diff --git a/Sources/App/Classes/Dialogs/TDCServerPropertiesSheet.m b/Sources/App/Classes/Dialogs/TDCServerPropertiesSheet.m index 6c0f60fbc..5e2147f4f 100755 --- a/Sources/App/Classes/Dialogs/TDCServerPropertiesSheet.m +++ b/Sources/App/Classes/Dialogs/TDCServerPropertiesSheet.m @@ -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]"); diff --git a/Sources/App/Classes/Headers/IRCAddressBook.h b/Sources/App/Classes/Headers/IRCAddressBook.h index 473aa29b1..dc693d504 100755 --- a/Sources/App/Classes/Headers/IRCAddressBook.h +++ b/Sources/App/Classes/Headers/IRCAddressBook.h @@ -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 *parentEntries; diff --git a/Sources/App/Classes/Headers/IRCAddressBookUserTracking.h b/Sources/App/Classes/Headers/IRCAddressBookUserTracking.h index c47483a37..375e07639 100644 --- a/Sources/App/Classes/Headers/IRCAddressBookUserTracking.h +++ b/Sources/App/Classes/Headers/IRCAddressBookUserTracking.h @@ -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; diff --git a/Sources/App/Classes/Headers/IRCChannel.h b/Sources/App/Classes/Headers/IRCChannel.h index a26f48acc..c8315d173 100755 --- a/Sources/App/Classes/Headers/IRCChannel.h +++ b/Sources/App/Classes/Headers/IRCChannel.h @@ -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; diff --git a/Sources/App/Classes/Headers/IRCChannelConfig.h b/Sources/App/Classes/Headers/IRCChannelConfig.h index 6398cfeda..cd849484e 100755 --- a/Sources/App/Classes/Headers/IRCChannelConfig.h +++ b/Sources/App/Classes/Headers/IRCChannelConfig.h @@ -41,9 +41,9 @@ NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, IRCChannelType) { - IRCChannelChannelType = 0, - IRCChannelPrivateMessageType, - IRCChannelUtilityType, + IRCChannelTypeChannel = 0, + IRCChannelTypePrivateMessage, + IRCChannelTypeUtility, }; #pragma mark - diff --git a/Sources/App/Classes/Headers/IRCChannelUser.h b/Sources/App/Classes/Headers/IRCChannelUser.h index 253c9e317..63f55367a 100755 --- a/Sources/App/Classes/Headers/IRCChannelUser.h +++ b/Sources/App/Classes/Headers/IRCChannelUser.h @@ -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. diff --git a/Sources/App/Classes/Headers/IRCClient.h b/Sources/App/Classes/Headers/IRCClient.h index a920e5a1c..6828deb27 100755 --- a/Sources/App/Classes/Headers/IRCClient.h +++ b/Sources/App/Classes/Headers/IRCClient.h @@ -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 @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; diff --git a/Sources/App/Classes/Headers/IRCColorFormat.h b/Sources/App/Classes/Headers/IRCColorFormat.h index 26bf183f1..7b7c070ee 100755 --- a/Sources/App/Classes/Headers/IRCColorFormat.h +++ b/Sources/App/Classes/Headers/IRCColorFormat.h @@ -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; diff --git a/Sources/App/Classes/Headers/IRCCommandIndex.h b/Sources/App/Classes/Headers/IRCCommandIndex.h index c80acfaef..b4b7e8f43 100644 --- a/Sources/App/Classes/Headers/IRCCommandIndex.h +++ b/Sources/App/Classes/Headers/IRCCommandIndex.h @@ -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 diff --git a/Sources/App/Classes/Headers/IRCISupportInfo.h b/Sources/App/Classes/Headers/IRCISupportInfo.h index 6ae382313..1f8951952 100755 --- a/Sources/App/Classes/Headers/IRCISupportInfo.h +++ b/Sources/App/Classes/Headers/IRCISupportInfo.h @@ -42,10 +42,10 @@ NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, IRCISupportInfoListType) { - IRCISupportInfoBanListType, - IRCISupportInfoBanExceptionListType, - IRCISupportInfoInviteExceptionListType, - IRCISupportInfoQuietListType + IRCISupportInfoListTypeBan, + IRCISupportInfoListTypeBanException, + IRCISupportInfoListTypeInviteException, + IRCISupportInfoListTypeQuiet }; #define IRCISupportInfoHighestUserPrefixRank 100 diff --git a/Sources/App/Classes/Headers/IRCWorld.h b/Sources/App/Classes/Headers/IRCWorld.h index 53315a4f3..28c2b1c4c 100755 --- a/Sources/App/Classes/Headers/IRCWorld.h +++ b/Sources/App/Classes/Headers/IRCWorld.h @@ -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; diff --git a/Sources/App/Classes/Headers/Private/IRCAddressBookMatchCachePrivate.h b/Sources/App/Classes/Headers/Private/IRCAddressBookMatchCachePrivate.h index 84cb6bcc1..8b4088107 100644 --- a/Sources/App/Classes/Headers/Private/IRCAddressBookMatchCachePrivate.h +++ b/Sources/App/Classes/Headers/Private/IRCAddressBookMatchCachePrivate.h @@ -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 *)findIgnoresForHostmask:(NSString *)hostmask; diff --git a/Sources/App/Classes/Headers/Private/IRCClientPrivate.h b/Sources/App/Classes/Headers/Private/IRCClientPrivate.h index b98e3c30a..2166c0a5f 100644 --- a/Sources/App/Classes/Headers/Private/IRCClientPrivate.h +++ b/Sources/App/Classes/Headers/Private/IRCClientPrivate.h @@ -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; diff --git a/Sources/App/Classes/Headers/Private/TDCBuddyListDialogPrivate.h b/Sources/App/Classes/Headers/Private/TDCBuddyListDialogPrivate.h index 81cc68f45..5c21d3737 100644 --- a/Sources/App/Classes/Headers/Private/TDCBuddyListDialogPrivate.h +++ b/Sources/App/Classes/Headers/Private/TDCBuddyListDialogPrivate.h @@ -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; diff --git a/Sources/App/Classes/Headers/Private/TDCChannelBanListSheetPrivate.h b/Sources/App/Classes/Headers/Private/TDCChannelBanListSheetPrivate.h index 2d0efdf6a..c679d259d 100755 --- a/Sources/App/Classes/Headers/Private/TDCChannelBanListSheetPrivate.h +++ b/Sources/App/Classes/Headers/Private/TDCChannelBanListSheetPrivate.h @@ -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 diff --git a/Sources/App/Classes/Headers/Private/TDCFileTransferDialogPrivate.h b/Sources/App/Classes/Headers/Private/TDCFileTransferDialogPrivate.h index 83346c94f..25f2c9f9a 100755 --- a/Sources/App/Classes/Headers/Private/TDCFileTransferDialogPrivate.h +++ b/Sources/App/Classes/Headers/Private/TDCFileTransferDialogPrivate.h @@ -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; diff --git a/Sources/App/Classes/Headers/Private/TDCInAppPurchaseDialogPrivate.h b/Sources/App/Classes/Headers/Private/TDCInAppPurchaseDialogPrivate.h index c0e27e109..5857b0b19 100644 --- a/Sources/App/Classes/Headers/Private/TDCInAppPurchaseDialogPrivate.h +++ b/Sources/App/Classes/Headers/Private/TDCInAppPurchaseDialogPrivate.h @@ -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; diff --git a/Sources/App/Classes/Headers/Private/TDCInAppPurchaseProductTableEntryPrivate.h b/Sources/App/Classes/Headers/Private/TDCInAppPurchaseProductTableEntryPrivate.h index a123457ee..6f30c35ca 100644 --- a/Sources/App/Classes/Headers/Private/TDCInAppPurchaseProductTableEntryPrivate.h +++ b/Sources/App/Classes/Headers/Private/TDCInAppPurchaseProductTableEntryPrivate.h @@ -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 diff --git a/Sources/App/Classes/Headers/Private/TDCInAppPurchaseUpgradeEligibilitySheetPrivate.h b/Sources/App/Classes/Headers/Private/TDCInAppPurchaseUpgradeEligibilitySheetPrivate.h index 1f0c35bbe..b9ea24b0b 100644 --- a/Sources/App/Classes/Headers/Private/TDCInAppPurchaseUpgradeEligibilitySheetPrivate.h +++ b/Sources/App/Classes/Headers/Private/TDCInAppPurchaseUpgradeEligibilitySheetPrivate.h @@ -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; diff --git a/Sources/App/Classes/Headers/Private/TDCLicenseManagerDialogPrivate.h b/Sources/App/Classes/Headers/Private/TDCLicenseManagerDialogPrivate.h index e62524748..7b5e98268 100644 --- a/Sources/App/Classes/Headers/Private/TDCLicenseManagerDialogPrivate.h +++ b/Sources/App/Classes/Headers/Private/TDCLicenseManagerDialogPrivate.h @@ -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; diff --git a/Sources/App/Classes/Headers/Private/TDCLicenseUpgradeEligibilitySheetPrivate.h b/Sources/App/Classes/Headers/Private/TDCLicenseUpgradeEligibilitySheetPrivate.h index 29e99a787..7137baf57 100644 --- a/Sources/App/Classes/Headers/Private/TDCLicenseUpgradeEligibilitySheetPrivate.h +++ b/Sources/App/Classes/Headers/Private/TDCLicenseUpgradeEligibilitySheetPrivate.h @@ -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; diff --git a/Sources/App/Classes/Headers/Private/TDCPreferencesControllerPrivate.h b/Sources/App/Classes/Headers/Private/TDCPreferencesControllerPrivate.h index 6bad911a8..45f732eea 100755 --- a/Sources/App/Classes/Headers/Private/TDCPreferencesControllerPrivate.h +++ b/Sources/App/Classes/Headers/Private/TDCPreferencesControllerPrivate.h @@ -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 diff --git a/Sources/App/Classes/Headers/Private/TDCServerPropertiesSheetPrivate.h b/Sources/App/Classes/Headers/Private/TDCServerPropertiesSheetPrivate.h index bcf702753..53f35052e 100755 --- a/Sources/App/Classes/Headers/Private/TDCServerPropertiesSheetPrivate.h +++ b/Sources/App/Classes/Headers/Private/TDCServerPropertiesSheetPrivate.h @@ -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 - (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 diff --git a/Sources/App/Classes/Headers/Private/THOPluginItemPrivate.h b/Sources/App/Classes/Headers/Private/THOPluginItemPrivate.h index 9c0aa7120..ffcd7b363 100755 --- a/Sources/App/Classes/Headers/Private/THOPluginItemPrivate.h +++ b/Sources/App/Classes/Headers/Private/THOPluginItemPrivate.h @@ -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 *supportedServerInputCommands; @property (readonly, copy, nullable) NSArray *supportedUserInputCommands; @property (readonly, copy, nullable) NSArray *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 diff --git a/Sources/App/Classes/Headers/Private/THOPluginManagerPrivate.h b/Sources/App/Classes/Headers/Private/THOPluginManagerPrivate.h index 8b230aaf0..31e801bf7 100644 --- a/Sources/App/Classes/Headers/Private/THOPluginManagerPrivate.h +++ b/Sources/App/Classes/Headers/Private/THOPluginManagerPrivate.h @@ -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 *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 diff --git a/Sources/App/Classes/Headers/Private/TLOAppStoreManagerPrivate.h b/Sources/App/Classes/Headers/Private/TLOAppStoreManagerPrivate.h index c063fe5c4..af85ed84b 100644 --- a/Sources/App/Classes/Headers/Private/TLOAppStoreManagerPrivate.h +++ b/Sources/App/Classes/Headers/Private/TLOAppStoreManagerPrivate.h @@ -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 *TLOAppStorePurchasedProducts(void); -TEXTUAL_EXTERN TLOAppStoreIAPProduct TLOAppStoreProductFromProductIdentifier(NSString *productIdentifier); +TEXTUAL_EXTERN TLOAppStoreIAPProduct TLOAppStoreProductFromProductIdentifier(TLOAppStoreIAPProductIdentifier productIdentifier); NS_ASSUME_NONNULL_END #endif diff --git a/Sources/App/Classes/Headers/Private/TLOLicenseManagerDownloaderPrivate.h b/Sources/App/Classes/Headers/Private/TLOLicenseManagerDownloaderPrivate.h index b683caf1d..50c329180 100644 --- a/Sources/App/Classes/Headers/Private/TLOLicenseManagerDownloaderPrivate.h +++ b/Sources/App/Classes/Headers/Private/TLOLicenseManagerDownloaderPrivate.h @@ -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; diff --git a/Sources/App/Classes/Headers/Private/TLOLicenseManagerPrivate.h b/Sources/App/Classes/Headers/Private/TLOLicenseManagerPrivate.h index 47f254c00..26bd81835 100644 --- a/Sources/App/Classes/Headers/Private/TLOLicenseManagerPrivate.h +++ b/Sources/App/Classes/Headers/Private/TLOLicenseManagerPrivate.h @@ -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; diff --git a/Sources/App/Classes/Headers/Private/TLONotificationConfigurationPrivate.h b/Sources/App/Classes/Headers/Private/TLONotificationConfigurationPrivate.h index e8ab21ec2..e38d48bbb 100644 --- a/Sources/App/Classes/Headers/Private/TLONotificationConfigurationPrivate.h +++ b/Sources/App/Classes/Headers/Private/TLONotificationConfigurationPrivate.h @@ -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; diff --git a/Sources/App/Classes/Headers/Private/TPCPreferencesLocalPrivate.h b/Sources/App/Classes/Headers/Private/TPCPreferencesLocalPrivate.h index 64661b612..2af01bb3b 100644 --- a/Sources/App/Classes/Headers/Private/TPCPreferencesLocalPrivate.h +++ b/Sources/App/Classes/Headers/Private/TPCPreferencesLocalPrivate.h @@ -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; diff --git a/Sources/App/Classes/Headers/Private/TVCMainWindowPrivate.h b/Sources/App/Classes/Headers/Private/TVCMainWindowPrivate.h index 02829fc20..a4e6a21ee 100644 --- a/Sources/App/Classes/Headers/Private/TVCMainWindowPrivate.h +++ b/Sources/App/Classes/Headers/Private/TVCMainWindowPrivate.h @@ -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) { diff --git a/Sources/App/Classes/Headers/Private/TXMenuControllerPrivate.h b/Sources/App/Classes/Headers/Private/TXMenuControllerPrivate.h index 76be6e52d..02ac36f67 100755 --- a/Sources/App/Classes/Headers/Private/TXMenuControllerPrivate.h +++ b/Sources/App/Classes/Headers/Private/TXMenuControllerPrivate.h @@ -65,7 +65,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)memberSendDroppedFiles:(NSArray *)files row:(NSUInteger)row; - (void)memberSendDroppedFilesToSelectedChannel:(NSArray *)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; diff --git a/Sources/App/Classes/Headers/TDCAlert.h b/Sources/App/Classes/Headers/TDCAlert.h index 4ae86c165..37ea8b464 100755 --- a/Sources/App/Classes/Headers/TDCAlert.h +++ b/Sources/App/Classes/Headers/TDCAlert.h @@ -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); diff --git a/Sources/App/Classes/Headers/TDCInputPrompt.h b/Sources/App/Classes/Headers/TDCInputPrompt.h index 1a5fc3e90..0a4d4a6a0 100755 --- a/Sources/App/Classes/Headers/TDCInputPrompt.h +++ b/Sources/App/Classes/Headers/TDCInputPrompt.h @@ -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 diff --git a/Sources/App/Classes/Headers/THOPluginProtocol.h b/Sources/App/Classes/Headers/THOPluginProtocol.h index d20a69e26..dd002f1ee 100755 --- a/Sources/App/Classes/Headers/THOPluginProtocol.h +++ b/Sources/App/Classes/Headers/THOPluginProtocol.h @@ -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` diff --git a/Sources/App/Classes/Headers/TLOGrowlController.h b/Sources/App/Classes/Headers/TLOGrowlController.h index 8bec9cac5..ec5059184 100644 --- a/Sources/App/Classes/Headers/TLOGrowlController.h +++ b/Sources/App/Classes/Headers/TLOGrowlController.h @@ -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 diff --git a/Sources/App/Classes/Headers/TPCPreferencesCloudSyncExtension.h b/Sources/App/Classes/Headers/TPCPreferencesCloudSyncExtension.h index e318cbb04..b2dd659d2 100644 --- a/Sources/App/Classes/Headers/TPCPreferencesCloudSyncExtension.h +++ b/Sources/App/Classes/Headers/TPCPreferencesCloudSyncExtension.h @@ -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; diff --git a/Sources/App/Classes/Headers/TPCPreferencesLocal.h b/Sources/App/Classes/Headers/TPCPreferencesLocal.h index 0791d4858..e63a7f67e 100755 --- a/Sources/App/Classes/Headers/TPCPreferencesLocal.h +++ b/Sources/App/Classes/Headers/TPCPreferencesLocal.h @@ -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; diff --git a/Sources/App/Classes/Headers/TPCPreferencesReload.h b/Sources/App/Classes/Headers/TPCPreferencesReload.h index e01233f03..a63ab0825 100644 --- a/Sources/App/Classes/Headers/TPCPreferencesReload.h +++ b/Sources/App/Classes/Headers/TPCPreferencesReload.h @@ -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 *)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 diff --git a/Sources/App/Classes/Headers/TPCThemeController.h b/Sources/App/Classes/Headers/TPCThemeController.h index 95fb56f6d..6fd47e519 100755 --- a/Sources/App/Classes/Headers/TPCThemeController.h +++ b/Sources/App/Classes/Headers/TPCThemeController.h @@ -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 diff --git a/Sources/App/Classes/Headers/TPCThemeSettings.h b/Sources/App/Classes/Headers/TPCThemeSettings.h index dd9fe9b8c..fc5908bd0 100755 --- a/Sources/App/Classes/Headers/TPCThemeSettings.h +++ b/Sources/App/Classes/Headers/TPCThemeSettings.h @@ -47,8 +47,8 @@ NS_ASSUME_NONNULL_BEGIN #define TPCThemeSettingsLatestTemplateEngineVersion 3 typedef NS_ENUM(NSUInteger, TPCThemeSettingsNicknameColorStyle) { - TPCThemeSettingsNicknameColorHashHueDarkStyle, - TPCThemeSettingsNicknameColorHashHueLightStyle + TPCThemeSettingsNicknameColorStyleHashHueDark, + TPCThemeSettingsNicknameColorStyleHashHueLight }; @class GRMustacheTemplate; diff --git a/Sources/App/Classes/Headers/TVCAlert.h b/Sources/App/Classes/Headers/TVCAlert.h index 8312820a7..b78c7c115 100755 --- a/Sources/App/Classes/Headers/TVCAlert.h +++ b/Sources/App/Classes/Headers/TVCAlert.h @@ -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 diff --git a/Sources/App/Classes/Headers/TVCLogController.h b/Sources/App/Classes/Headers/TVCLogController.h index 8ee46ffb4..a9834d149 100755 --- a/Sources/App/Classes/Headers/TVCLogController.h +++ b/Sources/App/Classes/Headers/TVCLogController.h @@ -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; diff --git a/Sources/App/Classes/Headers/TVCLogLine.h b/Sources/App/Classes/Headers/TVCLogLine.h index c093797bf..41ae477eb 100755 --- a/Sources/App/Classes/Headers/TVCLogLine.h +++ b/Sources/App/Classes/Headers/TVCLogLine.h @@ -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] diff --git a/Sources/App/Classes/Headers/TVCLogRenderer.h b/Sources/App/Classes/Headers/TVCLogRenderer.h index b9bfc6445..da5e740e2 100755 --- a/Sources/App/Classes/Headers/TVCLogRenderer.h +++ b/Sources/App/Classes/Headers/TVCLogRenderer.h @@ -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 -TEXTUAL_EXTERN NSString * const TVCLogRendererConfigurationExcludedKeywordsAttribute; // NSArray -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 +TEXTUAL_EXTERN TVCLogRendererConfigurationAttribute const TVCLogRendererConfigurationExcludedKeywordsAttribute; // NSArray +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 -TEXTUAL_EXTERN NSString * const TVCLogRendererResultsListOfLinksMappedInBodyAttribute; // NSDictionary -TEXTUAL_EXTERN NSString * const TVCLogRendererResultsKeywordMatchFoundAttribute; // BOOL -TEXTUAL_EXTERN NSString * const TVCLogRendererResultsListOfUsersFoundAttribute; // NSSet -TEXTUAL_EXTERN NSString * const TVCLogRendererResultsOriginalBodyWithoutEffectsAttribute; // NSString +TEXTUAL_EXTERN TVCLogRendererResultsAttribute const TVCLogRendererResultsListOfLinksInBodyAttribute; // NSArray +TEXTUAL_EXTERN TVCLogRendererResultsAttribute const TVCLogRendererResultsListOfLinksMappedInBodyAttribute; // NSDictionary +TEXTUAL_EXTERN TVCLogRendererResultsAttribute const TVCLogRendererResultsKeywordMatchFoundAttribute; // BOOL +TEXTUAL_EXTERN TVCLogRendererResultsAttribute const TVCLogRendererResultsListOfUsersFoundAttribute; // NSSet +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 *)templateTokens; -+ (NSAttributedString *)renderBodyAsAttributedString:(NSString *)body withAttributes:(NSDictionary *)inputDictionary; ++ (NSAttributedString *)renderBodyAsAttributedString:(NSString *)body withAttributes:(NSDictionary *)inputDictionary; + (NSString *)renderBody:(NSString *)body forViewController:(TVCLogController *)viewController - withAttributes:(NSDictionary *)inputDictionary - resultInfo:(NSDictionary * _Nullable * _Nullable)outputDictionary; + withAttributes:(NSDictionary *)inputDictionary + resultInfo:(NSDictionary * _Nullable * _Nullable)outputDictionary; @end NS_ASSUME_NONNULL_END diff --git a/Sources/App/Classes/Headers/TVCMainWindow.h b/Sources/App/Classes/Headers/TVCMainWindow.h index 9127351c5..1e01c26a0 100755 --- a/Sources/App/Classes/Headers/TVCMainWindow.h +++ b/Sources/App/Classes/Headers/TVCMainWindow.h @@ -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; diff --git a/Sources/App/Classes/Headers/TVCTextViewWithIRCFormatter.h b/Sources/App/Classes/Headers/TVCTextViewWithIRCFormatter.h index 7c71240e7..7ac0f7368 100755 --- a/Sources/App/Classes/Headers/TVCTextViewWithIRCFormatter.h +++ b/Sources/App/Classes/Headers/TVCTextViewWithIRCFormatter.h @@ -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 diff --git a/Sources/App/Classes/Headers/TXAppearance.h b/Sources/App/Classes/Headers/TXAppearance.h index 4224bf775..8be31113d 100644 --- a/Sources/App/Classes/Headers/TXAppearance.h +++ b/Sources/App/Classes/Headers/TXAppearance.h @@ -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 diff --git a/Sources/App/Classes/Headers/TXSharedApplication.h b/Sources/App/Classes/Headers/TXSharedApplication.h index fef2259d8..d4fa9ff60 100644 --- a/Sources/App/Classes/Headers/TXSharedApplication.h +++ b/Sources/App/Classes/Headers/TXSharedApplication.h @@ -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; diff --git a/Sources/App/Classes/Helpers/Cocoa (Objective-C)/NSStringHelper.m b/Sources/App/Classes/Helpers/Cocoa (Objective-C)/NSStringHelper.m index 05ec36d04..35c977ce2 100755 --- a/Sources/App/Classes/Helpers/Cocoa (Objective-C)/NSStringHelper.m +++ b/Sources/App/Classes/Helpers/Cocoa (Objective-C)/NSStringHelper.m @@ -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]; } diff --git a/Sources/App/Classes/Helpers/Plugin Architecture/THOPluginDispatcher.m b/Sources/App/Classes/Helpers/Plugin Architecture/THOPluginDispatcher.m index ce86f170b..bea01504e 100644 --- a/Sources/App/Classes/Helpers/Plugin Architecture/THOPluginDispatcher.m +++ b/Sources/App/Classes/Helpers/Plugin Architecture/THOPluginDispatcher.m @@ -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; } diff --git a/Sources/App/Classes/Helpers/Plugin Architecture/THOPluginItem.m b/Sources/App/Classes/Helpers/Plugin Architecture/THOPluginItem.m index 21157b2a0..b979805d8 100755 --- a/Sources/App/Classes/Helpers/Plugin Architecture/THOPluginItem.m +++ b/Sources/App/Classes/Helpers/Plugin Architecture/THOPluginItem.m @@ -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 *supportedUserInputCommands; @property (nonatomic, copy, readwrite, nullable) NSArray *supportedServerInputCommands; @property (nonatomic, copy, readwrite, nullable) NSArray *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); } diff --git a/Sources/App/Classes/Helpers/Plugin Architecture/THOPluginManager.m b/Sources/App/Classes/Helpers/Plugin Architecture/THOPluginManager.m index da68f3b25..db0e28679 100644 --- a/Sources/App/Classes/Helpers/Plugin Architecture/THOPluginManager.m +++ b/Sources/App/Classes/Helpers/Plugin Architecture/THOPluginManager.m @@ -57,7 +57,7 @@ NSString * const THOPluginManagerFinishedLoadingPluginsNotification = @"THOPlugi @interface THOPluginManager () @property (nonatomic, assign, readwrite) BOOL pluginsLoaded; @property (nonatomic, copy, readwrite) NSArray *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 *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 *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 *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 *allExtensions = [NSMutableArray array]; for (THOPluginItem *plugin in self.loadedPlugins) { - if ([plugin supportsFeature:THOPluginItemSupportsPreferencePane] == NO) { + if ([plugin supportsFeature:THOPluginItemSupportedFeaturePreferencePane] == NO) { continue; } diff --git a/Sources/App/Classes/IRC/IRCAddressBook.m b/Sources/App/Classes/IRC/IRCAddressBook.m index 5eae7d27f..75292cca6 100755 --- a/Sources/App/Classes/IRC/IRCAddressBook.m +++ b/Sources/App/Classes/IRC/IRCAddressBook.m @@ -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"]; } diff --git a/Sources/App/Classes/IRC/IRCAddressBookMatchCache.m b/Sources/App/Classes/IRC/IRCAddressBookMatchCache.m index e8b607084..b9218781d 100644 --- a/Sources/App/Classes/IRC/IRCAddressBookMatchCache.m +++ b/Sources/App/Classes/IRC/IRCAddressBookMatchCache.m @@ -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; diff --git a/Sources/App/Classes/IRC/IRCAddressBookUserTracking.m b/Sources/App/Classes/IRC/IRCAddressBookUserTracking.m index 6d4ddd50e..8baff159d 100644 --- a/Sources/App/Classes/IRC/IRCAddressBookUserTracking.m +++ b/Sources/App/Classes/IRC/IRCAddressBookUserTracking.m @@ -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; diff --git a/Sources/App/Classes/IRC/IRCChannel.m b/Sources/App/Classes/IRC/IRCChannel.m old mode 100755 new mode 100644 index d2be70fce..5bf32b619 --- a/Sources/App/Classes/IRC/IRCChannel.m +++ b/Sources/App/Classes/IRC/IRCChannel.m @@ -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]; } diff --git a/Sources/App/Classes/IRC/IRCChannelConfig.m b/Sources/App/Classes/IRC/IRCChannelConfig.m index 5a6fe2153..169de35b9 100755 --- a/Sources/App/Classes/IRC/IRCChannelConfig.m +++ b/Sources/App/Classes/IRC/IRCChannelConfig.m @@ -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"]; diff --git a/Sources/App/Classes/IRC/IRCChannelMode.m b/Sources/App/Classes/IRC/IRCChannelMode.m index f5cb4d700..c0cdecb20 100755 --- a/Sources/App/Classes/IRC/IRCChannelMode.m +++ b/Sources/App/Classes/IRC/IRCChannelMode.m @@ -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") ]; } diff --git a/Sources/App/Classes/IRC/IRCClient.m b/Sources/App/Classes/IRC/IRCClient.m old mode 100755 new mode 100644 index 808d068f4..48548961f --- a/Sources/App/Classes/IRC/IRCClient.m +++ b/Sources/App/Classes/IRC/IRCClient.m @@ -205,7 +205,7 @@ NSString * const IRCClientUserNicknameChangedNotification = @"IRCClientUserNickn @property (nonatomic, assign, readwrite) BOOL serverHasNickServ; @property (nonatomic, assign, readwrite) NSTimeInterval lastMessageReceived; @property (nonatomic, assign, readwrite) NSTimeInterval lastMessageServerTime; -@property (nonatomic, assign, readwrite) ClientIRCv3SupportedCapabilities capabilities; +@property (nonatomic, assign, readwrite) ClientIRCv3SupportedCapability capabilities; @property (nonatomic, copy, readwrite) NSArray *cachedHighlights; @property (nonatomic, copy, readwrite, nullable) NSString *userHostmask; @property (nonatomic, copy, readwrite) NSString *userNickname; @@ -307,8 +307,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END self.supportInfo = [[IRCISupportInfo alloc] initWithClient:self]; - self.connectType = IRCClientConnectNormalMode; - self.disconnectType = IRCClientDisconnectNormalMode; + self.connectType = IRCClientConnectModeNormal; + self.disconnectType = IRCClientDisconnectModeNormal; self.cachedHighlights = @[]; @@ -1204,7 +1204,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END return; } - self.disconnectType = IRCClientDisconnectReachabilityChangeMode; + self.disconnectType = IRCClientDisconnectModeReachabilityChange; self.reconnectEnabled = YES; @@ -1697,7 +1697,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END } switch (eventType) { - case TXNotificationHighlightType: + case TXNotificationTypeHighlight: { NSParameterAssert(channel != nil); NSParameterAssert(nickname != nil); @@ -1756,8 +1756,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationChannelMessageType: - case TXNotificationChannelNoticeType: + case TXNotificationTypeChannelMessage: + case TXNotificationTypeChannelNotice: { NSParameterAssert(channel != nil); NSParameterAssert(nickname != nil); @@ -1783,9 +1783,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSMutableString *mutableMessage = [NSMutableString string]; if (speakChannelName || speakNickname) { - if (eventType == TXNotificationChannelMessageType) { + if (eventType == TXNotificationTypeChannelMessage) { [mutableMessage appendString:TXTLS(@"Notifications[tao-i2]")]; - } else if (eventType == TXNotificationChannelNoticeType) { + } else if (eventType == TXNotificationTypeChannelNotice) { [mutableMessage appendString:TXTLS(@"Notifications[kk4-68]")]; } @@ -1806,9 +1806,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationNewPrivateMessageType: - case TXNotificationPrivateMessageType: - case TXNotificationPrivateNoticeType: + case TXNotificationTypeNewPrivateMessage: + case TXNotificationTypePrivateMessage: + case TXNotificationTypePrivateNotice: { NSParameterAssert(nickname != nil); NSParameterAssert(text != nil); @@ -1819,11 +1819,11 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSString *formatter = nil; - if (eventType == TXNotificationNewPrivateMessageType) { + if (eventType == TXNotificationTypeNewPrivateMessage) { formatter = @"Notifications[rvb-9l]"; - } else if (eventType == TXNotificationPrivateMessageType) { + } else if (eventType == TXNotificationTypePrivateMessage) { formatter = @"Notifications[2bu-ep]"; - } else if (eventType == TXNotificationPrivateNoticeType) { + } else if (eventType == TXNotificationTypePrivateNotice) { formatter = @"Notifications[6jl-vh]"; } @@ -1831,7 +1831,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationKickType: + case TXNotificationTypeKick: { NSParameterAssert(channel != nil); NSParameterAssert(nickname != nil); @@ -1842,7 +1842,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationInviteType: + case TXNotificationTypeInvite: { NSParameterAssert(nickname != nil); NSParameterAssert(text != nil); @@ -1853,14 +1853,14 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationConnectType: - case TXNotificationDisconnectType: + case TXNotificationTypeConnect: + case TXNotificationTypeDisconnect: { NSString *formatter = nil; - if (eventType == TXNotificationConnectType) { + if (eventType == TXNotificationTypeConnect) { formatter = @"Notifications[z4p-yr]"; - } else if (eventType == TXNotificationDisconnectType) { + } else if (eventType == TXNotificationTypeDisconnect) { formatter = @"Notifications[fd0-f8]"; } @@ -1868,7 +1868,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationAddressBookMatchType: + case TXNotificationTypeAddressBookMatch: { NSParameterAssert(text != nil); @@ -1876,25 +1876,25 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationFileTransferSendSuccessfulType: - case TXNotificationFileTransferReceiveSuccessfulType: - case TXNotificationFileTransferSendFailedType: - case TXNotificationFileTransferReceiveFailedType: - case TXNotificationFileTransferReceiveRequestedType: + case TXNotificationTypeFileTransferSendSuccessful: + case TXNotificationTypeFileTransferReceiveSuccessful: + case TXNotificationTypeFileTransferSendFailed: + case TXNotificationTypeFileTransferReceiveFailed: + case TXNotificationTypeFileTransferReceiveRequested: { NSParameterAssert(nickname != nil); NSString *formatter = nil; - if (eventType == TXNotificationFileTransferSendSuccessfulType) { + if (eventType == TXNotificationTypeFileTransferSendSuccessful) { formatter = @"Notifications[5e4-vg]"; - } else if (eventType == TXNotificationFileTransferReceiveSuccessfulType) { + } else if (eventType == TXNotificationTypeFileTransferReceiveSuccessful) { formatter = @"Notifications[4cd-p3]"; - } else if (eventType == TXNotificationFileTransferSendFailedType) { + } else if (eventType == TXNotificationTypeFileTransferSendFailed) { formatter = @"Notifications[f0u-32]"; - } else if (eventType == TXNotificationFileTransferReceiveFailedType) { + } else if (eventType == TXNotificationTypeFileTransferReceiveFailed) { formatter = @"Notifications[mak-bj]"; - } else if (eventType == TXNotificationFileTransferReceiveRequestedType) { + } else if (eventType == TXNotificationTypeFileTransferReceiveRequested) { formatter = @"Notifications[at0-vi]"; } @@ -1902,17 +1902,17 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationUserJoinedType: - case TXNotificationUserPartedType: + case TXNotificationTypeUserJoined: + case TXNotificationTypeUserParted: { NSParameterAssert(channel != nil); NSParameterAssert(nickname != nil); NSString *formatter = nil; - if (eventType == TXNotificationUserJoinedType) { + if (eventType == TXNotificationTypeUserJoined) { formatter = @"Notifications[bwu-ps]"; - } else if (eventType == TXNotificationUserPartedType) { + } else if (eventType == TXNotificationTypeUserParted) { formatter = @"Notifications[4aq-hz]"; } @@ -1920,7 +1920,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationUserDisconnectedType: + case TXNotificationTypeUserDisconnected: { NSParameterAssert(nickname != nil); @@ -1982,12 +1982,12 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END } BOOL isTextEvent = - (eventType == TXNotificationHighlightType || - eventType == TXNotificationNewPrivateMessageType || - eventType == TXNotificationChannelMessageType || - eventType == TXNotificationChannelNoticeType || - eventType == TXNotificationPrivateMessageType || - eventType == TXNotificationPrivateNoticeType); + (eventType == TXNotificationTypeHighlight || + eventType == TXNotificationTypeNewPrivateMessage || + eventType == TXNotificationTypeChannelMessage || + eventType == TXNotificationTypeChannelNotice || + eventType == TXNotificationTypePrivateMessage || + eventType == TXNotificationTypePrivateNotice); if (isTextEvent) { if ([self nicknameIsMyself:nickname]) { @@ -2006,7 +2006,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END if (target) { targetConfig = target.config; - if (eventType == TXNotificationHighlightType) { + if (eventType == TXNotificationTypeHighlight) { if (targetConfig.ignoreHighlights) { return YES; } @@ -2058,7 +2058,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END } if (postNotificationsWhileFocused == NO && mainWindowIsFocused) { - if (eventType != TXNotificationAddressBookMatchType) { + if (eventType != TXNotificationTypeAddressBookMatch) { return YES; } } @@ -2082,26 +2082,26 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END } switch (eventType) { - case TXNotificationHighlightType: - case TXNotificationNewPrivateMessageType: - case TXNotificationChannelMessageType: - case TXNotificationChannelNoticeType: - case TXNotificationPrivateMessageType: - case TXNotificationPrivateNoticeType: + case TXNotificationTypeHighlight: + case TXNotificationTypeNewPrivateMessage: + case TXNotificationTypeChannelMessage: + case TXNotificationTypeChannelNotice: + case TXNotificationTypePrivateMessage: + case TXNotificationTypePrivateNotice: { NSParameterAssert(nickname != nil); NSParameterAssert(text != nil); - if (eventType == TXNotificationHighlightType || - eventType == TXNotificationChannelMessageType || - eventType == TXNotificationChannelNoticeType) + if (eventType == TXNotificationTypeHighlight || + eventType == TXNotificationTypeChannelMessage || + eventType == TXNotificationTypeChannelNotice) { NSParameterAssert(target != nil); eventTitle = target.name; } - if (lineType == TVCLogLineActionType || lineType == TVCLogLineActionNoHighlightType) { + if (lineType == TVCLogLineTypeAction || lineType == TVCLogLineTypeActionNoHighlight) { eventDescription = [NSString stringWithFormat:TXNotificationDialogActionNicknameFormat, nickname, text]; } else { nickname = [self formatNickname:nickname inChannel:target]; @@ -2111,11 +2111,11 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationFileTransferSendSuccessfulType: - case TXNotificationFileTransferReceiveSuccessfulType: - case TXNotificationFileTransferSendFailedType: - case TXNotificationFileTransferReceiveFailedType: - case TXNotificationFileTransferReceiveRequestedType: + case TXNotificationTypeFileTransferSendSuccessful: + case TXNotificationTypeFileTransferReceiveSuccessful: + case TXNotificationTypeFileTransferSendFailed: + case TXNotificationTypeFileTransferReceiveFailed: + case TXNotificationTypeFileTransferReceiveRequested: { NSParameterAssert(nickname != nil); NSParameterAssert(text != nil); @@ -2126,19 +2126,19 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationConnectType: + case TXNotificationTypeConnect: { eventTitle = self.networkNameAlt; break; } - case TXNotificationDisconnectType: + case TXNotificationTypeDisconnect: { eventTitle = self.networkNameAlt; break; } - case TXNotificationAddressBookMatchType: + case TXNotificationTypeAddressBookMatch: { NSParameterAssert(text != nil); @@ -2146,7 +2146,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationKickType: + case TXNotificationTypeKick: { NSParameterAssert(target != nil); NSParameterAssert(nickname != nil); @@ -2158,7 +2158,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationInviteType: + case TXNotificationTypeInvite: { NSParameterAssert(nickname != nil); NSParameterAssert(text != nil); @@ -2169,7 +2169,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationUserJoinedType: + case TXNotificationTypeUserJoined: { NSParameterAssert(target != nil); NSParameterAssert(nickname != nil); @@ -2180,7 +2180,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationUserPartedType: + case TXNotificationTypeUserParted: { NSParameterAssert(target != nil); NSParameterAssert(nickname != nil); @@ -2196,7 +2196,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case TXNotificationUserDisconnectedType: + case TXNotificationTypeUserDisconnected: { NSParameterAssert(nickname != nil); NSParameterAssert(text != nil); @@ -2464,9 +2464,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSParameterAssert(withName != nil); if (isPrivateMessage == NO) { - return [self findChannelOrCreate:withName asType:IRCChannelChannelType]; + return [self findChannelOrCreate:withName asType:IRCChannelTypeChannel]; } else { - return [self findChannelOrCreate:withName asType:IRCChannelPrivateMessageType]; + return [self findChannelOrCreate:withName asType:IRCChannelTypePrivateMessage]; } } @@ -2475,9 +2475,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSParameterAssert(withName != nil); if (isUtility == NO) { - return [self findChannelOrCreate:withName asType:IRCChannelChannelType]; + return [self findChannelOrCreate:withName asType:IRCChannelTypeChannel]; } else { - return [self findChannelOrCreate:withName asType:IRCChannelUtilityType]; + return [self findChannelOrCreate:withName asType:IRCChannelTypeUtility]; } } @@ -2491,7 +2491,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END return channel; } - if (type == IRCChannelChannelType) { + if (type == IRCChannelTypeChannel) { IRCChannelConfig *config = [IRCChannelConfig seedWithName:withName]; channel = [worldController() createChannelWithConfig:config onClient:self add:YES adjust:YES reload:YES]; @@ -2773,7 +2773,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END - (void)inputText:(id)string destination:(IRCTreeItem *)destination { - [self inputText:string asCommand:IRCRemoteCommandPrivmsgIndex destination:destination]; + [self inputText:string asCommand:IRCRemoteCommandPrivmsg destination:destination]; } - (void)inputText:(id)string asCommand:(IRCRemoteCommand)command destination:(IRCTreeItem *)destination @@ -2791,9 +2791,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSAssert(NO, @"'string' must be NSString or NSAttributedString"); } - if (command != IRCRemoteCommandPrivmsgIndex && - command != IRCRemoteCommandPrivmsgActionIndex && - command != IRCRemoteCommandNoticeIndex) + if (command != IRCRemoteCommandPrivmsg && + command != IRCRemoteCommandPrivmsgAction && + command != IRCRemoteCommandNotice) { NSAssert(NO, @"Bad 'command' value"); } @@ -2882,23 +2882,23 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSString *commandToSend = nil; - TVCLogLineType lineType = TVCLogLineUndefinedType; + TVCLogLineType lineType = TVCLogLineTypeUndefined; - if (command == IRCRemoteCommandPrivmsgIndex) { + if (command == IRCRemoteCommandPrivmsg) { commandToSend = @"PRIVMSG"; - lineType = TVCLogLinePrivateMessageType; - } else if (command == IRCRemoteCommandPrivmsgActionIndex) { + lineType = TVCLogLineTypePrivateMessage; + } else if (command == IRCRemoteCommandPrivmsgAction) { commandToSend = @"PRIVMSG"; - lineType = TVCLogLineActionType; - } else if (command == IRCRemoteCommandNoticeIndex) { + lineType = TVCLogLineTypeAction; + } else if (command == IRCRemoteCommandNotice) { commandToSend = @"NOTICE"; - lineType = TVCLogLineNoticeType; + lineType = TVCLogLineTypeNotice; } - NSParameterAssert(lineType != TVCLogLineUndefinedType); + NSParameterAssert(lineType != TVCLogLineTypeUndefined); NSArray *lines = string.splitIntoLines; @@ -2926,7 +2926,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END TLOEncryptionManagerInjectCallbackBlock injectionBlock = ^(NSString *encodedString) { NSString *sendMessage = encodedString; - if (lineType == TVCLogLineActionType) { + if (lineType == TVCLogLineTypeAction) { sendMessage = [NSString stringWithFormat:@"%cACTION %@%c", 0x01, sendMessage, 0x01]; } @@ -2955,7 +2955,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END { [self performBlockOnMainThread:^{ [self sendText:[NSAttributedString attributedStringWithString:message] - asCommand:IRCRemoteCommandPrivmsgIndex + asCommand:IRCRemoteCommandPrivmsg toChannel:channel]; }]; } @@ -2964,7 +2964,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END { [self performBlockOnMainThread:^{ [self sendText:[NSAttributedString attributedStringWithString:message] - asCommand:IRCRemoteCommandPrivmsgActionIndex + asCommand:IRCRemoteCommandPrivmsgAction toChannel:channel]; }]; } @@ -2973,7 +2973,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END { [self performBlockOnMainThread:^{ [self sendText:[NSAttributedString attributedStringWithString:message] - asCommand:IRCRemoteCommandNoticeIndex + asCommand:IRCRemoteCommandNotice toChannel:channel]; }]; } @@ -3095,8 +3095,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END } switch (commandNumeric) { - case IRCLocalCommandAmeIndex: // Command: AME - case IRCLocalCommandAmsgIndex: // Command: AMSG + case IRCLocalCommandAme: // Command: AME + case IRCLocalCommandAmsg: // Command: AMSG { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3108,10 +3108,10 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END IRCRemoteCommand sendAsCommand = 0; - if (commandNumeric == IRCLocalCommandAmsgIndex) { - sendAsCommand = IRCRemoteCommandPrivmsgIndex; + if (commandNumeric == IRCLocalCommandAmsg) { + sendAsCommand = IRCRemoteCommandPrivmsg; } else { - sendAsCommand = IRCRemoteCommandPrivmsgActionIndex; + sendAsCommand = IRCRemoteCommandPrivmsgAction; } for (IRCClient *client in worldController().clientList) { @@ -3132,8 +3132,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandAquoteIndex: // Command: AQUOTE - case IRCLocalCommandArawIndex: // Command: ARAW + case IRCLocalCommandAquote: // Command: AQUOTE + case IRCLocalCommandAraw: // Command: ARAW { NSAssertReturnLoopBreak(self.isConnected); @@ -3149,7 +3149,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandAutojoinIndex: // Command: AUTOJOIN + case IRCLocalCommandAutojoin: // Command: AUTOJOIN { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3157,7 +3157,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandAwayIndex: // Command: AWAY + case IRCLocalCommandAway: // Command: AWAY { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3182,7 +3182,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandBackIndex: // Command: BACK + case IRCLocalCommandBack: // Command: BACK { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3196,8 +3196,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandCapIndex: // Command: CAP - case IRCLocalCommandCapsIndex: // Command: CAPS + case IRCLocalCommandCap: // Command: CAP + case IRCLocalCommandCaps: // Command: CAPS { NSString *capabilites = self.enabledCapabilitiesStringValue; @@ -3209,7 +3209,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandCcbadgeIndex: // Command: CCBADGE + case IRCLocalCommandCcbadge: // Command: CCBADGE { NSString *channelName = stringIn.tokenAsString; NSString *badgeCount = stringIn.tokenAsString; @@ -3240,7 +3240,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandClearIndex: // Command: CLEAR + case IRCLocalCommandClear: // Command: CLEAR { if (targetChannel) { [mainWindow() clearContentsOfChannel:targetChannel]; @@ -3250,7 +3250,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandClearallIndex: // Command: CLEARALL + case IRCLocalCommandClearall: // Command: CLEARALL { for (IRCClient *client in worldController().clientList) { if (client != self && [TPCPreferences clearAllConnections] == NO) { @@ -3266,8 +3266,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandCloseIndex: // Command: CLOSE - case IRCLocalCommandRemoveIndex: // Command: REMOVE + case IRCLocalCommandClose: // Command: CLOSE + case IRCLocalCommandRemove: // Command: REMOVE { NSString *channelName = stringIn.tokenAsString; @@ -3291,7 +3291,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandConnIndex: // Command: CONN + case IRCLocalCommandConn: // Command: CONN { NSString *serverAddress = stringIn.lowercaseGetToken; @@ -3321,8 +3321,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandCtcpIndex: // Command: CTCP - case IRCLocalCommandCtcpreplyIndex: // Command: CTCPREPLY + case IRCLocalCommandCtcp: // Command: CTCP + case IRCLocalCommandCtcpreply: // Command: CTCPREPLY { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3340,7 +3340,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - if (commandNumeric == IRCLocalCommandCtcpIndex) { + if (commandNumeric == IRCLocalCommandCtcp) { if ([subCommand isEqualToString:@"PING"]) { [self sendCTCPPing:targetChannelName]; } else { @@ -3352,9 +3352,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandCycleIndex: // Command: CYCLE - case IRCLocalCommandHopIndex: // Command: HOP - case IRCLocalCommandRejoinIndex: // Command: REJOIN + case IRCLocalCommandCycle: // Command: CYCLE + case IRCLocalCommandHop: // Command: HOP + case IRCLocalCommandRejoin: // Command: REJOIN { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3370,26 +3370,26 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandDehalfopIndex: // Command: DEHALFOP - case IRCLocalCommandDeopIndex: // Command: DEOP - case IRCLocalCommandDevoiceIndex: // Command: DEVOICE - case IRCLocalCommandHalfopIndex: // Command: HALFOP - case IRCLocalCommandOpIndex: // Command: OP - case IRCLocalCommandVoiceIndex: // Command: VOICE + case IRCLocalCommandDehalfop: // Command: DEHALFOP + case IRCLocalCommandDeop: // Command: DEOP + case IRCLocalCommandDevoice: // Command: DEVOICE + case IRCLocalCommandHalfop: // Command: HALFOP + case IRCLocalCommandOp: // Command: OP + case IRCLocalCommandVoice: // Command: VOICE { NSAssertReturnLoopBreak(self.isLoggedIn); - BOOL modeIsSet = (commandNumeric == IRCLocalCommandOpIndex || - commandNumeric == IRCLocalCommandHalfopIndex || - commandNumeric == IRCLocalCommandVoiceIndex); + BOOL modeIsSet = (commandNumeric == IRCLocalCommandOp || + commandNumeric == IRCLocalCommandHalfop || + commandNumeric == IRCLocalCommandVoice); NSString *modeSymbol = nil; - if (commandNumeric == IRCLocalCommandOpIndex || commandNumeric == IRCLocalCommandDeopIndex) { + if (commandNumeric == IRCLocalCommandOp || commandNumeric == IRCLocalCommandDeop) { modeSymbol = @"o"; - } else if (commandNumeric == IRCLocalCommandHalfopIndex || commandNumeric == IRCLocalCommandDehalfopIndex) { + } else if (commandNumeric == IRCLocalCommandHalfop || commandNumeric == IRCLocalCommandDehalfop) { modeSymbol = @"h"; - } else if (commandNumeric == IRCLocalCommandVoiceIndex || commandNumeric == IRCLocalCommandDevoiceIndex) { + } else if (commandNumeric == IRCLocalCommandVoice || commandNumeric == IRCLocalCommandDevoice) { modeSymbol = @"v"; } @@ -3430,8 +3430,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandDebugIndex: // Command: DEBUG - case IRCLocalCommandEchoIndex: // Command: ECHO + case IRCLocalCommandDebug: // Command: DEBUG + case IRCLocalCommandEcho: // Command: ECHO { if (stringIn.length == 0) { [self printInvalidSyntaxMessageForCommand:command]; @@ -3456,7 +3456,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandDefaultsIndex: // Command: DEFAULTS + case IRCLocalCommandDefaults: // Command: DEFAULTS { if (stringIn.length == 0) { [self printDebugInformation:TXTLS(@"IRC[1dz-jb]")]; @@ -3559,7 +3559,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandEmptycachesIndex: // Command: EMPTY_CACHES + case IRCLocalCommandEmptycaches: // Command: EMPTY_CACHES { XRPerformBlockAsynchronouslyOnGlobalQueue(^{ [TVCLogView emptyCaches]; @@ -3567,7 +3567,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandFakerawdataIndex: // Command: FAKERAWDATA + case IRCLocalCommandFakerawdata: // Command: FAKERAWDATA { if (stringIn.length == 0) { [self printInvalidSyntaxMessageForCommand:command]; @@ -3579,17 +3579,17 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandGetscriptsIndex: // Command: GETSCRIPTS + case IRCLocalCommandGetscripts: // Command: GETSCRIPTS { [sharedPluginManager() extrasInstallerLaunchInstaller]; break; } - case IRCLocalCommandGlineIndex: // Command: GLINE - case IRCLocalCommandGzlineIndex: // Command: GZLINE - case IRCLocalCommandShunIndex: // Command: SHUN - case IRCLocalCommandTempshunIndex: // Command: TEMPSHUN - case IRCLocalCommandZlineIndex: // Command: ZLINE + case IRCLocalCommandGline: // Command: GLINE + case IRCLocalCommandGzline: // Command: GZLINE + case IRCLocalCommandShun: // Command: SHUN + case IRCLocalCommandTempshun: // Command: TEMPSHUN + case IRCLocalCommandZline: // Command: ZLINE { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3600,7 +3600,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandGotoIndex: // Command: GOTO + case IRCLocalCommandGoto: // Command: GOTO { if (stringIn.length == 0) { [self printInvalidSyntaxMessageForCommand:command]; @@ -3630,7 +3630,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandIcbadgeIndex: // Command: ICBADGE + case IRCLocalCommandIcbadge: // Command: ICBADGE { if (stringIn.length == 0) { [self printInvalidSyntaxMessageForCommand:command]; @@ -3651,16 +3651,16 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandIgnoreIndex: // Command: IGNORE - case IRCLocalCommandUnignoreIndex: // Command: UNIGNORE + case IRCLocalCommandIgnore: // Command: IGNORE + case IRCLocalCommandUnignore: // Command: UNIGNORE { BOOL isIgnoreCommand = (commandNumeric == 5029); if (stringIn.length == 0 || targetChannel == nil) { if (isIgnoreCommand) { - [menuController() showServerPropertiesSheetForClient:self withSelection:TDCServerPropertiesSheetNewIgnoreEntrySelection context:@""]; + [menuController() showServerPropertiesSheetForClient:self withSelection:TDCServerPropertiesSheetSelectionNewIgnoreEntry context:@""]; } else { - [menuController() showServerPropertiesSheetForClient:self withSelection:TDCServerPropertiesSheetAddressBookSelection context:nil]; + [menuController() showServerPropertiesSheetForClient:self withSelection:TDCServerPropertiesSheetSelectionAddressBook context:nil]; } break; @@ -3672,9 +3672,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END if (member == nil) { if (isIgnoreCommand) { - [menuController() showServerPropertiesSheetForClient:self withSelection:TDCServerPropertiesSheetNewIgnoreEntrySelection context:nickname]; + [menuController() showServerPropertiesSheetForClient:self withSelection:TDCServerPropertiesSheetSelectionNewIgnoreEntry context:nickname]; } else { - [menuController() showServerPropertiesSheetForClient:self withSelection:TDCServerPropertiesSheetAddressBookSelection context:nil]; + [menuController() showServerPropertiesSheetForClient:self withSelection:TDCServerPropertiesSheetSelectionAddressBook context:nil]; } break; @@ -3690,7 +3690,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSMutableArray *matchedIgnores = [NSMutableArray array]; for (IRCAddressBookEntry *ignore in self.config.ignoreList) { - if (ignore.entryType != IRCAddressBookIgnoreEntryType) { + if (ignore.entryType != IRCAddressBookEntryTypeIgnore) { continue; } @@ -3754,7 +3754,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandInviteIndex: // Command: INVITE + case IRCLocalCommandInvite: // Command: INVITE { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3790,7 +3790,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandIsonIndex: // Command: ISON + case IRCLocalCommandIson: // Command: ISON { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3808,8 +3808,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandJIndex: // Command: J - case IRCLocalCommandJoinIndex: // Command: JOIN + case IRCLocalCommandJ: // Command: J + case IRCLocalCommandJoin: // Command: JOIN { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3839,7 +3839,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandJoinRandomIndex: // Command: JOIN_RANDOM + case IRCLocalCommandJoinRandom: // Command: JOIN_RANDOM { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3863,13 +3863,13 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandBanIndex: // Command: BAN - case IRCLocalCommandKbIndex: // Command: KB - case IRCLocalCommandKickIndex: // Command: KICK - case IRCLocalCommandKickbanIndex: // Command: KICKBAN - case IRCLocalCommandUnbanIndex: // Command: UNBAN - case IRCLocalCommandUnquietIndex: // Command: UNQUIET - case IRCLocalCommandQuietIndex: // Command: QUIET + case IRCLocalCommandBan: // Command: BAN + case IRCLocalCommandKb: // Command: KB + case IRCLocalCommandKick: // Command: KICK + case IRCLocalCommandKickban: // Command: KICKBAN + case IRCLocalCommandUnban: // Command: UNBAN + case IRCLocalCommandUnquiet: // Command: UNQUIET + case IRCLocalCommandQuiet: // Command: QUIET { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3897,12 +3897,12 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - if (commandNumeric == IRCLocalCommandKickbanIndex || - commandNumeric == IRCLocalCommandKbIndex || - commandNumeric == IRCLocalCommandBanIndex || - commandNumeric == IRCLocalCommandUnbanIndex || - commandNumeric == IRCLocalCommandQuietIndex || - commandNumeric == IRCLocalCommandUnquietIndex) + if (commandNumeric == IRCLocalCommandKickban || + commandNumeric == IRCLocalCommandKb || + commandNumeric == IRCLocalCommandBan || + commandNumeric == IRCLocalCommandUnban || + commandNumeric == IRCLocalCommandQuiet || + commandNumeric == IRCLocalCommandUnquiet) { IRCChannelUser *member = [targetChannel findMember:nickname]; @@ -3914,8 +3914,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSString *modeSymbol = nil; - if (commandNumeric == IRCLocalCommandQuietIndex || - commandNumeric == IRCLocalCommandUnquietIndex) + if (commandNumeric == IRCLocalCommandQuiet || + commandNumeric == IRCLocalCommandUnquiet) { modeSymbol = @"q"; } else { @@ -3928,8 +3928,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - if (commandNumeric == IRCLocalCommandUnbanIndex || - commandNumeric == IRCLocalCommandUnquietIndex) + if (commandNumeric == IRCLocalCommandUnban || + commandNumeric == IRCLocalCommandUnquiet) { [self send:@"MODE", targetChannelName, [@"-" stringByAppendingString:modeSymbol], banMask, nil]; } else { @@ -3937,9 +3937,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END } } - if (commandNumeric == IRCLocalCommandKbIndex || - commandNumeric == IRCLocalCommandKickIndex || - commandNumeric == IRCLocalCommandKickbanIndex) + if (commandNumeric == IRCLocalCommandKb || + commandNumeric == IRCLocalCommandKick || + commandNumeric == IRCLocalCommandKickban) { NSString *reason = stringIn.string; @@ -3958,7 +3958,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandKillIndex: // Command: KILL + case IRCLocalCommandKill: // Command: KILL { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3980,8 +3980,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandLagcheckIndex: // Command: LAGCHECK - case IRCLocalCommandMylagIndex: // Command: MYLAG + case IRCLocalCommandLagcheck: // Command: LAGCHECK + case IRCLocalCommandMylag: // Command: MYLAG { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -3994,7 +3994,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END lagCheckContext[@"time"] = @([NSDate timeIntervalSince1970]); - if (commandNumeric == IRCLocalCommandMylagIndex) { + if (commandNumeric == IRCLocalCommandMylag) { IRCChannel *selectedChannel = [mainWindow() selectedChannelOn:self]; if (selectedChannel) { @@ -4012,8 +4012,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandLeaveIndex: // Command: LEAVE - case IRCLocalCommandPartIndex: // Command: PART + case IRCLocalCommandLeave: // Command: LEAVE + case IRCLocalCommandPart: // Command: PART { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -4041,7 +4041,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandListIndex: // Command: LIST + case IRCLocalCommandList: // Command: LIST { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -4055,8 +4055,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandMIndex: // Command: M - case IRCLocalCommandModeIndex: // Command: MODE + case IRCLocalCommandM: // Command: M + case IRCLocalCommandMode: // Command: MODE { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -4085,7 +4085,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandMuteIndex: // Command: MUTE + case IRCLocalCommandMute: // Command: MUTE { if ([TPCPreferences soundIsMuted]) { [self printDebugInformation:TXTLS(@"IRC[sdn-yr]")]; @@ -4097,7 +4097,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandMyversionIndex: // Command: MYVERSION + case IRCLocalCommandMyversion: // Command: MYVERSION { NSString *applicationName = [TPCApplicationInfo applicationNameWithoutVersion]; NSString *versionLong = [TPCApplicationInfo applicationVersion]; @@ -4124,7 +4124,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandNickIndex: // Command: NICK + case IRCLocalCommandNick: // Command: NICK { /* Use -isConnected instead of -isLoggedIn so that user can change their nickname during registration @@ -4207,7 +4207,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandQueryIndex: // Command: QUERY + case IRCLocalCommandQuery: // Command: QUERY { NSString *nickname = stringIn.tokenAsString; @@ -4229,8 +4229,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandQuoteIndex: // Command: QUOTE - case IRCLocalCommandRawIndex: // Command: RAW + case IRCLocalCommandQuote: // Command: QUOTE + case IRCLocalCommandRaw: // Command: RAW { NSAssertReturnLoopBreak(self.isConnected); @@ -4244,7 +4244,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandQuitIndex: // Command: QUIT + case IRCLocalCommandQuit: // Command: QUIT { NSAssertReturnLoopBreak(self.isConnected); @@ -4256,7 +4256,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandNamesIndex: // Command: NAMES + case IRCLocalCommandNames: // Command: NAMES { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -4272,7 +4272,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandSetcolorIndex: // Command: SETCOLOR + case IRCLocalCommandSetcolor: // Command: SETCOLOR { if ([TPCPreferences disableNicknameColorHashing]) { [self printDebugInformation:TXTLS(@"IRC[026-qv]")]; @@ -4298,7 +4298,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandSetquerynameIndex: // Command: SETQUERYNAME + case IRCLocalCommandSetqueryname: // Command: SETQUERYNAME { if (targetChannel == nil || targetChannel.isPrivateMessage == NO) { [self printDebugInformation:TXTLS(@"IRC[m6o-z1]")]; @@ -4344,7 +4344,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandServerIndex: // Command: SERVER + case IRCLocalCommandServer: // Command: SERVER { if (stringIn.length == 0) { [self printInvalidSyntaxMessageForCommand:command]; @@ -4356,13 +4356,13 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandSslcontextIndex: // Command: SSLCONTEXT + case IRCLocalCommandSslcontext: // Command: SSLCONTEXT { [self presentCertificateTrustInformation]; break; } - case IRCLocalCommandTageIndex: // Command: TAGE + case IRCLocalCommandTage: // Command: TAGE { NSTimeInterval timePassed = [NSDate timeIntervalSinceNow:[TPCApplicationInfo applicationBirthday]]; @@ -4376,7 +4376,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandTimerIndex: // Command: TIMER + case IRCLocalCommandTimer: // Command: TIMER { if (stringIn.length == 0) { [self printDebugInformation:TXTLS(@"IRC[jj9-94]")]; @@ -4633,7 +4633,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSString *command = stringIn.trimmedString; - if ([repeatString contentsIsOfType:CSStringAnyNumberType]) + if ([repeatString contentsIsOfType:CSStringTypeAnyNumber]) { /* Contents of second argument is a number, which means we want to treat it as the repeat count. */ @@ -4684,8 +4684,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandTIndex: // Command: T - case IRCLocalCommandTopicIndex: // Command: TOPIC + case IRCLocalCommandT: // Command: T + case IRCLocalCommandTopic: // Command: TOPIC { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -4719,7 +4719,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandUmodeIndex: // Command: UMODE + case IRCLocalCommandUmode: // Command: UMODE { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -4731,7 +4731,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandUnmuteIndex: // Command: UNMUTE + case IRCLocalCommandUnmute: // Command: UNMUTE { if ([TPCPreferences soundIsMuted] == NO) { [self printDebugInformation:TXTLS(@"IRC[5rf-mj]")]; @@ -4743,7 +4743,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandWallopsIndex: // Command: WALLOPS + case IRCLocalCommandWallops: // Command: WALLOPS { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -4757,8 +4757,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandMonitorIndex: // Command: MONITOR - case IRCLocalCommandWatchIndex: // Command: WATCH + case IRCLocalCommandMonitor: // Command: MONITOR + case IRCLocalCommandWatch: // Command: WATCH { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -4800,7 +4800,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandWhoIndex: // Command: WHO + case IRCLocalCommandWho: // Command: WHO { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -4818,7 +4818,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandWhoisIndex: // Command: WHOIS + case IRCLocalCommandWhois: // Command: WHOIS { NSAssertReturnLoopBreak(self.isLoggedIn); @@ -4844,16 +4844,16 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandMeIndex: // Command: ME - case IRCLocalCommandMsgIndex: // Command: MSG - case IRCLocalCommandNoticeIndex: // Command: NOTICE - case IRCLocalCommandOmsgIndex: // Command: OMSG - case IRCLocalCommandOnoticeIndex: // Command: ONOTICE - case IRCLocalCommandSmeIndex: // Command: SME - case IRCLocalCommandSmsgIndex: // Command: SMSG - case IRCLocalCommandUmeIndex: // Command: UME - case IRCLocalCommandUmsgIndex: // Command: UMSG - case IRCLocalCommandUnoticeIndex: // Command: UNOTICE + case IRCLocalCommandMe: // Command: ME + case IRCLocalCommandMsg: // Command: MSG + case IRCLocalCommandNotice: // Command: NOTICE + case IRCLocalCommandOmsg: // Command: OMSG + case IRCLocalCommandOnotice: // Command: ONOTICE + case IRCLocalCommandSme: // Command: SME + case IRCLocalCommandSmsg: // Command: SMSG + case IRCLocalCommandUme: // Command: UME + case IRCLocalCommandUmsg: // Command: UMSG + case IRCLocalCommandUnotice: // Command: UNOTICE { /* Where would se send data to? */ if (self.isLoggedIn == NO) { @@ -4871,42 +4871,42 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSString *commandToSend = nil; - TVCLogLineType lineType = TVCLogLineUndefinedType; + TVCLogLineType lineType = TVCLogLineTypeUndefined; - if (commandNumeric == IRCLocalCommandMsgIndex || - commandNumeric == IRCLocalCommandOmsgIndex || - commandNumeric == IRCLocalCommandSmsgIndex || - commandNumeric == IRCLocalCommandUmsgIndex) + if (commandNumeric == IRCLocalCommandMsg || + commandNumeric == IRCLocalCommandOmsg || + commandNumeric == IRCLocalCommandSmsg || + commandNumeric == IRCLocalCommandUmsg) { commandToSend = @"PRIVMSG"; - lineType = TVCLogLinePrivateMessageType; + lineType = TVCLogLineTypePrivateMessage; - isOperatorMessage = (commandNumeric == IRCLocalCommandOmsgIndex); - isSecretMessage = (commandNumeric == IRCLocalCommandSmsgIndex); - isUnencryptedMessag = (commandNumeric == IRCLocalCommandUmsgIndex); + isOperatorMessage = (commandNumeric == IRCLocalCommandOmsg); + isSecretMessage = (commandNumeric == IRCLocalCommandSmsg); + isUnencryptedMessag = (commandNumeric == IRCLocalCommandUmsg); } - else if (commandNumeric == IRCLocalCommandMeIndex || - commandNumeric == IRCLocalCommandSmeIndex || - commandNumeric == IRCLocalCommandUmeIndex) + else if (commandNumeric == IRCLocalCommandMe || + commandNumeric == IRCLocalCommandSme || + commandNumeric == IRCLocalCommandUme) { commandToSend = @"PRIVMSG"; - lineType = TVCLogLineActionType; + lineType = TVCLogLineTypeAction; - isSecretMessage = (commandNumeric == IRCLocalCommandSmeIndex); - isUnencryptedMessag = (commandNumeric == IRCLocalCommandUmeIndex); + isSecretMessage = (commandNumeric == IRCLocalCommandSme); + isUnencryptedMessag = (commandNumeric == IRCLocalCommandUme); } - else if (commandNumeric == IRCLocalCommandNoticeIndex || // Command: NOTICE - commandNumeric == IRCLocalCommandOnoticeIndex || // Command: ONOTICE - commandNumeric == IRCLocalCommandUnoticeIndex) // Command: UNOTICE + else if (commandNumeric == IRCLocalCommandNotice || // Command: NOTICE + commandNumeric == IRCLocalCommandOnotice || // Command: ONOTICE + commandNumeric == IRCLocalCommandUnotice) // Command: UNOTICE { commandToSend = @"NOTICE"; - lineType = TVCLogLineNoticeType; + lineType = TVCLogLineTypeNotice; - isOperatorMessage = (commandNumeric == IRCLocalCommandOnoticeIndex); - isUnencryptedMessag = (commandNumeric == IRCLocalCommandUnoticeIndex); + isOperatorMessage = (commandNumeric == IRCLocalCommandOnotice); + isUnencryptedMessag = (commandNumeric == IRCLocalCommandUnotice); } if (isOperatorMessage) { @@ -4927,7 +4927,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END /* Operator messages should use the target channel unless the string in is a channel name */ /* All other scenarios use the string in (token) */ - if (isSecretMessage == NO && lineType == TVCLogLineActionType && targetChannel) { + if (isSecretMessage == NO && lineType == TVCLogLineTypeAction && targetChannel) { targetChannelName = targetChannel.name; } else if (isOperatorMessage && [self stringIsChannelName:stringIn.string] == NO && targetChannel.isChannel) { targetChannelName = targetChannel.name; @@ -4944,7 +4944,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END /* Actions are allowed to have an empty message but all other types are not. Empty actions use a whitespace. */ if (stringIn.length == 0) { - if (lineType == TVCLogLineActionType) { + if (lineType == TVCLogLineTypeAction) { [stringIn replaceCharactersInRange:NSMakeRange(0, 0) withString:@" "]; } else { @@ -5033,7 +5033,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END TLOEncryptionManagerInjectCallbackBlock injectionBlock = ^(NSString *encodedString) { NSString *sendMessage = encodedString; - if (lineType == TVCLogLineActionType) { + if (lineType == TVCLogLineTypeAction) { sendMessage = [NSString stringWithFormat:@"%cACTION %@%c", 0x01, sendMessage, 0x01]; } @@ -5062,7 +5062,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCLocalCommandReloadICLIndex: // Command: RELOADICL + case IRCLocalCommandReloadICL: // Command: RELOADICL { [TVCLogControllerInlineMediaSharedInstance() reloadService]; @@ -5423,18 +5423,18 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END /* Define where the message originated */ NSString *localNickname = self.userNickname; - TVCLogLineMemberType memberType = TVCLogLineMemberNormalType; + TVCLogLineMemberType memberType = TVCLogLineMemberTypeNormal; if ([nickname isEqualToString:localNickname]) { - memberType = TVCLogLineMemberLocalUserType; + memberType = TVCLogLineMemberTypeLocalUser; } /* Define list of highlight keywords */ BOOL matchHighlights = (channel && channel.config.ignoreHighlights == NO && - (lineType == TVCLogLinePrivateMessageType || lineType == TVCLogLineActionType) && - memberType == TVCLogLineMemberNormalType); + (lineType == TVCLogLineTypePrivateMessage || lineType == TVCLogLineTypeAction) && + memberType == TVCLogLineMemberTypeNormal); NSMutableArray *excludeKeywords = nil; NSMutableArray *matchKeywords = nil; @@ -5445,7 +5445,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END matchKeywords = [[TPCPreferences highlightMatchKeywords] mutableCopy]; /* Self nickname keyword */ - if ([TPCPreferences highlightMatchingMethod] != TXNicknameHighlightRegularExpressionMatchType && + if ([TPCPreferences highlightMatchingMethod] != TXNicknameHighlightMatchTypeRegularExpression && [TPCPreferences highlightCurrentNickname]) { [matchKeywords addObjectWithoutDuplication:localNickname]; @@ -5473,10 +5473,10 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END } } // matchKeywords - if (lineType == TVCLogLineActionNoHighlightType) { - lineType = TVCLogLineActionType; - } else if (lineType == TVCLogLinePrivateMessageNoHighlightType) { - lineType = TVCLogLinePrivateMessageType; + if (lineType == TVCLogLineTypeActionNoHighlight) { + lineType = TVCLogLineTypeAction; + } else if (lineType == TVCLogLineTypePrivateMessageNoHighlight) { + lineType = TVCLogLineTypePrivateMessage; } /* Renderer attributes */ @@ -5529,9 +5529,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END if ([TPCPreferences autoAddScrollbackMark]) { if ([mainWindow() isItemVisible:channel] == NO || mainWindow().mainWindow == NO) { if (channel.isUnread == NO && - (lineType == TVCLogLinePrivateMessageType || - lineType == TVCLogLineActionType || - lineType == TVCLogLineNoticeType)) + (lineType == TVCLogLineTypePrivateMessage || + lineType == TVCLogLineTypeAction || + lineType == TVCLogLineTypeNotice)) { [channel.viewController mark]; } @@ -5556,7 +5556,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END { NSParameterAssert(message != nil); - [self print:[message sequence:sequence] by:nil inChannel:channel asType:TVCLogLineDebugType command:message.command receivedAt:message.receivedAt]; + [self print:[message sequence:sequence] by:nil inChannel:channel asType:TVCLogLineTypeDebug command:message.command receivedAt:message.receivedAt]; } - (void)printUnknownReply:(IRCMessage *)message @@ -5573,7 +5573,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END { NSParameterAssert(message != nil); - [self print:[message sequence:sequence] by:nil inChannel:channel asType:TVCLogLineDebugType command:message.command receivedAt:message.receivedAt]; + [self print:[message sequence:sequence] by:nil inChannel:channel asType:TVCLogLineTypeDebug command:message.command receivedAt:message.receivedAt]; } - (void)printErrorReply:(IRCMessage *)message @@ -5600,12 +5600,12 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSString *errorMessage = TXTLS(@"IRC[3yo-gw]", message.commandNumeric, sequenceMessage); - [self print:errorMessage by:nil inChannel:channel asType:TVCLogLineDebugType command:message.command]; + [self print:errorMessage by:nil inChannel:channel asType:TVCLogLineTypeDebug command:message.command]; } - (void)printError:(NSString *)errorMessage asCommand:(NSString *)command { - [self print:errorMessage by:nil inChannel:nil asType:TVCLogLineDebugType command:command]; + [self print:errorMessage by:nil inChannel:nil asType:TVCLogLineTypeDebug command:command]; } - (void)printDebugInformationToConsole:(NSString *)message @@ -5625,7 +5625,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END - (void)printDebugInformationToConsole:(NSString *)message asCommand:(NSString *)command escapeMessage:(BOOL)escapeMessage { - [self print:message by:nil inChannel:nil asType:TVCLogLineDebugType command:command escapeMessage:escapeMessage]; + [self print:message by:nil inChannel:nil asType:TVCLogLineTypeDebug command:command escapeMessage:escapeMessage]; } - (void)printDebugInformation:(NSString *)message @@ -5657,7 +5657,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END - (void)printDebugInformation:(NSString *)message inChannel:(IRCChannel *)channel asCommand:(NSString *)command { - [self print:message by:nil inChannel:channel asType:TVCLogLineDebugType command:command escapeMessage:YES]; + [self print:message by:nil inChannel:channel asType:TVCLogLineTypeDebug command:command escapeMessage:YES]; } - (void)printDebugInformation:(NSString *)message inChannel:(IRCChannel *)channel escapeMessage:(BOOL)escapeMessage @@ -5667,7 +5667,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END - (void)printDebugInformation:(NSString *)message inChannel:(IRCChannel *)channel asCommand:(NSString *)command escapeMessage:(BOOL)escapeMessage { - [self print:message by:nil inChannel:channel asType:TVCLogLineDebugType command:command escapeMessage:escapeMessage]; + [self print:message by:nil inChannel:channel asType:TVCLogLineTypeDebug command:command escapeMessage:escapeMessage]; } - (void)printDebugInformationInAllViews:(NSString *)message @@ -5824,7 +5824,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END if ( disconnectError.code == IRCConnectionErrorCodeBadCertificate && [disconnectError.domain isEqualToString:IRCConnectionErrorDomain]) { - disconnectType = IRCClientDisconnectBadCertificateMode; + disconnectType = IRCClientDisconnectModeBadCertificate; } [self printError:disconnectError.localizedDescription asCommand:TVCLogLineDefaultCommandValue]; @@ -5833,31 +5833,31 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSString *disconnectMessage = nil; switch (disconnectType) { - case IRCClientDisconnectNormalMode: + case IRCClientDisconnectModeNormal: { disconnectMessage = TXTLS(@"IRC[9b4-10]"); break; } - case IRCClientDisconnectComputerSleepMode: + case IRCClientDisconnectModeComputerSleep: { disconnectMessage = TXTLS(@"IRC[drg-b7]"); break; } - case IRCClientDisconnectBadCertificateMode: + case IRCClientDisconnectModeBadCertificate: { disconnectMessage = TXTLS(@"IRC[zro-bg]"); break; } - case IRCClientDisconnectServerRedirectMode: + case IRCClientDisconnectModeServerRedirect: { disconnectMessage = TXTLS(@"IRC[wcl-po]"); break; } - case IRCClientDisconnectReachabilityChangeMode: + case IRCClientDisconnectModeReachabilityChange: { disconnectMessage = TXTLS(@"IRC[isx-fi]"); @@ -5865,7 +5865,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END } #if TEXTUAL_BUILT_FOR_APP_STORE_DISTRIBUTION == 1 - case IRCClientDisconnectSoftwareTrialMode: + case IRCClientDisconnectModeSoftwareTrial: { disconnectMessage = TXTLS(@"IRC[t8r-ak]"); @@ -5894,7 +5894,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self.viewController mark]; if (self.isConnected) { - [self notifyEvent:TXNotificationDisconnectType lineType:TVCLogLineDebugType]; + [self notifyEvent:TXNotificationTypeDisconnect lineType:TVCLogLineTypeDebug]; } [self postEventToViewController:@"serverDisconnected"]; @@ -6144,87 +6144,87 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSUInteger commandNumeric = [IRCCommandIndex indexOfRemoteCommand:message.command]; switch (commandNumeric) { - case IRCRemoteCommandNoticeIndex: // Command: NOTICE - case IRCRemoteCommandPrivmsgIndex: // Command: PRIVMSG + case IRCRemoteCommandNotice: // Command: NOTICE + case IRCRemoteCommandPrivmsg: // Command: PRIVMSG { [self receivePrivmsgAndNotice:message]; break; } - case IRCRemoteCommandErrorIndex: // Command: ERROR + case IRCRemoteCommandError: // Command: ERROR { [self receiveError:message]; break; } - case IRCRemoteCommandInviteIndex: // Command: INVITE + case IRCRemoteCommandInvite: // Command: INVITE { [self receiveInvite:message]; break; } - case IRCRemoteCommandJoinIndex: // Command: JOIN + case IRCRemoteCommandJoin: // Command: JOIN { [self receiveJoin:message]; break; } - case IRCRemoteCommandKickIndex: // Command: KICK + case IRCRemoteCommandKick: // Command: KICK { [self receiveKick:message]; break; } - case IRCRemoteCommandKillIndex: // Command: KILL + case IRCRemoteCommandKill: // Command: KILL { [self receiveKill:message]; break; } - case IRCRemoteCommandModeIndex: // Command: MODE + case IRCRemoteCommandMode: // Command: MODE { [self receiveMode:message]; break; } - case IRCRemoteCommandNickIndex: // Command: NICK + case IRCRemoteCommandNick: // Command: NICK { [self receiveNick:message]; break; } - case IRCRemoteCommandPartIndex: // Command: PART + case IRCRemoteCommandPart: // Command: PART { [self receivePart:message]; break; } - case IRCRemoteCommandPingIndex: // Command: PING + case IRCRemoteCommandPing: // Command: PING { [self receivePing:message]; break; } - case IRCRemoteCommandQuitIndex: // Command: QUIT + case IRCRemoteCommandQuit: // Command: QUIT { [self receiveQuit:message]; break; } - case IRCRemoteCommandTopicIndex: // Command: TOPIC + case IRCRemoteCommandTopic: // Command: TOPIC { [self receiveTopic:message]; break; } - case IRCRemoteCommandWallopsIndex: // Command: WALLOPS + case IRCRemoteCommandWallops: // Command: WALLOPS { [self receiveWallops:message]; break; } - case IRCRemoteCommandAuthenticateIndex: // Command: AUTHENTICATE - case IRCRemoteCommandCapIndex: // Command: CAP + case IRCRemoteCommandAuthenticate: // Command: AUTHENTICATE + case IRCRemoteCommandCap: // Command: CAP { [self updateConnectedToZNCPropertyWithMessage:message]; @@ -6232,25 +6232,25 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCRemoteCommandAwayIndex: // Command: AWAY (away-notify CAP) + case IRCRemoteCommandAway: // Command: AWAY (away-notify CAP) { [self receiveAwayNotifyCapability:message]; break; } - case IRCRemoteCommandBatchIndex: // BATCH + case IRCRemoteCommandBatch: // BATCH { [self receiveBatch:message]; break; } - case IRCRemoteCommandCertinfoIndex: // CERTINFO + case IRCRemoteCommandCertinfo: // CERTINFO { [self receiveCertInfo:message]; break; } - case IRCRemoteCommandChghostIndex: + case IRCRemoteCommandChghost: { [self receiveChangeHost:message]; @@ -6423,7 +6423,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END text = [text substringFromIndex:1]; } - TVCLogLineType lineType = TVCLogLinePrivateMessageType; + TVCLogLineType lineType = TVCLogLineTypePrivateMessage; BOOL isPlainText = [m.command isEqualToString:@"PRIVMSG"]; @@ -6440,25 +6440,25 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END if ([text hasPrefixIgnoringCase:@"ACTION "]) { text = [text substringFromIndex:7]; - lineType = TVCLogLineActionType; + lineType = TVCLogLineTypeAction; } else { - lineType = TVCLogLineCTCPQueryType; + lineType = TVCLogLineTypeCTCPQuery; } } else { - lineType = TVCLogLineCTCPReplyType; // notice -> query + lineType = TVCLogLineTypeCTCPReply; // notice -> query } } else if (isPlainText == NO) { - lineType = TVCLogLineNoticeType; + lineType = TVCLogLineTypeNotice; } - if (lineType == TVCLogLineActionType || - lineType == TVCLogLinePrivateMessageType || - lineType == TVCLogLineNoticeType) + if (lineType == TVCLogLineTypeAction || + lineType == TVCLogLineTypePrivateMessage || + lineType == TVCLogLineTypeNotice) { [self receiveText:m lineType:lineType text:text]; - } else if (lineType == TVCLogLineCTCPQueryType) { + } else if (lineType == TVCLogLineTypeCTCPQuery) { [self receiveCTCPQuery:m text:text]; - } else if (lineType == TVCLogLineCTCPReplyType) { + } else if (lineType == TVCLogLineTypeCTCPReply) { [self receiveCTCPReply:m text:text]; } } @@ -6467,11 +6467,11 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END { NSParameterAssert(m != nil); - NSParameterAssert(lineType == TVCLogLineActionType || - lineType == TVCLogLineActionNoHighlightType || - lineType == TVCLogLinePrivateMessageType || - lineType == TVCLogLinePrivateMessageNoHighlightType || - lineType == TVCLogLineNoticeType); + NSParameterAssert(lineType == TVCLogLineTypeAction || + lineType == TVCLogLineTypeActionNoHighlight || + lineType == TVCLogLineTypePrivateMessage || + lineType == TVCLogLineTypePrivateMessageNoHighlight || + lineType == TVCLogLineTypeNotice); NSParameterAssert(text != nil); @@ -6479,8 +6479,8 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END /* Allow empty actions but no other type */ if (text.length == 0) { - if (lineType == TVCLogLineActionType || - lineType == TVCLogLineActionNoHighlightType) + if (lineType == TVCLogLineTypeAction || + lineType == TVCLogLineTypeActionNoHighlight) { text = @" "; } else { @@ -6511,14 +6511,14 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END IRCAddressBookEntry *ignoreInfo = [self findAddressBookEntryForHostmask:m.senderHostmask]; if (ignoreInfo.ignorePublicMessageHighlights) { - if (lineType == TVCLogLineActionType) { - lineType = TVCLogLineActionNoHighlightType; - } else if (lineType == TVCLogLinePrivateMessageType) { - lineType = TVCLogLinePrivateMessageNoHighlightType; + if (lineType == TVCLogLineTypeAction) { + lineType = TVCLogLineTypeActionNoHighlight; + } else if (lineType == TVCLogLineTypePrivateMessage) { + lineType = TVCLogLineTypePrivateMessageNoHighlight; } } - if (lineType == TVCLogLineNoticeType) { + if (lineType == TVCLogLineTypeNotice) { if (ignoreInfo.ignoreNoticeMessages) { return; } @@ -6595,7 +6595,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END TVCLogControllerPrintOperationCompletionBlock printCompletionBlock = nil; - BOOL isPlainText = (lineType != TVCLogLineNoticeType); + BOOL isPlainText = (lineType != TVCLogLineTypeNotice); if (isPlainText == NO) { /* Completion block for notices */ @@ -6604,7 +6604,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END ^(TVCLogControllerPrintOperationContext *context) { if ([self isSafeToPostNotificationForMessage:m inChannel:channel]) { - [self notifyText:TXNotificationChannelNoticeType lineType:lineType target:channel nickname:sender text:text]; + [self notifyText:TXNotificationTypeChannelNotice lineType:lineType target:channel nickname:sender text:text]; } }; } else { @@ -6623,9 +6623,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END if ([self isSafeToPostNotificationForMessage:m inChannel:channel]) { if (isHighlight) { - postEvent = [self notifyText:TXNotificationHighlightType lineType:lineType target:channel nickname:sender text:text]; + postEvent = [self notifyText:TXNotificationTypeHighlight lineType:lineType target:channel nickname:sender text:text]; } else { - postEvent = [self notifyText:TXNotificationChannelMessageType lineType:lineType target:channel nickname:sender text:text]; + postEvent = [self notifyText:TXNotificationTypeChannelMessage lineType:lineType target:channel nickname:sender text:text]; } } @@ -6644,7 +6644,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END /* Ask for permission to print message */ BOOL printMessage = YES; - if ([sharedPluginManager() supportsFeature:THOPluginItemSupportsDidReceivePlainTextMessageEvent]) { + if ([sharedPluginManager() supportsFeature:THOPluginItemSupportedFeatureDidReceivePlainTextMessageEvent]) { printMessage = [THOPluginDispatcher receivedText:text authoredBy:m.sender destinedFor:channel @@ -6699,7 +6699,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END TVCLogControllerPrintOperationCompletionBlock printCompletionBlock = nil; - BOOL isPlainText = (lineType != TVCLogLineNoticeType); + BOOL isPlainText = (lineType != TVCLogLineTypeNotice); /* If the self-message CAP is not enabled, we still check if we are on a ZNC based connections because older versions of ZNC combined with the privmsg @@ -6735,14 +6735,14 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END } /* Determine where to send notice messages */ - if ([TPCPreferences locationToSendNotices] == TXNoticeSendSelectedChannelType) { + if ([TPCPreferences locationToSendNotices] == TXNoticeSendLocationSelectedChannel) { query = [mainWindow() selectedChannelOn:self]; } /* Do not create query until after ChanServ notices have been processed so that entry messages do not create a new window. */ if (query == nil) { - if ([TPCPreferences locationToSendNotices] == TXNoticeSendToQueryDestinationType) { + if ([TPCPreferences locationToSendNotices] == TXNoticeSendLocationQuery) { // newPrivateMessage = YES; if (isSelfMessage) { @@ -6763,7 +6763,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END BOOL postEvent = YES; if ([self isSafeToPostNotificationForMessage:m inChannel:query]) { - postEvent = [self notifyText:TXNotificationPrivateNoticeType lineType:lineType target:query nickname:sender text:text]; + postEvent = [self notifyText:TXNotificationTypePrivateNotice lineType:lineType target:query nickname:sender text:text]; } if (postEvent && query != nil) { @@ -6798,12 +6798,12 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END if ([self isSafeToPostNotificationForMessage:m inChannel:query]) { if (isHighlight) { - postEvent = [self notifyText:TXNotificationHighlightType lineType:lineType target:query nickname:sender text:text]; + postEvent = [self notifyText:TXNotificationTypeHighlight lineType:lineType target:query nickname:sender text:text]; } else { if (newPrivateMessage) { - postEvent = [self notifyText:TXNotificationNewPrivateMessageType lineType:lineType target:query nickname:sender text:text]; + postEvent = [self notifyText:TXNotificationTypeNewPrivateMessage lineType:lineType target:query nickname:sender text:text]; } else { - postEvent = [self notifyText:TXNotificationPrivateMessageType lineType:lineType target:query nickname:sender text:text]; + postEvent = [self notifyText:TXNotificationTypePrivateMessage lineType:lineType target:query nickname:sender text:text]; } } } @@ -6823,7 +6823,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END /* Ask for permission to print message */ BOOL printMessage = YES; - if ([sharedPluginManager() supportsFeature:THOPluginItemSupportsDidReceivePlainTextMessageEvent]) { + if ([sharedPluginManager() supportsFeature:THOPluginItemSupportedFeatureDidReceivePlainTextMessageEvent]) { printMessage = [THOPluginDispatcher receivedText:text authoredBy:m.sender destinedFor:query @@ -6986,7 +6986,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSString *sender = m.senderNickname; - BOOL isPlainText = (lineType != TVCLogLineNoticeType); + BOOL isPlainText = (lineType != TVCLogLineTypeNotice); IRCChannel *query = nil; @@ -7002,7 +7002,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END /* Print message */ BOOL printMessage = YES; - if ([sharedPluginManager() supportsFeature:THOPluginItemSupportsDidReceivePlainTextMessageEvent]) { + if ([sharedPluginManager() supportsFeature:THOPluginItemSupportedFeatureDidReceivePlainTextMessageEvent]) { printMessage = [THOPluginDispatcher receivedText:text authoredBy:m.sender destinedFor:query @@ -7030,7 +7030,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END self.disconnectCallback = ^{ [weakSelf printDebugInformationToConsole:TXTLS(@"IRC[5i4-qq]")]; - [weakSelf connect:IRCClientConnectReconnectMode]; + [weakSelf connect:IRCClientConnectModeReconnect]; }; [self disconnect]; @@ -7086,7 +7086,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END IRCChannel *printTarget = nil; - if ([TPCPreferences locationToSendNotices] == TXNoticeSendSelectedChannelType) { + if ([TPCPreferences locationToSendNotices] == TXNoticeSendLocationSelectedChannel) { printTarget = [mainWindow() selectedChannelOn:self]; } @@ -7096,7 +7096,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:messageToPrint by:nil inChannel:printTarget - asType:TVCLogLineCTCPQueryType + asType:TVCLogLineTypeCTCPQuery command:m.command receivedAt:m.receivedAt]; } @@ -7257,7 +7257,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END /* Print message */ IRCChannel *printTarget = nil; - if ([TPCPreferences locationToSendNotices] == TXNoticeSendSelectedChannelType) { + if ([TPCPreferences locationToSendNotices] == TXNoticeSendLocationSelectedChannel) { printTarget = [mainWindow() selectedChannelOn:self]; } @@ -7274,7 +7274,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:messageToPrint by:nil inChannel:printTarget - asType:TVCLogLineCTCPReplyType + asType:TVCLogLineTypeCTCPReply command:m.command receivedAt:m.receivedAt]; } @@ -7340,7 +7340,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:TXTLS(@"IRC[q0q-ch]", sender) by:nil inChannel:senderQuery - asType:TVCLogLineJoinType + asType:TVCLogLineTypeJoin command:m.command receivedAt:m.receivedAt]; @@ -7377,7 +7377,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:channel - asType:TVCLogLineJoinType + asType:TVCLogLineTypeJoin command:m.command receivedAt:m.receivedAt]; } @@ -7393,7 +7393,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self requestModesForChannel:channel]; } } else { - [self notifyEvent:TXNotificationUserJoinedType lineType:TVCLogLineJoinType target:channel nickname:sender text:nil]; + [self notifyEvent:TXNotificationTypeUserJoined lineType:TVCLogLineTypeJoin target:channel nickname:sender text:nil]; } } @@ -7437,7 +7437,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [channel removeMemberWithNickname:sender]; /* Notify user */ - [self notifyEvent:TXNotificationUserPartedType lineType:TVCLogLinePartType target:channel nickname:sender text:comment]; + [self notifyEvent:TXNotificationTypeUserParted lineType:TVCLogLineTypePart target:channel nickname:sender text:comment]; } } @@ -7468,7 +7468,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:channel - asType:TVCLogLinePartType + asType:TVCLogLineTypePart command:m.command receivedAt:m.receivedAt]; } @@ -7509,7 +7509,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [mainWindow() reloadTreeItem:channel]; /* Notify user */ - [self notifyEvent:TXNotificationKickType lineType:TVCLogLineKickType target:channel nickname:sender text:comment]; + [self notifyEvent:TXNotificationTypeKick lineType:TVCLogLineTypeKick target:channel nickname:sender text:comment]; /* Rejoin channel */ if ([TPCPreferences rejoinOnKick] && channel.errorOnLastJoinAttempt == NO) { @@ -7549,7 +7549,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:channel - asType:TVCLogLineKickType + asType:TVCLogLineTypeKick command:m.command receivedAt:m.receivedAt]; } @@ -7613,7 +7613,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END { if (myself == NO && isPrintOnlyMessage == NO) { switch (channel.type) { - case IRCChannelChannelType: + case IRCChannelTypeChannel: { IRCChannelUser *member = [user userAssociatedWithChannel:channel]; @@ -7625,7 +7625,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCChannelPrivateMessageType: + case IRCChannelTypePrivateMessage: { if ([sender isEqualToStringIgnoringCase:channel.name] == NO) { return; @@ -7675,7 +7675,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:channel - asType:TVCLogLineQuitType + asType:TVCLogLineTypeQuit command:m.command receivedAt:m.receivedAt]; }; @@ -7699,7 +7699,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END if (myself == NO) { [mainWindow() updateTitleFor:self]; - [self notifyEvent:TXNotificationUserDisconnectedType lineType:TVCLogLineQuitType target:nil nickname:sender text:comment]; + [self notifyEvent:TXNotificationTypeUserDisconnected lineType:TVCLogLineTypeQuit target:nil nickname:sender text:comment]; } } @@ -7820,7 +7820,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END { if (isPrintOnlyMessage == NO) { switch (channel.type) { - case IRCChannelChannelType: + case IRCChannelTypeChannel: { /* Rename the user in the channel */ IRCChannelUser *member = [user userAssociatedWithChannel:channel]; @@ -7833,7 +7833,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END break; } - case IRCChannelPrivateMessageType: + case IRCChannelTypePrivateMessage: { /* Rename private message if one with old name is found */ if ([oldNickname isEqualToStringIgnoringCase:channel.name] == NO) { @@ -7885,7 +7885,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:messageToPrint by:nil inChannel:channel - asType:TVCLogLineNickType + asType:TVCLogLineTypeNick command:m.command receivedAt:m.receivedAt]; }; @@ -7932,7 +7932,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:TXTLS(@"IRC[v5d-ix]", sender, modeString) by:nil inChannel:nil - asType:TVCLogLineModeType + asType:TVCLogLineTypeMode command:m.command receivedAt:m.receivedAt]; } @@ -7969,7 +7969,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:TXTLS(@"IRC[v5d-ix]", sender, modeString) by:nil inChannel:channel - asType:TVCLogLineModeType + asType:TVCLogLineTypeMode command:m.command receivedAt:m.receivedAt]; } @@ -8008,7 +8008,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:TXTLS(@"IRC[qq2-66]", sender, topic) by:nil inChannel:channel - asType:TVCLogLineTopicType + asType:TVCLogLineTypeTopic command:m.command receivedAt:m.receivedAt]; } @@ -8034,12 +8034,12 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:[mainWindow() selectedChannelOn:self] - asType:TVCLogLineInviteType + asType:TVCLogLineTypeInvite command:m.command receivedAt:m.receivedAt]; } - [self notifyEvent:TXNotificationInviteType lineType:TVCLogLineInviteType target:nil nickname:sender text:channelName]; + [self notifyEvent:TXNotificationTypeInvite lineType:TVCLogLineTypeInvite target:nil nickname:sender text:channelName]; if ([TPCPreferences autoJoinOnInvite]) { [self joinUnlistedChannel:channelName]; @@ -8293,47 +8293,47 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END #pragma mark - #pragma mark Server Capability -- (void)enableCapability:(ClientIRCv3SupportedCapabilities)capability +- (void)enableCapability:(ClientIRCv3SupportedCapability)capability { if ([self isCapabilityEnabled:capability] == NO) { self->_capabilities |= capability; } } -- (void)disableCapability:(ClientIRCv3SupportedCapabilities)capability +- (void)disableCapability:(ClientIRCv3SupportedCapability)capability { if ([self isCapabilityEnabled:capability]) { self->_capabilities &= ~capability; } } -- (BOOL)isCapabilityEnabled:(ClientIRCv3SupportedCapabilities)capability +- (BOOL)isCapabilityEnabled:(ClientIRCv3SupportedCapability)capability { return ((self->_capabilities & capability) == capability); } -- (void)enablePendingCapability:(ClientIRCv3SupportedCapabilities)capability +- (void)enablePendingCapability:(ClientIRCv3SupportedCapability)capability { @synchronized (self.capabilitiesPending) { [self.capabilitiesPending addObjectWithoutDuplication:@(capability)]; } } -- (void)disablePendingCapability:(ClientIRCv3SupportedCapabilities)capability +- (void)disablePendingCapability:(ClientIRCv3SupportedCapability)capability { @synchronized (self.capabilitiesPending) { [self.capabilitiesPending removeObject:@(capability)]; } } -- (BOOL)isPendingCapabilityEnabled:(ClientIRCv3SupportedCapabilities)capability +- (BOOL)isPendingCapabilityEnabled:(ClientIRCv3SupportedCapability)capability { @synchronized (self.capabilitiesPending) { return [self.capabilitiesPending containsObject:@(capability)]; } } -- (nullable NSString *)capabilityStringValue:(ClientIRCv3SupportedCapabilities)capability +- (nullable NSString *)capabilityStringValue:(ClientIRCv3SupportedCapability)capability { NSString *stringValue = nil; @@ -8466,7 +8466,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END return stringValue; } -- (ClientIRCv3SupportedCapabilities)capabilityFromStringValue:(NSString *)capabilityString +- (ClientIRCv3SupportedCapability)capabilityFromStringValue:(NSString *)capabilityString { NSParameterAssert(capabilityString != nil); @@ -8511,7 +8511,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END { NSMutableArray *enabledCapabilities = [NSMutableArray array]; - void (^appendValue)(ClientIRCv3SupportedCapabilities) = ^(ClientIRCv3SupportedCapabilities capability) { + void (^appendValue)(ClientIRCv3SupportedCapability) = ^(ClientIRCv3SupportedCapability capability) { if ([self isCapabilityEnabled:capability] == NO) { return; } @@ -8555,7 +8555,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END array for the first capability that is acceptable for negotiation. */ NSUInteger nextCapabilityIndex = [self.capabilitiesPending indexOfObjectPassingTest:^BOOL(NSNumber *capabilityPending, NSUInteger index, BOOL *stop) { - ClientIRCv3SupportedCapabilities capability = capabilityPending.unsignedIntegerValue; + ClientIRCv3SupportedCapability capability = capabilityPending.unsignedIntegerValue; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-compare" @@ -8587,7 +8587,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END return; } - ClientIRCv3SupportedCapabilities capability = + ClientIRCv3SupportedCapability capability = [self.capabilitiesPending unsignedIntegerAtIndex:nextCapabilityIndex]; [self.capabilitiesPending removeObjectAtIndex:nextCapabilityIndex]; @@ -8658,7 +8658,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END return; } - ClientIRCv3SupportedCapabilities capability = [self capabilityFromStringValue:capabilityString]; + ClientIRCv3SupportedCapability capability = [self capabilityFromStringValue:capabilityString]; if (capability == 0) { return; @@ -8721,7 +8721,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END return; } - ClientIRCv3SupportedCapabilities capability = [self capabilityFromStringValue:capabilityString]; + ClientIRCv3SupportedCapability capability = [self capabilityFromStringValue:capabilityString]; [self enablePendingCapability:capability]; } @@ -8789,7 +8789,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END - (void)processPendingCapabilityForSASL:(nullable NSArray *)capabilityOptions { - ClientIRCv3SupportedCapabilities identificationMechanism = 0; + ClientIRCv3SupportedCapability identificationMechanism = 0; if (self.socket.isConnectedWithClientSideCertificate && self.config.saslAuthenticationDisableExternalMechanism == NO) @@ -8939,7 +8939,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END /* Post event */ [self postEventToViewController:@"serverConnected"]; - [self notifyEvent:TXNotificationConnectType lineType:TVCLogLineDebugType]; + [self notifyEvent:TXNotificationTypeConnect lineType:TVCLogLineTypeDebug]; /* Perform login commands */ for (__strong NSString *command in self.config.loginCommands) { @@ -9064,7 +9064,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSString *serverAddress = [m paramAt:1]; NSString *serverPort = [m paramAt:2]; - self.disconnectType = IRCClientDisconnectServerRedirectMode; + self.disconnectType = IRCClientDisconnectModeServerRedirect; /* If the address is thought to be invalid, then we still perform the disconnect suggested by the redirect, but @@ -9124,7 +9124,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:nil - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; @@ -9167,7 +9167,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:TXTLS(@"IRC[ipj-34]", nickname, modeString) by:nil inChannel:nil - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; } @@ -9205,7 +9205,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:channel - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; } @@ -9277,7 +9277,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:[mainWindow() selectedChannelOn:self] - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; @@ -9323,7 +9323,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:[mainWindow() selectedChannelOn:self] - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; } @@ -9357,7 +9357,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:[mainWindow() selectedChannelOn:self] - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; @@ -9384,7 +9384,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:[mainWindow() selectedChannelOn:self] - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; @@ -9404,7 +9404,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:[mainWindow() selectedChannelOn:self] - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; @@ -9421,7 +9421,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:[mainWindow() selectedChannelOn:self] - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; @@ -9487,7 +9487,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:TXTLS(@"IRC[obp-ww]", message) by:nil inChannel:channel - asType:TVCLogLineModeType + asType:TVCLogLineTypeMode command:m.command receivedAt:m.receivedAt]; } @@ -9515,7 +9515,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:TXTLS(@"IRC[7nm-7v]", topic) by:nil inChannel:channel - asType:TVCLogLineTopicType + asType:TVCLogLineTypeTopic command:m.command receivedAt:m.receivedAt]; } @@ -9554,7 +9554,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:channel - asType:TVCLogLineTopicType + asType:TVCLogLineTypeTopic command:m.command receivedAt:m.receivedAt]; @@ -9582,7 +9582,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:TXTLS(@"IRC[wk4-rv]", nickname, channelName) by:nil inChannel:channel - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; @@ -9618,7 +9618,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [trackedUsers enumerateKeysAndObjectsUsingBlock:^(NSString *trackedUser, NSNumber *trackingStatusInt, BOOL *stop) { IRCAddressBookUserTrackingStatus trackingStatus = - IRCAddressBookUserTrackingUnknownStatus; + IRCAddressBookUserTrackingStatusUnknown; /* Was the user on during the last check? */ BOOL ison = trackingStatusInt.boolValue; @@ -9628,23 +9628,23 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END users in this reply, then they are considered gone. Log that. */ if ([onlineNicknames containsObjectIgnoringCase:trackedUser] == NO) { if (self.invokingISONCommandForFirstTime == NO) { - trackingStatus = IRCAddressBookUserTrackingSignedOffStatus; + trackingStatus = IRCAddressBookUserTrackingStatusSignedOff; } } } else { /* If they were not on but now are, then log that too. */ if ([onlineNicknames containsObjectIgnoringCase:trackedUser]) { if (self.invokingISONCommandForFirstTime) { - trackingStatus = IRCAddressBookUserTrackingIsAvailalbeStatus; + trackingStatus = IRCAddressBookUserTrackingStatusAvailalbe; } else { - trackingStatus = IRCAddressBookUserTrackingSignedOnStatus; + trackingStatus = IRCAddressBookUserTrackingStatusSignedOn; } } } /* If something changed (non-nil localization string), then scan the list of address book entries to report the result. */ - if (trackingStatus != IRCAddressBookUserTrackingUnknownStatus) { + if (trackingStatus != IRCAddressBookUserTrackingStatusUnknown) { [self statusOfTrackedNickname:trackedUser changedTo:trackingStatus notify:YES]; } }]; // for @@ -10105,7 +10105,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:message by:nil inChannel:nil - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; @@ -10142,7 +10142,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:TXTLS(@"IRC[6bh-br]", m.senderNickname) by:nil inChannel:nil - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; } @@ -10167,7 +10167,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:TXTLS(@"IRC[8tq-g6]", website) by:nil inChannel:channel - asType:TVCLogLineWebsiteType + asType:TVCLogLineTypeWebsite command:m.command receivedAt:m.receivedAt]; @@ -10246,13 +10246,13 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END switch (numeric) { case RPL_LOGON: // logged online { - [self statusOfTrackedNickname:nickname changedTo:IRCAddressBookUserTrackingSignedOnStatus notify:YES]; + [self statusOfTrackedNickname:nickname changedTo:IRCAddressBookUserTrackingStatusSignedOn notify:YES]; break; } case RPL_LOGOFF: // logged offline { - [self statusOfTrackedNickname:nickname changedTo:IRCAddressBookUserTrackingSignedOffStatus notify:YES]; + [self statusOfTrackedNickname:nickname changedTo:IRCAddressBookUserTrackingStatusSignedOff notify:YES]; break; } @@ -10286,13 +10286,13 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END switch (numeric) { case RPL_NOWON: // is online { - [self statusOfTrackedNickname:nickname changedTo:IRCAddressBookUserTrackingIsAvailalbeStatus notify:NO]; + [self statusOfTrackedNickname:nickname changedTo:IRCAddressBookUserTrackingStatusAvailalbe notify:NO]; break; } case RPL_NOWOFF: // is offline { - [self statusOfTrackedNickname:nickname changedTo:IRCAddressBookUserTrackingIsNotAvailalbeStatus notify:NO]; + [self statusOfTrackedNickname:nickname changedTo:IRCAddressBookUserTrackingStatusNotAvailalbe notify:NO]; break; } @@ -10370,9 +10370,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END } if (numeric == RPL_MONONLINE) { // logged online - [self statusOfTrackedNickname:nickname changedTo:IRCAddressBookUserTrackingSignedOnStatus notify:YES]; + [self statusOfTrackedNickname:nickname changedTo:IRCAddressBookUserTrackingStatusSignedOn notify:YES]; } else { - [self statusOfTrackedNickname:nickname changedTo:IRCAddressBookUserTrackingSignedOffStatus notify:YES]; + [self statusOfTrackedNickname:nickname changedTo:IRCAddressBookUserTrackingStatusSignedOff notify:YES]; } } @@ -10426,7 +10426,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END IRCChannel *channel = nil; - if ([TPCPreferences locationToSendNotices] == TXNoticeSendSelectedChannelType) { + if ([TPCPreferences locationToSendNotices] == TXNoticeSendLocationSelectedChannel) { channel = [mainWindow() selectedChannelOn:self]; } @@ -10448,7 +10448,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:[m sequence:3] by:nil inChannel:nil - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; } @@ -10465,7 +10465,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END [self print:[m sequence:2] by:nil inChannel:nil - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:m.command receivedAt:m.receivedAt]; } @@ -11050,7 +11050,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END return; } - [self connect:IRCClientConnectReconnectMode]; + [self connect:IRCClientConnectModeReconnect]; } - (void)startRetryTimer @@ -11081,7 +11081,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END __weak IRCClient *weakSelf = self; self.disconnectCallback = ^{ - [weakSelf connect:IRCClientConnectRetryMode]; + [weakSelf connect:IRCClientConnectModeRetry]; }; [self disconnect]; @@ -11171,7 +11171,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END } else { - self.disconnectType = IRCClientDisconnectSoftwareTrialMode; + self.disconnectType = IRCClientDisconnectModeSoftwareTrial; [self quit]; } @@ -11487,7 +11487,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END - (void)connect { - [self connect:IRCClientConnectNormalMode]; + [self connect:IRCClientConnectModeNormal]; } - (void)connect:(IRCClientConnectMode)connectMode @@ -11581,7 +11581,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END /* Reset status */ self.connectType = connectMode; - self.disconnectType = IRCClientDisconnectNormalMode; + self.disconnectType = IRCClientDisconnectModeNormal; self.isConnecting = YES; @@ -11593,9 +11593,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END /* Present status to user */ [mainWindow() updateTitleFor:self]; - if (connectMode == IRCClientConnectReconnectMode) { + if (connectMode == IRCClientConnectModeReconnect) { [self printDebugInformationToConsole:TXTLS(@"IRC[xxb-y2]")]; - } else if (connectMode == IRCClientConnectRetryMode) { + } else if (connectMode == IRCClientConnectModeRetry) { [self printDebugInformationToConsole:TXTLS(@"IRC[ky3-36]")]; } @@ -11725,7 +11725,7 @@ TEXTUAL_IGNORE_DEPRECATION_END self.reconnectEnabledBecauseOfSleepMode = YES; - [self connect:IRCClientConnectReconnectMode]; + [self connect:IRCClientConnectModeReconnect]; } - (void)disconnect @@ -11751,7 +11751,7 @@ TEXTUAL_IGNORE_DEPRECATION_END { NSString *comment = nil; - if (self.disconnectType == IRCClientDisconnectComputerSleepMode) { + if (self.disconnectType == IRCClientDisconnectModeComputerSleep) { comment = self.config.sleepModeLeavingComment; } else { comment = self.config.normalLeavingComment; @@ -12484,31 +12484,31 @@ TEXTUAL_IGNORE_DEPRECATION_END NSString *description = nil; switch (type) { - case TXNotificationFileTransferSendSuccessfulType: + case TXNotificationTypeFileTransferSendSuccessful: { description = TXTLS(@"Notifications[fhn-dd]", filename, totalFilesize); break; } - case TXNotificationFileTransferReceiveSuccessfulType: + case TXNotificationTypeFileTransferReceiveSuccessful: { description = TXTLS(@"Notifications[oqh-pn]", filename, totalFilesize); break; } - case TXNotificationFileTransferSendFailedType: + case TXNotificationTypeFileTransferSendFailed: { description = TXTLS(@"Notifications[9r4-cq]", filename); break; } - case TXNotificationFileTransferReceiveFailedType: + case TXNotificationTypeFileTransferReceiveFailed: { description = TXTLS(@"Notifications[cqq-ci]", filename); break; } - case TXNotificationFileTransferReceiveRequestedType: + case TXNotificationTypeFileTransferReceiveRequested: { description = TXTLS(@"Notifications[wik-wq]", filename, totalFilesize); @@ -12526,7 +12526,7 @@ TEXTUAL_IGNORE_DEPRECATION_END @"fileTransferNotificationType" : @(type) }; - [self notifyEvent:type lineType:TVCLogLineUndefinedType target:nil nickname:nickname text:description userInfo:info]; + [self notifyEvent:type lineType:TVCLogLineTypeUndefined target:nil nickname:nickname text:description userInfo:info]; } - (void)receivedDCCQuery:(IRCMessage *)m text:(NSString *)text ignoreInfo:(nullable IRCAddressBookEntry *)ignoreInfo @@ -12696,7 +12696,7 @@ TEXTUAL_IGNORE_DEPRECATION_END } else if (e) { - if (e.transferStatus != TDCFileTransferDialogTransferWaitingForReceiverToAcceptStatus) { + if (e.transferStatus != TDCFileTransferDialogTransferStatusWaitingForReceiverToAccept) { LogToConsoleError("Fatal error: Unexpected request to begin transfer"); goto present_error; @@ -12736,9 +12736,9 @@ TEXTUAL_IGNORE_DEPRECATION_END goto present_error; } - if ((isResumeRequest && (e.transferStatus != TDCFileTransferDialogTransferWaitingForReceiverToAcceptStatus && - e.transferStatus != TDCFileTransferDialogTransferIsListeningAsSenderStatus)) || - (isAcceptRequest && e.transferStatus != TDCFileTransferDialogTransferWaitingForResumeAcceptStatus)) + if ((isResumeRequest && (e.transferStatus != TDCFileTransferDialogTransferStatusWaitingForReceiverToAccept && + e.transferStatus != TDCFileTransferDialogTransferStatusIsListeningAsSender)) || + (isAcceptRequest && e.transferStatus != TDCFileTransferDialogTransferStatusWaitingForResumeAccept)) { LogToConsoleError("Fatal error: Bad transfer status"); @@ -12756,7 +12756,7 @@ TEXTUAL_IGNORE_DEPRECATION_END // Report an error present_error: - [self print:TXTLS(@"IRC[y3w-la]", sender) by:nil inChannel:nil asType:TVCLogLineDCCFileTransferType command:TVCLogLineDefaultCommandValue]; + [self print:TXTLS(@"IRC[y3w-la]", sender) by:nil inChannel:nil asType:TVCLogLineTypeDCCFileTransfer command:TVCLogLineDefaultCommandValue]; } - (void)receivedDCCSend:(NSString *)nickname filename:(NSString *)filename address:(NSString *)address port:(uint16_t)port filesize:(uint64_t)totalFilesize token:(nullable NSString *)transferToken @@ -12767,9 +12767,9 @@ present_error: NSString *message = TXTLS(@"IRC[snf-45]", nickname, filename, totalFilesize); - [self print:message by:nil inChannel:nil asType:TVCLogLineDCCFileTransferType command:TVCLogLineDefaultCommandValue]; + [self print:message by:nil inChannel:nil asType:TVCLogLineTypeDCCFileTransfer command:TVCLogLineDefaultCommandValue]; - if ([TPCPreferences fileTransferRequestReplyAction] == TXFileTransferRequestReplyIgnoreAction) { + if ([TPCPreferences fileTransferRequestReplyAction] == TXFileTransferRequestReplyIgnore) { return; } @@ -12779,7 +12779,7 @@ present_error: return; } - [self notifyFileTransfer:TXNotificationFileTransferReceiveRequestedType nickname:nickname filename:filename filesize:totalFilesize requestIdentifier:addedRequest]; + [self notifyFileTransfer:TXNotificationTypeFileTransferReceiveRequested nickname:nickname filename:filename filesize:totalFilesize requestIdentifier:addedRequest]; } - (void)sendFileResume:(NSString *)nickname port:(uint16_t)port filename:(NSString *)filename filesize:(uint64_t)totalFilesize token:(nullable NSString *)transferToken @@ -12843,7 +12843,7 @@ present_error: NSString *message = TXTLS(@"IRC[ags-s8]", nickname, filename, totalFilesize); - [self print:message by:nil inChannel:nil asType:TVCLogLineDCCFileTransferType command:TVCLogLineDefaultCommandValue]; + [self print:message by:nil inChannel:nil asType:TVCLogLineTypeDCCFileTransfer command:TVCLogLineDefaultCommandValue]; } - (NSString *)DCCSendEscapeFilename:(NSString *)filename @@ -13072,11 +13072,11 @@ present_error: NSString *message = nil; - if (newStatus == IRCAddressBookUserTrackingSignedOnStatus) { + if (newStatus == IRCAddressBookUserTrackingStatusSignedOn) { message = TXTLS(@"Notifications[xk2-1l]", nickname); - } else if (newStatus == IRCAddressBookUserTrackingSignedOffStatus) { + } else if (newStatus == IRCAddressBookUserTrackingStatusSignedOff) { message = TXTLS(@"Notifications[rif-9r]", nickname); - } else if (newStatus == IRCAddressBookUserTrackingIsAvailalbeStatus) { + } else if (newStatus == IRCAddressBookUserTrackingStatusAvailalbe) { message = TXTLS(@"Notifications[97r-0l]", nickname); } @@ -13084,7 +13084,7 @@ present_error: return; } - [self notifyEvent:TXNotificationAddressBookMatchType lineType:TVCLogLineNoticeType target:nil nickname:nickname text:message]; + [self notifyEvent:TXNotificationTypeAddressBookMatch lineType:TVCLogLineTypeNotice target:nil nickname:nickname text:message]; } - (void)populateISONTrackedUsersList @@ -13112,7 +13112,7 @@ present_error: IRCAddressBookUserTrackingStatus trackingStatus = [self.trackedUsers statusOfUser:trackingNickname]; - if (trackingStatus != IRCAddressBookUserTrackingUnknownStatus) { + if (trackingStatus != IRCAddressBookUserTrackingStatusUnknown) { [trackedUsersNew addObject:trackingNickname]; continue; @@ -13334,16 +13334,16 @@ present_error: IRCAddressBookUserTrackingStatus trackingStatus = [self.trackedUsers statusOfEntry:addressBookEntry]; - if (trackingStatus == IRCAddressBookUserTrackingUnknownStatus) { + if (trackingStatus == IRCAddressBookUserTrackingStatusUnknown) { return; } - BOOL ison = (trackingStatus == IRCAddressBookUserTrackingIsAvailalbeStatus); + BOOL ison = (trackingStatus == IRCAddressBookUserTrackingStatusAvailalbe); /* Notification Type: JOIN Command */ if ([message.command isEqualToStringIgnoringCase:@"JOIN"]) { if (ison == NO) { - [self statusOfTrackedNickname:message.senderNickname changedTo:IRCAddressBookUserTrackingSignedOnStatus notify:YES]; + [self statusOfTrackedNickname:message.senderNickname changedTo:IRCAddressBookUserTrackingStatusSignedOn notify:YES]; } return; @@ -13352,7 +13352,7 @@ present_error: /* Notification Type: QUIT Command */ if ([message.command isEqualToStringIgnoringCase:@"QUIT"]) { if (ison) { - [self statusOfTrackedNickname:message.senderNickname changedTo:IRCAddressBookUserTrackingSignedOffStatus notify:YES]; + [self statusOfTrackedNickname:message.senderNickname changedTo:IRCAddressBookUserTrackingStatusSignedOff notify:YES]; } return; @@ -13361,9 +13361,9 @@ present_error: /* Notification Type: NICK Command */ if ([message.command isEqualToStringIgnoringCase:@"NICK"]) { if (ison) { - [self statusOfTrackedNickname:message.senderNickname changedTo:IRCAddressBookUserTrackingSignedOffStatus notify:YES]; + [self statusOfTrackedNickname:message.senderNickname changedTo:IRCAddressBookUserTrackingStatusSignedOff notify:YES]; } else { - [self statusOfTrackedNickname:message.senderNickname changedTo:IRCAddressBookUserTrackingSignedOnStatus notify:YES]; + [self statusOfTrackedNickname:message.senderNickname changedTo:IRCAddressBookUserTrackingStatusSignedOn notify:YES]; } return; @@ -13375,22 +13375,22 @@ present_error: - (void)createChannelInviteExceptionListSheet { - [self createChannelBanListSheet:TDCChannelBanListSheetInviteExceptionEntryType]; + [self createChannelBanListSheet:TDCChannelBanListSheetEntryTypeInviteException]; } - (void)createChannelBanExceptionListSheet { - [self createChannelBanListSheet:TDCChannelBanListSheetBanExceptionEntryType]; + [self createChannelBanListSheet:TDCChannelBanListSheetEntryTypeBanException]; } - (void)createChannelBanListSheet { - [self createChannelBanListSheet:TDCChannelBanListSheetBanEntryType]; + [self createChannelBanListSheet:TDCChannelBanListSheetEntryTypeBan]; } - (void)createChannelQuietListSheet { - [self createChannelBanListSheet:TDCChannelBanListSheetQuietEntryType]; + [self createChannelBanListSheet:TDCChannelBanListSheetEntryTypeQuiet]; } - (void)createChannelBanListSheet:(TDCChannelBanListSheetEntryType)entryType diff --git a/Sources/App/Classes/IRC/IRCClientConfig.m b/Sources/App/Classes/IRC/IRCClientConfig.m index 9fc730c38..a93f04acf 100755 --- a/Sources/App/Classes/IRC/IRCClientConfig.m +++ b/Sources/App/Classes/IRC/IRCClientConfig.m @@ -392,7 +392,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END for (NSDictionary *e in channelListIn) { IRCChannelConfig *c = [[IRCChannelConfig alloc] initWithDictionary:e]; - if (c.type == IRCChannelPrivateMessageType) { + if (c.type == IRCChannelTypePrivateMessage) { if (ignorePrivateMessages == NO) { [channelListOut addObject:c]; } diff --git a/Sources/App/Classes/IRC/IRCClientRequestedCommands.m b/Sources/App/Classes/IRC/IRCClientRequestedCommands.m index 1868ee149..13a535533 100644 --- a/Sources/App/Classes/IRC/IRCClientRequestedCommands.m +++ b/Sources/App/Classes/IRC/IRCClientRequestedCommands.m @@ -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 diff --git a/Sources/App/Classes/IRC/IRCHighlightLogEntry.m b/Sources/App/Classes/IRC/IRCHighlightLogEntry.m index a52df09a8..098bcb9ba 100644 --- a/Sources/App/Classes/IRC/IRCHighlightLogEntry.m +++ b/Sources/App/Classes/IRC/IRCHighlightLogEntry.m @@ -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 "• : 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]; diff --git a/Sources/App/Classes/Preferences/TPCPreferencesReload.m b/Sources/App/Classes/Preferences/TPCPreferencesReload.m index d2c2be5bb..f988fb2bf 100644 --- a/Sources/App/Classes/Preferences/TPCPreferencesReload.m +++ b/Sources/App/Classes/Preferences/TPCPreferencesReload.m @@ -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]; diff --git a/Sources/App/Classes/Preferences/Themes/TPCThemeController.m b/Sources/App/Classes/Preferences/Themes/TPCThemeController.m old mode 100755 new mode 100644 index 817173dc0..3d718ccff --- a/Sources/App/Classes/Preferences/Themes/TPCThemeController.m +++ b/Sources/App/Classes/Preferences/Themes/TPCThemeController.m @@ -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 *> *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 */ diff --git a/Sources/App/Classes/Preferences/Themes/TPCThemeSettings.m b/Sources/App/Classes/Preferences/Themes/TPCThemeSettings.m index 69b9171e4..47fb473e1 100755 --- a/Sources/App/Classes/Preferences/Themes/TPCThemeSettings.m +++ b/Sources/App/Classes/Preferences/Themes/TPCThemeSettings.m @@ -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; } } diff --git a/Sources/App/Classes/Preferences/iCloud/TPCPreferencesCloudSyncExtension.m b/Sources/App/Classes/Preferences/iCloud/TPCPreferencesCloudSyncExtension.m index 2c36b8398..5bbd4f7e4 100644 --- a/Sources/App/Classes/Preferences/iCloud/TPCPreferencesCloudSyncExtension.m +++ b/Sources/App/Classes/Preferences/iCloud/TPCPreferencesCloudSyncExtension.m @@ -100,7 +100,7 @@ NSString * const TPCPreferencesCloudSyncDidChangeThemeNameNotification = @"TPCPr [TPCPreferences setThemeName:remoteValue]; // Will reset the BOOL - [TPCPreferences performReloadAction:TPCPreferencesReloadStyleAction]; + [TPCPreferences performReloadAction:TPCPreferencesReloadActionStyle]; [RZNotificationCenter() postNotificationName:TPCPreferencesCloudSyncDidChangeThemeNameNotification object:nil]; } @@ -127,7 +127,7 @@ NSString * const TPCPreferencesCloudSyncDidChangeThemeNameNotification = @"TPCPr [TPCPreferences setThemeChannelViewFontName:remoteValue]; // Will remove the BOOL - [TPCPreferences performReloadAction:TPCPreferencesReloadStyleAction]; + [TPCPreferences performReloadAction:TPCPreferencesReloadActionStyle]; [RZNotificationCenter() postNotificationName:TPCPreferencesCloudSyncDidChangeThemeFontNotification object:nil]; } diff --git a/Sources/App/Classes/Views/Channel View/TVCLogController.m b/Sources/App/Classes/Views/Channel View/TVCLogController.m old mode 100755 new mode 100644 index 09b923923..272ca5510 --- a/Sources/App/Classes/Views/Channel View/TVCLogController.m +++ b/Sources/App/Classes/Views/Channel View/TVCLogController.m @@ -411,7 +411,7 @@ ClassWithDesignatedInitializerInitMethod forViewController:self withAttributes:@{ TVCLogRendererConfigurationRenderLinksAttribute : @YES, - TVCLogRendererConfigurationLineTypeAttribute : @(TVCLogLineTopicType) + TVCLogRendererConfigurationLineTypeAttribute : @(TVCLogLineTypeTopic) } resultInfo:NULL]; @@ -809,7 +809,7 @@ ClassWithDesignatedInitializerInitMethod self.activeLineCount += lineNumbers.count; - if ([sharedPluginManager() supportsFeature:THOPluginItemSupportsNewMessagePostedEvent] == NO) { + if ([sharedPluginManager() supportsFeature:THOPluginItemSupportedFeatureNewMessagePostedEvent] == NO) { return; } @@ -1288,7 +1288,7 @@ ClassWithDesignatedInitializerInitMethod /* Using informationi provided by conversation tracking we can update our internal array of favored nicknames for nick completion. */ - if (logLine.memberType == TVCLogLineMemberLocalUserType) { + if (logLine.memberType == TVCLogLineMemberTypeLocalUser) { [listOfUsers.allObjects makeObjectsPerformSelector:@selector(outgoingConversation)]; } else { [listOfUsers.allObjects makeObjectsPerformSelector:@selector(conversation)]; @@ -1362,7 +1362,7 @@ ClassWithDesignatedInitializerInitMethod BOOL inlineMedia = (self.inlineMediaEnabledForView && - (lineType == TVCLogLinePrivateMessageType || lineType == TVCLogLineActionType)); + (lineType == TVCLogLineTypePrivateMessage || lineType == TVCLogLineTypeAction)); NSString *lineNumber = logLine.uniqueIdentifier; @@ -1417,7 +1417,7 @@ ClassWithDesignatedInitializerInitMethod NSString *classAttribute = nil; - if (lineType == TVCLogLinePrivateMessageType || lineType == TVCLogLineActionType || lineType == TVCLogLineNoticeType) { + if (lineType == TVCLogLineTypePrivateMessage || lineType == TVCLogLineTypeAction || lineType == TVCLogLineTypeNotice) { classAttribute = @"text"; } else { classAttribute = @"event"; @@ -1441,7 +1441,7 @@ ClassWithDesignatedInitializerInitMethod templateAttributes[@"isHighlight"] = @(highlighted); - templateAttributes[@"isRemoteMessage"] = @(logLine.memberType == TVCLogLineMemberNormalType); + templateAttributes[@"isRemoteMessage"] = @(logLine.memberType == TVCLogLineMemberTypeNormal); // ---- // @@ -1484,7 +1484,7 @@ ClassWithDesignatedInitializerInitMethod if (resultInfoTemp) { resultInfoTemp[@"processInlineMedia"] = @(inlineMedia); - if ([sharedPluginManager() supportsFeature:THOPluginItemSupportsNewMessagePostedEvent]) { + if ([sharedPluginManager() supportsFeature:THOPluginItemSupportedFeatureNewMessagePostedEvent]) { NSArray *listOfLinks = rendererResults[TVCLogRendererResultsListOfLinksInBodyAttribute]; THOPluginDidPostNewMessageConcreteObject *pluginConcreteObject = diff --git a/Sources/App/Classes/Views/Channel View/TVCLogLine.m b/Sources/App/Classes/Views/Channel View/TVCLogLine.m index b178c3d7a..eb1e738df 100755 --- a/Sources/App/Classes/Views/Channel View/TVCLogLine.m +++ b/Sources/App/Classes/Views/Channel View/TVCLogLine.m @@ -187,12 +187,12 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_BEGIN SetVariableIfNil(self->_messageBody, @"") SetVariableIfNil(self->_receivedAt, [NSDate date]) - if (self->_lineType == TVCLogLineActionNoHighlightType) { - self->_lineType = TVCLogLineActionType; + if (self->_lineType == TVCLogLineTypeActionNoHighlight) { + self->_lineType = TVCLogLineTypeAction; self->_highlightKeywords = nil; - } else if (self->_lineType == TVCLogLinePrivateMessageNoHighlightType) { - self->_lineType = TVCLogLinePrivateMessageType; + } else if (self->_lineType == TVCLogLineTypePrivateMessageNoHighlight) { + self->_lineType = TVCLogLineTypePrivateMessage; self->_highlightKeywords = nil; } @@ -281,27 +281,27 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_BEGIN #define _dv(lineType, returnValue) case (lineType): { return (returnValue); break; } switch (type) { - _dv(TVCLogLineActionType, @"action") - _dv(TVCLogLineActionNoHighlightType, @"action") - _dv(TVCLogLineCTCPType, @"ctcp") - _dv(TVCLogLineCTCPQueryType, @"ctcp") - _dv(TVCLogLineCTCPReplyType, @"ctcp") - _dv(TVCLogLineDCCFileTransferType, @"dcc-file-transfer") - _dv(TVCLogLineDebugType, @"debug") - _dv(TVCLogLineInviteType, @"invite") - _dv(TVCLogLineJoinType, @"join") - _dv(TVCLogLineKickType, @"kick") - _dv(TVCLogLineKillType, @"kill") - _dv(TVCLogLineModeType, @"mode") - _dv(TVCLogLineNickType, @"nick") - _dv(TVCLogLineNoticeType, @"notice") - _dv(TVCLogLineOffTheRecordEncryptionStatusType, @"off-the-record-encryption-status") - _dv(TVCLogLinePartType, @"part") - _dv(TVCLogLinePrivateMessageType, @"privmsg") - _dv(TVCLogLinePrivateMessageNoHighlightType, @"privmsg") - _dv(TVCLogLineQuitType, @"quit") - _dv(TVCLogLineTopicType, @"topic") - _dv(TVCLogLineWebsiteType, @"website") + _dv(TVCLogLineTypeAction, @"action") + _dv(TVCLogLineTypeActionNoHighlight, @"action") + _dv(TVCLogLineTypeCTCP, @"ctcp") + _dv(TVCLogLineTypeCTCPQuery, @"ctcp") + _dv(TVCLogLineTypeCTCPReply, @"ctcp") + _dv(TVCLogLineTypeDCCFileTransfer, @"dcc-file-transfer") + _dv(TVCLogLineTypeDebug, @"debug") + _dv(TVCLogLineTypeInvite, @"invite") + _dv(TVCLogLineTypeJoin, @"join") + _dv(TVCLogLineTypeKick, @"kick") + _dv(TVCLogLineTypeKill, @"kill") + _dv(TVCLogLineTypeMode, @"mode") + _dv(TVCLogLineTypeNick, @"nick") + _dv(TVCLogLineTypeNotice, @"notice") + _dv(TVCLogLineTypeOffTheRecordEncryptionStatus, @"off-the-record-encryption-status") + _dv(TVCLogLineTypePart, @"part") + _dv(TVCLogLineTypePrivateMessage, @"privmsg") + _dv(TVCLogLineTypePrivateMessageNoHighlight, @"privmsg") + _dv(TVCLogLineTypeQuit, @"quit") + _dv(TVCLogLineTypeTopic, @"topic") + _dv(TVCLogLineTypeWebsite, @"website") default: { @@ -314,7 +314,7 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_BEGIN + (NSString *)stringForMemberType:(TVCLogLineMemberType)type { - if (type == TVCLogLineMemberLocalUserType) { + if (type == TVCLogLineMemberTypeLocalUser) { return @"myself"; } else { return @"normal"; @@ -367,9 +367,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_BEGIN } if (format == nil) { - if (self.lineType == TVCLogLineActionType) { + if (self.lineType == TVCLogLineTypeAction) { return [NSString stringWithFormat:TVCLogLineActionNicknameFormat, self.nickname]; - } else if (self.lineType == TVCLogLineNoticeType) { + } else if (self.lineType == TVCLogLineTypeNotice) { return [NSString stringWithFormat:TVCLogLineNoticeNicknameFormat, self.nickname]; } } @@ -395,9 +395,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_BEGIN NSString *nicknameFormatted = nil; - if (self.lineType == TVCLogLineActionType) { + if (self.lineType == TVCLogLineTypeAction) { nicknameFormatted = [self formattedNicknameInChannel:channel withFormat:TLOFileLoggerActionNicknameFormat]; - } else if (self.lineType == TVCLogLineNoticeType) { + } else if (self.lineType == TVCLogLineTypeNotice) { nicknameFormatted = [self formattedNicknameInChannel:channel withFormat:TLOFileLoggerNoticeNicknameFormat]; } else { nicknameFormatted = [self formattedNicknameInChannel:channel withFormat:TLOFileLoggerUndefinedNicknameFormat]; @@ -416,10 +416,10 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_BEGIN - (void)computeNicknameColorStyle { if (self.nickname != nil && - (self.lineType == TVCLogLinePrivateMessageType || - self.lineType == TVCLogLinePrivateMessageNoHighlightType || - self.lineType == TVCLogLineActionType || - self.lineType == TVCLogLineActionNoHighlightType)) + (self.lineType == TVCLogLineTypePrivateMessage || + self.lineType == TVCLogLineTypePrivateMessageNoHighlight || + self.lineType == TVCLogLineTypeAction || + self.lineType == TVCLogLineTypeActionNoHighlight)) { BOOL isOverride = NO; diff --git a/Sources/App/Classes/Views/Channel View/TVCLogRenderer.m b/Sources/App/Classes/Views/Channel View/TVCLogRenderer.m old mode 100755 new mode 100644 index 14762cbec..1a889f2d7 --- a/Sources/App/Classes/Views/Channel View/TVCLogRenderer.m +++ b/Sources/App/Classes/Views/Channel View/TVCLogRenderer.m @@ -133,7 +133,7 @@ NSString * const TVCLogRendererResultsOriginalBodyWithoutEffectsAttribute = @"TV if (character < 0x20) { switch (character) { - case IRCTextFormatterBoldEffectCharacter: + case IRCTextFormatterEffectBoldCharacter: { if (characterPosition > 0 && [bodyWithAttributes isAttributeSet:TVCLogRendererFormattingBoldTextAttribute atIndex:characterPosition]) { [bodyWithAttributes removeAttribute:TVCLogRendererFormattingBoldTextAttribute startingAt:characterPosition]; @@ -147,8 +147,8 @@ NSString * const TVCLogRendererResultsOriginalBodyWithoutEffectsAttribute = @"TV continue; } - case IRCTextFormatterColorAsDigitEffectCharacter: - case IRCTextFormatterColorAsHexEffectCharacter: + case IRCTextFormatterEffectColorAsDigitCharacter: + case IRCTextFormatterEffectColorAsHexCharacter: { id foregroundColor = nil; id backgroundColor = nil; @@ -192,8 +192,8 @@ NSString * const TVCLogRendererResultsOriginalBodyWithoutEffectsAttribute = @"TV continue; } - case IRCTextFormatterItalicEffectCharacter: - case IRCTextFormatterItalicEffectCharacterOld: + case IRCTextFormatterEffectItalicCharacter: + case IRCTextFormatterEffectItalicCharacterOld: { if (characterPosition > 0 && [bodyWithAttributes isAttributeSet:TVCLogRendererFormattingItalicTextAttribute atIndex:characterPosition]) { [bodyWithAttributes removeAttribute:TVCLogRendererFormattingItalicTextAttribute startingAt:characterPosition]; @@ -207,7 +207,7 @@ NSString * const TVCLogRendererResultsOriginalBodyWithoutEffectsAttribute = @"TV continue; } - case IRCTextFormatterMonospaceEffectCharacter: + case IRCTextFormatterEffectMonospaceCharacter: { if (characterPosition > 0 && [bodyWithAttributes isAttributeSet:TVCLogRendererFormattingMonospaceTextAttribute atIndex:characterPosition]) { [bodyWithAttributes removeAttribute:TVCLogRendererFormattingMonospaceTextAttribute startingAt:characterPosition]; @@ -221,7 +221,7 @@ NSString * const TVCLogRendererResultsOriginalBodyWithoutEffectsAttribute = @"TV continue; } - case IRCTextFormatterStrikethroughEffectCharacter: + case IRCTextFormatterEffectStrikethroughCharacter: { if (characterPosition > 0 && [bodyWithAttributes isAttributeSet:TVCLogRendererFormattingStrikethroughTextAttribute atIndex:characterPosition]) { [bodyWithAttributes removeAttribute:TVCLogRendererFormattingStrikethroughTextAttribute startingAt:characterPosition]; @@ -235,7 +235,7 @@ NSString * const TVCLogRendererResultsOriginalBodyWithoutEffectsAttribute = @"TV continue; } - case IRCTextFormatterUnderlineEffectCharacter: + case IRCTextFormatterEffectUnderlineCharacter: { if (characterPosition > 0 && [bodyWithAttributes isAttributeSet:TVCLogRendererFormattingUnderlineTextAttribute atIndex:characterPosition]) { [bodyWithAttributes removeAttribute:TVCLogRendererFormattingUnderlineTextAttribute startingAt:characterPosition]; @@ -266,17 +266,17 @@ NSString * const TVCLogRendererResultsOriginalBodyWithoutEffectsAttribute = @"TV - (BOOL)isRenderingPRIVMSG { - return (self->_lineType == TVCLogLinePrivateMessageType || self->_lineType == TVCLogLineActionType); + return (self->_lineType == TVCLogLineTypePrivateMessage || self->_lineType == TVCLogLineTypeAction); } - (BOOL)isRenderingPRIVMSG_or_NOTICE { - return (self->_lineType == TVCLogLinePrivateMessageType || self->_lineType == TVCLogLineActionType || self->_lineType == TVCLogLineNoticeType); + return (self->_lineType == TVCLogLineTypePrivateMessage || self->_lineType == TVCLogLineTypeAction || self->_lineType == TVCLogLineTypeNotice); } - (BOOL)scanForKeywords { - return ([self isRenderingPRIVMSG] && self->_memberType == TVCLogLineMemberNormalType); + return ([self isRenderingPRIVMSG] && self->_memberType == TVCLogLineMemberTypeNormal); } - (void)stripDangerousUnicodeCharactersFromBody @@ -285,14 +285,14 @@ NSString * const TVCLogRendererResultsOriginalBodyWithoutEffectsAttribute = @"TV return; } - if (self->_lineType != TVCLogLineActionType && - self->_lineType != TVCLogLineCTCPType && - self->_lineType != TVCLogLineCTCPQueryType && - self->_lineType != TVCLogLineCTCPReplyType && - self->_lineType != TVCLogLineDCCFileTransferType && - self->_lineType != TVCLogLineNoticeType && - self->_lineType != TVCLogLinePrivateMessageType && - self->_lineType != TVCLogLineTopicType) + if (self->_lineType != TVCLogLineTypeAction && + self->_lineType != TVCLogLineTypeCTCP && + self->_lineType != TVCLogLineTypeCTCPQuery && + self->_lineType != TVCLogLineTypeCTCPReply && + self->_lineType != TVCLogLineTypeDCCFileTransfer && + self->_lineType != TVCLogLineTypeNotice && + self->_lineType != TVCLogLineTypePrivateMessage && + self->_lineType != TVCLogLineTypeTopic) { return; } @@ -357,14 +357,14 @@ NSString * const TVCLogRendererResultsOriginalBodyWithoutEffectsAttribute = @"TV BOOL foundKeyword = NO; switch ([TPCPreferences highlightMatchingMethod]) { - case TXNicknameHighlightExactMatchType: - case TXNicknameHighlightPartialMatchType: + case TXNicknameHighlightMatchTypeExact: + case TXNicknameHighlightMatchTypePartial: { foundKeyword = [self matchKeywordsUsingNormalMatching:highlightKeywords excludedRanges:excludeRanges]; break; } - case TXNicknameHighlightRegularExpressionMatchType: + case TXNicknameHighlightMatchTypeRegularExpression: { foundKeyword = [self matchKeywordsUsingRegularExpression:highlightKeywords excludedRanges:excludeRanges]; @@ -392,7 +392,7 @@ NSString * const TVCLogRendererResultsOriginalBodyWithoutEffectsAttribute = @"TV } } - if ([TPCPreferences highlightMatchingMethod] == TXNicknameHighlightExactMatchType) { + if ([TPCPreferences highlightMatchingMethod] == TXNicknameHighlightMatchTypeExact) { if ([self sectionOfBodyIsSurroundedByNonAlphabeticals:range] == NO) { return; } diff --git a/Sources/App/Classes/Views/Channel View/TVCLogScriptEventSink.m b/Sources/App/Classes/Views/Channel View/TVCLogScriptEventSink.m index ed1c8d0f3..e7beea73f 100755 --- a/Sources/App/Classes/Views/Channel View/TVCLogScriptEventSink.m +++ b/Sources/App/Classes/Views/Channel View/TVCLogScriptEventSink.m @@ -1087,9 +1087,9 @@ ClassWithDesignatedInitializerInitMethod TPCThemeSettingsNicknameColorStyle colorStyleEnum; if ([colorStyle isEqualToString:@"HSL-dark"]) { - colorStyleEnum = TPCThemeSettingsNicknameColorHashHueDarkStyle; + colorStyleEnum = TPCThemeSettingsNicknameColorStyleHashHueDark; } else if ([colorStyle isEqualToString:@"HSL-light"]) { - colorStyleEnum = TPCThemeSettingsNicknameColorHashHueLightStyle; + colorStyleEnum = TPCThemeSettingsNicknameColorStyleHashHueLight; } else { [self.class throwJavaScriptException:@"Invalid style" forCaller:context.caller @@ -1398,7 +1398,7 @@ ClassWithDesignatedInitializerInitMethod - (void)_sendPluginPayload:(TVCLogScriptEventSinkContext *)context { - if ([sharedPluginManager() supportsFeature:THOPluginItemSupportsWebViewJavaScriptPayloads] == NO) { + if ([sharedPluginManager() supportsFeature:THOPluginItemSupportedFeatureWebViewJavaScriptPayloads] == NO) { [self.class throwJavaScriptException:@"There are no plugins loaded that support JavaScritp payloads" forCaller:context.caller inWebView:context.webView]; diff --git a/Sources/App/Classes/Views/Errors/TVCAlert.m b/Sources/App/Classes/Views/Errors/TVCAlert.m index 879d934f4..a6f0a3cef 100755 --- a/Sources/App/Classes/Views/Errors/TVCAlert.m +++ b/Sources/App/Classes/Views/Errors/TVCAlert.m @@ -151,7 +151,7 @@ typedef NS_ENUM(NSUInteger, TVCAlertType) { } } -- (TVCAlertResponse)runModal +- (TVCAlertResponseButton)runModal { NSAssert((self.alertFinished == NO), @"Cannot show alert because it has already finished"); @@ -443,7 +443,7 @@ typedef NS_ENUM(NSUInteger, TVCAlertType) { #pragma mark - #pragma mark Utilities -- (void)_postCompletionBlockWithResponse:(TVCAlertResponse)response +- (void)_postCompletionBlockWithResponse:(TVCAlertResponseButton)response { if (self.completionBlock) { self.completionBlock(self, response); diff --git a/Sources/App/Classes/Views/Input Text Field/TVCTextFormatterMenu.m b/Sources/App/Classes/Views/Input Text Field/TVCTextFormatterMenu.m index d906aaa4a..a9079d145 100755 --- a/Sources/App/Classes/Views/Input Text Field/TVCTextFormatterMenu.m +++ b/Sources/App/Classes/Views/Input Text Field/TVCTextFormatterMenu.m @@ -216,42 +216,42 @@ NS_ASSUME_NONNULL_BEGIN - (BOOL)textIsBold { - return [self propertyIsSet:IRCTextFormatterBoldEffect]; + return [self propertyIsSet:IRCTextFormatterEffectBold]; } - (BOOL)textIsItalicized { - return [self propertyIsSet:IRCTextFormatterItalicEffect]; + return [self propertyIsSet:IRCTextFormatterEffectItalic]; } - (BOOL)textIsMonospace { - return [self propertyIsSet:IRCTextFormatterMonospaceEffect]; + return [self propertyIsSet:IRCTextFormatterEffectMonospace]; } - (BOOL)textIsStruckthrough { - return [self propertyIsSet:IRCTextFormatterStrikethroughEffect]; + return [self propertyIsSet:IRCTextFormatterEffectStrikethrough]; } - (BOOL)textIsUnderlined { - return [self propertyIsSet:IRCTextFormatterUnderlineEffect]; + return [self propertyIsSet:IRCTextFormatterEffectUnderline]; } - (BOOL)textHasForegroundColor { - return [self propertyIsSet:IRCTextFormatterForegroundColorEffect]; + return [self propertyIsSet:IRCTextFormatterEffectForegroundColor]; } - (BOOL)textHasBackgroundColor { - return [self propertyIsSet:IRCTextFormatterBackgroundColorEffect]; + return [self propertyIsSet:IRCTextFormatterEffectBackgroundColor]; } - (BOOL)textHasSpoiler { - return [self propertyIsSet:IRCTextFormatterSpoilerEffect]; + return [self propertyIsSet:IRCTextFormatterEffectSpoiler]; } #pragma mark - @@ -270,13 +270,13 @@ NS_ASSUME_NONNULL_BEGIN [self applyAttributedStringToTextBox:stringMutableCopy inRange:limitRange]; if (value == nil && - (formatterEffect == IRCTextFormatterForegroundColorEffect || - formatterEffect == IRCTextFormatterSpoilerEffect)) + (formatterEffect == IRCTextFormatterEffectForegroundColor || + formatterEffect == IRCTextFormatterEffectSpoiler)) { [self.textField resetFontColorInRange:limitRange]; } - if (formatterEffect == IRCTextFormatterMonospaceEffect && value == nil) { + if (formatterEffect == IRCTextFormatterEffectMonospace && value == nil) { [self.textField resetFontInRange:limitRange]; } } @@ -326,35 +326,35 @@ NS_ASSUME_NONNULL_BEGIN { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterBoldEffect withValue:@(YES) inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectBold withValue:@(YES) inRange:selectedTextRange]; } - (void)insertItalicCharIntoTextBox:(id)sender { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterItalicEffect withValue:@(YES) inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectItalic withValue:@(YES) inRange:selectedTextRange]; } - (void)insertMonospaceCharIntoTextBox:(id)sender { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterMonospaceEffect withValue:@(YES) inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectMonospace withValue:@(YES) inRange:selectedTextRange]; } - (void)insertStrikethroughCharIntoTextBox:(id)sender { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterStrikethroughEffect withValue:@(YES) inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectStrikethrough withValue:@(YES) inRange:selectedTextRange]; } - (void)insertUnderlineCharIntoTextBox:(id)sender { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterUnderlineEffect withValue:@(YES) inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectUnderline withValue:@(YES) inRange:selectedTextRange]; } - (void)insertForegroundColorCharIntoTextBox:(id)sender @@ -378,7 +378,7 @@ NS_ASSUME_NONNULL_BEGIN NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterForegroundColorEffect withValue:@([sender tag]) inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectForegroundColor withValue:@([sender tag]) inRange:selectedTextRange]; } - (void)insertBackgroundColorCharIntoTextBox:(id)sender @@ -403,7 +403,7 @@ NS_ASSUME_NONNULL_BEGIN NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterBackgroundColorEffect withValue:@([sender tag]) inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectBackgroundColor withValue:@([sender tag]) inRange:selectedTextRange]; } - (void)insertRainbowColorCharInfoTextBox:(id)sender asForegroundColor:(BOOL)asForegroundColor @@ -432,9 +432,9 @@ NS_ASSUME_NONNULL_BEGIN NSRange currentCharacterRange = NSMakeRange(charCountIndex, 1); if (asForegroundColor) { - [self applyEffect:IRCTextFormatterForegroundColorEffect withValue:@(currentColorCode) inRange:currentCharacterRange toMutableString:mutableStringCopy]; + [self applyEffect:IRCTextFormatterEffectForegroundColor withValue:@(currentColorCode) inRange:currentCharacterRange toMutableString:mutableStringCopy]; } else { - [self applyEffect:IRCTextFormatterBackgroundColorEffect withValue:@(currentColorCode) inRange:currentCharacterRange toMutableString:mutableStringCopy]; + [self applyEffect:IRCTextFormatterEffectBackgroundColor withValue:@(currentColorCode) inRange:currentCharacterRange toMutableString:mutableStringCopy]; } rainbowArrayIndex += 1; @@ -449,24 +449,24 @@ NS_ASSUME_NONNULL_BEGIN { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterForegroundColorEffect withValue:sender.color inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectForegroundColor withValue:sender.color inRange:selectedTextRange]; } - (void)backgroundColorPanelColorChanged:(NSColorPanel *)sender { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterBackgroundColorEffect withValue:sender.color inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectBackgroundColor withValue:sender.color inRange:selectedTextRange]; } - (void)insertSpoilerCharIntoTextBox:(id)sender { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterSpoilerEffect withValue:@(YES) inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectSpoiler withValue:@(YES) inRange:selectedTextRange]; - [self applyEffectToTextBox:IRCTextFormatterForegroundColorEffect withValue:@(14) inRange:selectedTextRange]; - [self applyEffectToTextBox:IRCTextFormatterBackgroundColorEffect withValue:@(14) inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectForegroundColor withValue:@(14) inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectBackgroundColor withValue:@(14) inRange:selectedTextRange]; } #pragma mark - @@ -476,59 +476,59 @@ NS_ASSUME_NONNULL_BEGIN { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterBoldEffect withValue:nil inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectBold withValue:nil inRange:selectedTextRange]; } - (void)removeItalicCharFromTextBox:(id)sender { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterItalicEffect withValue:nil inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectItalic withValue:nil inRange:selectedTextRange]; } - (void)removeMonospaceCharFromTextBox:(id)sender { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterMonospaceEffect withValue:nil inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectMonospace withValue:nil inRange:selectedTextRange]; } - (void)removeStrikethroughCharFromTextBox:(id)sender { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterStrikethroughEffect withValue:nil inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectStrikethrough withValue:nil inRange:selectedTextRange]; } - (void)removeUnderlineCharFromTextBox:(id)sender { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterUnderlineEffect withValue:nil inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectUnderline withValue:nil inRange:selectedTextRange]; } - (void)removeForegroundColorCharFromTextBox:(id)sender { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterForegroundColorEffect withValue:nil inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectForegroundColor withValue:nil inRange:selectedTextRange]; } - (void)removeBackgroundColorCharFromTextBox:(id)sender { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterBackgroundColorEffect withValue:nil inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectBackgroundColor withValue:nil inRange:selectedTextRange]; } - (void)removeSpoilerCharFromTextBox:(id)sender { NSRange selectedTextRange = self.textField.selectedRange; - [self applyEffectToTextBox:IRCTextFormatterForegroundColorEffect withValue:nil inRange:selectedTextRange]; - [self applyEffectToTextBox:IRCTextFormatterBackgroundColorEffect withValue:nil inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectForegroundColor withValue:nil inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectBackgroundColor withValue:nil inRange:selectedTextRange]; - [self applyEffectToTextBox:IRCTextFormatterSpoilerEffect withValue:nil inRange:selectedTextRange]; + [self applyEffectToTextBox:IRCTextFormatterEffectSpoiler withValue:nil inRange:selectedTextRange]; } @end diff --git a/Sources/App/Classes/Views/Input Text Field/TVCTextViewWithIRCFormatter.m b/Sources/App/Classes/Views/Input Text Field/TVCTextViewWithIRCFormatter.m index 4ce8715df..0476bca8e 100755 --- a/Sources/App/Classes/Views/Input Text Field/TVCTextViewWithIRCFormatter.m +++ b/Sources/App/Classes/Views/Input Text Field/TVCTextViewWithIRCFormatter.m @@ -310,7 +310,7 @@ NS_ASSUME_NONNULL_BEGIN NSUInteger stringLength = self.stringLength; if (stringLength == 0) { - return TVCTextViewCaretInOnlyLine; + return TVCTextViewCaretLocationOnlyLine; } NSRange selectedRange = self.selectedRange; @@ -341,14 +341,14 @@ NS_ASSUME_NONNULL_BEGIN /* Process results */ if (inFirstLine && inLastLine) { - return TVCTextViewCaretInOnlyLine; + return TVCTextViewCaretLocationOnlyLine; } else if (inFirstLine) { - return TVCTextViewCaretInFirstLine; + return TVCTextViewCaretLocationFirstLine; } else if (inLastLine) { - return TVCTextViewCaretInLastLine; + return TVCTextViewCaretLocationLastLine; } - return TVCTextViewCaretInMiddle; + return TVCTextViewCaretLocationMiddle; } - (CGFloat)highestHeightBelowHeight:(CGFloat)maximumHeight withPadding:(CGFloat)valuePadding diff --git a/Sources/App/Classes/Views/Main Window/TVCMainWindow.m b/Sources/App/Classes/Views/Main Window/TVCMainWindow.m old mode 100755 new mode 100644 index 4115c5d72..d4d2ac18a --- a/Sources/App/Classes/Views/Main Window/TVCMainWindow.m +++ b/Sources/App/Classes/Views/Main Window/TVCMainWindow.m @@ -704,13 +704,13 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel } /* Skip entries depending on navigation type */ - if (selectionType == TVCServerListNavigationSelectionChannelType) + if (selectionType == TVCServerListNavigationSelectionTypeChannel) { if ([item isChannel] == NO && [item isPrivateMessage] == NO) { continue; } } - else if (selectionType == TVCServerListNavigationSelectionServerType) + else if (selectionType == TVCServerListNavigationSelectionTypeServer) { if ([item isClient] == NO) { continue; @@ -718,13 +718,13 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel } /* Select current item if it is matched by our condition */ - if (navigationType == TVCServerListNavigationMovementAllType) + if (navigationType == TVCServerListNavigationMovementTypeAll) { [self select:item]; break; } - else if (navigationType == TVCServerListNavigationMovementActiveType) + else if (navigationType == TVCServerListNavigationMovementTypeActive) { if ([item isActive]) { [self select:item]; @@ -732,7 +732,7 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel break; } } - else if (navigationType == TVCServerListNavigationMovementUnreadType) + else if (navigationType == TVCServerListNavigationMovementTypeUnread) { if ([item isUnread]) { [self select:item]; @@ -763,7 +763,7 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel startingPoint:startingPoint isMovingDown:isMovingDown navigationType:navigationType - selectionType:TVCServerListNavigationSelectionChannelType]; + selectionType:TVCServerListNavigationSelectionTypeChannel]; } - (void)navigateChannelEntriesWithinServerScope:(BOOL)isMovingDown withNavigationType:(TVCServerListNavigationMovementType)navigationType @@ -778,7 +778,7 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel startingPoint:[scannedRows indexOfObject:self.selectedItem] isMovingDown:isMovingDown navigationType:navigationType - selectionType:TVCServerListNavigationSelectionChannelType]; + selectionType:TVCServerListNavigationSelectionTypeChannel]; } - (void)navigateServerEntries:(BOOL)isMovingDown withNavigationType:(TVCServerListNavigationMovementType)navigationType @@ -790,7 +790,7 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel startingPoint:[scannedRows indexOfObject:self.selectedClient] isMovingDown:isMovingDown navigationType:navigationType - selectionType:TVCServerListNavigationSelectionServerType]; + selectionType:TVCServerListNavigationSelectionTypeServer]; } - (void)navigateToNextEntry:(BOOL)isMovingDown @@ -803,58 +803,58 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel entryCount:entryCount startingPoint:startingPoint isMovingDown:isMovingDown - navigationType:TVCServerListNavigationMovementAllType - selectionType:TVCServerListNavigationSelectionAnyType]; + navigationType:TVCServerListNavigationMovementTypeAll + selectionType:TVCServerListNavigationSelectionTypeAny]; } - (void)selectPreviousChannel:(NSEvent *)e { - [self navigateChannelEntries:NO withNavigationType:TVCServerListNavigationMovementAllType]; + [self navigateChannelEntries:NO withNavigationType:TVCServerListNavigationMovementTypeAll]; } - (void)selectNextChannel:(NSEvent *)e { - [self navigateChannelEntries:YES withNavigationType:TVCServerListNavigationMovementAllType]; + [self navigateChannelEntries:YES withNavigationType:TVCServerListNavigationMovementTypeAll]; } - (void)selectPreviousUnreadChannel:(NSEvent *)e { - [self navigateChannelEntries:NO withNavigationType:TVCServerListNavigationMovementUnreadType]; + [self navigateChannelEntries:NO withNavigationType:TVCServerListNavigationMovementTypeUnread]; } - (void)selectNextUnreadChannel:(NSEvent *)e { - [self navigateChannelEntries:YES withNavigationType:TVCServerListNavigationMovementUnreadType]; + [self navigateChannelEntries:YES withNavigationType:TVCServerListNavigationMovementTypeUnread]; } - (void)selectPreviousActiveChannel:(NSEvent *)e { - [self navigateChannelEntries:NO withNavigationType:TVCServerListNavigationMovementActiveType]; + [self navigateChannelEntries:NO withNavigationType:TVCServerListNavigationMovementTypeActive]; } - (void)selectNextActiveChannel:(NSEvent *)e { - [self navigateChannelEntries:YES withNavigationType:TVCServerListNavigationMovementActiveType]; + [self navigateChannelEntries:YES withNavigationType:TVCServerListNavigationMovementTypeActive]; } - (void)selectPreviousServer:(NSEvent *)e { - [self navigateServerEntries:NO withNavigationType:TVCServerListNavigationMovementAllType]; + [self navigateServerEntries:NO withNavigationType:TVCServerListNavigationMovementTypeAll]; } - (void)selectNextServer:(NSEvent *)e { - [self navigateServerEntries:YES withNavigationType:TVCServerListNavigationMovementAllType]; + [self navigateServerEntries:YES withNavigationType:TVCServerListNavigationMovementTypeAll]; } - (void)selectPreviousActiveServer:(NSEvent *)e { - [self navigateServerEntries:NO withNavigationType:TVCServerListNavigationMovementActiveType]; + [self navigateServerEntries:NO withNavigationType:TVCServerListNavigationMovementTypeActive]; } - (void)selectNextActiveServer:(NSEvent *)e { - [self navigateServerEntries:YES withNavigationType:TVCServerListNavigationMovementActiveType]; + [self navigateServerEntries:YES withNavigationType:TVCServerListNavigationMovementTypeActive]; } - (void)selectPreviousSelection:(NSEvent *)e @@ -1044,10 +1044,10 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel { TXTabKeyAction tabKeyAction = [TPCPreferences tabKeyAction]; - if (tabKeyAction == TXTabKeyNicknameCompleteAction) { + if (tabKeyAction == TXTabKeyActionNicknameComplete) { [self completeNickname:YES]; - } else if (tabKeyAction == TXTabKeyUnreadChannelAction) { - [self navigateChannelEntries:YES withNavigationType:TVCServerListNavigationMovementUnreadType]; + } else if (tabKeyAction == TXTabKeyActionUnreadChannel) { + [self navigateChannelEntries:YES withNavigationType:TVCServerListNavigationMovementTypeUnread]; } } @@ -1055,10 +1055,10 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel { TXTabKeyAction tabKeyAction = [TPCPreferences tabKeyAction]; - if (tabKeyAction == TXTabKeyNicknameCompleteAction) { + if (tabKeyAction == TXTabKeyActionNicknameComplete) { [self completeNickname:NO]; - } else if (tabKeyAction == TXTabKeyUnreadChannelAction) { - [self navigateChannelEntries:NO withNavigationType:TVCServerListNavigationMovementUnreadType]; + } else if (tabKeyAction == TXTabKeyActionUnreadChannel) { + [self navigateChannelEntries:NO withNavigationType:TVCServerListNavigationMovementTypeUnread]; } } @@ -1076,7 +1076,7 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel - (void)sendMessageAsAction:(NSEvent *)e { if ([TPCPreferences commandReturnSendsMessageAsAction]) { - [self inputTextAsCommand:IRCRemoteCommandPrivmsgActionIndex]; + [self inputTextAsCommand:IRCRemoteCommandPrivmsgAction]; return; } @@ -1089,9 +1089,9 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel if (checkScroller) { TVCTextViewCaretLocation caretLocation = self.inputTextField.caretLocation; - if (caretLocation != TVCTextViewCaretInOnlyLine) { - BOOL atTop = (caretLocation == TVCTextViewCaretInFirstLine); - BOOL atBottom = (caretLocation == TVCTextViewCaretInLastLine); + if (caretLocation != TVCTextViewCaretLocationOnlyLine) { + BOOL atTop = (caretLocation == TVCTextViewCaretLocationFirstLine); + BOOL atBottom = (caretLocation == TVCTextViewCaretLocationLastLine); if ((atTop && event.keyCode == TXKeyDownArrowCode) || (atBottom && event.keyCode == TXKeyUpArrowCode) || @@ -1263,7 +1263,7 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel - (void)textEntered { - [self inputTextAsCommand:IRCRemoteCommandPrivmsgIndex]; + [self inputTextAsCommand:IRCRemoteCommandPrivmsg]; } - (void)inputTextAsCommand:(IRCRemoteCommand)command @@ -2117,7 +2117,7 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel [title appendString:TXTLS(@"TVCMainWindow[q42-an]")]; } } else if (u.isConnecting && u.isLoggedIn == NO) { - if (u.connectType == IRCClientConnectRetryMode || u.connectType == IRCClientConnectReconnectMode) { + if (u.connectType == IRCClientConnectModeRetry || u.connectType == IRCClientConnectModeReconnect) { [title appendString:TXTLS(@"TVCMainWindow[s23-zd]")]; } else { [title appendString:TXTLS(@"TVCMainWindow[8eu-c7]")]; @@ -2151,7 +2151,7 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel NSString *channelName = c.name; switch (c.type) { - case IRCChannelChannelType: + case IRCChannelTypeChannel: { [title appendString:channelName]; @@ -2167,7 +2167,7 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel break; } - case IRCChannelPrivateMessageType: + case IRCChannelTypePrivateMessage: { /* Textual defines the topic of a private message as the user host. */ /* If it is not defined yet, then we just use the channel name @@ -2184,7 +2184,7 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel break; } - case IRCChannelUtilityType: + case IRCChannelTypeUtility: { [title appendString:channelName]; @@ -2536,8 +2536,8 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel { [self shiftSelection:self.selectedItem toItem:item - options:(TVCMainWindowShiftSelectionMaintainGroupingFlag | - TVCMainWindowShiftSelectionPerformDeselectFlag)]; + options:(TVCMainWindowShiftSelectionFlagMaintainGrouping | + TVCMainWindowShiftSelectionFlagPerformDeselect)]; } - (void)deselect:(IRCTreeItem *)item @@ -2546,7 +2546,7 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel [self shiftSelection:item toItem:nil - options:TVCMainWindowShiftSelectionPerformDeselectFlag]; + options:TVCMainWindowShiftSelectionFlagPerformDeselect]; } - (void)deselectGroup:(IRCTreeItem *)item @@ -2559,8 +2559,8 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel [self shiftSelection:item toItem:nil - options:(TVCMainWindowShiftSelectionPerformDeselectFlag | - TVCMainWindowShiftSelectionPerformDeselectChildrenFlag)]; + options:(TVCMainWindowShiftSelectionFlagPerformDeselect | + TVCMainWindowShiftSelectionFlagPerformDeselectChildren)]; } - (void)shiftSelection:(nullable IRCTreeItem *)oldItem toItem:(nullable IRCTreeItem *)newItem options:(TVCMainWindowShiftSelectionFlags)selectionOptions @@ -2578,11 +2578,11 @@ NSString * const TVCMainWindowDidReloadThemeNotification = @"TVCMainWindowDidRel } /* Context */ - BOOL optionMaintainGrouping = ((selectionOptions & TVCMainWindowShiftSelectionMaintainGroupingFlag) == TVCMainWindowShiftSelectionMaintainGroupingFlag); + BOOL optionMaintainGrouping = ((selectionOptions & TVCMainWindowShiftSelectionFlagMaintainGrouping) == TVCMainWindowShiftSelectionFlagMaintainGrouping); BOOL optionPerformDeselectAll = NO; - BOOL optionPerformDeselectOld = ((selectionOptions & TVCMainWindowShiftSelectionPerformDeselectFlag) == TVCMainWindowShiftSelectionPerformDeselectFlag); - BOOL optionPerformDeselectChildren = ((selectionOptions & TVCMainWindowShiftSelectionPerformDeselectChildrenFlag) == TVCMainWindowShiftSelectionPerformDeselectChildrenFlag); + BOOL optionPerformDeselectOld = ((selectionOptions & TVCMainWindowShiftSelectionFlagPerformDeselect) == TVCMainWindowShiftSelectionFlagPerformDeselect); + BOOL optionPerformDeselectChildren = ((selectionOptions & TVCMainWindowShiftSelectionFlagPerformDeselectChildren) == TVCMainWindowShiftSelectionFlagPerformDeselectChildren); BOOL optionPerformDeselect = (optionPerformDeselectChildren || optionPerformDeselectOld); diff --git a/Sources/App/Classes/Views/Main Window/TVCMainWindowTextView.m b/Sources/App/Classes/Views/Main Window/TVCMainWindowTextView.m index 02e0d5d64..2a47097ab 100755 --- a/Sources/App/Classes/Views/Main Window/TVCMainWindowTextView.m +++ b/Sources/App/Classes/Views/Main Window/TVCMainWindowTextView.m @@ -302,8 +302,8 @@ NS_ASSUME_NONNULL_BEGIN TVCMainWindowTextViewFontSize preferredFontSize = self.userInterfaceObjects.textViewPreferredFontSize; - if (preferredFontSize == TVCMainWindowTextViewFontNormalSize || - preferredFontSize == TVCMainWindowTextViewFontLargeSize) + if (preferredFontSize == TVCMainWindowTextViewFontSizeNormal || + preferredFontSize == TVCMainWindowTextViewFontSizeLarge) { selectedRect.origin.y -= 1; } diff --git a/Sources/App/Classes/Views/Main Window/TVCMainWindowTextViewAppearance.m b/Sources/App/Classes/Views/Main Window/TVCMainWindowTextViewAppearance.m index d686b0077..7b0491aea 100644 --- a/Sources/App/Classes/Views/Main Window/TVCMainWindowTextViewAppearance.m +++ b/Sources/App/Classes/Views/Main Window/TVCMainWindowTextViewAppearance.m @@ -154,13 +154,13 @@ NS_ASSUME_NONNULL_BEGIN NSFont *preferredFont = nil; - if (preferredFontSize == TVCMainWindowTextViewFontNormalSize) { + if (preferredFontSize == TVCMainWindowTextViewFontSizeNormal) { preferredFont = self.textViewFont; - } else if (preferredFontSize == TVCMainWindowTextViewFontLargeSize) { + } else if (preferredFontSize == TVCMainWindowTextViewFontSizeLarge) { preferredFont = self.textViewFontLarge; - } else if (preferredFontSize == TVCMainWindowTextViewFontExtraLargeSize) { + } else if (preferredFontSize == TVCMainWindowTextViewFontSizeExtraLarge) { preferredFont = self.textViewFontExtraLarge; - } else if (preferredFontSize == TVCMainWindowTextViewFontHumongousSize) { + } else if (preferredFontSize == TVCMainWindowTextViewFontSizeHumongous) { preferredFont = self.textViewFontHumongous; } diff --git a/Sources/App/Classes/Views/Server List/TVCServerListAppearance.m b/Sources/App/Classes/Views/Server List/TVCServerListAppearance.m index 1e971cad6..d5730586c 100644 --- a/Sources/App/Classes/Views/Server List/TVCServerListAppearance.m +++ b/Sources/App/Classes/Views/Server List/TVCServerListAppearance.m @@ -282,8 +282,8 @@ NS_ASSUME_NONNULL_BEGIN TXAppearanceType appearanceType = self.appearanceType; switch (appearanceType) { - case TXAppearanceMavericksAquaDarkType: - case TXAppearanceMavericksGraphiteDarkType: + case TXAppearanceTypeMavericksAquaDark: + case TXAppearanceTypeMavericksGraphiteDark: { if (up) { if (selected) { @@ -299,8 +299,8 @@ NS_ASSUME_NONNULL_BEGIN } } } // Mavericks - case TXAppearanceYosemiteDarkType: - case TXAppearanceMojaveDarkType: + case TXAppearanceTypeYosemiteDark: + case TXAppearanceTypeMojaveDark: { if (up) { return [NSImage imageNamed:@"YosemiteDarkServerListViewDisclosureUp"]; @@ -328,8 +328,8 @@ NS_ASSUME_NONNULL_BEGIN TXAppearanceType appearanceType = self.appearanceType; switch (appearanceType) { - case TXAppearanceMavericksAquaLightType: - case TXAppearanceMavericksGraphiteLightType: + case TXAppearanceTypeMavericksAquaLight: + case TXAppearanceTypeMavericksGraphiteLight: { if (isActive) { return @"channelRoomStatusIconMavericksLightActive"; @@ -337,8 +337,8 @@ NS_ASSUME_NONNULL_BEGIN return @"channelRoomStatusIconMavericksLightInactive"; } } - case TXAppearanceMavericksAquaDarkType: - case TXAppearanceMavericksGraphiteDarkType: + case TXAppearanceTypeMavericksAquaDark: + case TXAppearanceTypeMavericksGraphiteDark: { if (isActive) { return @"channelRoomStatusIconMavericksDarkActive"; @@ -346,8 +346,8 @@ NS_ASSUME_NONNULL_BEGIN return @"channelRoomStatusIconMavericksDarkInactive"; } } // Mavericks - case TXAppearanceYosemiteLightType: - case TXAppearanceMojaveLightType: + case TXAppearanceTypeYosemiteLight: + case TXAppearanceTypeMojaveLight: { /* When the window is not in focus, when this item is selected, and when we are not using vibrant dark mode; the outline view does not turn our icon to a light variant @@ -371,8 +371,8 @@ NS_ASSUME_NONNULL_BEGIN return @"channelRoomStatusIconYosemiteLightInactive"; } } // Yosemite, Mojave - case TXAppearanceYosemiteDarkType: - case TXAppearanceMojaveDarkType: + case TXAppearanceTypeYosemiteDark: + case TXAppearanceTypeMojaveDark: { *treatAsTemplate = NO; @@ -392,10 +392,10 @@ NS_ASSUME_NONNULL_BEGIN TXAppearanceType appearanceType = self.appearanceType; switch (appearanceType) { - case TXAppearanceMavericksAquaLightType: - case TXAppearanceMavericksAquaDarkType: - case TXAppearanceMavericksGraphiteLightType: - case TXAppearanceMavericksGraphiteDarkType: + case TXAppearanceTypeMavericksAquaLight: + case TXAppearanceTypeMavericksAquaDark: + case TXAppearanceTypeMavericksGraphiteLight: + case TXAppearanceTypeMavericksGraphiteDark: { if (isSelected) { return @"NSUser"; @@ -407,8 +407,8 @@ NS_ASSUME_NONNULL_BEGIN return @"MavericksDarkServerListViewSelectedPrivateMessageUserInactive"; } } // Mavericks - case TXAppearanceYosemiteLightType: - case TXAppearanceMojaveLightType: + case TXAppearanceTypeYosemiteLight: + case TXAppearanceTypeMojaveLight: { *treatAsTemplate = YES; @@ -418,8 +418,8 @@ NS_ASSUME_NONNULL_BEGIN return @"VibrantLightServerListViewPrivateMessageUserIconInactive"; } } // Yosemite, Mojave - case TXAppearanceYosemiteDarkType: - case TXAppearanceMojaveDarkType: + case TXAppearanceTypeYosemiteDark: + case TXAppearanceTypeMojaveDark: { *treatAsTemplate = NO; diff --git a/Sources/App/Classes/Views/TVCAppearance.m b/Sources/App/Classes/Views/TVCAppearance.m index ec66c7125..52fea85b5 100644 --- a/Sources/App/Classes/Views/TVCAppearance.m +++ b/Sources/App/Classes/Views/TVCAppearance.m @@ -42,14 +42,14 @@ NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, TVCListAppearanceColorType) { - TVCListAppearanceColorCalibratedWhiteType = 1, // [alpha] - TVCListAppearanceColorRGBType = 2, // [alpha] - TVCListAppearanceColorSystemType = 3, // selector + TVCListAppearanceColorTypeCalibratedWhite = 1, // [alpha] + TVCListAppearanceColorTypeRGB = 2, // [alpha] + TVCListAppearanceColorTypeSystem = 3, // selector }; typedef NS_ENUM(NSUInteger, TVCListAppearanceImageType) { - TVCListAppearanceImageAssetType = 1, + TVCListAppearanceImageTypeAsset = 1, }; @interface TVCAppearance () @@ -337,7 +337,7 @@ ClassWithDesignatedInitializerInitMethod TVCListAppearanceColorType colorType = [colorProperties unsignedIntegerForKey:@"type"]; switch (colorType) { - case TVCListAppearanceColorCalibratedWhiteType: + case TVCListAppearanceColorTypeCalibratedWhite: { NSArray *components = [colorValue componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; @@ -355,7 +355,7 @@ ClassWithDesignatedInitializerInitMethod return [NSColor colorWithCalibratedWhite:white alpha:alpha]; } - case TVCListAppearanceColorRGBType: + case TVCListAppearanceColorTypeRGB: { NSArray *components = [colorValue componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; @@ -375,7 +375,7 @@ ClassWithDesignatedInitializerInitMethod return [NSColor calibratedColorWithRed:red green:green blue:blue alpha:alpha]; } - case TVCListAppearanceColorSystemType: + case TVCListAppearanceColorTypeSystem: { SEL selector = NSSelectorFromString(colorValue); @@ -684,7 +684,7 @@ ClassWithDesignatedInitializerInitMethod TVCListAppearanceImageType imageType = [imageProperties unsignedIntegerForKey:@"type"]; switch (imageType) { - case TVCListAppearanceImageAssetType: + case TVCListAppearanceImageTypeAsset: { return [NSImage imageNamed:imageValue]; } diff --git a/Sources/App/Classes/Views/User List/TVCMemberList.m b/Sources/App/Classes/Views/User List/TVCMemberList.m index 12384dd83..bde935ce0 100755 --- a/Sources/App/Classes/Views/User List/TVCMemberList.m +++ b/Sources/App/Classes/Views/User List/TVCMemberList.m @@ -407,13 +407,13 @@ NSString * const TVCMemberListDragType = @"TVCMemberListDragType"; dispatch_once(&onceToken, ^{ preferenceMap = @{ - @"User List Mode Badge Colors -> +y" : @(IRCUserIRCopByModeRank), - @"User List Mode Badge Colors -> +q" : @(IRCUserChannelOwnerRank), - @"User List Mode Badge Colors -> +a" : @(IRCUserSuperOperatorRank), - @"User List Mode Badge Colors -> +o" : @(IRCUserNormalOperatorRank), - @"User List Mode Badge Colors -> +h" : @(IRCUserHalfOperatorRank), - @"User List Mode Badge Colors -> +v" : @(IRCUserVoicedRank), - @"User List Mode Badge Colors -> no mode" : @(IRCUserNoRank) + @"User List Mode Badge Colors -> +y" : @(IRCUserRankIRCopByMode), + @"User List Mode Badge Colors -> +q" : @(IRCUserRankChannelOwner), + @"User List Mode Badge Colors -> +a" : @(IRCUserRankSuperOperator), + @"User List Mode Badge Colors -> +o" : @(IRCUserRankNonermalOperator), + @"User List Mode Badge Colors -> +h" : @(IRCUserRankHalfOperator), + @"User List Mode Badge Colors -> +v" : @(IRCUserRankVoiced), + @"User List Mode Badge Colors -> no mode" : @(IRCUserRankNone) }; }); @@ -425,7 +425,7 @@ NSString * const TVCMemberListDragType = @"TVCMemberListDragType"; IRCUserRank rankEnum = rank.unsignedIntegerValue; - [self refreshDrawingForMembersWithRank:rankEnum isIRCop:(rankEnum == IRCUserIRCopByModeRank)]; + [self refreshDrawingForMembersWithRank:rankEnum isIRCop:(rankEnum == IRCUserRankIRCopByMode)]; } - (void)refreshDrawingForMembersWithRank:(IRCUserRank)rank isIRCop:(BOOL)isIRCop diff --git a/Sources/App/Classes/Views/User List/TVCMemberListCell.m b/Sources/App/Classes/Views/User List/TVCMemberListCell.m index 5e4074b01..db554854a 100755 --- a/Sources/App/Classes/Views/User List/TVCMemberListCell.m +++ b/Sources/App/Classes/Views/User List/TVCMemberListCell.m @@ -393,15 +393,15 @@ NS_ASSUME_NONNULL_BEGIN NSString *modeSymbol = cellItem.mark; - IRCUserRank userRankToDraw = IRCUserNoRank; + IRCUserRank userRankToDraw = IRCUserRankNone; if ([TPCPreferences memberListSortFavorsServerStaff]) { if (cellItem.user.isIRCop) { - userRankToDraw = IRCUserIRCopByModeRank; + userRankToDraw = IRCUserRankIRCopByMode; } } - if (userRankToDraw == IRCUserNoRank) { + if (userRankToDraw == IRCUserRankNone) { userRankToDraw = cellItem.rank; } @@ -458,17 +458,17 @@ NS_ASSUME_NONNULL_BEGIN } else { backgroundColor = appearance.markBadgeSelectedBackgroundColorInactiveWindow; } // isWindowActive - } else if (userRank == IRCUserIRCopByModeRank) { + } else if (userRank == IRCUserRankIRCopByMode) { backgroundColor = appearance.markBadgeBackgroundColor_Y; - } else if (userRank == IRCUserChannelOwnerRank) { + } else if (userRank == IRCUserRankChannelOwner) { backgroundColor = appearance.markBadgeBackgroundColor_Q; - } else if (userRank == IRCUserSuperOperatorRank) { + } else if (userRank == IRCUserRankSuperOperator) { backgroundColor = appearance.markBadgeBackgroundColor_A; - } else if (userRank == IRCUserNormalOperatorRank) { + } else if (userRank == IRCUserRankNonermalOperator) { backgroundColor = appearance.markBadgeBackgroundColor_O; - } else if (userRank == IRCUserHalfOperatorRank) { + } else if (userRank == IRCUserRankHalfOperator) { backgroundColor = appearance.markBadgeBackgroundColor_H; - } else if (userRank == IRCUserVoicedRank) { + } else if (userRank == IRCUserRankVoiced) { backgroundColor = appearance.markBadgeBackgroundColor_V; } else { NSColor *customColor = appearance.markBadgeBackgroundColorByUser; @@ -676,22 +676,22 @@ NS_ASSUME_NONNULL_BEGIN IRCUserRank userRank = cellItem.rank; if (cellItem.user.isIRCop) { - userRank = IRCUserIRCopByModeRank; + userRank = IRCUserRankIRCopByMode; } NSString *userPrivileges = nil; - if (userRank == IRCUserIRCopByModeRank) { + if (userRank == IRCUserRankIRCopByMode) { userPrivileges = TXTLS(@"TVCMainWindow[i8t-vb]"); - } else if (userRank == IRCUserChannelOwnerRank) { + } else if (userRank == IRCUserRankChannelOwner) { userPrivileges = TXTLS(@"TVCMainWindow[p1z-sc]"); - } else if (userRank == IRCUserSuperOperatorRank) { + } else if (userRank == IRCUserRankSuperOperator) { userPrivileges = TXTLS(@"TVCMainWindow[som-zo]"); - } else if (userRank == IRCUserNormalOperatorRank) { + } else if (userRank == IRCUserRankNonermalOperator) { userPrivileges = TXTLS(@"TVCMainWindow[0kn-s5]"); - } else if (userRank == IRCUserHalfOperatorRank) { + } else if (userRank == IRCUserRankHalfOperator) { userPrivileges = TXTLS(@"TVCMainWindow[0nn-te]"); - } else if (userRank == IRCUserVoicedRank) { + } else if (userRank == IRCUserRankVoiced) { userPrivileges = TXTLS(@"TVCMainWindow[ya1-sk]"); } else { userPrivileges = TXTLS(@"TVCMainWindow[tjj-z2]"); diff --git a/Sources/Plugins/Brag Spam/Classes/TPIBragSpam.m b/Sources/Plugins/Brag Spam/Classes/TPIBragSpam.m index b7fd3cc69..e78961dd5 100755 --- a/Sources/Plugins/Brag Spam/Classes/TPIBragSpam.m +++ b/Sources/Plugins/Brag Spam/Classes/TPIBragSpam.m @@ -99,11 +99,11 @@ NS_ASSUME_NONNULL_BEGIN IRCUserRank myRanks = myself.ranks; - BOOL IHaveModeQ = ((myRanks & IRCUserChannelOwnerRank) == IRCUserChannelOwnerRank); - BOOL IHaveModeA = ((myRanks & IRCUserSuperOperatorRank) == IRCUserSuperOperatorRank); - BOOL IHaveModeO = ((myRanks & IRCUserNormalOperatorRank) == IRCUserNormalOperatorRank); - BOOL IHaveModeH = ((myRanks & IRCUserHalfOperatorRank) == IRCUserHalfOperatorRank); - BOOL IHaveModeV = ((myRanks & IRCUserVoicedRank) == IRCUserVoicedRank); + BOOL IHaveModeQ = ((myRanks & IRCUserRankChannelOwner) == IRCUserRankChannelOwner); + BOOL IHaveModeA = ((myRanks & IRCUserRankSuperOperator) == IRCUserRankSuperOperator); + BOOL IHaveModeO = ((myRanks & IRCUserRankNonermalOperator) == IRCUserRankNonermalOperator); + BOOL IHaveModeH = ((myRanks & IRCUserRankHalfOperator) == IRCUserRankHalfOperator); + BOOL IHaveModeV = ((myRanks & IRCUserRankVoiced) == IRCUserRankVoiced); if (IHaveModeQ || IHaveModeA || IHaveModeO) { channelOpCount++; @@ -122,10 +122,10 @@ NS_ASSUME_NONNULL_BEGIN IRCUserRank userRanks = member.ranks; - BOOL UserHasModeQ = ((userRanks & IRCUserChannelOwnerRank) == IRCUserChannelOwnerRank); - BOOL UserHasModeA = ((userRanks & IRCUserSuperOperatorRank) == IRCUserSuperOperatorRank); - BOOL UserHasModeO = ((userRanks & IRCUserNormalOperatorRank) == IRCUserNormalOperatorRank); - BOOL UserHasModeH = ((userRanks & IRCUserHalfOperatorRank) == IRCUserHalfOperatorRank); + BOOL UserHasModeQ = ((userRanks & IRCUserRankChannelOwner) == IRCUserRankChannelOwner); + BOOL UserHasModeA = ((userRanks & IRCUserRankSuperOperator) == IRCUserRankSuperOperator); + BOOL UserHasModeO = ((userRanks & IRCUserRankNonermalOperator) == IRCUserRankNonermalOperator); + BOOL UserHasModeH = ((userRanks & IRCUserRankHalfOperator) == IRCUserRankHalfOperator); if (client.userIsIRCop && member.user.isIRCop == NO) { addUser = YES; diff --git a/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilter.h b/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilter.h index ee856a72a..18f93d89e 100644 --- a/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilter.h +++ b/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilter.h @@ -40,26 +40,26 @@ NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, TPI_ChatFilterLimitToValue) { - TPI_ChatFilterLimitToNoLimitValue = 0, - TPI_ChatFilterLimitToChannelsValue = 1, - TPI_ChatFilterLimitToPrivateMessagesValue = 2, - TPI_ChatFilterLimitToSpecificItemsValue = 3 + TPI_ChatFilterLimitToValueNoLimit = 0, + TPI_ChatFilterLimitToValueChannels = 1, + TPI_ChatFilterLimitToValuePrivateMessages = 2, + TPI_ChatFilterLimitToValueSpecificItems = 3 }; typedef NS_OPTIONS(NSUInteger, TPI_ChatFilterEventType) { - TPI_ChatFilterNumericEventType = 1 << 0, - TPI_ChatFilterPlainTextMessageEventType = 1 << 1, - TPI_ChatFilterActionMessageEventType = 1 << 2, - TPI_ChatFilterNoticeMessageEventType = 1 << 3, - TPI_ChatFilterUserJoinedChannelEventType = 1 << 4, - TPI_ChatFilterUserLeftChannelEventType = 1 << 5, - TPI_ChatFilterUserKickedFromChannelEventType = 1 << 6, - TPI_ChatFilterUserDisconnectedEventType = 1 << 7, - TPI_ChatFilterUserChangedNicknameEventType = 1 << 8, - TPI_ChatFilterChannelTopicReceivedEventType = 1 << 9, - TPI_ChatFilterChannelTopicChangedEventType = 1 << 10, - TPI_ChatFilterChannelModeReceivedEventType = 1 << 11, - TPI_ChatFilterChannelModeChangedEventType = 1 << 12 + TPI_ChatFilterEventTypeNumeric = 1 << 0, + TPI_ChatFilterEventTypePlainTextMessage = 1 << 1, + TPI_ChatFilterEventTypeActionMessage = 1 << 2, + TPI_ChatFilterEventTypeNoticeMessage = 1 << 3, + TPI_ChatFilterEventTypeUserJoinedChannel = 1 << 4, + TPI_ChatFilterEventTypeUserLeftChannel = 1 << 5, + TPI_ChatFilterEventTypeUserKickedFromChannel = 1 << 6, + TPI_ChatFilterEventTypeUserDisconnected = 1 << 7, + TPI_ChatFilterEventTypeUserChangedNickname = 1 << 8, + TPI_ChatFilterEventTypeChannelTopicReceived = 1 << 9, + TPI_ChatFilterEventTypeChannelTopicChanged = 1 << 10, + TPI_ChatFilterEventTypeChannelModeReceived = 1 << 11, + TPI_ChatFilterEventTypeChannelModeChanged = 1 << 12 }; @interface TPI_ChatFilter : NSObject diff --git a/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilter.m b/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilter.m index fa47a7d75..20e10d019 100644 --- a/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilter.m +++ b/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilter.m @@ -49,15 +49,15 @@ NS_ASSUME_NONNULL_BEGIN ObjectIsAlreadyInitializedAssert self->_defaults = @{ - @"filterEvents" : @(TPI_ChatFilterPlainTextMessageEventType | - TPI_ChatFilterActionMessageEventType), + @"filterEvents" : @(TPI_ChatFilterEventTypePlainTextMessage | + TPI_ChatFilterEventTypeActionMessage), @"filterIgnoreContent" : @(NO), @"filterIgnoresOperators" : @(YES), @"filterLimitedToMyself" : @(NO), @"filterLogMatch" : @(NO), - @"filterLimitedToValue" : @(TPI_ChatFilterLimitToNoLimitValue), + @"filterLimitedToValue" : @(TPI_ChatFilterLimitToValueNoLimit), }; } @@ -172,22 +172,22 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END } else { - TPI_ChatFilterEventType filterEventsMask = (TPI_ChatFilterPlainTextMessageEventType | TPI_ChatFilterActionMessageEventType); + TPI_ChatFilterEventType filterEventsMask = (TPI_ChatFilterEventTypePlainTextMessage | TPI_ChatFilterEventTypeActionMessage); id filterCommandPRIVMSG = defaultsMutable[@"filterCommandPRIVMSG"]; if (filterCommandPRIVMSG && [filterCommandPRIVMSG boolValue] == NO) { - filterEventsMask &= ~TPI_ChatFilterPlainTextMessageEventType; + filterEventsMask &= ~TPI_ChatFilterEventTypePlainTextMessage; } id filterCommandPRIVMSG_ACTION = defaultsMutable[@"filterCommandPRIVMSG_ACTION"]; if (filterCommandPRIVMSG_ACTION && [filterCommandPRIVMSG_ACTION boolValue] == NO) { - filterEventsMask &= ~TPI_ChatFilterActionMessageEventType; + filterEventsMask &= ~TPI_ChatFilterEventTypeActionMessage; } if ([defaultsMutable boolForKey:@"filterCommandNOTICE"]) { - filterEventsMask |= TPI_ChatFilterNoticeMessageEventType; + filterEventsMask |= TPI_ChatFilterEventTypeNoticeMessage; } self->_filterEvents = filterEventsMask; @@ -199,9 +199,9 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END NSMutableDictionary *dic = [NSMutableDictionary dictionary]; /* Maintain backwards compatibility by setting old key names */ - [dic setBool:[self isEventTypeEnabled:TPI_ChatFilterPlainTextMessageEventType] forKey:@"filterCommandPRIVMSG"]; - [dic setBool:[self isEventTypeEnabled:TPI_ChatFilterActionMessageEventType] forKey:@"filterCommandPRIVMSG_ACTION"]; - [dic setBool:[self isEventTypeEnabled:TPI_ChatFilterNoticeMessageEventType] forKey:@"filterCommandNOTICE"]; + [dic setBool:[self isEventTypeEnabled:TPI_ChatFilterEventTypePlainTextMessage] forKey:@"filterCommandPRIVMSG"]; + [dic setBool:[self isEventTypeEnabled:TPI_ChatFilterEventTypeActionMessage] forKey:@"filterCommandPRIVMSG_ACTION"]; + [dic setBool:[self isEventTypeEnabled:TPI_ChatFilterEventTypeNoticeMessage] forKey:@"filterCommandNOTICE"]; /* Set regular key names */ [dic maybeSetObject:self.filterLimitedToChannelsIDs forKey:@"filterLimitedToChannelsIDs"]; @@ -251,16 +251,16 @@ DESIGNATED_INITIALIZER_EXCEPTION_BODY_END cachedResponse = @((filterEvents & _event_) == _event_); \ } - _commandMatchesEvent(@"JOIN", TPI_ChatFilterUserJoinedChannelEventType) - else _commandMatchesEvent(@"PART", TPI_ChatFilterUserLeftChannelEventType) - else _commandMatchesEvent(@"KICK", TPI_ChatFilterUserKickedFromChannelEventType) - else _commandMatchesEvent(@"QUIT", TPI_ChatFilterUserDisconnectedEventType) - else _commandMatchesEvent(@"NICK", TPI_ChatFilterUserChangedNicknameEventType) - else _commandMatchesEvent(@"TOPIC", TPI_ChatFilterChannelTopicChangedEventType) - else _commandMatchesEvent(@"MODE", TPI_ChatFilterChannelModeChangedEventType) - else _commandMatchesEvent(@"332", TPI_ChatFilterChannelTopicReceivedEventType) - else _commandMatchesEvent(@"333", TPI_ChatFilterChannelTopicReceivedEventType) - else _commandMatchesEvent(@"324", TPI_ChatFilterChannelModeReceivedEventType) + _commandMatchesEvent(@"JOIN", TPI_ChatFilterEventTypeUserJoinedChannel) + else _commandMatchesEvent(@"PART", TPI_ChatFilterEventTypeUserLeftChannel) + else _commandMatchesEvent(@"KICK", TPI_ChatFilterEventTypeUserKickedFromChannel) + else _commandMatchesEvent(@"QUIT", TPI_ChatFilterEventTypeUserDisconnected) + else _commandMatchesEvent(@"NICK", TPI_ChatFilterEventTypeUserChangedNickname) + else _commandMatchesEvent(@"TOPIC", TPI_ChatFilterEventTypeChannelTopicChanged) + else _commandMatchesEvent(@"MODE", TPI_ChatFilterEventTypeChannelModeChanged) + else _commandMatchesEvent(@"332", TPI_ChatFilterEventTypeChannelTopicReceived) + else _commandMatchesEvent(@"333", TPI_ChatFilterEventTypeChannelTopicReceived) + else _commandMatchesEvent(@"324", TPI_ChatFilterEventTypeChannelModeReceived) else { cachedResponse = @([self.filterEventsNumerics containsObject:command]); diff --git a/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilterEditFilterSheet.h b/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilterEditFilterSheet.h index a31d2eeeb..110d756ae 100644 --- a/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilterEditFilterSheet.h +++ b/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilterEditFilterSheet.h @@ -42,15 +42,15 @@ NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, TPI_ChatFilterActionTokenTag) { - TPI_ChatFilterActionTokenChannelNameTag = 1, - TPI_ChatFilterActionTokenLocalNicknameTag = 2, - TPI_ChatFilterActionTokenNetworkNameTag = 3, + TPI_ChatFilterActionTokenTagChannelName = 1, + TPI_ChatFilterActionTokenTagLocalNickname = 2, + TPI_ChatFilterActionTokenTagNetworkName = 3, TPI_ChatFilterActionTokenOriginalMessage = 4, - TPI_ChatFilterActionTokenSenderNicknameTag = 5, - TPI_ChatFilterActionTokenSenderAddressTag = 6, - TPI_ChatFilterActionTokenSenderUsernameTag = 7, - TPI_ChatFilterActionTokenSenderHostmaskTag = 8, - TPI_ChatFilterActionTokenServerAddressTag = 9 + TPI_ChatFilterActionTokenTagSenderNickname = 5, + TPI_ChatFilterActionTokenTagSenderAddress = 6, + TPI_ChatFilterActionTokenTagSenderUsername = 7, + TPI_ChatFilterActionTokenTagSenderHostmask = 8, + TPI_ChatFilterActionTokenTagServerAddress = 9 }; @protocol TPI_ChatFilterEditFilterSheetDelegate; diff --git a/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilterEditFilterSheet.m b/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilterEditFilterSheet.m index c75158e98..d0a0496d2 100644 --- a/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilterEditFilterSheet.m +++ b/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilterEditFilterSheet.m @@ -39,14 +39,14 @@ NS_ASSUME_NONNULL_BEGIN -typedef NS_ENUM(NSUInteger, TPI_ChatFilterEditFilterSheetNavigationSelection) +typedef NS_ENUM(NSUInteger, TPI_ChatFilterEditFilterSheetSelection) { - TPI_ChatFilterEditFilterSheetGeneralSelection = 0, - TPI_ChatFilterEditFilterSheetChannelsSelection = 1, - TPI_ChatFilterEditFilterSheetEventsSelection = 2, - TPI_ChatFilterEditFilterSheetSenderSelection = 3, - TPI_ChatFilterEditFilterSheetNotesSelection = 4, - TPI_ChatFilterEditFilterSheetAdvancedSelection = 5 + TPI_ChatFilterEditFilterSheetSelectionGeneral = 0, + TPI_ChatFilterEditFilterSheetSelectionChannels = 1, + TPI_ChatFilterEditFilterSheetSelectionEvents = 2, + TPI_ChatFilterEditFilterSheetSelectionSender = 3, + TPI_ChatFilterEditFilterSheetSelectionNotes = 4, + TPI_ChatFilterEditFilterSheetSelectionAdvanced = 5 }; @interface TPI_ChatFilterEditFilterSheet () @@ -191,18 +191,18 @@ typedef NS_ENUM(NSUInteger, TPI_ChatFilterEditFilterSheetNavigationSelection) self.filterLimitedToMyselfCheck.state = self.filter.filterLimitedToMyself; - self.filterEventPlainTextMessageCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterPlainTextMessageEventType]; - self.filterEventActionMessageCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterActionMessageEventType]; - self.filterEventNoticeMessageCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterNoticeMessageEventType]; - self.filterEventUserJoinedChannelCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterUserJoinedChannelEventType]; - self.filterEventUserLeftChannelCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterUserLeftChannelEventType]; - self.filterEventUserKickedFromChannelCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterUserKickedFromChannelEventType]; - self.filterEventUserDisconnectedCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterUserDisconnectedEventType]; - self.filterEventUserChangedNicknameCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterUserChangedNicknameEventType]; - self.filterEventChannelTopicReceivedCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterChannelTopicReceivedEventType]; - self.filterEventChannelTopicChangedCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterChannelTopicChangedEventType]; - self.filterEventChannelModeReceivedCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterChannelModeReceivedEventType]; - self.filterEventChannelModeChangedCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterChannelModeChangedEventType]; + self.filterEventPlainTextMessageCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterEventTypePlainTextMessage]; + self.filterEventActionMessageCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterEventTypeActionMessage]; + self.filterEventNoticeMessageCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterEventTypeNoticeMessage]; + self.filterEventUserJoinedChannelCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterEventTypeUserJoinedChannel]; + self.filterEventUserLeftChannelCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterEventTypeUserLeftChannel]; + self.filterEventUserKickedFromChannelCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterEventTypeUserKickedFromChannel]; + self.filterEventUserDisconnectedCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterEventTypeUserDisconnected]; + self.filterEventUserChangedNicknameCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterEventTypeUserChangedNickname]; + self.filterEventChannelTopicReceivedCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterEventTypeChannelTopicReceived]; + self.filterEventChannelTopicChangedCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterEventTypeChannelTopicChanged]; + self.filterEventChannelModeReceivedCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterEventTypeChannelModeReceived]; + self.filterEventChannelModeChangedCheck.state = [self.filter isEventTypeEnabled:TPI_ChatFilterEventTypeChannelModeChanged]; NSArray *filterEventsNumerics = self.filter.filterEventsNumerics; @@ -340,40 +340,40 @@ typedef NS_ENUM(NSUInteger, TPI_ChatFilterEditFilterSheetNavigationSelection) TPI_ChatFilterEventType filterEvents = 0; if (self.filterEventPlainTextMessageCheck.state == NSOnState) - filterEvents |= TPI_ChatFilterPlainTextMessageEventType; + filterEvents |= TPI_ChatFilterEventTypePlainTextMessage; if (self.filterEventActionMessageCheck.state == NSOnState) - filterEvents |= TPI_ChatFilterActionMessageEventType; + filterEvents |= TPI_ChatFilterEventTypeActionMessage; if (self.filterEventNoticeMessageCheck.state == NSOnState) - filterEvents |= TPI_ChatFilterNoticeMessageEventType; + filterEvents |= TPI_ChatFilterEventTypeNoticeMessage; if (self.filterEventUserJoinedChannelCheck.state == NSOnState) - filterEvents |= TPI_ChatFilterUserJoinedChannelEventType; + filterEvents |= TPI_ChatFilterEventTypeUserJoinedChannel; if (self.filterEventUserLeftChannelCheck.state == NSOnState) - filterEvents |= TPI_ChatFilterUserLeftChannelEventType; + filterEvents |= TPI_ChatFilterEventTypeUserLeftChannel; if (self.filterEventUserKickedFromChannelCheck.state == NSOnState) - filterEvents |= TPI_ChatFilterUserKickedFromChannelEventType; + filterEvents |= TPI_ChatFilterEventTypeUserKickedFromChannel; if (self.filterEventUserDisconnectedCheck.state == NSOnState) - filterEvents |= TPI_ChatFilterUserDisconnectedEventType; + filterEvents |= TPI_ChatFilterEventTypeUserDisconnected; if (self.filterEventUserChangedNicknameCheck.state == NSOnState) - filterEvents |= TPI_ChatFilterUserChangedNicknameEventType; + filterEvents |= TPI_ChatFilterEventTypeUserChangedNickname; if (self.filterEventChannelTopicReceivedCheck.state == NSOnState) - filterEvents |= TPI_ChatFilterChannelTopicReceivedEventType; + filterEvents |= TPI_ChatFilterEventTypeChannelTopicReceived; if (self.filterEventChannelTopicChangedCheck.state == NSOnState) - filterEvents |= TPI_ChatFilterChannelTopicChangedEventType; + filterEvents |= TPI_ChatFilterEventTypeChannelTopicChanged; if (self.filterEventChannelModeReceivedCheck.state == NSOnState) - filterEvents |= TPI_ChatFilterChannelModeReceivedEventType; + filterEvents |= TPI_ChatFilterEventTypeChannelModeReceived; if (self.filterEventChannelModeChangedCheck.state == NSOnState) - filterEvents |= TPI_ChatFilterChannelModeChangedEventType; + filterEvents |= TPI_ChatFilterEventTypeChannelModeChanged; return filterEvents; } @@ -395,18 +395,18 @@ typedef NS_ENUM(NSUInteger, TPI_ChatFilterEditFilterSheetNavigationSelection) - (BOOL)okOrError { - if ([self okOrErrorForTextField:self.filterEventNumericTextField inSelection:TPI_ChatFilterEditFilterSheetEventsSelection] == NO) { + if ([self okOrErrorForTextField:self.filterEventNumericTextField inSelection:TPI_ChatFilterEditFilterSheetSelectionEvents] == NO) { return NO; } - if ([self okOrErrorForTextField:self.filterForwardToDestinationTextField inSelection:TPI_ChatFilterEditFilterSheetAdvancedSelection] == NO) { + if ([self okOrErrorForTextField:self.filterForwardToDestinationTextField inSelection:TPI_ChatFilterEditFilterSheetSelectionAdvanced] == NO) { return NO; } return YES; } -- (BOOL)okOrErrorForTextField:(TVCValidatedTextField *)textField inSelection:(TPI_ChatFilterEditFilterSheetNavigationSelection)selection +- (BOOL)okOrErrorForTextField:(TVCValidatedTextField *)textField inSelection:(TPI_ChatFilterEditFilterSheetSelection)selection { if (textField.valueIsValid) { return YES; @@ -422,7 +422,7 @@ typedef NS_ENUM(NSUInteger, TPI_ChatFilterEditFilterSheetNavigationSelection) return NO; } -- (void)navigateToSelection:(TPI_ChatFilterEditFilterSheetNavigationSelection)selection +- (void)navigateToSelection:(TPI_ChatFilterEditFilterSheetSelection)selection { if (self.contentViewTabView.indexOfSelectedItem == selection) { return; @@ -716,7 +716,7 @@ typedef NS_ENUM(NSUInteger, TPI_ChatFilterEditFilterSheetNavigationSelection) - (void)updateVisibilityOfLimitedToTableHostView { - if (self.filterLimitToMatrix.selectedTag == TPI_ChatFilterLimitToSpecificItemsValue) { + if (self.filterLimitToMatrix.selectedTag == TPI_ChatFilterLimitToValueSpecificItems) { self.filterLimitedToHostView.hidden = NO; } else { self.filterLimitedToHostView.hidden = YES; @@ -730,7 +730,7 @@ typedef NS_ENUM(NSUInteger, TPI_ChatFilterEditFilterSheetNavigationSelection) - (void)updateEnabledStateOfFilterEvents { - BOOL enabled = (self.filterLimitToMatrix.selectedTag != TPI_ChatFilterLimitToPrivateMessagesValue); + BOOL enabled = (self.filterLimitToMatrix.selectedTag != TPI_ChatFilterLimitToValuePrivateMessages); self.filterEventUserJoinedChannelCheck.enabled = enabled; self.filterEventUserLeftChannelCheck.enabled = enabled; diff --git a/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilterLogic.m b/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilterLogic.m index bbc5659be..b52dcdfa9 100644 --- a/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilterLogic.m +++ b/Sources/Plugins/Chat Filter/Classes/TPI_ChatFilterLogic.m @@ -74,7 +74,7 @@ NS_ASSUME_NONNULL_BEGIN know that there is a filter that will need it. */ TPI_ChatFilterLimitToValue filterLimitedToValue = filter.filterLimitedToValue; - if (filterLimitedToValue != TPI_ChatFilterLimitToNoLimitValue || filter.filterIgnoreOperators) { + if (filterLimitedToValue != TPI_ChatFilterLimitToValueNoLimit || filter.filterIgnoreOperators) { if (textDestination == nil && textAuthor.isServer == NO) { LogToConsoleDebug("textDestination == nil — Returning input instead of continuing with filter"); @@ -82,21 +82,21 @@ NS_ASSUME_NONNULL_BEGIN } } - if (filterLimitedToValue == TPI_ChatFilterLimitToChannelsValue) { + if (filterLimitedToValue == TPI_ChatFilterLimitToValueChannels) { if (textDestination.isChannel == NO) { /* Filter is limited to a channel but the destination is not a channel. */ return NO; } - } else if (filterLimitedToValue == TPI_ChatFilterLimitToPrivateMessagesValue) { + } else if (filterLimitedToValue == TPI_ChatFilterLimitToValuePrivateMessages) { if (textDestination.isPrivateMessage == NO) { /* Filter is limited to a private message but the destination is not a private message. */ return NO; } - } else if (filterLimitedToValue == TPI_ChatFilterLimitToSpecificItemsValue) { + } else if (filterLimitedToValue == TPI_ChatFilterLimitToValueSpecificItems) { NSArray *filterLimitedToClientsIDs = filter.filterLimitedToClientsIDs; NSArray *filterLimitedToChannelsIDs = filter.filterLimitedToChannelsIDs; @@ -227,7 +227,7 @@ NS_ASSUME_NONNULL_BEGIN [client print:message by:nil inChannel:destinationChannel - asType:TVCLogLineDebugType + asType:TVCLogLineTypeDebug command:TVCLogLineDefaultCommandValue receivedAt:receivedAt isEncrypted:NO @@ -261,14 +261,14 @@ NS_ASSUME_NONNULL_BEGIN for (TPI_ChatFilter *filter in filters) { @autoreleasepool { - if (((lineType == TVCLogLinePrivateMessageType || lineType == TVCLogLinePrivateMessageNoHighlightType) && - [filter isEventTypeEnabled:TPI_ChatFilterPlainTextMessageEventType] == NO) || + if (((lineType == TVCLogLineTypePrivateMessage || lineType == TVCLogLineTypePrivateMessageNoHighlight) && + [filter isEventTypeEnabled:TPI_ChatFilterEventTypePlainTextMessage] == NO) || - ((lineType == TVCLogLineActionType || lineType == TVCLogLineActionNoHighlightType) && - [filter isEventTypeEnabled:TPI_ChatFilterActionMessageEventType] == NO) || + ((lineType == TVCLogLineTypeAction || lineType == TVCLogLineTypeActionNoHighlight) && + [filter isEventTypeEnabled:TPI_ChatFilterEventTypeActionMessage] == NO) || - (lineType == TVCLogLineNoticeType && - [filter isEventTypeEnabled:TPI_ChatFilterNoticeMessageEventType] == NO)) + (lineType == TVCLogLineTypeNotice && + [filter isEventTypeEnabled:TPI_ChatFilterEventTypeNoticeMessage] == NO)) { /* Continue to next filter. This filter is not interested in the line type of the input. */ @@ -327,13 +327,13 @@ NS_ASSUME_NONNULL_BEGIN NSString *fakeMessageCommand = nil; - if (lineType == TVCLogLinePrivateMessageType || - lineType == TVCLogLinePrivateMessageNoHighlightType || - lineType == TVCLogLineActionType || - lineType == TVCLogLineActionNoHighlightType) + if (lineType == TVCLogLineTypePrivateMessage || + lineType == TVCLogLineTypePrivateMessageNoHighlight || + lineType == TVCLogLineTypeAction || + lineType == TVCLogLineTypeActionNoHighlight) { fakeMessageCommand = @"PRIVMSG"; - } else if (lineType == TVCLogLineNoticeType) { + } else if (lineType == TVCLogLineTypeNotice) { fakeMessageCommand = @"NOTICE"; } @@ -346,7 +346,7 @@ NS_ASSUME_NONNULL_BEGIN isEncrypted:wasEncrypted referenceMessage:nil completionBlock:^(TVCLogControllerPrintOperationContext *context) { - if (lineType == TVCLogLineNoticeType) { + if (lineType == TVCLogLineTypeNotice) { [client setUnreadStateForChannel:destinationChannel]; } else { BOOL isHighlight = context.highlight; @@ -460,7 +460,7 @@ NS_ASSUME_NONNULL_BEGIN [client print:formattedMessage by:nil inChannel:filterActionReportQuery - asType:TVCLogLinePrivateMessageType + asType:TVCLogLineTypePrivateMessage command:@"PRIVMSG"]; [client setUnreadStateForChannel:filterActionReportQuery]; diff --git a/Sources/Plugins/Smiley Converter/Classes/TPISmileyConverter.m b/Sources/Plugins/Smiley Converter/Classes/TPISmileyConverter.m index afb5f372d..8e9856d3d 100644 --- a/Sources/Plugins/Smiley Converter/Classes/TPISmileyConverter.m +++ b/Sources/Plugins/Smiley Converter/Classes/TPISmileyConverter.m @@ -136,8 +136,8 @@ NS_ASSUME_NONNULL_BEGIN return newMessage; } - if (lineType == TVCLogLineActionType || - lineType == TVCLogLinePrivateMessageType) + if (lineType == TVCLogLineTypeAction || + lineType == TVCLogLineTypePrivateMessage) { return [self convertStringToEmoji:newMessage]; } diff --git a/Sources/Shared/Headers/IRCConnectionErrors.h b/Sources/Shared/Headers/IRCConnectionErrors.h index 4cfd494d7..328acf9c8 100644 --- a/Sources/Shared/Headers/IRCConnectionErrors.h +++ b/Sources/Shared/Headers/IRCConnectionErrors.h @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN -extern NSString * const IRCConnectionErrorDomain NS_SWIFT_NAME(ConnectionErrorDomain); +extern NSErrorDomain const IRCConnectionErrorDomain NS_SWIFT_NAME(ConnectionErrorDomain); typedef NS_ENUM(NSUInteger, IRCConnectionErrorCode) { diff --git a/Sources/Shared/Headers/TPCPreferencesUserDefaults.h b/Sources/Shared/Headers/TPCPreferencesUserDefaults.h index b202858fd..9f496ff6c 100644 --- a/Sources/Shared/Headers/TPCPreferencesUserDefaults.h +++ b/Sources/Shared/Headers/TPCPreferencesUserDefaults.h @@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN #define RZUserDefaults() [TPCPreferencesUserDefaults sharedUserDefaults] /* The user info dictionary of this notification contains the changed key. */ -TEXTUAL_EXTERN NSString * const TPCPreferencesUserDefaultsDidChangeNotification; +TEXTUAL_EXTERN NSNotificationName const TPCPreferencesUserDefaultsDidChangeNotification; /* TPCPreferencesUserDefaults subclasses NSUserDefaults to allow Textual to fire off notifications for changed keys on a per-key basis so that the iCloud controller can diff --git a/XPC Services/Historic Log File Manager/Classes/HLSHistoricLogProcessMain.m b/XPC Services/Historic Log File Manager/Classes/HLSHistoricLogProcessMain.m index 0efd0906e..fc409a35d 100644 --- a/XPC Services/Historic Log File Manager/Classes/HLSHistoricLogProcessMain.m +++ b/XPC Services/Historic Log File Manager/Classes/HLSHistoricLogProcessMain.m @@ -39,8 +39,8 @@ NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, HLSHistoricLogUniqueIdentifierFetchType) { - HLSHistoricLogReturnEntriesBeforeUniqueIdentifierType, - HLSHistoricLogReturnEntriesAfterUniqueIdentifierType + HLSHistoricLogReturnEntriesUniqueIdentifierTypeBefore, + HLSHistoricLogReturnEntriesUniqueIdentifierTypeAfter }; @interface HLSHistoricLogProcessMain () @@ -238,7 +238,7 @@ typedef NS_ENUM(NSUInteger, HLSHistoricLogUniqueIdentifierFetchType) { return [self fetchEntriesForView:viewId withUniqueIdentifier:uniqueId - fetchType:HLSHistoricLogReturnEntriesBeforeUniqueIdentifierType + fetchType:HLSHistoricLogReturnEntriesUniqueIdentifierTypeBefore fetchLimit:fetchLimit limitToDate:limitToDate withCompletionBlock:completionBlock]; @@ -252,7 +252,7 @@ typedef NS_ENUM(NSUInteger, HLSHistoricLogUniqueIdentifierFetchType) { return [self fetchEntriesForView:viewId withUniqueIdentifier:uniqueId - fetchType:HLSHistoricLogReturnEntriesAfterUniqueIdentifierType + fetchType:HLSHistoricLogReturnEntriesUniqueIdentifierTypeAfter fetchLimit:fetchLimit limitToDate:limitToDate withCompletionBlock:completionBlock]; @@ -411,7 +411,7 @@ typedef NS_ENUM(NSUInteger, HLSHistoricLogUniqueIdentifierFetchType) NSInteger highestEntryId = 0; switch (fetchType) { - case HLSHistoricLogReturnEntriesBeforeUniqueIdentifierType: + case HLSHistoricLogReturnEntriesUniqueIdentifierTypeBefore: { /* 1 is subtracted so we can still return fetchLimit while accounting for the fact that firstEntryId is @@ -422,7 +422,7 @@ typedef NS_ENUM(NSUInteger, HLSHistoricLogUniqueIdentifierFetchType) break; } - case HLSHistoricLogReturnEntriesAfterUniqueIdentifierType: + case HLSHistoricLogReturnEntriesUniqueIdentifierTypeAfter: { lowestEntryId = (firstEntryId + 1); diff --git a/XPC Services/Inline Content Loader/Classes/Headers/Private/ICLProcessPCHPrivate.h b/XPC Services/Inline Content Loader/Classes/Headers/Private/ICLProcessPCHPrivate.h index c105b1dd7..2a75d9559 100644 --- a/XPC Services/Inline Content Loader/Classes/Headers/Private/ICLProcessPCHPrivate.h +++ b/XPC Services/Inline Content Loader/Classes/Headers/Private/ICLProcessPCHPrivate.h @@ -41,4 +41,4 @@ #import "StaticDefinitions.h" -extern NSString * const ICLInlineContentErrorDomain; +extern NSErrorDomain const ICLInlineContentErrorDomain; diff --git a/XPC Services/Inline Content Loader/Extensions/Core Media/Classes/Modules/Twitch Live/ICMTwitchLive.m b/XPC Services/Inline Content Loader/Extensions/Core Media/Classes/Modules/Twitch Live/ICMTwitchLive.m index a22353073..88c386985 100644 --- a/XPC Services/Inline Content Loader/Extensions/Core Media/Classes/Modules/Twitch Live/ICMTwitchLive.m +++ b/XPC Services/Inline Content Loader/Extensions/Core Media/Classes/Modules/Twitch Live/ICMTwitchLive.m @@ -39,26 +39,26 @@ NS_ASSUME_NONNULL_BEGIN -typedef NS_ENUM(NSUInteger, ICMTwitchLiveContentType) +typedef NS_ENUM(NSUInteger, ICMTwitchLiveContentTypeContent) { - ICMTwitchLiveUnknownType = 0, - ICMTwitchLiveChannelType, - ICMTwitchLiveVideoType + ICMTwitchLiveContentTypeUnknown = 0, + ICMTwitchLiveContentTypeChannel, + ICMTwitchLiveContentTypeVideo }; @implementation ICMTwitchLive -- (void)_performActionForContent:(NSString *)contentIdentifier type:(ICMTwitchLiveContentType)contentType +- (void)_performActionForContent:(NSString *)contentIdentifier type:(ICMTwitchLiveContentTypeContent)contentType { NSParameterAssert(contentIdentifier != nil); - NSParameterAssert(contentType == ICMTwitchLiveChannelType || - contentType == ICMTwitchLiveVideoType); + NSParameterAssert(contentType == ICMTwitchLiveContentTypeChannel || + contentType == ICMTwitchLiveContentTypeVideo); NSString *contentArgument = nil; - if (contentType == ICMTwitchLiveChannelType) { + if (contentType == ICMTwitchLiveContentTypeChannel) { contentArgument = @"channel"; - } else if (contentType == ICMTwitchLiveVideoType) { + } else if (contentType == ICMTwitchLiveContentTypeVideo) { contentArgument = @"video"; } @@ -87,7 +87,7 @@ typedef NS_ENUM(NSUInteger, ICMTwitchLiveContentType) { NSParameterAssert(url != nil); - ICMTwitchLiveContentType contentType = ICMTwitchLiveUnknownType; + ICMTwitchLiveContentTypeContent contentType = ICMTwitchLiveContentTypeUnknown; NSString *contentIdentifier = [self _contentIdentifierForURL:url type:&contentType]; @@ -102,7 +102,7 @@ typedef NS_ENUM(NSUInteger, ICMTwitchLiveContentType) } copy]; } -+ (nullable NSString *)_contentIdentifierForURL:(NSURL *)url type:(ICMTwitchLiveContentType *)contentTypeIn ++ (nullable NSString *)_contentIdentifierForURL:(NSURL *)url type:(ICMTwitchLiveContentTypeContent *)contentTypeIn { NSString *urlPath = url.path.percentEncodedURLPath; @@ -131,7 +131,7 @@ typedef NS_ENUM(NSUInteger, ICMTwitchLiveContentType) return nil; } - *contentTypeIn = ICMTwitchLiveVideoType; + *contentTypeIn = ICMTwitchLiveContentTypeVideo; return contentIdentifier; } @@ -150,7 +150,7 @@ typedef NS_ENUM(NSUInteger, ICMTwitchLiveContentType) return nil; } - *contentTypeIn = ICMTwitchLiveChannelType; + *contentTypeIn = ICMTwitchLiveContentTypeChannel; return contentIdentifier; }