Skip to content

Commit

Permalink
OF-2741: Fix a deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Fishbowler committed Nov 21, 2023
1 parent e751845 commit d63ccd1
Showing 1 changed file with 18 additions and 48 deletions.
66 changes: 18 additions & 48 deletions build/osx/openfirePrefPane/openfirePrefPane.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,10 @@ - (BOOL)isRunning
if((ps=popen(pscmd, "r")) == NULL)
{
// There was an error opening the pipe. Alert the user.
NSBeginAlertSheet(
@"Error!",
@"OK",
nil,
nil,
[NSApp mainWindow],
self,
nil,
nil,
self,
@"An error occured while detecting a running Openfire process.",
nil);
NSAlert *alert = [[NSAlert alloc] init];
alert.alertStyle = NSAlertStyleWarning;
alert.messageText = @"An error occured while detecting a running Openfire process.";
[alert runModal];

return NO;
}
Expand Down Expand Up @@ -92,18 +84,10 @@ - (IBAction)toggleAutoStart:(id)sender
if(ourStatus != errAuthorizationSuccess)
{
// alert user the startup has failed
NSBeginAlertSheet(
@"Error!",
@"OK",
nil,
nil,
[NSApp mainWindow],
self,
nil,
nil,
self,
@"Could not toggle Openfire startup.",
nil);
NSAlert *alert = [[NSAlert alloc] init];
alert.alertStyle = NSAlertStyleWarning;
alert.messageText = @"Could not toggle Openfire startup.";
[alert runModal];
[statusTimer invalidate];
[self checkStatus];
}
Expand Down Expand Up @@ -176,18 +160,11 @@ - (void)startServer
if(ourStatus != errAuthorizationSuccess)
{
// alert user the startup has failed
NSBeginAlertSheet(
@"Error!",
@"OK",
nil,
nil,
[NSApp mainWindow],
self,
nil,
nil,
self,
@"Could not start the Openfire server.",
nil);
NSAlert *alert = [[NSAlert alloc] init];
alert.alertStyle = NSAlertStyleWarning;
alert.messageText = @"Could not start the Openfire server.";
[alert runModal];

[statusTimer invalidate];
[self checkStatus];
}
Expand All @@ -205,18 +182,11 @@ - (void) stopServer
if(ourStatus != errAuthorizationSuccess)
{
// alert user the startup has failed
NSBeginAlertSheet(
@"Error!",
@"OK",
nil,
nil,
[NSApp mainWindow],
self,
nil,
nil,
self,
@"Could not stop the Openfire server.",
nil);
NSAlert *alert = [[NSAlert alloc] init];
alert.alertStyle = NSAlertStyleWarning;
alert.messageText = @"Could not stop the Openfire server.";
[alert runModal];

[statusTimer invalidate];
[self checkStatus];
}
Expand Down

0 comments on commit d63ccd1

Please sign in to comment.