Skip to content
Snippets Groups Projects
Commit 1954f360 authored by George Nachman's avatar George Nachman
Browse files

Having merged in the PR for selecting an account after opening the password...

Having merged in the PR for selecting an account after opening the password manager from a trigger, add manual retain-release code and rename ivar.
parent acc89806
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -37,7 +37,7 @@ static BOOL sAuthenticated;
NSArray *_accounts;
NSString *_passwordBeingShown;
NSInteger _rowForPasswordBeingShown;
NSString *_selectedAccountNameBeforeAuthenticated;
NSString *_accountNameToSelectAfterAuthentication;
}
 
+ (NSArray *)accountNamesWithFilter:(NSString *)filter {
Loading
Loading
@@ -154,6 +154,7 @@ static BOOL sAuthenticated;
 
- (void)dealloc {
[_accounts release];
[_accountNameToSelectAfterAuthentication release];
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
Loading
Loading
@@ -192,7 +193,8 @@ static BOOL sAuthenticated;
[_tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:index]
byExtendingSelection:NO];
} else if (!sAuthenticated) {
_selectedAccountNameBeforeAuthenticated = name;
[_accountNameToSelectAfterAuthentication autorelease];
_accountNameToSelectAfterAuthentication = [name copy];
}
}
 
Loading
Loading
@@ -354,8 +356,10 @@ static BOOL sAuthenticated;
 
if (success) {
[self reloadAccounts];
if (_selectedAccountNameBeforeAuthenticated) {
[self selectAccountName:_selectedAccountNameBeforeAuthenticated];
if (_accountNameToSelectAfterAuthentication) {
[self selectAccountName:_accountNameToSelectAfterAuthentication];
[_accountNameToSelectAfterAuthentication release];
_accountNameToSelectAfterAuthentication = nil;
} else {
[[self window] makeFirstResponder:_searchField];
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment