Changeset 9617
- Timestamp:
- 05/11/08 15:20:22 (2 months ago)
- Files:
-
- trunk/src/gajim.py (modified) (1 diff)
- trunk/src/otr_windows.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/gajim.py
r9616 r9617 287 287 288 288 if not no_print: 289 ctrl = gajim.interface.msg_win_mgr.get_control( 290 gajim.get_jid_without_resource(fjid), account) 289 ctrl = self.get_control(fjid, account) 291 290 if ctrl: 292 291 ctrl.print_conversation_line(u" [OTR] %s"%msg, 'status', '', None) 293 292 id = gajim.logger.write('chat_msg_recv', fjid, message=msg, tim=tim) 293 # gajim.logger.write() only marks a message as unread (and so only 294 # returns an id) when fjid is a real contact (NOT if it's a GC private 295 # chat) 294 296 if id: 295 297 gajim.logger.set_read_messages([id]) 298 299 def get_control(self, fjid, account): 300 # first try to get the window with the full jid 301 ctrl = gajim.interface.msg_win_mgr.get_control(fjid, account) 302 if ctrl: 303 # got one, be happy 304 return ctrl 305 306 # otherwise try without the resource 307 ctrl = gajim.interface.msg_win_mgr.get_control( 308 gajim.get_jid_without_resource(fjid), account) 309 # but only use it when it is not a GC window 310 if ctrl and ctrl.TYPE_ID == message_control.TYPE_CHAT: 311 return ctrl 296 312 297 313 def policy(self, opdata=None, context=None): 298 policy = gajim.config.get_per("contacts", 299 gajim.get_jid_without_resource(context.username), "otr_flags") 314 policy = gajim.config.get_per("contacts", context.username, 315 "otr_flags") 316 if policy <= 0: 317 policy = gajim.config.get_per("contacts", 318 gajim.get_jid_without_resource(context.username), 319 "otr_flags") 300 320 if policy <= 0: 301 321 policy = gajim.config.get_per("accounts", opdata['account'], "otr_flags") trunk/src/otr_windows.py
r9607 r9617 225 225 "otr_flags") 226 226 227 if otr_flags > 0:227 if otr_flags >= 0: 228 228 self.gw("otr_default_checkbutton").set_active(0) 229 229 for w in self.gw("otr_settings_vbox").get_children():
