Changeset 9863

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

fix esession toggling

Location:
trunk/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/chat_control.py

    r9861 r9863  
    23262326        def _on_toggle_e2e_menuitem_activate(self, widget): 
    23272327                if self.session and self.session.enable_encryption: 
     2328                        jid = str(self.session.jid) 
     2329                        thread_id = self.session.thread_id 
     2330 
    23282331                        self.session.terminate_e2e() 
    23292332 
    2330                         self.print_esession_details() 
    2331  
    2332                         jid = str(self.session.jid) 
    2333  
    2334                         gajim.connections[self.account].delete_session(jid, 
    2335                                 self.session.thread_id) 
    2336  
    2337                         self.set_session(gajim.connections[self.account].make_new_session(jid)) 
     2333                        gajim.connections[self.account].delete_session(jid, thread_id) 
    23382334                else: 
    23392335                        if not self.session: 
     
    23422338                                self.set_session(new_sess) 
    23432339 
    2344                         # XXX decide whether to use 4 or 3 message negotiation 
    23452340                        self.session.negotiate_e2e(False) 
    23462341 
  • trunk/src/dialogs.py

    r9861 r9863  
    38193819        def on_verify_now_button_clicked(self, widget): 
    38203820                pritext = _('''Have you verified the remote contact's identity?''') 
    3821                 sectext = _('''To prevent a man-in-the-middle attack, you should speak to this person directly (in person or on the phone) and verify that they see the same SAS as you.\n\nThis session's SAS: %s''') % self.session.sas 
     3821                sectext = _('''To prevent a man-in-the-middle attack, you should speak to %s directly (in person or on the phone) and verify that they see the same SAS as you.\n\nThis session's SAS: <b>%s<b>''') % (self.session.jid, self.session.sas) 
    38223822                sectext += '\n\n' + _('Did you talk to the remote contact and verify the SAS?') 
    38233823 
  • trunk/src/session.py

    r9861 r9863  
    2222 
    2323        def acknowledge_termination(self): 
     24                if self.control: 
     25                        self.control.set_session(None) 
     26 
    2427                stanza_session.EncryptedStanzaSession.acknowledge_termination(self) 
    25  
    26                 if self.control: 
    27                         if self.enable_encryption: 
    28                                 self.control.print_esession_details() 
    29  
    30                         self.control.set_session(None) 
    3128 
    3229        def terminate(self):