From 9ac298174082cf7858931a59452479105121da3b Mon Sep 17 00:00:00 2001 From: Justin Anderson Date: Fri, 17 Oct 2008 19:41:02 +0000 Subject: [PATCH] Stop using -[NSWindow setIgnoresMouseEvents:] and manage enabled state of each control individually with bindings ticket:6198 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20890 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kim/agent/mac/AuthenticationController.m | 6 +- src/kim/agent/mac/KIMUtilities.h | 1 + .../English.lproj/Authentication.xib | 351 +++++++++++++++++- 3 files changed, 342 insertions(+), 16 deletions(-) diff --git a/src/kim/agent/mac/AuthenticationController.m b/src/kim/agent/mac/AuthenticationController.m index ade8b5195..ad665fb29 100644 --- a/src/kim/agent/mac/AuthenticationController.m +++ b/src/kim/agent/mac/AuthenticationController.m @@ -312,7 +312,8 @@ [passwordSpinny startAnimation: nil]; [samSpinny startAnimation: nil]; [changePasswordSpinny startAnimation: nil]; - [[self window] setIgnoresMouseEvents:YES]; + [glueController setValue:[NSNumber numberWithBool:NO] + forKeyPath:accepting_input_keypath]; } - (void) hideSpinny @@ -321,7 +322,8 @@ [passwordSpinny stopAnimation: nil]; [samSpinny stopAnimation: nil]; [changePasswordSpinny stopAnimation: nil]; - [[self window] setIgnoresMouseEvents:NO]; + [glueController setValue:[NSNumber numberWithBool:YES] + forKeyPath:accepting_input_keypath]; } - (void) showSAM diff --git a/src/kim/agent/mac/KIMUtilities.h b/src/kim/agent/mac/KIMUtilities.h index e2a1ee28d..6575ca712 100644 --- a/src/kim/agent/mac/KIMUtilities.h +++ b/src/kim/agent/mac/KIMUtilities.h @@ -66,6 +66,7 @@ #define max_renewable_keypath @"content.maxRenewableLifetime" #define wants_change_password_keypath @"content.wants_change_password" +#define accepting_input_keypath @"content.acceptingInput" #define ACKVOContext @"authenticationController" diff --git a/src/kim/agent/mac/resources/English.lproj/Authentication.xib b/src/kim/agent/mac/resources/English.lproj/Authentication.xib index 0fb1048ab..a58f67049 100644 --- a/src/kim/agent/mac/resources/English.lproj/Authentication.xib +++ b/src/kim/agent/mac/resources/English.lproj/Authentication.xib @@ -9,9 +9,6 @@ YES - - - YES @@ -60,6 +57,7 @@ identity_string favorite_identity_strings isBusy + acceptingInput YES @@ -377,7 +375,7 @@ NSView - + 274 YES @@ -523,7 +521,6 @@ {500, 208} - NSView @@ -668,7 +665,7 @@ NSView - + 286 YES @@ -848,7 +845,6 @@ {500, 230} - NSView @@ -961,7 +957,7 @@ {3.40282e+38, 3.40282e+38} {430, 283} - + 256 YES @@ -1197,7 +1193,6 @@ {430, 305} - {{0, 0}, {1440, 878}} {430, 305} @@ -1343,7 +1338,7 @@ enabled: selection.isPrincipalValid - + enabled: selection.isPrincipalValid @@ -1407,7 +1402,7 @@ enabled: selection.isPromptValid - + enabled: selection.isPromptValid @@ -1495,7 +1490,7 @@ enabled: selection.isPromptValid - + enabled: selection.isPromptValid @@ -1615,7 +1610,7 @@ enabled: selection.isChangePasswordValid - + enabled: selection.isChangePasswordValid @@ -2269,6 +2264,334 @@ 300556 + + + enabled: selection.acceptingInput + + + + + + enabled: selection.acceptingInput + enabled + selection.acceptingInput + 2 + + + 300560 + + + + enabled: selection.acceptingInput + + + + + + enabled: selection.acceptingInput + enabled + selection.acceptingInput + 2 + + + 300561 + + + + enabled: selection.acceptingInput + + + + + + enabled: selection.acceptingInput + enabled + selection.acceptingInput + 2 + + + 300562 + + + + enabled2: selection.acceptingInput + + + + + + enabled2: selection.acceptingInput + enabled2 + selection.acceptingInput + + YES + + YES + NSMultipleValuesPlaceholder + NSNoSelectionPlaceholder + NSNotApplicablePlaceholder + NSNullPlaceholder + + + YES + + + + + + + + 2 + + + 300563 + + + + enabled: selection.acceptingInput + + + + + + enabled: selection.acceptingInput + enabled + selection.acceptingInput + 2 + + + 300564 + + + + enabled: selection.acceptingInput + + + + + + enabled: selection.acceptingInput + enabled + selection.acceptingInput + 2 + + + 300565 + + + + enabled: selection.acceptingInput + + + + + + enabled: selection.acceptingInput + enabled + selection.acceptingInput + 2 + + + 300566 + + + + enabled: selection.acceptingInput + + + + + + enabled: selection.acceptingInput + enabled + selection.acceptingInput + 2 + + + 300567 + + + + enabled2: selection.acceptingInput + + + + + + enabled2: selection.acceptingInput + enabled2 + selection.acceptingInput + + YES + + YES + NSMultipleValuesPlaceholder + NSNoSelectionPlaceholder + NSNotApplicablePlaceholder + NSNullPlaceholder + + + YES + + + + + + + + 2 + + + 300568 + + + + enabled: selection.acceptingInput + + + + + + enabled: selection.acceptingInput + enabled + selection.acceptingInput + 2 + + + 300569 + + + + enabled: selection.acceptingInput + + + + + + enabled: selection.acceptingInput + enabled + selection.acceptingInput + 2 + + + 300570 + + + + enabled2: selection.acceptingInput + + + + + + enabled2: selection.acceptingInput + enabled2 + selection.acceptingInput + + YES + + YES + NSMultipleValuesPlaceholder + NSNoSelectionPlaceholder + NSNotApplicablePlaceholder + NSNullPlaceholder + + + YES + + + + + + + + 2 + + + 300571 + + + + enabled: selection.acceptingInput + + + + + + enabled: selection.acceptingInput + enabled + selection.acceptingInput + 2 + + + 300572 + + + + enabled: selection.acceptingInput + + + + + + enabled: selection.acceptingInput + enabled + selection.acceptingInput + 2 + + + 300573 + + + + enabled: selection.acceptingInput + + + + + + enabled: selection.acceptingInput + enabled + selection.acceptingInput + 2 + + + 300574 + + + + enabled2: selection.acceptingInput + + + + + + enabled2: selection.acceptingInput + enabled2 + selection.acceptingInput + + YES + + YES + NSMultipleValuesPlaceholder + NSNoSelectionPlaceholder + NSNotApplicablePlaceholder + NSNullPlaceholder + + + YES + + + + + + + + 2 + + + 300575 + @@ -3403,7 +3726,7 @@ - 300556 + 300575 -- 2.26.2