Show
Ignore:
Timestamp:
06/29/08 06:39:29 (5 months ago)
Author:
bct
Message:

make esession authentication warning less obtrusive

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/negotiation.py

    r9115 r9861  
    1414        elif features['logging'] == 'mustnot': 
    1515                return _('- messages will not be logged') 
    16  
    17 def show_sas_dialog(session, jid, sas, on_success): 
    18         def success_cb(checked): 
    19                 on_success(checked) 
    20  
    21         def failure_cb(): 
    22                 session.reject_negotiation() 
    23  
    24         dialogs.ConfirmationDialogCheck(_('''OK to continue with negotiation?'''), 
    25                 _('''You've begun an encrypted session with %s, but it can't be guaranteed that you're talking directly to the person you think you are. 
    26  
    27 You should speak with them directly (in person or on the phone) and confirm that their Short Authentication String is identical to this one: %s 
    28  
    29 Would you like to continue with the encrypted session?''') % (jid, sas), 
    30  
    31                 _('Yes, I verified the Short Authentication String'), 
    32                 on_response_ok=success_cb, on_response_cancel=failure_cb, is_modal=False) 
    3316 
    3417class FeatureNegotiationWindow: 
     
    6851 
    6952        def on_cancel_button_clicked(self, widget): 
    70                 # XXX determine whether to reveal presence 
    71  
    7253                rejection = xmpp.Message(self.jid) 
    7354                rejection.setThread(self.session.thread_id) 
     
    8162                feature.addChild(node=x) 
    8263 
    83                 # XXX optional <body/> 
    84  
    8564                gajim.connections[self.account].send_stanza(rejection) 
    8665