Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions Sources/MHApplicationDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,20 @@ - (IBAction)showAddConnectionPanel:(id)sender

- (IBAction)deleteConnection:(id)sender
{
[connectionsArrayController remove:sender];
[self saveConnections];
NSAlert *alert = [[[NSAlert alloc] init] autorelease];
[alert addButtonWithTitle:@"OK"];
[alert addButtonWithTitle:@"Cancel"];
[alert setMessageText:@"Delete the connection?"];
[alert setInformativeText:@"Deleted connections cannot be restored."];
[alert setAlertStyle:NSWarningAlertStyle];

NSInteger answer = [alert runModal];
alert = nil;

if (answer == NSAlertFirstButtonReturn) {
[connectionsArrayController remove:sender];
[self saveConnections];
}
}

- (IBAction)showEditConnectionPanel:(id)sender
Expand Down