Changeset 9607
- Timestamp:
- 05/10/08 23:29:47 (7 months ago)
- Location:
- trunk
- Files:
-
- 8 modified
-
config.h.in (modified) (1 diff)
-
src/chat_control.py (modified) (4 diffs)
-
src/common/connection_handlers.py (modified) (2 diffs)
-
src/common/connection.py (modified) (1 diff)
-
src/gajim.py (modified) (3 diffs)
-
src/message_control.py (modified) (2 diffs)
-
src/otr_windows.py (modified) (5 diffs)
-
src/roster_window.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/config.h.in
r7184 r9607 64 64 #undef HAVE_UNISTD_H 65 65 66 /* Define to the sub-directory in which libtool stores uninstalled libraries. 67 */ 68 #undef LT_OBJDIR 69 66 70 /* Name of package */ 67 71 #undef PACKAGE -
trunk/src/chat_control.py
r9603 r9607 1209 1209 def update_otr(self, print_status=False): 1210 1210 # retrieve the OTR context from the chat's contact data 1211 ctx = gajim.otr_module.otrl_context_find(gajim. otr_userstates[self.account],1211 ctx = gajim.otr_module.otrl_context_find(gajim.connections[self.account].otr_userstates, 1212 1212 self.contact.get_full_jid().encode(), 1213 1213 gajim.get_jid_from_account(self.account).encode(), gajim.OTR_PROTO, 1, … … 1852 1852 self.handlers[id] = smp_otr_menuitem 1853 1853 1854 ctx = gajim.otr_module.otrl_context_find(gajim. otr_userstates[self.account],1854 ctx = gajim.otr_module.otrl_context_find(gajim.connections[self.account].otr_userstates, 1855 1855 self.contact.get_full_jid().encode(), 1856 1856 gajim.get_jid_from_account(self.account).encode(), gajim.OTR_PROTO, 1, … … 2350 2350 def _on_end_otr_menuitem_activate(self, widget): 2351 2351 fjid = self.contact.get_full_jid() 2352 gajim.otr_module.otrl_message_disconnect(gajim. otr_userstates[self.account],2352 gajim.otr_module.otrl_message_disconnect(gajim.connections[self.account].otr_userstates, 2353 2353 (gajim.otr_ui_ops, {'account':self.account,'urgent':True}), 2354 2354 gajim.get_jid_from_account(self.account).encode(), gajim.OTR_PROTO, … … 2360 2360 gajim.otr_windows.ContactOtrWindow(self.contact, self.account, self) 2361 2361 def _on_smp_otr_menuitem_activate(self, widget): 2362 ctx = gajim.otr_module.otrl_context_find(gajim. otr_userstates[self.account],2362 ctx = gajim.otr_module.otrl_context_find(gajim.connections[self.account].otr_userstates, 2363 2363 self.contact.get_full_jid().encode(), 2364 2364 gajim.get_jid_from_account(self.account).encode(), gajim.OTR_PROTO, 1, -
trunk/src/common/connection_handlers.py
r9605 r9607 1681 1681 if gajim.otr_module and isinstance(msgtxt, unicode): 1682 1682 otr_msg_tuple = gajim.otr_module.otrl_message_receiving( 1683 gajim. otr_userstates[self.name],1683 gajim.connections[self.name].otr_userstates, 1684 1684 (gajim.otr_ui_ops, {'account':self.name}), 1685 1685 gajim.get_jid_from_account(self.name).encode(), … … 1700 1700 ctrl.update_ui() 1701 1701 1702 ctx = gajim.otr_module.otrl_context_find(gajim. otr_userstates[self.name], frm.encode(),1702 ctx = gajim.otr_module.otrl_context_find(gajim.connections[self.name].otr_userstates, frm.encode(), 1703 1703 gajim.get_jid_from_account(self.name).encode(), gajim.OTR_PROTO, 1, 1704 1704 (gajim.otr_add_appdata, self.name))[0] -
trunk/src/common/connection.py
r9602 r9607 165 165 self.vcard_supported = True 166 166 self.private_storage_supported = True 167 168 if gajim.otr_module: 169 self.otr_userstates = gajim.otr_module.otrl_userstate_create() 170 171 try: 172 gajim.otr_module.otrl_privkey_read(self.otr_userstates, 173 os.path.join(gajimpaths.root, 174 '%s.key' % self.name).encode()) 175 except Exception, e: 176 if hasattr(e, 'os_errno') and e.os_errno == 2: 177 pass 178 179 try: 180 gajim.otr_module.otrl_privkey_read_fingerprints( 181 self.otr_userstates, os.path.join( 182 gajimpaths.root, '%s.fpr' % self.name 183 ).encode(), (add_appdata, a)) 184 except Exception, e: 185 if hasattr(e, 'os_errno') and e.os_errno == 2: 186 pass 167 187 # END __init__ 168 188 -
trunk/src/gajim.py
r9602 r9607 320 320 gtk.main_iteration(block=False) 321 321 322 otr.otrl_privkey_generate(gajim. otr_userstates[opdata['account']],322 otr.otrl_privkey_generate(gajim.connections[opdata['account']].otr_userstates, 323 323 os.path.join(gajimpaths.root, "%s.key"%opdata['account']).encode(), 324 324 accountname, gajim.OTR_PROTO) … … 372 372 373 373 def write_fingerprints(self, opdata=""): 374 otr.otrl_privkey_write_fingerprints(gajim. otr_userstates[opdata['account']],374 otr.otrl_privkey_write_fingerprints(gajim.connections[opdata['account']].otr_userstates, 375 375 os.path.join(gajimpaths.root, "%s.fpr"%opdata['account']).encode()) 376 376 … … 3327 3327 gajim.transport_avatar[a] = {} 3328 3328 3329 if gajim.otr_module:3330 gajim.otr_userstates[a] = otr.otrl_userstate_create()3331 try:3332 otr.otrl_privkey_read(gajim.otr_userstates[a],3333 os.path.join(gajimpaths.root, "%s.key"%a).encode())3334 except Exception, e:3335 if hasattr(e,"os_errno") and e.os_errno == 2:3336 print "didn't find otr keyfile "+ \3337 (os.path.join(gajimpaths.root, "%s.key"%a).encode())3338 pass3339 try:3340 otr.otrl_privkey_read_fingerprints(gajim.otr_userstates[a],3341 os.path.join(gajimpaths.root, "%s.fpr"%a).encode(), (add_appdata, a))3342 except Exception, e:3343 if hasattr(e,"os_errno") and e.os_errno == 2:3344 print "didn't find otr fingerprint file "+ \3345 (os.path.join(gajimpaths.root, "%s.fpr"%a).encode())3346 pass3347 3348 3329 if gajim.config.get('remote_control'): 3349 3330 try: -
trunk/src/message_control.py
r9602 r9607 161 161 162 162 new_msg = gajim.otr_module.otrl_message_sending( 163 gajim. otr_userstates[self.account],163 gajim.connections[self.account].otr_userstates, 164 164 (gajim.otr_ui_ops, d), 165 165 gajim.get_jid_from_account(self.account).encode(), gajim.OTR_PROTO, … … 167 167 168 168 context = gajim.otr_module.otrl_context_find( 169 gajim. otr_userstates[self.account],169 gajim.connections[self.account].otr_userstates, 170 170 self.contact.get_full_jid().encode(), 171 171 gajim.get_jid_from_account(self.account).encode(), 172 172 gajim.OTR_PROTO, 1)[0] 173 174 print repr(context.accountname), repr(context.username)175 173 176 174 # we send all because inject_message can filter on HTML stuff then -
trunk/src/otr_windows.py
r9602 r9607 50 50 51 51 self.ctx = gajim.otr_module.otrl_context_find( 52 gajim. otr_userstates[self.account],52 gajim.connections[self.account].otr_userstates, 53 53 self.fjid.encode(), gajim.get_jid_from_account(self.account).encode(), 54 54 gajim.OTR_PROTO, 1, (gajim.otr_add_appdata, self.account))[0] … … 80 80 def _abort(self, text=None): 81 81 self.smp_running = False 82 gajim.otr_module.otrl_message_abort_smp(gajim. otr_userstates[self.account],82 gajim.otr_module.otrl_message_abort_smp(gajim.connections[self.account].otr_userstates, 83 83 (gajim.otr_ui_ops, {'account':self.account}), self.ctx) 84 84 if text: … … 153 153 secret = self.gw("secret_entry").get_text() 154 154 if self.response: 155 gajim.otr_module.otrl_message_respond_smp(gajim. otr_userstates[self.account],155 gajim.otr_module.otrl_message_respond_smp(gajim.connections[self.account].otr_userstates, 156 156 (gajim.otr_ui_ops, {'account':self.account}), self.ctx, secret) 157 157 else: 158 gajim.otr_module.otrl_message_initiate_smp(gajim. otr_userstates[self.account],158 gajim.otr_module.otrl_message_initiate_smp(gajim.connections[self.account].otr_userstates, 159 159 (gajim.otr_ui_ops, {'account':self.account}), self.ctx, secret) 160 160 self.gw("progressbar").set_fraction(0.3) … … 175 175 176 176 self.ctx = gajim.otr_module.otrl_context_find( 177 gajim. otr_userstates[self.account],177 gajim.connections[self.account].otr_userstates, 178 178 self.contact.get_full_jid().encode(), 179 179 gajim.get_jid_from_account(self.account).encode(), … … 194 194 self.gw("our_fp_label").set_markup(our_fp_text% 195 195 gajim.otr_module.otrl_privkey_fingerprint( 196 gajim. otr_userstates[self.account],196 gajim.connections[self.account].otr_userstates, 197 197 gajim.get_jid_from_account(self.account).encode(), 198 198 gajim.OTR_PROTO)) -
trunk/src/roster_window.py
r9602 r9607 1777 1777 # offline/invisible 1778 1778 if status == 'offline' or status == 'invisible': 1779 ctx = gajim. otr_userstates[account].context_root1779 ctx = gajim.connections[account].otr_userstates.context_root 1780 1780 while ctx is not None: 1781 1781 if ctx.msgstate == gajim.otr_module.OTRL_MSGSTATE_ENCRYPTED: 1782 1782 disconnected = True 1783 gajim.otr_module.otrl_message_disconnect(gajim. otr_userstates[account],1783 gajim.otr_module.otrl_message_disconnect(gajim.connections[account].otr_userstates, 1784 1784 (gajim.otr_ui_ops, 1785 1785 {'account':account,'urgent':True}), ctx.accountname,
