Skip to content

Commit

Permalink
4.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffeyDev committed Feb 15, 2021
1 parent 25b7b47 commit 0cb240f
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 31 deletions.
13 changes: 13 additions & 0 deletions atemOSC/ConnectionView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,19 @@ - (void)controlTextDidEndEditing:(NSNotification *)notification

else if (textField == nicknameTextField)
{
AppDelegate* appDel = (AppDelegate *) [[NSApplication sharedApplication] delegate];
for (Switcher *s : [appDel switchers])
{
if (s.nickname != nil && [textField stringValue].length > 0 && [s.nickname isEqualToString: [textField stringValue]])
{
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:@"Duplicate Nickname"];
[alert setInformativeText:@"Please assign a unique nickname to each switcher"];
[alert beginSheetModalForWindow:[[NSApplication sharedApplication] mainWindow] completionHandler:nil];
[textField setStringValue:switcher.nickname];
return;
}
}
[switcher setNickname: [textField stringValue]];
[[window addressesView] loadFromSwitcher:[self switcher]];
}
Expand Down
Loading

0 comments on commit 0cb240f

Please sign in to comment.