From: Justin Anderson Date: Thu, 2 Oct 2008 17:34:17 +0000 (+0000) Subject: Resize dialogs better, added progress indicator to show KerberosAgent is working... X-Git-Tag: krb5-1.7-alpha1~360 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=347cfa63fa8d3097d540fa84146e020e06c9a91c;p=krb5.git Resize dialogs better, added progress indicator to show KerberosAgent is working between interactions Make Identity and Identities classes use NSDictionary representations of kim_options like the rest of KerberosAgent. ticket: 6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20811 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kim/agent/mac/AuthenticationController.h b/src/kim/agent/mac/AuthenticationController.h index c62611db7..f6f5bd2b2 100644 --- a/src/kim/agent/mac/AuthenticationController.h +++ b/src/kim/agent/mac/AuthenticationController.h @@ -47,6 +47,11 @@ IBOutlet BadgedImageView *changePasswordBadge; IBOutlet BadgedImageView *errorBadge; + IBOutlet NSProgressIndicator *enterSpinny; + IBOutlet NSProgressIndicator *passwordSpinny; + IBOutlet NSProgressIndicator *samSpinny; + IBOutlet NSProgressIndicator *changePasswordSpinny; + // Controls that need to be made key IBOutlet NSTextField *identityField; IBOutlet NSTextField *passwordField; @@ -98,6 +103,5 @@ contextInfo: (void *) contextInfo; - (IBAction) changePasswordGearAction: (id) sender; -- (void) changePasswordThread: (NSString *) identityString; @end diff --git a/src/kim/agent/mac/AuthenticationController.m b/src/kim/agent/mac/AuthenticationController.m index 34e7662d2..8880cb809 100644 --- a/src/kim/agent/mac/AuthenticationController.m +++ b/src/kim/agent/mac/AuthenticationController.m @@ -142,6 +142,12 @@ } } +- (IBAction) showWindow: (id) sender +{ + [[self window] center]; + [super showWindow:sender]; +} + - (void) setContent: (NSMutableDictionary *) newContent { [self window]; // wake up the nib connections @@ -151,6 +157,7 @@ - (void) showEnterIdentity { kim_error err = KIM_NO_ERROR; + NSWindow *theWindow = [self window]; NSString *key = (associatedClient.name) ? ACAppPrincReqKey : ACPrincReqKey; NSString *message = [NSString stringWithFormat: NSLocalizedStringFromTable(key, ACLocalizationTable, NULL), @@ -207,19 +214,27 @@ // wake up the nib connections and adjust window size [self window]; // set up controls with info from associatedClient - [[containerView subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; - [containerView addSubview:identityView]; [enterBadge setBadgePath:associatedClient.path]; [glueController setValue:message forKeyPath:message_keypath]; + + [theWindow setFrame:[theWindow frameRectForContentRect:[identityView frame]] display:NO]; + [[containerView subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; + [containerView addSubview:identityView]; + + [enterSpinny stopAnimation:nil]; + + [theWindow makeFirstResponder:identityField]; [self showWindow:nil]; - [[self window] makeFirstResponder:identityField]; } - (void) showAuthPrompt { uint32_t type = [[glueController valueForKeyPath:@"content.prompt_type"] unsignedIntegerValue]; + [passwordSpinny stopAnimation:nil]; + [samSpinny stopAnimation:nil]; + switch (type) { case kim_prompt_type_password : [self showEnterPassword]; break; @@ -235,8 +250,7 @@ NSRect frame; NSString *key = nil; NSString *message = nil; - - [self window]; + NSWindow *theWindow = [self window]; if ([associatedClient.name isEqualToString:[[NSBundle mainBundle] bundlePath]]) { key = ACPasswordReqKey; @@ -253,40 +267,42 @@ [glueController setValue:message forKeyPath:message_keypath]; - // wake up the nib connections and adjust window size - // set up controls with info from associatedClient - [[containerView subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; - [containerView addSubview:passwordView]; // set badge [passwordBadge setBadgePath:associatedClient.path]; - + + frame = [passwordView frame]; + [theWindow setFrame:[theWindow frameRectForContentRect:frame] display:NO]; + [[containerView subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; + [containerView addSubview:passwordView]; + // adjust for checkbox visibility if (![[glueController valueForKeyPath:allow_save_password_keypath] boolValue]) { + frame = [theWindow frame]; shrinkBy = ([passwordField frame].origin.y - [rememberPasswordInKeychainCheckBox frame].origin.y); - frame = [[self window] frame]; frame.origin.y += shrinkBy; frame.size.height -= shrinkBy; - [[self window] setFrame:frame display:NO animate:NO]; + [theWindow setFrame:frame display:NO]; } + [theWindow makeFirstResponder:passwordField]; [self showWindow:nil]; - [[self window] makeFirstResponder:passwordField]; } - (void) showSAM { - // wake up the nib connections and adjust window size - [self window]; - // set up controls with info from associatedClient - [[containerView subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; - [containerView addSubview:samView]; + NSWindow *theWindow = [self window]; + // set badge [samBadge setBadgePath:associatedClient.path]; [glueController setValue:[NSNumber numberWithBool:NO] forKeyPath:allow_save_password_keypath]; + [theWindow setFrame:[theWindow frameRectForContentRect:[samView frame]] display:NO]; + [[containerView subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; + [containerView addSubview:samView]; + [self showWindow:nil]; [[self window] makeFirstResponder:samPromptField]; } @@ -297,6 +313,7 @@ NSString *message = [NSString stringWithFormat: NSLocalizedStringFromTable(key, ACLocalizationTable, NULL), associatedClient.name]; + NSWindow *theWindow = [self window]; BOOL expired = [[glueController valueForKeyPath:password_expired_keypath] boolValue]; @@ -323,15 +340,17 @@ [glueController setValue:message forKeyPath:message_keypath]; // wake up the nib connections and adjust window size - [self window]; + [theWindow setFrame:[theWindow frameRectForContentRect:[changePasswordView frame]] display:NO]; // set up controls with info from associatedClient [[containerView subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; [containerView addSubview:changePasswordView]; // set badge [changePasswordBadge setBadgePath:associatedClient.path]; + [changePasswordSpinny stopAnimation:nil]; + [self showWindow:nil]; - [[self window] makeFirstResponder:oldPasswordField]; + [theWindow makeFirstResponder:oldPasswordField]; } - (void) showError @@ -478,35 +497,16 @@ - (IBAction) changePasswordGearAction: (id) sender { NSString *expandedString = [KIMUtilities expandedIdentity:[identityField stringValue]]; - NSLog(@"%s", __FUNCTION__); - if (expandedString && [expandedString length] > 0) { - [expandedString retain]; - [NSThread detachNewThreadSelector:@selector(changePasswordThread:) - toTarget:self - withObject:expandedString]; - } -} - -- (void) changePasswordThread: (NSString *) identityString -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - kim_error err = KIM_NO_ERROR; - kim_identity identity = NULL; + NSDictionary *options = [favoriteOptions objectForKey:expandedString]; - NSLog(@"%s %@", __FUNCTION__, identityString); - if (!err) { - err = kim_identity_create_from_string(&identity, [identityString UTF8String]); - } - if (!err) { - err = kim_identity_change_password(identity); + if (!options) { + options = [glueController valueForKeyPath:options_keypath]; } - - NSLog(@"%s %d", __FUNCTION__, err); - - kim_identity_free(&identity); - [identityString release]; - [pool release]; + [enterSpinny startAnimation:nil]; + + // the principal must already be valid to get this far + [associatedClient didEnterIdentity:expandedString options:options wantsChangePassword:YES]; } - (IBAction) cancel: (id) sender @@ -518,13 +518,16 @@ - (IBAction) enterIdentity: (id) sender { NSString *expandedString = [KIMUtilities expandedIdentity:[identityField stringValue]]; - NSDictionary *options = [favoriteOptions objectForKey:expandedString]; - + NSDictionary *options = [favoriteOptions objectForKey:expandedString]; + if (!options) { options = [glueController valueForKeyPath:options_keypath]; } + + [enterSpinny startAnimation:nil]; + // the principal must already be valid to get this far - [associatedClient didEnterIdentity:expandedString options:options]; + [associatedClient didEnterIdentity:expandedString options:options wantsChangePassword:NO]; } - (IBAction) answerAuthPrompt: (id) sender @@ -535,6 +538,8 @@ if (!saveResponse) { saveResponse = [NSNumber numberWithBool:NO]; } + [passwordSpinny startAnimation:nil]; + [samSpinny startAnimation:nil]; [associatedClient didPromptForAuth:responseString saveResponse:saveResponse]; } @@ -545,6 +550,8 @@ NSString *newString = [glueController valueForKeyPath:new_password_keypath]; NSString *verifyString = [glueController valueForKeyPath:verify_password_keypath]; + [changePasswordSpinny startAnimation:nil]; + [associatedClient didChangePassword:oldString newPassword:newString verifyPassword:verifyString]; diff --git a/src/kim/agent/mac/IPCClient.h b/src/kim/agent/mac/IPCClient.h index 172d79374..361c4283a 100644 --- a/src/kim/agent/mac/IPCClient.h +++ b/src/kim/agent/mac/IPCClient.h @@ -57,8 +57,12 @@ - (kim_error) handleError: (NSDictionary *) info; - (void) didCancel; -- (void) didSelectIdentity: (NSString *) identityString options: (NSDictionary *) options; -- (void) didEnterIdentity: (NSString *) identityString options: (NSDictionary *) options; +- (void) didSelectIdentity: (NSString *) identityString + options: (NSDictionary *) options + wantsChangePassword: (BOOL) wantsChangePassword; +- (void) didEnterIdentity: (NSString *) identityString + options: (NSDictionary *) options + wantsChangePassword: (BOOL) wantsChangePassword; - (void) didPromptForAuth: (NSString *) responseString saveResponse: (NSNumber *) saveResponse; - (void) didChangePassword: (NSString *) oldPassword newPassword: (NSString *) newPassword diff --git a/src/kim/agent/mac/IPCClient.m b/src/kim/agent/mac/IPCClient.m index 814e1480f..62b6dd0f8 100644 --- a/src/kim/agent/mac/IPCClient.m +++ b/src/kim/agent/mac/IPCClient.m @@ -119,11 +119,23 @@ enum krb_agent_client_state { return 0; } -- (void) didSelectIdentity: (NSString *) identityString options: (NSDictionary *) options +- (void) didSelectIdentity: (NSString *) identityString + options: (NSDictionary *) options + wantsChangePassword: (BOOL) wantsChangePassword { + NSLog(@"%s %@ %@", __FUNCTION__, identityString, options); [self.currentInfo setObject:identityString forKey:@"identity_string"]; - [self.currentInfo setObject:options forKey:@"options"]; - + // if the user set custom options, use those + if (options) { + [self.currentInfo setObject:options forKey:@"options"]; + } + // else use the options in the hints + else { + [self.currentInfo setObject:[self.currentInfo valueForKeyPath:@"hints.options"] + forKey:@"options"]; + } + [self.currentInfo setObject:[NSNumber numberWithBool:wantsChangePassword] forKey:@"wants_change_password"]; + [KerberosAgentListener didSelectIdentity:self.currentInfo error:0]; // clean up state @@ -142,10 +154,13 @@ enum krb_agent_client_state { return 0; } -- (void) didEnterIdentity: (NSString *) identityString options: (NSDictionary *) options +- (void) didEnterIdentity: (NSString *) identityString + options: (NSDictionary *) options + wantsChangePassword: (BOOL) wantsChangePassword { [self.currentInfo setObject:identityString forKey:@"identity_string"]; [self.currentInfo setObject:options forKey:@"options"]; + [self.currentInfo setObject:[NSNumber numberWithBool:wantsChangePassword] forKey:@"wants_change_password"]; [KerberosAgentListener didEnterIdentity:self.currentInfo error:0]; } diff --git a/src/kim/agent/mac/Identities.h b/src/kim/agent/mac/Identities.h index cdb3167ac..712abb31c 100644 --- a/src/kim/agent/mac/Identities.h +++ b/src/kim/agent/mac/Identities.h @@ -27,43 +27,40 @@ #import "KIMUtilities.h" @interface Identity : NSObject { - kim_identity kimIdentity; - kim_options kimOptions; + NSString *identity; + NSDictionary *options; kim_credential_state state; - cc_time_t expiration_time; + NSDate *expirationDate; BOOL favorite; } -@property kim_identity kimIdentity; -@property kim_options kimOptions; -@property kim_credential_state state; -@property BOOL favorite; -@property cc_time_t expiration_time; +@property (readwrite, retain) NSString *identity; +@property (readwrite, retain) NSDictionary *options; +@property (assign) kim_credential_state state; +@property (assign) BOOL favorite; +@property (readwrite, retain) NSDate *expirationDate; // derived properties -@property(readonly) NSString *principalString; -@property(readonly) NSString *componentsString; -@property(readonly) NSString *realmString; -@property(readonly) NSDate *expirationDate; -@property(readonly) NSString *expirationString; -@property(readonly) NSString *validLifetimeString; -@property(readonly) NSString *renewableLifetimeString; -@property(readonly) BOOL hasCCache; -@property(readwrite) BOOL isRenewable; -@property(readwrite) BOOL isForwardable; -@property(readwrite) BOOL isAddressless; -@property(readwrite) BOOL isProxiable; -@property(readwrite) NSUInteger validLifetime; -@property(readwrite) NSUInteger renewableLifetime; +@property (readonly) kim_identity kimIdentity; +@property (readonly) kim_options kimOptions; +@property (readonly) NSString *expirationString; +@property (readonly) NSString *validLifetimeString; +@property (readonly) NSString *renewableLifetimeString; +@property (readonly) BOOL hasCCache; +@property (readwrite) BOOL isRenewable; +@property (readwrite) BOOL isForwardable; +@property (readwrite) BOOL isAddressless; +@property (readwrite) BOOL isProxiable; +@property (readwrite) NSUInteger validLifetime; +@property (readwrite) NSUInteger renewableLifetime; -- (id) initWithIdentity: (kim_identity) identity options: (kim_options) options; -- (id) initWithFavoriteIdentity: (kim_identity) identity options: (kim_options) options; +- (id) initWithKimIdentity: (kim_identity) an_identity kimOptions: (kim_options) some_options; +- (id) initWithFavoriteIdentity: (kim_identity) an_identity options: (kim_options) some_options; +- (id) initWithIdentity: (NSString *) anIdentity options: (NSDictionary *) someOptions; - (BOOL) isEqualToKIMIdentity: (kim_identity) identity; - (BOOL) isEqual: (Identity *)otherIdentity; -- (kim_error) setPrincipalComponents: (NSString *) componentsString realm: (NSString *) realmString; - - (void) resetOptions; - (void) toggleFavorite; - (BOOL) addToFavorites; @@ -73,12 +70,12 @@ @interface Identities : NSObject { - NSArray *favoriteIdentities; - NSArray *identities; + NSMutableArray *favoriteIdentities; + NSMutableArray *identities; NSConnection *threadConnection; } -@property(readonly, retain) NSArray *identities; +@property(readonly, retain) NSMutableArray *identities; @property(readonly) NSUInteger minimumValidLifetime; @property(readonly) NSUInteger maximumValidLifetime; @property(readonly) NSUInteger minimumRenewableLifetime; diff --git a/src/kim/agent/mac/Identities.m b/src/kim/agent/mac/Identities.m index 4d9aeb71c..c388de46f 100644 --- a/src/kim/agent/mac/Identities.m +++ b/src/kim/agent/mac/Identities.m @@ -34,8 +34,10 @@ @implementation Identity +@synthesize identity; +@synthesize options; +@synthesize expirationDate; @synthesize state; -@synthesize expiration_time; @synthesize favorite; #pragma mark Initialization & Comparison @@ -47,39 +49,39 @@ NSMutableSet *result = [[super keyPathsForValuesAffectingValueForKey:key] mutableCopy]; NSSet *otherKeys = nil; - if ([key isEqualToString:@"principalString"]) { - otherKeys = [NSSet setWithObjects:@"kimIdentity", nil]; - } - else if ([key isEqualToString:@"expirationDate"]) { - otherKeys = [NSSet setWithObjects:@"kimOptions", @"state", @"expirationTime", nil]; - } - else if ([key isEqualToString:@"expirationString"]) { - otherKeys = [NSSet setWithObjects:@"kimOptions", @"state", @"expirationTime", nil]; - } - else if ([key isEqualToString:@"isProxiable"]) { - otherKeys = [NSSet setWithObjects:@"kimOptions", nil]; - } - else if ([key isEqualToString:@"isForwardable"]) { - otherKeys = [NSSet setWithObjects:@"kimOptions", nil]; - } - else if ([key isEqualToString:@"isAddressless"]) { - otherKeys = [NSSet setWithObjects:@"kimOptions", nil]; - } - else if ([key isEqualToString:@"isRenewable"]) { - otherKeys = [NSSet setWithObjects:@"kimOptions", nil]; - } - else if ([key isEqualToString:@"validLifetime"]) { - otherKeys = [NSSet setWithObjects:@"kimOptions", nil]; - } - else if ([key isEqualToString:@"renewableLifetime"]) { - otherKeys = [NSSet setWithObjects:@"kimOptions", nil]; - } - else if ([key isEqualToString:@"validLifetimeString"]) { - otherKeys = [NSSet setWithObjects:@"kimOptions", @"validLifetime", nil]; - } - else if ([key isEqualToString:@"renewableLifetimeString"]) { - otherKeys = [NSSet setWithObjects:@"kimOptions", @"renewableLifetime", nil]; - } +// if ([key isEqualToString:@"principalString"]) { +// otherKeys = [NSSet setWithObjects:@"kimIdentity", nil]; +// } +// else if ([key isEqualToString:@"expirationDate"]) { +// otherKeys = [NSSet setWithObjects:@"kimOptions", @"state", @"expirationTime", nil]; +// } +// else if ([key isEqualToString:@"expirationString"]) { +// otherKeys = [NSSet setWithObjects:@"kimOptions", @"state", @"expirationTime", nil]; +// } +// else if ([key isEqualToString:@"isProxiable"]) { +// otherKeys = [NSSet setWithObjects:@"kimOptions", nil]; +// } +// else if ([key isEqualToString:@"isForwardable"]) { +// otherKeys = [NSSet setWithObjects:@"kimOptions", nil]; +// } +// else if ([key isEqualToString:@"isAddressless"]) { +// otherKeys = [NSSet setWithObjects:@"kimOptions", nil]; +// } +// else if ([key isEqualToString:@"isRenewable"]) { +// otherKeys = [NSSet setWithObjects:@"kimOptions", nil]; +// } +// else if ([key isEqualToString:@"validLifetime"]) { +// otherKeys = [NSSet setWithObjects:@"kimOptions", nil]; +// } +// else if ([key isEqualToString:@"renewableLifetime"]) { +// otherKeys = [NSSet setWithObjects:@"kimOptions", nil]; +// } +// else if ([key isEqualToString:@"validLifetimeString"]) { +// otherKeys = [NSSet setWithObjects:@"kimOptions", @"validLifetime", nil]; +// } +// else if ([key isEqualToString:@"renewableLifetimeString"]) { +// otherKeys = [NSSet setWithObjects:@"kimOptions", @"renewableLifetime", nil]; +// } [result unionSet:otherKeys]; @@ -90,29 +92,28 @@ - (id) init { - return [self initWithIdentity: NULL options: NULL]; + return [self initWithIdentity: @"" options: [NSDictionary dictionary]]; } // --------------------------------------------------------------------------- -- (id) initWithIdentity: (kim_identity) identity options: (kim_options) options +- (id) initWithKimIdentity: (kim_identity) an_identity kimOptions: (kim_options) some_options { - if ((self = [super init])) { - self.kimIdentity = identity; - self.kimOptions = options; - self.state = kim_credentials_state_not_yet_valid; - self.expiration_time = 0; - self.favorite = FALSE; - } + kim_error err = KIM_NO_ERROR; + kim_string identity_string = NULL; - return self; + if (!err) { + err = kim_identity_get_display_string(an_identity, &identity_string); + } + return [self initWithIdentity:[NSString stringWithUTF8String:identity_string] + options:[KIMUtilities dictionaryForKimOptions:some_options]]; } // --------------------------------------------------------------------------- -- (id) initWithFavoriteIdentity: (kim_identity) identity options: (kim_options) options +- (id) initWithFavoriteIdentity: (kim_identity) an_identity options: (kim_options) some_options { - if ((self = [self initWithIdentity: identity options: options])) { + if ((self = [self initWithKimIdentity: an_identity kimOptions: some_options])) { self.favorite = TRUE; } @@ -121,12 +122,30 @@ // --------------------------------------------------------------------------- -- (BOOL) isEqualToKIMIdentity: (kim_identity) identity +- (id) initWithIdentity: (NSString *) anIdentity options: (NSDictionary *) someOptions +{ + self = [super init]; + if (self != nil) { + self.identity = anIdentity; + self.options = someOptions; + self.state = kim_credentials_state_not_yet_valid; + self.expirationDate = [NSDate dateWithTimeIntervalSince1970:0]; + self.favorite = NO; + } + return self; +} + +// --------------------------------------------------------------------------- + +- (BOOL) isEqualToKIMIdentity: (kim_identity) comparison_identity { kim_error err = KIM_NO_ERROR; kim_comparison comparison; + kim_identity an_identity = self.kimIdentity; - err = kim_identity_compare (kimIdentity, identity, &comparison); + err = kim_identity_compare (an_identity, comparison_identity, &comparison); + + kim_identity_free(&an_identity); return (!err && kim_comparison_is_equal_to (comparison)); } @@ -142,14 +161,14 @@ - (NSUInteger)hash { - return [self.principalString hash]; + return [self.identity hash]; } // --------------------------------------------------------------------------- - (NSComparisonResult) compare: (Identity *)otherIdentity { - return ([self.principalString compare:otherIdentity.principalString]); + return ([self.identity compare:otherIdentity.identity]); } #pragma mark Actions @@ -159,7 +178,18 @@ - (void) resetOptions { // property setter converts NULL into actual kim_options with default settings - self.kimOptions = NULL; + kim_error err = KIM_NO_ERROR; + kim_options some_options = NULL; + + err = kim_options_create(&some_options); + + if (!err) { + self.options = [KIMUtilities dictionaryForKimOptions:some_options]; + } + + log_kim_error_to_console(err); + + kim_options_free(&some_options); } // --------------------------------------------------------------------------- @@ -179,30 +209,28 @@ { kim_error err = KIM_NO_ERROR; kim_preferences preferences = NULL; - kim_options options = NULL; - kim_string error_string = NULL; - err = kim_preferences_create(&preferences); + kim_identity an_identity = self.kimIdentity; + kim_options some_options = self.kimOptions; - if (!err) { - err = kim_options_create(&options); - } + err = kim_preferences_create(&preferences); if (!err) { - err = kim_preferences_add_favorite_identity(preferences, self.kimIdentity, options); + err = kim_preferences_add_favorite_identity(preferences, an_identity, some_options); } if (!err) { err = kim_preferences_synchronize(preferences); } - if (options) { - kim_options_free(&options); - } - kim_preferences_free(&preferences); + if (!err) { self.favorite = true; } else { - kim_string_create_for_last_error(&error_string, err); - NSLog(@"%s failed with %s", __FUNCTION__, error_string); + log_kim_error_to_console(err); } + + kim_preferences_free(&preferences); + kim_identity_free(&an_identity); + kim_options_free(&some_options); + return (err != KIM_NO_ERROR); } @@ -212,30 +240,25 @@ { kim_error err = KIM_NO_ERROR; kim_preferences preferences = NULL; - kim_options options = NULL; - kim_string error_string = NULL; + kim_identity an_identity = self.kimIdentity; + err = kim_preferences_create(&preferences); if (!err) { - err = kim_options_create(&options); - } - - if (!err) { - err = kim_preferences_remove_favorite_identity(preferences, self.kimIdentity); + err = kim_preferences_remove_favorite_identity(preferences, an_identity); } if (!err) { err = kim_preferences_synchronize(preferences); } - if (options) { - kim_options_free(&options); - } - kim_preferences_free(&preferences); if (!err) { self.favorite = false; } else { - kim_string_create_for_last_error(&error_string, err); - NSLog(@"%s failed with %s", __FUNCTION__, error_string); + log_kim_error_to_console(err); } + + kim_preferences_free(&preferences); + kim_identity_free(&an_identity); + return (err != KIM_NO_ERROR); } @@ -243,13 +266,6 @@ // --------------------------------------------------------------------------- -- (NSDate *) expirationDate -{ - return [NSDate dateWithTimeIntervalSince1970:expiration_time]; -} - -// --------------------------------------------------------------------------- - - (BOOL) hasCCache { kim_error err = KIM_NO_ERROR; @@ -268,327 +284,123 @@ // --------------------------------------------------------------------------- - (kim_identity) kimIdentity -{ - return kimIdentity; -} - -// --------------------------------------------------------------------------- - -- (void) setKimIdentity:(kim_identity)newKimIdentity { kim_error err = KIM_NO_ERROR; - kim_string string = NULL; - - if (!kimIdentity || kimIdentity != newKimIdentity) { - [self willChangeValueForKey:@"kimOptions"]; - - kim_identity_free(&kimIdentity); - kimIdentity = NULL; - if (newKimIdentity != NULL) { - kim_identity_get_display_string(newKimIdentity, &string); - err = kim_identity_copy(&kimIdentity, newKimIdentity); - } - - [self didChangeValueForKey:@"kimOptions"]; - } - - if (err) { - log_kim_error_to_console(err); - } + kim_identity an_identity = NULL; + err = kim_identity_create_from_string(&an_identity, [self.identity UTF8String]); + return an_identity; } // --------------------------------------------------------------------------- - (kim_options) kimOptions { - return kimOptions; -} - -// --------------------------------------------------------------------------- - -- (void) setKimOptions:(kim_options)newKimOptions -{ - // Passing NULL resets to default options - kim_error err = KIM_NO_ERROR; - - if (!kimOptions || kimOptions != newKimOptions) { - [self willChangeValueForKey:@"kimOptions"]; - - kim_options_free(&kimOptions); - kimOptions = NULL; - - if (newKimOptions == NULL) { - err = kim_options_create(&kimOptions); - } else { - err = kim_options_copy(&kimOptions, newKimOptions); - } - - [self didChangeValueForKey:@"kimOptions"]; - } + return [KIMUtilities kimOptionsForDictionary:self.options]; } // --------------------------------------------------------------------------- - (BOOL) isRenewable { - kim_error err = KIM_NO_ERROR; - kim_boolean result = FALSE; - kim_options options = self.kimOptions; - - err = kim_options_get_renewable(options, &result); - - return (result != 0); + return [[self.options valueForKey:@"renewable"] boolValue]; } // --------------------------------------------------------------------------- - (void) setIsRenewable: (BOOL) value { - kim_error err = KIM_NO_ERROR; - kim_options options = self.kimOptions; - - err = kim_options_set_renewable(options, value); + [self.options setValue:[NSNumber numberWithBool:value] + forKey:@"renewable"]; } // --------------------------------------------------------------------------- - (BOOL) isForwardable { - kim_error err = KIM_NO_ERROR; - kim_boolean result = FALSE; - kim_options options = self.kimOptions; - - err = kim_options_get_forwardable(options, &result); - - return (result != 0); + return [[self.options valueForKey:@"forwardable"] boolValue]; } // --------------------------------------------------------------------------- - (void) setIsForwardable: (BOOL) value { - kim_error err = KIM_NO_ERROR; - kim_options options = self.kimOptions; - - err = kim_options_set_forwardable(options, value); + [self.options setValue:[NSNumber numberWithBool:value] + forKey:@"forwardable"]; } // --------------------------------------------------------------------------- - (BOOL) isAddressless { - kim_error err = KIM_NO_ERROR; - kim_boolean result = FALSE; - kim_options options = self.kimOptions; - - err = kim_options_get_addressless(options, &result); - - return (result != 0); + return [[self.options valueForKey:@"addressless"] boolValue]; } // --------------------------------------------------------------------------- - (void) setIsAddressless: (BOOL) value { - kim_error err = KIM_NO_ERROR; - kim_options options = self.kimOptions; - - err = kim_options_set_addressless(options, value); + [self.options setValue:[NSNumber numberWithBool:value] + forKey:@"addressless"]; } // --------------------------------------------------------------------------- - (BOOL) isProxiable { - kim_error err = KIM_NO_ERROR; - kim_boolean result = FALSE; - kim_options options = self.kimOptions; - - err = kim_options_get_proxiable(options, &result); - - return (result != 0); + return [[self.options valueForKey:@"proxiable"] boolValue]; } // --------------------------------------------------------------------------- - (void) setIsProxiable: (BOOL) value { - kim_error err = KIM_NO_ERROR; - kim_options options = self.kimOptions; - - err = kim_options_set_proxiable(options, value); + [self.options setValue:[NSNumber numberWithBool:value] + forKey:@"proxiable"]; } // --------------------------------------------------------------------------- - (NSUInteger) validLifetime { - kim_error err = KIM_NO_ERROR; - kim_lifetime value = 0; - kim_options options = self.kimOptions; - - err = kim_options_get_lifetime(options, &value); - - return (NSUInteger) value; + return [[self.options valueForKey:@"valid_lifetime"] unsignedIntegerValue]; } // --------------------------------------------------------------------------- - (void) setValidLifetime: (NSUInteger) newLifetime { - kim_error err = KIM_NO_ERROR; - kim_options options = self.kimOptions; - - // round to nearest five minutes - newLifetime = (newLifetime / VALID_LIFETIME_INCREMENT) * VALID_LIFETIME_INCREMENT; - - err = kim_options_set_lifetime(options, (kim_lifetime) newLifetime); + [self.options setValue:[NSNumber numberWithUnsignedInteger:newLifetime] + forKey:@"valid_lifetime"]; } // --------------------------------------------------------------------------- - (NSUInteger) renewableLifetime { - kim_error err = KIM_NO_ERROR; - kim_lifetime value = 0; - kim_options options = self.kimOptions; - - err = kim_options_get_renewal_lifetime(options, &value); - - return (NSUInteger) value; + return [[self.options valueForKey:@"renewable_lifetime"] unsignedIntegerValue]; } // --------------------------------------------------------------------------- - (void) setRenewableLifetime: (NSUInteger) newLifetime { - kim_error err = KIM_NO_ERROR; - kim_options options = self.kimOptions; - - // round to nearest five minutes - newLifetime = (newLifetime / RENEWABLE_LIFETIME_INCREMENT) * RENEWABLE_LIFETIME_INCREMENT; - - err = kim_options_set_renewal_lifetime(options, (kim_lifetime) newLifetime); + [self.options setValue:[NSNumber numberWithUnsignedInteger:newLifetime] + forKey:@"renewable_lifetime"]; } #pragma mark String representations // --------------------------------------------------------------------------- -- (NSString *) principalString -{ - kim_error err = KIM_NO_ERROR; - kim_string display_string = NULL; - NSString *result = nil; - - if (self.kimIdentity) { - err = kim_identity_get_display_string(self.kimIdentity, &display_string); - } - - if (!err && display_string) { - result = [NSString stringWithUTF8String:display_string]; - } - else { - result = @"-"; - } - - if (err) { - log_kim_error_to_console(err); - } - - kim_string_free(&display_string); - - return result; -} - -// --------------------------------------------------------------------------- - -- (NSString *) componentsString -{ - kim_error err = KIM_NO_ERROR; - kim_string display_string = NULL; - NSString *result = @""; - - if (self.kimIdentity) { - err = kim_identity_get_components_string(self.kimIdentity, &display_string); - } - - if (!err && display_string) { - result = [NSString stringWithUTF8String:display_string]; - } - - if (err) { - log_kim_error_to_console(err); - } - - kim_string_free(&display_string); - - return result; -} - -// --------------------------------------------------------------------------- - -- (NSString *) realmString -{ - kim_error err = KIM_NO_ERROR; - kim_string display_string = NULL; - NSString *result = @""; - - if (self.kimIdentity) { - err = kim_identity_get_realm(self.kimIdentity, &display_string); - } - - if (!err && display_string) { - result = [NSString stringWithUTF8String:display_string]; - } - - if (err) { - log_kim_error_to_console(err); - } - - kim_string_free(&display_string); - - return result; -} - -// --------------------------------------------------------------------------- - -- (kim_error) setPrincipalComponents: (NSString *) componentsString realm: (NSString *) realmString -{ - kim_error err = KIM_NO_ERROR; - kim_identity new_identity = NULL; - char *principal_string = NULL; - - asprintf(&principal_string, "%s@%s", - [componentsString UTF8String], [realmString UTF8String]); - - if (principal_string) { - err = kim_identity_create_from_string(&new_identity, principal_string); - } - - self.kimIdentity = new_identity; - - kim_identity_free(&new_identity); - if (principal_string) { - free(principal_string); - } - - return err; -} - -// --------------------------------------------------------------------------- - - (NSString *) expirationString { NSString *result = nil; - - if (expiration_time > 0) { - time_t now = time(NULL); - time_t lifetime = expiration_time - now; - time_t seconds = (lifetime % 60); - time_t minutes = (lifetime / 60 % 60); - time_t hours = (lifetime / 3600 % 24); - time_t days = (lifetime / 86400); + NSTimeInterval lifetime = [self.expirationDate timeIntervalSinceNow]; + if (lifetime > 0) { + NSTimeInterval seconds = fmod(lifetime, 60); + NSTimeInterval minutes = fmod(lifetime, 60 % 60); + NSTimeInterval hours = fmod(lifetime, 3600 % 24); + NSTimeInterval days = fmod(lifetime, 86400); if (seconds > 0) { seconds = 0; minutes++; } if (minutes > 59) { minutes = 0; hours++; } @@ -652,15 +464,15 @@ - (NSString *) description { - return [NSString stringWithFormat:@"%@ (%@) %@", self.principalString, self.expirationString, super.description]; + return [NSString stringWithFormat:@"%@ (%@) %@", self.identity, self.expirationString, [super description]]; } @end @interface Identities () -@property(readwrite, retain) NSArray *favoriteIdentities; -@property(readwrite, retain) NSArray *identities; +@property(readwrite, retain) NSMutableArray *favoriteIdentities; +@property(readwrite, retain) NSMutableArray *identities; @end @@ -857,17 +669,16 @@ // NSLog(@"updating %@", [[NSThread currentThread] description]); while (!err) { kim_ccache ccache = NULL; - kim_identity kimIdentity = NULL; - kim_options kimOptions = NULL; + kim_identity an_identity = NULL; + kim_options some_options = NULL; kim_credential_state state = kim_credentials_state_valid; - kim_time expirationTime = 0; - kim_lifetime lifetime = 0; + kim_time expiration_time = 0; err = kim_ccache_iterator_next (iterator, &ccache); if (!err && !ccache) { break; } if (!err) { - err = kim_ccache_get_client_identity (ccache, &kimIdentity); + err = kim_ccache_get_client_identity (ccache, &an_identity); } if (!err) { @@ -875,33 +686,25 @@ } if (!err && state == kim_credentials_state_valid) { - err = kim_ccache_get_expiration_time (ccache, &expirationTime); + err = kim_ccache_get_expiration_time (ccache, &expiration_time); } if (!err) { - err = kim_ccache_get_options(ccache, &kimOptions); - } - - if (!err) { - err = kim_options_get_lifetime(kimOptions, &lifetime); + err = kim_ccache_get_options(ccache, &some_options); } if (!err) { - Identity *identity = [[Identity alloc] initWithIdentity: kimIdentity options: kimOptions]; + Identity *identity = [[Identity alloc] initWithKimIdentity:an_identity kimOptions:some_options]; if (!identity) { err = ENOMEM; } if (!err) { - kimIdentity = NULL; /* take ownership */ - identity.kimOptions = kimOptions; identity.state = state; - identity.expiration_time = expirationTime; + identity.expirationDate = [NSDate dateWithTimeIntervalSince1970:expiration_time]; [newIdentities addObject: identity]; } - if (identity) { - [identity release]; - identity = nil; - } + [identity release]; + identity = nil; } if (err == KIM_NO_CREDENTIALS_ERR) { @@ -913,8 +716,8 @@ log_kim_error_to_console(err); } - kim_options_free (&kimOptions); - kim_identity_free (&kimIdentity); + kim_options_free (&some_options); + kim_identity_free (&an_identity); kim_ccache_free (&ccache); } @@ -925,11 +728,11 @@ Identity *matchingIdentity = [newIdentities member:identity]; if (matchingIdentity) { identity.state = matchingIdentity.state; - identity.expiration_time = matchingIdentity.expiration_time; + identity.expirationDate = matchingIdentity.expirationDate; [newIdentities removeObject:matchingIdentity]; } else { identity.state = kim_credentials_state_expired; - identity.expiration_time = 0; + identity.expirationDate = [NSDate distantPast]; } } @@ -937,8 +740,10 @@ [newIdentities unionSet:[NSSet setWithArray:self.favoriteIdentities]]; if (!err) { - /* Use @property setter to trigger KVO notifications */ - self.identities = [[newIdentities allObjects] sortedArrayUsingSelector:@selector(compare:)]; + [self.identities removeAllObjects]; + [self.identities addObjectsFromArray:[newIdentities allObjects]]; + [self.identities sortUsingSelector:@selector(compare:)]; + if (!identities) { err = ENOMEM; } } else { log_kim_error_to_console(err); @@ -952,13 +757,9 @@ - (kim_error) addIdentity: (Identity *) anIdentity { kim_error err = KIM_NO_ERROR; - NSMutableArray *newIdentities = nil; - + if (![self.identities containsObject:anIdentity]) { - newIdentities = [self.identities mutableCopy]; - [newIdentities addObject:anIdentity]; - self.identities = newIdentities; - [newIdentities release]; + [self.identities addObject:anIdentity]; } else { err = KIM_IDENTITY_ALREADY_IN_LIST_ERR; } diff --git a/src/kim/agent/mac/KIMUtilities.h b/src/kim/agent/mac/KIMUtilities.h index 516e8effe..b3b201456 100644 --- a/src/kim/agent/mac/KIMUtilities.h +++ b/src/kim/agent/mac/KIMUtilities.h @@ -64,6 +64,8 @@ #define min_renewable_keypath @"content.minRenewableLifetime" #define max_renewable_keypath @"content.maxRenewableLifetime" +#define wants_change_password_keypath @"content.wants_change_password" + #define ACKVOContext @"authenticationController" diff --git a/src/kim/agent/mac/SelectIdentityController.h b/src/kim/agent/mac/SelectIdentityController.h index 9b78bd7b2..494d79913 100644 --- a/src/kim/agent/mac/SelectIdentityController.h +++ b/src/kim/agent/mac/SelectIdentityController.h @@ -73,6 +73,8 @@ - (IBAction) cancelOptions: (id) sender; - (IBAction) doneOptions: (id) sender; +- (IBAction) changePassword: (id) sender; + - (IBAction) select: (id) sender; - (IBAction) cancel: (id) sender; diff --git a/src/kim/agent/mac/SelectIdentityController.m b/src/kim/agent/mac/SelectIdentityController.m index eafd3d462..f6f891ab3 100644 --- a/src/kim/agent/mac/SelectIdentityController.m +++ b/src/kim/agent/mac/SelectIdentityController.m @@ -126,6 +126,13 @@ // --------------------------------------------------------------------------- +- (IBAction) changePassword: (id) sender +{ + +} + +// --------------------------------------------------------------------------- + - (IBAction) select: (id) sender { Identity *selectedIdentity = nil; @@ -136,8 +143,9 @@ } selectedIdentity = [[identityArrayController selectedObjects] lastObject]; - [associatedClient didSelectIdentity: selectedIdentity.principalString - options: [identityOptionsController valueForKeyPath:@"content.options"]]; + [associatedClient didSelectIdentity: selectedIdentity.identity + options: [identityOptionsController valueForKeyPath:@"content.options"] + wantsChangePassword: NO]; } // --------------------------------------------------------------------------- @@ -205,12 +213,14 @@ - (void) showOptions: (NSString *) contextInfo { - Identity *anIdentity = identityOptionsController.content; - - [identityField setStringValue:anIdentity.principalString]; - [staticIdentityField setStringValue:anIdentity.principalString]; - + Identity *anIdentity = [[identityArrayController selectedObjects] lastObject]; // use a copy of the current options + [identityOptionsController setContent: + [[[glueController valueForKeyPath:options_keypath] mutableCopy] autorelease]]; + + [identityField setStringValue:anIdentity.identity]; + [staticIdentityField setStringValue:anIdentity.identity]; + [identityOptionsController setContent: [[[glueController valueForKeyPath:options_keypath] mutableCopy] autorelease]]; diff --git a/src/kim/agent/mac/resources/English.lproj/Authentication.xib b/src/kim/agent/mac/resources/English.lproj/Authentication.xib index d665e878d..e9745bd2a 100644 --- a/src/kim/agent/mac/resources/English.lproj/Authentication.xib +++ b/src/kim/agent/mac/resources/English.lproj/Authentication.xib @@ -8,8 +8,12 @@ 352.00 YES - + + + + + YES @@ -57,6 +61,7 @@ min_valid_lifetime identity_string favorite_identity_strings + isBusy YES @@ -83,7 +88,7 @@ YES - 264 + 266 {{101, 103}, {382, 54}} YES @@ -341,7 +346,6 @@ - YES Q2hhbmdlIFBhc3N3b3Jk4oCmA 2147483647 @@ -350,28 +354,6 @@ _popUpItemAction: - - - YES - YES - - - 2147483647 - - - _popUpItemAction: - - - - - QWJvdXQgS2VyYmVyb3PigKY - - 2147483647 - - - _popUpItemAction: - - 2 @@ -382,13 +364,23 @@ 2 + + + 1292 + + {{66, 25}, {16, 16}} + + 28938 + 1.600000e+01 + 1.000000e+02 + {500, 187} NSView - + 274 YES @@ -522,19 +514,30 @@ BadgedImageView + + + 1292 + + {{19, 22}, {16, 16}} + + 28938 + 1.600000e+01 + 1.000000e+02 + {500, 210} + NSView - + 274 YES 266 - {{101, 149}, {382, 17}} + {{101, 140}, {382, 17}} YES @@ -550,7 +553,7 @@ 290 - {{226, 62}, {254, 22}} + {{202, 62}, {278, 22}} YES @@ -585,32 +588,16 @@ 25 - - - 292 - {{17, 64}, {204, 17}} - - YES - - 68288064 - 71304192 - %@: - - - - - - 274 - {{101, 92}, {382, 49}} + {{101, 104}, {382, 28}} YES 67239424 272629760 - %@ + b25lIGxpbmUKdHdvIGxpbmVzA LucidaGrande 1.100000e+01 @@ -624,7 +611,7 @@ 268 - {{20, 126}, {64, 64}} + {{20, 103}, {64, 64}} BadgedImageView @@ -649,12 +636,43 @@ 25 + + + 292 + {{17, 20}, {180, 61}} + + YES + + 67239424 + 71303168 + I am a really big prompt label: + + LucidaGrande + 1.300000e+01 + 16 + + + + + + + + + 1292 + + {{20, 22}, {16, 16}} + + 28938 + 1.600000e+01 + 1.000000e+02 + - {500, 210} + {500, 187} + NSView - + 286 YES @@ -841,8 +859,19 @@ 25 + + + 1292 + + {{20, 22}, {16, 16}} + + 28938 + 1.600000e+01 + 1.000000e+02 + {500, 230} + NSView @@ -932,9 +961,10 @@ {600, 400} {484, 199} - + 256 {500, 210} + {{0, 0}, {1920, 1178}} {484, 221} @@ -1441,54 +1471,6 @@ 300372 - - - value: selection.title - - - - - - value: selection.title - value - selection.title - 2 - - - 300373 - - - - value: selection.message - - - - - - value: selection.message - value - selection.message - 2 - - - 300374 - - - - value: selection.description - - - - - - value: selection.description - value - selection.description - 2 - - - 300375 - value: selection.prompt_response @@ -2084,6 +2066,106 @@ 300522 + + + value: selection.message + + + + + + value: selection.message + value + selection.message + 2 + + + 300524 + + + + value: selection.title + + + + + + value: selection.title + value + selection.title + 2 + + + 300525 + + + + displayPatternValue1: selection.description + + + + + + displayPatternValue1: selection.description + displayPatternValue1 + selection.description + + NSDisplayPattern + %{value1}@: + + 2 + + + 300529 + + + + samSpinny + + + + 300532 + + + + changePasswordSpinny + + + + 300537 + + + + enterSpinny + + + + 300538 + + + + passwordSpinny + + + + 300539 + + + + enabled: selection.isPrincipalValid + + + + + + enabled: selection.isPrincipalValid + enabled + selection.isPrincipalValid + 2 + + + 300540 + @@ -2144,6 +2226,7 @@ + Enter Identity @@ -2235,6 +2318,7 @@ + Enter Password @@ -2335,11 +2419,12 @@ YES - - + + + SAM Authentication @@ -2376,15 +2461,6 @@ - - 300200 - - - YES - - - - 300223 @@ -2413,11 +2489,6 @@ - - 300203 - - - 300207 @@ -2449,6 +2520,7 @@ + Change Password @@ -2576,8 +2648,6 @@ YES - - @@ -2588,16 +2658,6 @@ - - 300317 - - - - - 300320 - - - 300384 @@ -2899,6 +2959,40 @@ + + 300526 + + + YES + + + + + + 300527 + + + + + 300530 + + + + + 300533 + + + + + 300534 + + + + + 300536 + + + @@ -2955,10 +3049,8 @@ 300196.ImportedFromIB2 300197.IBPluginDependency 300197.ImportedFromIB2 - 300200.IBPluginDependency 300201.IBPluginDependency 300201.ImportedFromIB2 - 300203.IBPluginDependency 300210.IBPluginDependency 300211.IBEditorWindowLastContentRect 300211.IBPluginDependency @@ -2986,8 +3078,6 @@ 300314.IBEditorWindowLastContentRect 300314.IBPluginDependency 300316.IBPluginDependency - 300317.IBPluginDependency - 300320.IBPluginDependency 300384.CustomClassName 300384.IBPluginDependency 300384.ImportedFromIB2 @@ -3041,6 +3131,12 @@ 300469.IBPluginDependency 300502.IBPluginDependency 300510.IBPluginDependency + 300526.IBPluginDependency + 300527.IBPluginDependency + 300530.IBPluginDependency + 300533.IBPluginDependency + 300534.IBPluginDependency + 300536.IBPluginDependency YES @@ -3058,7 +3154,7 @@ {484, 199} com.apple.InterfaceBuilder.CocoaPlugin - {{602, 455}, {500, 187}} + {{338, 521}, {500, 187}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3069,7 +3165,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{477, 611}, {500, 210}} + {{790, 237}, {500, 210}} com.apple.InterfaceBuilder.CocoaPlugin NSSecureTextField com.apple.InterfaceBuilder.CocoaPlugin @@ -3085,7 +3181,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{628, 163}, {500, 210}} + {{597, 343}, {500, 187}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3095,10 +3191,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin {{553, 638}, {500, 210}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3122,9 +3216,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{611, 408}, {189, 93}} - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin + {{347, 504}, {189, 63}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin NSSecureTextField @@ -3180,6 +3272,12 @@ 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 @@ -3202,7 +3300,7 @@ - 300522 + 300540 @@ -3244,9 +3342,11 @@ YES changePasswordBadge + changePasswordSpinny changePasswordView containerView enterBadge + enterSpinny errorBadge errorView expiredPasswordView @@ -3257,11 +3357,13 @@ oldPasswordField passwordBadge passwordField + passwordSpinny passwordView rememberPasswordInKeychainCheckBox renewableLifetimeSlider samBadge samPromptField + samSpinny samView ticketOptionsController ticketOptionsSheet @@ -3270,9 +3372,11 @@ YES BadgedImageView + NSProgressIndicator NSView NSView BadgedImageView + NSProgressIndicator BadgedImageView NSView NSView @@ -3283,11 +3387,13 @@ NSTextField BadgedImageView NSTextField + NSProgressIndicator NSView NSButton NSSlider BadgedImageView NSTextField + NSProgressIndicator NSView NSObjectController NSWindow diff --git a/src/kim/agent/mac/resources/English.lproj/SelectIdentity.xib b/src/kim/agent/mac/resources/English.lproj/SelectIdentity.xib index d38d944c9..8953d97db 100644 --- a/src/kim/agent/mac/resources/English.lproj/SelectIdentity.xib +++ b/src/kim/agent/mac/resources/English.lproj/SelectIdentity.xib @@ -9,7 +9,6 @@ YES - YES @@ -29,7 +28,7 @@ 13 2 - {{279, 512}, {491, 316}} + {{279, 568}, {398, 260}} 1886913536 Select a Kerberos Identity @@ -39,7 +38,6 @@ View {600, 600} - {419, 298} 256 @@ -48,7 +46,7 @@ 266 - {{101, 265}, {373, 17}} + {{101, 213}, {280, 17}} YES @@ -84,7 +82,7 @@ 266 - {{101, 220}, {373, 37}} + {{101, 168}, {280, 37}} YES @@ -104,7 +102,7 @@ 289 - {{390, 13}, {87, 32}} + {{297, 12}, {87, 32}} YES @@ -125,7 +123,7 @@ 289 - {{308, 13}, {82, 32}} + {{215, 12}, {82, 32}} YES @@ -146,14 +144,14 @@ 268 - {{20, 232}, {64, 64}} + {{20, 176}, {64, 64}} BadgedImageView 292 - {{20, 19}, {28, 24}} + {{20, 18}, {28, 24}} YES @@ -187,13 +185,13 @@ 256 - {449, 133} + {356, 83} YES 256 - {449, 17} + {356, 17} @@ -207,7 +205,7 @@ YES identityColumn - 2.670000e+02 + 1.740000e+02 4.000000e+01 1.000000e+03 @@ -328,7 +326,7 @@ YES - {{1, 17}, {449, 133}} + {{1, 17}, {356, 83}} @@ -362,7 +360,7 @@ YES - {{1, 0}, {449, 17}} + {{1, 0}, {356, 17}} @@ -371,7 +369,7 @@ - {{20, 61}, {451, 151}} + {{20, 59}, {358, 101}} 530 @@ -385,7 +383,7 @@ 292 - {{47, 19}, {54, 24}} + {{47, 18}, {54, 24}} YES @@ -430,7 +428,6 @@ - YES Remember Identity 1048576 @@ -462,8 +459,20 @@ _popUpItemAction: + + + Q2hhbmdlIFBhc3N3b3Jk4oCmA + + 1048576 + 2147483647 + + + _popUpItemAction: + + + 4 YES 2 YES @@ -472,13 +481,12 @@ - {491, 316} + {398, 260} {{0, 0}, {1920, 1178}} - {419, 320} {600, 622} - SelectIdentityWindow + @@ -512,7 +520,7 @@ {3.40282e+38, 3.40282e+38} - + 258 YES @@ -854,7 +862,6 @@ {427, 348} - {{0, 0}, {1280, 778}} {3.40282e+38, 3.40282e+38} @@ -1570,6 +1577,14 @@ 300484 + + + changePassword: + + + + 300486 + @@ -2076,6 +2091,7 @@ + @@ -2119,6 +2135,11 @@ Glue Controller + + 300485 + + + @@ -2202,6 +2223,7 @@ 300431.IBPluginDependency 300432.IBPluginDependency 300462.IBPluginDependency + 300485.IBPluginDependency 5.IBEditorWindowLastContentRect 5.IBPluginDependency 5.IBWindowTemplateEditedContentRect @@ -2289,21 +2311,22 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{535, 102}, {198, 83}} + {{535, 82}, {203, 103}} + 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 - {{499, 142}, {491, 316}} + {{508, 407}, {398, 260}} com.apple.InterfaceBuilder.CocoaPlugin - {{499, 142}, {491, 316}} + {{508, 407}, {398, 260}} {{503, 256}, {419, 465}} - + {600, 600} {419, 298} com.apple.InterfaceBuilder.CocoaPlugin @@ -2332,7 +2355,7 @@ - 300484 + 300486 @@ -2376,6 +2399,7 @@ addToFavorites: cancel: cancelOptions: + changePassword: doneOptions: editOptions: newIdentity: @@ -2396,6 +2420,7 @@ id id id + id