mirror of
https://github.com/Codeux-Software/Textual.git
synced 2026-06-16 13:24:32 +00:00
Modify built in extensions to be thread safe
This commit is contained in:
@@ -112,6 +112,17 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)userInputCommandInvokedOnClient:(IRCClient *)client
|
||||
commandString:(NSString *)commandString
|
||||
messageString:(NSString *)messageString
|
||||
{
|
||||
XRPerformBlockAsynchronouslyOnMainQueue(^{
|
||||
[self _userInputCommandInvokedOnClient:client
|
||||
commandString:commandString
|
||||
messageString:messageString];
|
||||
});
|
||||
}
|
||||
|
||||
- (void)_userInputCommandInvokedOnClient:(IRCClient *)client
|
||||
commandString:(NSString *)commandString
|
||||
messageString:(NSString *)messageString
|
||||
{
|
||||
IRCChannel *channel = mainWindow().selectedChannel;
|
||||
|
||||
|
||||
@@ -47,6 +47,17 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)userInputCommandInvokedOnClient:(IRCClient *)client
|
||||
commandString:(NSString *)commandString
|
||||
messageString:(NSString *)messageString
|
||||
{
|
||||
XRPerformBlockAsynchronouslyOnMainQueue(^{
|
||||
[self _userInputCommandInvokedOnClient:client
|
||||
commandString:commandString
|
||||
messageString:messageString];
|
||||
});
|
||||
}
|
||||
|
||||
- (void)_userInputCommandInvokedOnClient:(IRCClient *)client
|
||||
commandString:(NSString *)commandString
|
||||
messageString:(NSString *)messageString
|
||||
{
|
||||
IRCChannel *channel = mainWindow().selectedChannel;
|
||||
|
||||
|
||||
@@ -73,6 +73,17 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)userInputCommandInvokedOnClient:(IRCClient *)client
|
||||
commandString:(NSString *)commandString
|
||||
messageString:(NSString *)messageString
|
||||
{
|
||||
XRPerformBlockAsynchronouslyOnMainQueue(^{
|
||||
[self _userInputCommandInvokedOnClient:client
|
||||
commandString:commandString
|
||||
messageString:messageString];
|
||||
});
|
||||
}
|
||||
|
||||
- (void)_userInputCommandInvokedOnClient:(IRCClient *)client
|
||||
commandString:(NSString *)commandString
|
||||
messageString:(NSString *)messageString
|
||||
{
|
||||
/* Throw error if user tries to invoke a command that requires the
|
||||
user to be connected to a ZNC bouncer */
|
||||
@@ -128,20 +139,18 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
return;
|
||||
}
|
||||
|
||||
XRPerformBlockSynchronouslyOnMainQueue(^{
|
||||
SFCertificateTrustPanel *panel = [SFCertificateTrustPanel new];
|
||||
SFCertificateTrustPanel *panel = [SFCertificateTrustPanel new];
|
||||
|
||||
[panel setDefaultButtonTitle:TXTLS(@"Prompts[aqw-q1]")];
|
||||
[panel setDefaultButtonTitle:TXTLS(@"Prompts[aqw-q1]")];
|
||||
|
||||
[panel setAlternateButtonTitle:nil];
|
||||
[panel setAlternateButtonTitle:nil];
|
||||
|
||||
[panel beginSheetForWindow:[NSApp mainWindow]
|
||||
modalDelegate:nil
|
||||
didEndSelector:NULL
|
||||
contextInfo:NULL
|
||||
certificates:(__bridge NSArray *)certificateArray
|
||||
showGroup:YES];
|
||||
});
|
||||
[panel beginSheetForWindow:[NSApp mainWindow]
|
||||
modalDelegate:nil
|
||||
didEndSelector:NULL
|
||||
contextInfo:NULL
|
||||
certificates:(__bridge NSArray *)certificateArray
|
||||
showGroup:YES];
|
||||
|
||||
CFRelease(certificateArray);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user