+- (BOOL)showPasswordPanel
+{
+ [passwordPanel setLevel:NSStatusWindowLevel];
+ [passwordPanelOKButton setTitle:@"Connect"];
+ [passwordPanelTitle setStringValue:@"Password Required"];
+ [passwordPanelMessage setStringValue:[NSString stringWithFormat:@"Please enter a password for access to the MenuTunes player named %@ at %@.", [[[NetworkController sharedController] networkObject] serverName], [[NetworkController sharedController] remoteHost]]];
+ [passwordPanel center];
+ [passwordPanel setLevel:NSStatusWindowLevel];
+ [passwordPanel makeKeyAndOrderFront:nil];
+ if ([NSApp runModalForWindow:passwordPanel]) {
+ return YES;
+ } else {
+ return NO;
+ }
+}
+
+- (BOOL)showInvalidPasswordPanel
+{
+ [passwordPanel setLevel:NSStatusWindowLevel];
+ [passwordPanelOKButton setTitle:@"Retry"];
+ [passwordPanelTitle setStringValue:@"Invalid Password"];
+ [passwordPanelMessage setStringValue:[NSString stringWithFormat:@"The password entered for access to the MenuTunes player named %@ at %@ is invalid. Please provide a new password.", [[[NetworkController sharedController] networkObject] serverName], [[NetworkController sharedController] remoteHost]]];
+ [passwordPanel center];
+ [passwordPanel setLevel:NSStatusWindowLevel];
+ [passwordPanel makeKeyAndOrderFront:nil];
+ if ([NSApp runModalForWindow:passwordPanel]) {
+ return YES;
+ } else {
+ return NO;
+ }
+}
+