Changeset 9116
- Timestamp:
- 12/08/07 10:09:06 (12 months ago)
- Location:
- branches/session_centric/src
- Files:
-
- 4 modified
-
chat_control.py (modified) (3 diffs)
-
common/stanza_session.py (modified) (5 diffs)
-
gajim.py (modified) (2 diffs)
-
negotiation.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/session_centric/src/chat_control.py
r9113 r9116 1465 1465 self.kbd_activity_in_last_30_secs = False 1466 1466 1467 def on_cancel_session_negotiation(self): 1468 msg = _('Session negotiation cancelled') 1469 ChatControlBase.print_conversation_line(self, msg, 'status', '', None) 1467 1470 1468 1471 # print esession settings to textview … … 2156 2159 tb = self.xml.get_widget('gpg_togglebutton') 2157 2160 tb.set_active(not tb.get_active()) 2158 2161 2159 2162 def _on_convert_to_gc_menuitem_activate(self, widget): 2160 2163 '''user want to invite some friends to chat''' … … 2165 2168 self.session.terminate_e2e() 2166 2169 2167 msg = _('Encryption disabled') 2168 ChatControlBase.print_conversation_line(self, msg, 2169 'status', '', None) 2170 self.print_esession_details() 2170 2171 2171 2172 jid = str(self.session.jid) -
branches/session_centric/src/common/stanza_session.py
r9113 r9116 37 37 self.status = None 38 38 self.negotiated = {} 39 39 40 40 def generate_thread_id(self): 41 41 return "".join([random.choice(string.ascii_letters) for x in xrange(0,32)]) … … 47 47 msg.setAttr('to', self.jid) 48 48 self.conn.send_stanza(msg) 49 49 50 50 if isinstance(msg, xmpp.Message): 51 51 self.last_send = time.time() … … 73 73 74 74 if hasattr(self, 'control'): 75 msg = _('Session negotiation cancelled') 76 self.control.print_conversation_line(self, msg, 'status', '', None) 75 self.control.on_cancel_session_negotiation() 77 76 78 77 self.status = None … … 351 350 352 351 if not eir_pubkey.verify(hash, signature): 353 raise exceptions.NegotiationError, 'public key signature verification failed!' 352 raise exceptions.NegotiationError, 'public key signature verification failed!' 354 353 355 354 elif mac_o_calculated != mac_o: … … 904 903 905 904 return self.loggable and account not in no_log_for and self.jid not in no_log_for 905 906 def cancelled_negotiation(self): 907 StanzaSession.cancelled_negotiation(self) 908 self.enable_encryption = False 909 910 self.km_o = '' -
branches/session_centric/src/gajim.py
r9113 r9116 1903 1903 1904 1904 if form.getField('accept') and not form['accept'] in ('1', 'true'): 1905 dialogs.InformationDialog(_('Session negotiation cancelled'),1906 _('The client at %s cancelled the session negotiation.') % (jid))1907 1905 session.cancelled_negotiation() 1908 1906 return … … 2019 2017 # user cancelled the negotiation 2020 2018 2021 session.cancelled_negotiation() 2022 2023 return 2024 2025 if form.getField('terminate'): 2026 if form.getField('terminate').getValue() in ('1', 'true'): 2027 session.acknowledge_termination() 2028 2029 gajim.connections[account].delete_session(str(jid), session.thread_id) 2030 2031 ctrl = gajim.interface.msg_win_mgr.get_control(str(jid), account) 2032 2033 if ctrl: 2034 new_sess = gajim.connections[account].make_new_session(str(jid)) 2035 ctrl.set_session(new_sess) 2036 2037 return 2019 session.reject_negotiation() 2020 2021 return 2022 2023 if form.getField('terminate') and\ 2024 form.getField('terminate').getValue() in ('1', 'true'): 2025 was_encrypted = session.enable_encryption 2026 ctrl = session.control 2027 2028 session.acknowledge_termination() 2029 gajim.connections[account].delete_session(str(jid), session.thread_id) 2030 2031 if ctrl: 2032 new_sess = gajim.connections[account].make_new_session(str(jid)) 2033 ctrl.set_session(new_sess) 2034 2035 if was_encrypted: 2036 ctrl.print_esession_details() 2037 2038 return 2038 2039 2039 2040 # non-esession negotiation. this isn't very useful, but i'm keeping it around -
branches/session_centric/src/negotiation.py
r8873 r9116 20 20 21 21 def failure_cb(): 22 session. cancelled_negotiation()22 session.reject_negotiation() 23 23 24 24 dialogs.ConfirmationDialogCheck(_('''OK to continue with negotiation?'''),
