diff --git a/Resources/English.lproj/ServerDisplay.nib/designable.nib b/Resources/English.lproj/ServerDisplay.nib/designable.nib
index fe2f4bf..71f20a6 100644
--- a/Resources/English.lproj/ServerDisplay.nib/designable.nib
+++ b/Resources/English.lproj/ServerDisplay.nib/designable.nib
@@ -1,1692 +1,320 @@
-
-
-
- 1060
- 10K549
- 851
- 1038.36
- 461.00
-
-
-
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
-
-
-
-
-
-
-
-
-
-
-
- hostName
-
-
-
- 39
-
-
-
- rememberPwd
-
-
-
- 42
-
-
-
- shared
-
-
-
- 43
-
-
-
- profilePopup
-
-
-
- 44
-
-
-
- box
-
-
-
- 45
-
-
-
- window
-
-
-
- 54
-
-
-
- connectIndicator
-
-
-
- 55
-
-
-
- connectIndicatorText
-
-
-
- 56
-
-
-
- connectBtn
-
-
-
- 62
-
-
-
- sharedChanged:
-
-
-
- 75
-
-
-
- rememberPwdChanged:
-
-
-
- 77
-
-
-
- profileSelectionChanged:
-
-
-
- 78
-
-
-
- connectToServer:
-
-
-
- 79
-
-
-
- display
-
-
-
- 80
-
-
-
- password
-
-
-
- 81
-
-
-
- nextKeyView
-
-
-
- 82
-
-
-
- nextKeyView
-
-
-
- 83
-
-
-
- nextKeyView
-
-
-
- 84
-
-
-
- nextKeyView
-
-
-
- 85
-
-
-
- nextKeyView
-
-
-
- 86
-
-
-
- nextKeyView
-
-
-
- 87
-
-
-
- nextKeyView
-
-
-
- 88
-
-
-
- delegate
-
-
-
- 89
-
-
-
- delegate
-
-
-
- 90
-
-
-
- fullscreen
-
-
-
- 93
-
-
-
- fullscreenChanged:
-
-
-
- 94
-
-
-
- save
-
-
-
- 96
-
-
-
- addServerChanged:
-
-
-
- 97
-
-
-
- viewOnly
-
-
-
- 109
-
-
-
- viewOnlyChanged:
-
-
-
- 110
-
-
-
- displayDescription
-
-
-
- 130
-
-
-
- useSshTunnelChanged:
-
-
-
- 137
-
-
-
- sshHostChanged:
-
-
-
- 138
-
-
-
- sshHost
-
-
-
- 139
-
-
-
- useSshTunnel
-
-
-
- 140
-
-
-
- passwordChanged:
-
-
-
- 141
-
-
-
-
-
- 0
-
-
-
-
-
- -2
-
-
- File's Owner
-
-
- -1
-
-
- First Responder
-
-
- 6
-
-
-
-
-
- Connect
-
-
- 5
-
-
-
-
-
-
-
- 23
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -3
-
-
- Application
-
-
- 95
-
-
-
-
-
-
-
- 125
-
-
-
-
- 11
-
-
-
-
-
-
-
- 116
-
-
-
-
- 10
-
-
-
-
-
-
-
- 115
-
-
-
-
- 25
-
-
-
-
-
-
-
- 122
-
-
-
-
- 8
-
-
-
-
-
-
-
- 113
-
-
-
-
- 18
-
-
-
-
-
-
-
- 120
-
-
-
-
-
-
-
- 49
-
-
-
-
- 15
-
-
-
-
-
-
-
- 118
-
-
-
-
- 17
-
-
-
-
-
-
-
- 119
-
-
-
-
-
-
-
- 21
-
-
-
-
-
-
-
- 13
-
-
-
-
- 20
-
-
-
-
-
-
-
- 121
-
-
-
-
- 14
-
-
-
-
-
-
-
- 117
-
-
-
-
- 19
-
-
-
-
- 256
- {{2, 2}, {332, 1}}
-
-
-
-
-
- 12
-
-
-
-
- 7
-
-
-
-
-
-
-
- 112
-
-
-
-
- 26
-
-
-
-
-
-
-
- 123
-
-
-
-
- 92
-
-
-
-
-
-
-
- 124
-
-
-
-
- 98
-
-
-
-
-
-
-
- 126
-
-
-
-
- 127
-
-
-
-
-
-
-
- 128
-
-
-
-
- 9
-
-
-
-
-
-
-
- 114
-
-
-
-
- 27
-
-
-
-
- 131
-
-
-
-
-
-
-
- 132
-
-
-
-
- 133
-
-
-
-
-
-
-
- 134
-
-
-
-
- 135
-
-
-
-
-
-
-
- 136
-
-
-
-
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
-
-
- ToolTip
-
- ToolTip
-
- The host name or IP address of the server to which you wish to connect. You can optionally append a port number with a colon.
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
-
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- P4AAAL+AAABCHAAAwxEAAA
-
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
-
- P4AAAL+AAABC0gAAwtQAAA
-
- com.apple.InterfaceBuilder.CocoaPlugin
- com.apple.InterfaceBuilder.CocoaPlugin
-
- P4AAAL+AAABBoAAAwvIAAA
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- ToolTip
-
- ToolTip
-
- Connect to the server now
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- P4AAAL+AAABDbQAAwhQAAA
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
-
- ToolTip
-
- ToolTip
-
- Select your desired connection profile.
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
-
- ToolTip
-
- ToolTip
-
- The display number of the server to which you wish to connect
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- Ab+AAABCLAAAA
-
-
-
- ToolTip
-
- ToolTip
-
- Store this password in your Keychain for automatic retrieval next time.
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- AUGgAABCfAAAA
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
-
- ToolTip
-
- ToolTip
-
- Other clients can connect to the server at the same time as you.
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- P4AAAL+AAABAwAAAwbAAAA
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- {{336, 631}, {368, 375}}
- com.apple.InterfaceBuilder.CocoaPlugin
- {{336, 631}, {368, 375}}
-
-
- {213, 107}
- NSSecureTextField
-
- ToolTip
-
- ToolTip
-
- The password for the server to which you wish to connect
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- P4AAAL+AAABB0AAAwagAAA
-
-
-
- ToolTip
-
- ToolTip
-
- Hide your menubar and Dock and use the entire screen.
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
-
- ToolTip
-
- ToolTip
-
- Keyboard and mouse events will not be sent to the server, you will only be observing.
-
-
- com.apple.InterfaceBuilder.CocoaPlugin
-
-
-
-
-
-
- 141
-
-
-
-
- FirstResponder
- NSObject
-
- :
- id
-
-
- :
-
- :
- id
-
-
-
- IBUserSource
-
-
-
-
- NSObject
-
- IBProjectSource
- Source/NSObject_Chicken.h
-
-
-
- ServerDataViewController
- NSWindowController
-
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
- id
-
-
-
- addServerChanged:
- id
-
-
- cancelConnect:
- id
-
-
- connectToServer:
- id
-
-
- fullscreenChanged:
- id
-
-
- passwordChanged:
- id
-
-
- profileSelectionChanged:
- id
-
-
- rememberPwdChanged:
- id
-
-
- sharedChanged:
- id
-
-
- showProfileManager:
- id
-
-
- sshHostChanged:
- id
-
-
- useSshTunnelChanged:
- id
-
-
- viewOnlyChanged:
- id
-
-
-
- NSBox
- NSButton
- NSProgressIndicator
- NSTextField
- NSTextField
- NSTextField
- NSButton
- NSTextField
- NSTextField
- NSPopUpButton
- NSButton
- NSButton
- NSButton
- NSTextField
- NSButton
- NSButton
-
-
-
- box
- NSBox
-
-
- connectBtn
- NSButton
-
-
- connectIndicator
- NSProgressIndicator
-
-
- connectIndicatorText
- NSTextField
-
-
- display
- NSTextField
-
-
- displayDescription
- NSTextField
-
-
- fullscreen
- NSButton
-
-
- hostName
- NSTextField
-
-
- password
- NSTextField
-
-
- profilePopup
- NSPopUpButton
-
-
- rememberPwd
- NSButton
-
-
- save
- NSButton
-
-
- shared
- NSButton
-
-
- sshHost
- NSTextField
-
-
- useSshTunnel
- NSButton
-
-
- viewOnly
- NSButton
-
-
-
- IBProjectSource
- Source/ServerDataViewController.h
-
-
-
- ServerDataViewController
- NSWindowController
-
- IBUserSource
-
-
-
-
-
-
- NSObject
-
- IBFrameworkSource
- Sparkle.framework/Headers/SUAppcast.h
-
-
-
- NSObject
-
- IBFrameworkSource
- Sparkle.framework/Headers/SUUpdater.h
-
-
-
-
- 0
- IBCocoaFramework
-
- com.apple.InterfaceBuilder.CocoaPlugin.macosx
-
-
-
- com.apple.InterfaceBuilder.CocoaPlugin.macosx
-
-
- YES
- ../../Chicken of the VNC.xcodeproj
- 3
-
- {9, 8}
- {7, 2}
- {15, 15}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Resources/English.lproj/ServerDisplay.nib/keyedobjects.nib b/Resources/English.lproj/ServerDisplay.nib/keyedobjects.nib
index 8626375..12f9564 100644
Binary files a/Resources/English.lproj/ServerDisplay.nib/keyedobjects.nib and b/Resources/English.lproj/ServerDisplay.nib/keyedobjects.nib differ
diff --git a/Source/IServerData.h b/Source/IServerData.h
old mode 100644
new mode 100755
index 6e6fca2..c2dcce8
--- a/Source/IServerData.h
+++ b/Source/IServerData.h
@@ -29,6 +29,7 @@ typedef enum
EDIT_ADDRESS,
EDIT_PORT,
EDIT_NAME,
+ EDIT_USERNAME,
EDIT_PASSWORD,
CONNECT,
} SUPPORT_TYPE;
@@ -41,6 +42,7 @@ typedef enum
- (NSString*)name;
- (NSString*)host;
+- (NSString*)userName;
- (NSString*)password;
- (bool)rememberPassword;
- (int)port;
diff --git a/Source/RFBConnection.h b/Source/RFBConnection.h
old mode 100644
new mode 100755
index 82d3292..1b8f19c
--- a/Source/RFBConnection.h
+++ b/Source/RFBConnection.h
@@ -59,6 +59,7 @@
ByteReader *currentReader;
RFBHandshaker *handshaker;
id server_;
+ NSString *userName;
NSString *password;
RFBProtocol *rfbProtocol;
CARD16 lastMouseX; // location of last mouse position we sent
@@ -95,6 +96,7 @@
- (void)setRfbView:(RFBView *)view;
- (void)setSession:(Session *)aSession;
+- (void)setUserName:(NSString *)userName;
- (void)setPassword:(NSString *)password;
- (void)setSshTunnel:(SshTunnel *)tunnel;
- (void)setReader:(ByteReader*)aReader;
@@ -133,6 +135,7 @@
- (Profile*)profile;
- (int) protocolMajorVersion;
- (int) protocolMinorVersion;
+- (NSString*)userName;
- (NSString*)password;
- (BOOL)connectShared;
- (BOOL)viewOnly;
diff --git a/Source/RFBConnection.m b/Source/RFBConnection.m
old mode 100644
new mode 100755
index 2a84dfb..89b5481
--- a/Source/RFBConnection.m
+++ b/Source/RFBConnection.m
@@ -80,6 +80,7 @@ - (id)initWithFileHandle:(NSFileHandle*)file server:(id)server
currentReader = nil;
server_ = [(id)server retain];
+ userName = [[server userName] retain];
password = [[server password] retain];
_eventFilter = [[EventFilter alloc] init];
@@ -177,6 +178,12 @@ - (void)setSession:(Session *)aSession
session = aSession;
}
+- (void)setUserName:(NSString *)aUserName
+{
+ [userName release];
+ userName = [aUserName retain];
+}
+
- (void)setPassword:(NSString *)aPassword
{
[password release];
@@ -300,6 +307,11 @@ - (void)start:(ServerInitMessage*)info
handshaker = nil;
}
+- (NSString*)userName
+{
+ return userName;
+}
+
- (NSString*)password
{
return password;
diff --git a/Source/RFBHandshaker.m b/Source/RFBHandshaker.m
old mode 100644
new mode 100755
index c1cf402..f0728aa
--- a/Source/RFBHandshaker.m
+++ b/Source/RFBHandshaker.m
@@ -155,9 +155,18 @@ - (void)setAuthArray:(NSData*)authTypeArray {
}
- (void)atenDiscardDone {
+ const char *userName = [connection.userName UTF8String];
+ if (userName == NULL) {
+ userName = "";
+ }
+ const char *password = [connection.password UTF8String];
+ if (password == NULL) {
+ password = "";
+ }
+
unsigned char auth[48] = {0}; // *SPIT*
- strlcpy((char*) &auth[0], "testuser", 24);
- strlcpy((char*) &auth[24], "testpass", 24);
+ strlcpy((char*) &auth[0], userName, 24);
+ strlcpy((char*) &auth[24], password, 24);
[connection writeBytes:&auth[0] length:sizeof(auth)];
[connection setReader:authResultReader];
}
diff --git a/Source/ServerBase.h b/Source/ServerBase.h
old mode 100644
new mode 100755
index 655a009..d59fd80
--- a/Source/ServerBase.h
+++ b/Source/ServerBase.h
@@ -29,6 +29,7 @@
// This represents all the data and settings needed to connect to a VNC server.
@interface ServerBase : NSObject {
NSString* _host;
+ NSString* _userName;
NSString* _password;
int _port;
bool _shared;
@@ -52,6 +53,7 @@
- (NSString*)name;
- (NSString*)host;
+- (NSString*)userName;
- (NSString*)password;
- (BOOL)rememberPassword;
- (int)port;
@@ -68,6 +70,7 @@
- (void)setHost: (NSString*)host;
- (BOOL)setHostAndPort: (NSString*)host;
+- (void)setUserName: (NSString*)userName;
- (void)setPassword: (NSString*)password;
- (void)setDisplay: (int)display;
- (void)setShared: (bool)shared;
diff --git a/Source/ServerBase.m b/Source/ServerBase.m
old mode 100644
new mode 100755
index 7445187..1c0547d
--- a/Source/ServerBase.m
+++ b/Source/ServerBase.m
@@ -40,6 +40,7 @@ - (id)init
if( self = [super init] )
{
_host = @"localhost";
+ _userName = nil;
_password = nil;
_port = 5900;
_shared = NO;
@@ -81,6 +82,11 @@ - (NSString*)host
return _host;
}
+- (NSString*)userName
+{
+ return _userName;
+}
+
- (NSString*)password
{
return _password;
@@ -204,6 +210,12 @@ - (BOOL)setHostAndPort: (NSString*)hostAndPort
return NO;
}
+- (void)setUserName:(NSString *)userName
+{
+ [_userName autorelease];
+ _userName = [userName retain];
+}
+
- (void)setPassword: (NSString*)password
{
[_password autorelease];
diff --git a/Source/ServerDataViewController.h b/Source/ServerDataViewController.h
old mode 100644
new mode 100755
index fcab354..981705d
--- a/Source/ServerDataViewController.h
+++ b/Source/ServerDataViewController.h
@@ -35,6 +35,7 @@
IBOutlet NSTextField *display;
IBOutlet NSTextField *displayDescription;
IBOutlet NSTextField *hostName;
+ IBOutlet NSTextField *userName;
IBOutlet NSTextField *password;
IBOutlet NSPopUpButton *profilePopup;
IBOutlet NSButton *rememberPwd;
@@ -66,6 +67,7 @@
- (void)setServer:(id)server;
- (id)server;
+- (IBAction)userNameChanged:(id)sender;
- (IBAction)passwordChanged:(id)sender;
- (IBAction)rememberPwdChanged:(id)sender;
- (IBAction)profileSelectionChanged:(id)sender;
diff --git a/Source/ServerDataViewController.m b/Source/ServerDataViewController.m
old mode 100644
new mode 100755
index 8654183..2165b00
--- a/Source/ServerDataViewController.m
+++ b/Source/ServerDataViewController.m
@@ -42,23 +42,23 @@ - (id)init
if (self = [super init])
{
[NSBundle loadNibNamed:@"ServerDisplay.nib" owner:self];
-
+
selfTerminate = NO;
removedSaveCheckbox = NO;
-
+
[connectIndicatorText setStringValue:@""];
[box setBorderType:NSNoBorder];
connectionWaiter = nil;
-
+
[self loadProfileIntoView];
-
+
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(updateProfileView:)
name:ProfileListChangeMsg
object:(id)[ProfileDataManager sharedInstance]];
}
-
+
return self;
}
@@ -68,7 +68,7 @@ - (id)initWithServer:(id)server
{
[self setServer:server];
}
-
+
return self;
}
@@ -77,13 +77,13 @@ - (id)initWithReleaseOnCloseOrConnect
if (self = [self init])
{
selfTerminate = YES;
-
+
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowClose:)
name:NSWindowWillCloseNotification
object:(id)[self window]];
}
-
+
return self;
}
@@ -94,11 +94,11 @@ - (void)dealloc
{
[save release];
}
-
+
[connectionWaiter cancel];
[connectionWaiter release];
[super dealloc];
-
+
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
@@ -111,18 +111,18 @@ - (void)setServer:(id)server
object:(id)mServer];
[(id)mServer autorelease];
}
-
+
mServer = [(id)server retain];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(updateView:)
name:ServerChangeMsg
object:(id)mServer];
-
+
[self updateView:nil];
}
-
+
- (void)updateView:(id)notification
-{
+{
// Set properties in dialog box
if (mServer != nil)
{
@@ -133,12 +133,13 @@ - (void)updateView:(id)notification
{
[self setSaveCheckboxIsVisible: NO];
}
-
+
[hostName setEnabled: YES];
+ [userName setEnabled: YES];
[password setEnabled: YES];
[shared setEnabled: YES];
[profilePopup setEnabled: YES];
-
+
if (port < DISPLAY_MAX) {
// Low port numbers have to be encoded as host:port so they won't be
// interpreted as display numbers
@@ -173,6 +174,7 @@ - (void)updateView:(id)notification
/* It's important to do password before rememberPwd so that
* the latter will reflect a failure to retrieve the
* passsword from the key chain. */
+ [userName setStringValue:[mServer userName] ? [mServer userName] : @""];
[password setStringValue:[mServer password] ? [mServer password] : @""];
[rememberPwd setIntValue:[mServer rememberPassword]];
[shared setIntValue:[mServer shared]];
@@ -186,8 +188,9 @@ - (void)updateView:(id)notification
[useSshTunnel setIntValue:YES];
[sshHost setStringValue:[mServer sshString]];
}
-
+
[hostName setEnabled: [mServer doYouSupport:EDIT_ADDRESS]];
+ [userName setEnabled: [mServer doYouSupport:EDIT_USERNAME]];
[password setEnabled: [mServer doYouSupport:EDIT_PASSWORD]];
[rememberPwd setEnabled: [mServer respondsToSelector:@selector(setRememberPassword:)]];
[useSshTunnel setEnabled: YES];
@@ -200,6 +203,7 @@ - (void)updateView:(id)notification
else
{
[hostName setEnabled: NO];
+ [userName setEnabled: NO];
[password setEnabled: NO];
[rememberPwd setEnabled: NO];
[display setEnabled: NO];
@@ -210,6 +214,7 @@ - (void)updateView:(id)notification
[sshHost setEnabled: NO];
[hostName setStringValue:@""];
+ [userName setStringValue:@""];
[password setStringValue:@""];
[rememberPwd setIntValue:0];
[display setStringValue:@""];
@@ -243,13 +248,13 @@ - (void)setProfilePopupToProfile: (Profile *)profile
- (void)loadProfileIntoView
{
[profilePopup removeAllItems];
-
+
NSArray* profileKeys = [NSArray arrayWithArray:[[ProfileDataManager sharedInstance] sortedKeyArray]];
-
+
[profilePopup addItemsWithTitles:profileKeys];
[[profilePopup menu] addItem: [NSMenuItem separatorItem]];
[profilePopup addItemWithTitle:NSLocalizedString(@"EditProfiles", nil)];
-
+
[self setProfilePopupToProfile: [mServer profile]];
}
@@ -286,7 +291,7 @@ - (void)descriptionFromPort
{
int port = [mServer port];
NSString *str;
-
+
if (port >= PORT_BASE && port < PORT_BASE + DISPLAY_MAX) {
NSString *fmt = NSLocalizedString(@"PortIsDisplay", nil);
@@ -321,7 +326,7 @@ - (void)takePortFromDisplay
- (void)controlTextDidChange:(NSNotification *)aNotification
{
NSControl* sender = [aNotification object];
-
+
if( display == sender )
{
if( nil != mServer && [mServer doYouSupport:EDIT_PORT] )
@@ -354,6 +359,19 @@ - (void)controlTextDidChange:(NSNotification *)aNotification
}
}
+- (IBAction)userNameChanged:(id)sender {
+ if ([mServer doYouSupport:EDIT_USERNAME]) {
+ NSString *str = [sender stringValue];
+
+ if ([str length] > 0)
+ [mServer setUserName:str];
+ else {
+ [mServer setUserName:nil];
+ }
+ }
+
+}
+
- (IBAction)passwordChanged:(id)sender
{
if ([mServer doYouSupport:EDIT_PASSWORD]) {
@@ -483,7 +501,7 @@ - (IBAction)connectToServer:(id)sender
server = s;
} else
server = mServer;
-
+
// Asynchronously creates a connection to the server
connectionWaiter = [[ConnectionWaiter waiterForServer:server
delegate:self
@@ -545,6 +563,7 @@ - (void)disableControls
{
[display setEnabled: NO];
[hostName setEnabled: NO];
+ [userName setEnabled: NO];
[password setEnabled: NO];
[profilePopup setEnabled: NO];
[rememberPwd setEnabled: NO];
@@ -557,7 +576,7 @@ - (void)disableControls
}
- (void)windowClose:(id)notification
-{
+{
if([notification object] == [self window])
{
if( YES == selfTerminate )
diff --git a/Source/ServerFromConnection.m b/Source/ServerFromConnection.m
old mode 100644
new mode 100755
index 3f7417c..c1e925f
--- a/Source/ServerFromConnection.m
+++ b/Source/ServerFromConnection.m
@@ -45,6 +45,7 @@ - (bool)doYouSupport: (SUPPORT_TYPE)type
case EDIT_ADDRESS:
case EDIT_PORT:
case EDIT_NAME:
+ case EDIT_USERNAME:
case EDIT_PASSWORD:
case CONNECT:
return NO;
diff --git a/Source/ServerFromPrefs.m b/Source/ServerFromPrefs.m
old mode 100644
new mode 100755
index 2bc7fc4..ab92782
--- a/Source/ServerFromPrefs.m
+++ b/Source/ServerFromPrefs.m
@@ -149,6 +149,7 @@ - (bool)doYouSupport: (SUPPORT_TYPE)type
case EDIT_ADDRESS:
case EDIT_PORT:
case EDIT_NAME:
+ case EDIT_USERNAME:
case EDIT_PASSWORD:
case CONNECT:
return YES;
diff --git a/Source/ServerStandAlone.m b/Source/ServerStandAlone.m
old mode 100644
new mode 100755
index 9cb1bff..b8a34ea
--- a/Source/ServerStandAlone.m
+++ b/Source/ServerStandAlone.m
@@ -40,6 +40,7 @@ - (bool)doYouSupport: (SUPPORT_TYPE)type
case EDIT_ADDRESS:
case EDIT_PORT:
case EDIT_NAME:
+ case EDIT_USERNAME:
case EDIT_PASSWORD:
case CONNECT:
return YES;