Removed unnecessary code that was resetting options whenever the
authorAlexandra Ellwood <lxs@mit.edu>
Wed, 29 Oct 2008 21:07:40 +0000 (21:07 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Wed, 29 Oct 2008 21:07:40 +0000 (21:07 +0000)
array changes in the background.  The problem is that any external
change to the ticket list will cause this to happen, even when the
options dialog is open.

Also removed unused function resetOptions.

ticket: 6224

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20938 dc483132-0cff-0310-8789-dd5450dbe970

src/kim/agent/mac/SelectIdentityController.h
src/kim/agent/mac/SelectIdentityController.m

index 1a95ca994644b0589e576be610f2b3322878e422..4d744ba08e13d0e6d2ef5be3e0d09efd9d34d84d 100644 (file)
@@ -77,7 +77,6 @@
 - (IBAction) removeFromFavorites: (id) sender;
 
 - (IBAction) editOptions: (id) sender;
-- (IBAction) resetOptions: (id) sender;
 - (IBAction) cancelOptions: (id) sender;
 - (IBAction) doneOptions: (id) sender;
 
index 4bc760d9d8a382bed3aafa300d4ceeab20662b88..9f9addaf37ff7decf4dce2a214e334864c70ff23 100644 (file)
@@ -41,7 +41,6 @@
 
 - (void) dealloc
 {
-    [identityArrayController removeObserver:self forKeyPath:@"selectedObjects"];
     [identityOptionsController removeObserver:self forKeyPath:uses_default_options_keypath];
     [refreshTimer release];
     [identities release];
                                 forKeyPath:identity_string_keypath
                                    options:NSKeyValueObservingOptionNew
                                    context:NULL];
-    [identityArrayController addObserver:self
-                              forKeyPath:@"selectedObjects"
-                                 options:NSKeyValueObservingOptionNew
-                                 context:NULL];
 }
 
 - (void)  observeValueForKeyPath:(NSString *) keyPath ofObject: (id) object change: (NSDictionary *) change context:(void *) context
         [identityOptionsController setValue:[NSNumber numberWithBool:enabled] 
                                  forKeyPath:@"content.canClickOK"];
     }
-    // clear options on selection change
-    else if (object == identityArrayController && [keyPath isEqualToString:@"selectedObjects"]) {
-        [identityOptionsController setContent:nil];
-    }
 }
 
 // ---------------------------------------------------------------------------
 
 // ---------------------------------------------------------------------------
 
-- (IBAction) resetOptions: (id) sender
-{
-    Identity *anIdentity = [identityArrayController.selectedObjects lastObject];
-    [identityOptionsController setContent:anIdentity.options];
-}
-
-// ---------------------------------------------------------------------------
-
 - (IBAction) cancelOptions: (id) sender
 {
     identityOptionsController.content = nil;