[Adium-devl] rev 21545 - in trunk: Adium.xcodeproj Plugins/Purple Service Plugins/Purple Service/en.lproj/AICertificateTrustWarning.nib Plugins/Purple Service/en.lproj/ESPurpleJabberAccountView.nib Plugins/Purple Service/libpurple_extensions
Andreas Monitzer
soc at monitzer.com
Tue Nov 6 18:20:18 UTC 2007
On Nov 06, 2007, at 18:53, Peter Hosey wrote:
> On Nov 05, 2007, at 20:12:42, am at adiumx.com wrote:
>> This is still quite sub-optimal, since Apple seems to not have
>> considered people that don't want modal windows and don't have a
>> window to attach their certificate warning to, …
>
> I'm not sure what you meant by this. Would you expand, please?
There are two panels available in the SecurityInterface framework for
displaying certificates (one of them also allowing editing the trust
settings as stored in the keychain), called SFCertificatePanel and
SFCertificateTrustPanel.
Both of them have similar methods to be displayed:
- (NSInt)runModalForCertificates:(NSArray *)certificates showGroup:
(BOOL)showGroup
- (void)beginSheetForWindow:(NSWindow *)docWindow modalDelegate:
(id)delegate didEndSelector:(SEL)didEndSelector contextInfo:(void
*)contextInfo certificates:(NSArray *)certificates showGroup:
(BOOL)showGroup
and
- (NSInt)runModalForTrust:(SecTrustRef)trust message:(NSString *)message
- (void)beginSheetForWindow:(NSWindow *)docWindow modalDelegate:
(id)delegate didEndSelector:(SEL)didEndSelector contextInfo:(void
*)contextInfo trust:(SecTrustRef)trust message:(NSString *)message
respectively.
Notice how all four methods get passed the vital information to
display, and so I have to call one of them to be able to do anything
with the classes (just calling -makeKeyAndOrderFront: won't do it,
even though they're a subclass of NSPanel).
One of them is application-modal (returning only after the user has
made a decision), while the other is a sheet. The first one is not an
option for Adium, since it'd stop all other operations in the program
(like the keepalive on protocols like XMPP) and is a general nuisance
for the user. The second one is not an option, since there is no
window to attach the sheet to.
I tried re-implementing the SFCertificatePanel as a non-modal window,
but it is inferior to the one Apple provides, and I don't quite know
how to get all the information required for it (for example, it also
displays the parent certificates stored in the keychain).
I hope this expansion was verbose enough :)
Yesterday (after that commit) I talked to zac on #adium-devl, and we
came up with the idea to open the account editor window for the
account in question and attach the alert as a sheet to this one. This
might work pretty well, and I'll work on implementing that next.
andy
More information about the devel
mailing list