зеркало из https://github.com/mozilla/pjs.git
Fix bug 308356: fix saving keychain info by making sure we map return codes correctly. r=pinkerton
This commit is contained in:
Родитель
a656eecc05
Коммит
624534f15e
|
@ -391,9 +391,16 @@ int KeychainPrefChangedCallback(const char* inPref, void* unused)
|
|||
int result = [NSApp runModalForWindow:confirmStorePasswordPanel relativeToWindow:parent];
|
||||
[confirmStorePasswordPanel close];
|
||||
|
||||
// the results of hitButtonXX: map to the corresponding values in the
|
||||
// |KeychainPromptResult| enum so we can just cast and return
|
||||
return NS_STATIC_CAST(KeychainPromptResult, result);
|
||||
KeychainPromptResult keychainAction = kDontRemember;
|
||||
switch (result)
|
||||
{
|
||||
case NSAlertDefaultReturn: keychainAction = kSave; break;
|
||||
default:
|
||||
case NSAlertAlternateReturn: keychainAction = kDontRemember; break;
|
||||
case NSAlertOtherReturn: keychainAction = kNeverRemember; break;
|
||||
}
|
||||
|
||||
return keychainAction;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Загрузка…
Ссылка в новой задаче